Rust Lexical Versions Save

Fast numeric to- and from-string conversion routines.

v0.8.6

1 year ago

Changed

  • Fixed partial integer parser to correct return negative values.

v0.8.5

2 years ago

Changed

  • Fixed numeric overflow bug causing panic (should explicitly wrap) in dragonbox algorithm's umul192_lower128.
  • Fixed new warnings in nightly clippy and fmt lints.
  • Fixed comprehensive test suites due to new clap versions.
  • Disabled powerpc64le checks due to bugs in workflow.

v0.8.4

2 years ago

Updated the algorithms used in float writing to use the latest improvements to dragonbox. The resulting code is more compact, and should compile faster due to not requiring static table generation during compilation.

v0.8.3

2 years ago

Numerous bug fixes and minor feature additions.

  • Added support for -Zmiri-tag-raw-pointers in miri correctness checks.
  • Added the documented functions format_error and format_is_valid to determine if a format packed struct is valid, since the previous checks relied on undocumented behavior.
  • Added from_radix to ParseFloatOptions and WriteFloatOptions, to simplify creating the default options with a different radix.
  • Fixed no_std in lexical-parse-float when default features are disabled.
  • Fixed issue in parsing integers and floats with the power-of-two feature enabled for radixes 16 and 32.

v0.8.2

2 years ago

Reproduced all dependent licenses in lexical, and document extensively what features are dependent on what licensing terms.

v0.8.1

2 years ago
  • Fix for #66

Existing code using digit separators such as "4_2.0" in the integral component would fail, due the counting of non-digit separators in number parsing not incrementing when calling step_by_unchecked. This led to erroneous Error::EmptyInteger results.

v0.8.0

2 years ago

This was a large release that Involved a near complete re-write of lexical for faster algorithms, a simpler internal design, and faster digit parsing implementations.

Options API

  • Added the Options API, a way to customize numeric conversions at runtime. The Options API is described in depth here, and contains the following structs:
    • ParseFloatOptions
    • ParseIntegerOptions
    • WriteFloatOptions
    • WriteIntegerOptions

Format API

  • Change NumberFormat to be a packed u128 struct to allow more extensive configuration and use const generics.
  • Changed NumberFormat to be an internal implementation detail, and NumberFormatBuilder to be the public API for creating custom formats at compile time.

Simplified the public API

  • Added parse_with_options, parse_partial_with_options.

  • Added write_with_options, write_unchecked, and write_with_options_unchecked.

  • Remove the write_format, write_radix, and similar functions.

  • Remove the parse_format, parse_radix, and similar functions.

  • Added a faster float writer and parser for power of 2 radixes.

  • Added the required_exponent_notation flag to NumberFormat.

  • Added the power-of-two feature, for conversion to and from strings with power-of-two bases.

  • Added the compact feature, optimized for binary size rather than performance.

  • Added extensive documentation on benchmarks, algorithms used, and internal implementation details.

Removal Features

  • Removed the dtoa feature. This allows only 1 compact backend and 1 performance backend, for fully additive features. The new Dragonbox algorithm is faster than any existing algorithms.
  • Removed the rounding feature. This was never used in practice.
  • Removed the lexical-capi. Existing, high-performance C/C++ libraries exist, so it's no longer practical.

Algorithm Improvements

  • Made the Eisel-Lemire algorithm the default float-parser, leading to substantial improvements in performance.
  • Made Dragonbox the default float writer.
  • Removed pre-computed float tables of powers-of-two, and recreated stable powers of 2 through bit manipulations.
  • Improved the algorithms to write and parse 128-bit integers, using faster division and multiplication algorithms.
  • Simplified the big-integer arithmetic, improving performance and simplifying maintenance for float parsing algorithms.

Other Changes

  • Updated the MSRV to 1.51.0.
  • Updated the benchmarks to note the significant algorithm changes.
  • Added automatic formatting via Rustfmt, linting via Clippy, as well as increased documentation of safety guarantees.
  • Added support for base prefixes and suffixes.
  • Reduced static storage required for extended-float algorithms.
  • Updated the fuzz handlers and conformance tests.
  • Refactored all numeric conversions into separate crates, using workspaces.

Bug Fixes

  • Fixed a bug with trailing digit separators in special values.

v0.7.6

3 years ago
  • Updated cfg_if version.
  • Downgraded rand to fix proptests.
  • Fixed a bug on newer Rustc versions where slice::sort is not present in no_std.
  • Added a feature libm which enables stable no_std use.
  • Patched an implementation of insert_many due to a security advisory which does not affect lexical.

v0.6.8

3 years ago
  • Patched an implementation of insert_many due to a security advisory which does not affect lexical.
  • Fixed build script for cross-compiling.
  • Updated cfg_if version.

v0.4.8

3 years ago
  • Updated cfg_if dependency.
  • Dropped support for Rustc versions older than 1.31.0.
  • Patched an implementation of insert_many due to a security advisory which does not affect lexical.
  • Fixed build script for cross-compiling.