← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Rust 1.98.0 Released with Algebraic Floating-Point Methods and Buffered Integer Formatting

🔄 Updated 1h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Rust 1.98.0 is now available.
  • New algebraic floating-point methods allow compiler optimizations.
  • Buffered integer formatting via `format_into` improves performance.
  • Floating-point methods are non-deterministic but do not cause undefined behavior.

Rust 1.98.0 Release

The Rust team announced the release of Rust 1.98.0. This version introduces several new features and improvements for the programming language, which focuses on building reliable and efficient software. Users can update their existing Rust installations via `rustup update stable`.

Algebraic Floating-Point Methods

Floating-point types `f32` and `f64` now include "algebraic" methods for addition, subtraction, multiplication, division, and remainder. These methods enable the compiler to apply optimizations based on the algebraic properties of real numbers, even though floating-point representations have limitations. This can lead to reordering of operations, potentially allowing for broader loop-vectorization.

These algebraic methods are non-deterministic, meaning the compiler can choose different optimization strategies, but they are guaranteed not to cause undefined behavior. This feature is similar to the `-ffast-math` option found in other languages.

Buffered Integer Formatting

All primitive integer types now have a `format_into` method. This method takes a `&mut NumBuffer<Self>` parameter, which is a buffer sized to hold the decimal format of any value of that type. The method returns a formatted `&str` with a lifetime borrowed from the buffer.

The `format_into` method bypasses much of the dynamic dispatch typically involved with buffered `write!` formatting, resulting in performance gains. Benchmarks indicate that `format_into` performs similarly to the `itoa` crate, positioning it as a potential standard replacement for that dependency.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~17 min · 15 stories · Aug 20

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

The Rust team released version 1.98.0, introducing new "algebraic" methods for floating-point operations and a `format_into` method for buffered integer formatting. These updates provide developers with more control over floating-point optimizations and offer performance improvements for integer formatting.