<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q" -->

---
title: Rust 1.98 Adds Algebraic Floating-Point Methods Akin To...
description: Rust 1.98 introduces new algebraic floating-point methods for f32 and f64 covering addition, subtraction, multiplication, division, and remainder. These...
canonical: https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Rust 1.98 Adds Algebraic Floating-Point Methods Akin To &quot;-ffast-math&quot; | daily.dev
og:description: Rust 1.98 introduces new algebraic floating-point methods for f32 and f64 covering addition, subtraction, multiplication, division, and remainder. These...
og:url: https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q
og:image: https://api.daily.dev/og/posts/0l11re56q.png
og:image:alt: Rust 1.98 Adds Algebraic Floating-Point Methods Akin To &quot;-ffast-math&quot;
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rust 1.98 Adds Algebraic Floating-Point Methods Akin To "-ffast-math"

**[Phoronix](https://daily.dev/sources/phoronix)** · 2 min read · 0 upvotes · 0 comments

## Summary

Rust 1.98 introduces new algebraic floating-point methods for f32 and f64 covering addition, subtraction, multiplication, division, and remainder. These methods let the compiler apply optimizations based on the algebraic properties of real numbers, similar to the -ffast-math flag used in other compilers, enabling reordering of operations and broader loop vectorization at the cost of deterministic results. The change stems from a 2025 issue reporting that Rust dot products could be up to 8x slower than C++ on modern x86_64 CPUs due to lack of float reordering for vectorization. The release also adds buffered integer formatting and other changes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.phoronix.com/news/Rust-1.98-Released>

## Questions this post answers

### What do the new algebraic floating-point methods in Rust 1.98 do?

Rust 1.98 adds algebraic methods for addition, subtraction, multiplication, division, and remainder on f32 and f64, allowing the compiler to apply optimizations based on the algebraic properties of real numbers even though those properties don't strictly hold for floating-point representation. This is similar to the -ffast-math flag in other compilers, enabling reordering like evaluating a+b+c+d as (a+b)+(c+d) and broader loop vectorization, though results become non-deterministic.

_Track new Rust performance features like this on daily.dev before optimizing numerical code._

### Why is Rust dot product computation slower than C++ on x86_64?

Rust dot products were reported to be up to 8x slower than C++ on modern x86_64 CPUs because the Rust compiler was not reordering floating-point operations to enable better vectorization, since strict IEEE 754 semantics require left-associative evaluation order. This performance gap, raised in a 2025 libs-team issue, motivated the addition of algebraic floating-point methods in Rust 1.98.

_Developers chasing SIMD performance parity with C++ can follow Rust changes like this on daily.dev._

### Are the new algebraic floating-point methods in Rust safe to use?

Yes, the algebraic methods never cause undefined behavior, but they are non-deterministic since the compiler may choose different optimizations, meaning the same inputs can produce different results even within a single program run. Unsafe code must not rely on any property of the return value for soundness, though implementations aim for a reasonable tradeoff between performance and accuracy.

_daily.dev helps Rust developers stay current on safety tradeoffs before adopting new floating-point APIs._

## Similar posts on daily.dev

- [Rust language adds algebraic floating-point methods](https://daily.dev/posts/rust-language-adds-algebraic-floating-point-methods-jimyxkos8) · InfoWorld · 1 upvotes · 0 comments
- [Faster floating point math with Rust’s new API](https://daily.dev/posts/faster-floating-point-math-with-rust-s-new-api-zyoed6fm9) · Lobsters · 0 upvotes · 0 comments
- [Rust 1.93 Brings Improvement For Inline Assembly Handling](https://daily.dev/posts/rust-1-93-brings-improvement-for-inline-assembly-handling-o9g10pe7q) · Phoronix · 0 upvotes · 0 comments
- [Operators of death: checked arithmetic in Rust — Bitfield Consulting](https://daily.dev/posts/operators-of-death-checked-arithmetic-in-rust-bitfield-consulting-ruiyndmyn) · Bitfield Consulting · 5 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#rust](https://daily.dev/tags/rust), [#compiler-optimization](https://daily.dev/tags/compiler-optimization)

[View this post on daily.dev](https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Rust 1.98 Adds Algebraic Floating-Point Methods Akin To \"-ffast-math\"","url":"https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q"},"datePublished":"2026-08-20T17:39:05.731Z","dateModified":"2026-08-21T08:00:40.795Z","description":"Rust 1.98 introduces new algebraic floating-point methods for f32 and f64 covering addition, subtraction, multiplication, division, and remainder. These...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2787e9cf9013eba8a561b0e3e0df424b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2787e9cf9013eba8a561b0e3e0df424b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Phoronix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Phoronix","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/6a26ba379dd64932830aa0c9803dd7ee","url":"https://daily.dev/sources/phoronix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,rust,compiler-optimization","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Phoronix","item":"https://daily.dev/sources/phoronix"},{"@type":"ListItem","position":3,"name":"Rust 1.98 Adds Algebraic Floating-Point Methods Akin To \"-ffast-math\""}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/rust-1-98-adds-algebraic-floating-point-methods-akin-to--ffast-math--0l11re56q#faq","mainEntity":[{"@type":"Question","name":"What do the new algebraic floating-point methods in Rust 1.98 do?","acceptedAnswer":{"@type":"Answer","text":"Rust 1.98 adds algebraic methods for addition, subtraction, multiplication, division, and remainder on f32 and f64, allowing the compiler to apply optimizations based on the algebraic properties of real numbers even though those properties don't strictly hold for floating-point representation. This is similar to the -ffast-math flag in other compilers, enabling reordering like evaluating a+b+c+d as (a+b)+(c+d) and broader loop vectorization, though results become non-deterministic. Track new Rust performance features like this on daily.dev before optimizing numerical code."}},{"@type":"Question","name":"Why is Rust dot product computation slower than C++ on x86_64?","acceptedAnswer":{"@type":"Answer","text":"Rust dot products were reported to be up to 8x slower than C++ on modern x86_64 CPUs because the Rust compiler was not reordering floating-point operations to enable better vectorization, since strict IEEE 754 semantics require left-associative evaluation order. This performance gap, raised in a 2025 libs-team issue, motivated the addition of algebraic floating-point methods in Rust 1.98. Developers chasing SIMD performance parity with C++ can follow Rust changes like this on daily.dev."}},{"@type":"Question","name":"Are the new algebraic floating-point methods in Rust safe to use?","acceptedAnswer":{"@type":"Answer","text":"Yes, the algebraic methods never cause undefined behavior, but they are non-deterministic since the compiler may choose different optimizations, meaning the same inputs can produce different results even within a single program run. Unsafe code must not rely on any property of the return value for soundness, though implementations aim for a reasonable tradeoff between performance and accuracy. daily.dev helps Rust developers stay current on safety tradeoffs before adopting new floating-point APIs."}}]}
```

