Code Monkey home page Code Monkey logo

twofloat's Introduction

twofloat

Build Status 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.

Known issues

This library depends on the std implementations of the floating point mathematical functions, which in turn depend on the C standard library implementation, which may have variations between platforms.

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.

twofloat's People

Contributors

ajtribick avatar joseluis avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.