GitXplorerGitXplorer
a

twofloat

public
17 stars
8 forks
8 issues

Commits

List of commits on branch main.
Verified
23d4b675f58a67d1876e670f9b86aa8c4b798f26

allow to use iterator to sum directly into TwoFloat (#44)

aapelloni committed 10 days ago
Unverified
a0d55606ae0bde56b7c3db27dc22cb72c5c95a74

Prepare 0.8.3 release

aajtribick committed 11 days ago
Unverified
1f174629710abcf2ad44d78d2737d7bddcf4f9a8

Fix no_std build

aajtribick committed 11 days ago
Unverified
25fcf8b0ac0ce10cba6a3e12608877af8f79e3bc

Add x86_64-apple-darwin, check no_std builds

aajtribick committed 11 days ago
Unverified
1b4a7788fb7491e2ec44895ea49c74c7eec58ee3

Prepare 0.8.2 release

aajtribick committed 17 days ago
Unverified
75558637f71e05776dab6f63200ac54ccb4d45c5

Fix powf when checking when negative

aapelloni committed a month ago

README

The README file for this repository.

twofloat

Crate

A double-double arithmetic library for Rust.

This library provides an implementation of double-double arithmetic for the Rust language. Note that this is not the same as the IEEE quadruple-precision floating-point format. Instead, higher precision is obtained by representing the value as the sum of two non-overlapping f64 values.

Operator traits are implemented both for reference and value types where appropriate. The code indicates the source of the algorithms used.

Mathematical constants are available in the twofloat::consts module, which provides the same set of constants as std::f64::consts.

Please note that the implementation of the mathematical functions (exp, powf, etc.) is very preliminary. In particular, they are calculated using operations at the same precision as the result, so they will not return values which are correct to the full precision of the TwoFloat type. This may be addressed in future releases.

Optional features

  • math_funcs - include mathematical functions (enabled by default)
  • serde - enable serialization/deserialization with Serde.
  • std - use std mathematical functions instead of libm.

Known issues

  • The MinGW fma implementation appears to give incorrect results in some cases, so the libm implementation is always used on this platform.

References

  • Mioara Joldeș, Jean-Michel Muller, Valentina Popescu. Tight and rigourous error bounds for basic building blocks of double-word arithmetic. ACM Transactions on Mathematical Software, Association for Computing Machinery, 2017, 44 (2), pp. 1-27. 10.1145/3121432. hal-01351529v3

  • Alan H. Karp, Peter Markstein. High Precision Division and Square Root. ACM Transactions on Mathematical Software, Association for Computing Machinery, 1997, 23 (4), pp. 561-589. 10.1145/279232.279237.

  • S. Chevillard, M. Joldeș and C. Lauter. Sollya: an environment for the development of numerical codes. Mathematical Software - ICMS 2010, pp. 28–31.