GithubHelp home page GithubHelp logo

Comments (2)

stephentyrone avatar stephentyrone commented on May 29, 2024 3

Yes, the system math library functions do not generally produce identical results on different platforms. It's a possible long-term goal for Swift Numerics to provide portable implementations, but it's very long-term¹. If you need exactly reproducible math library results in the short-term, you will need to link against a math library that you control for that specific purpose (one option is to use crlibm, which is an open-source correctly rounded math library; because it's correctly-rounded, it is necessarily portable, but it is significantly slower--occasionally orders of magnitude slower--than a "normal" system math library).

  1. I've written a system math library three times (Darwin's for x86_64, arm, and arm64; I did not attempt to deliver identical results across these platforms, because our goal is to deliver the best library we can for each platform). A truly portable math library requires one of:
    a. significant compromises to performance
    b. significant compromises to accuracy
    c. a baseline of Haswell for x86 (to ensure availability of hardware FMA), plus modest compromises of performance.
    You also need to decide how to handle fixing bugs; fixing bugs is good, but it will perturb results, which is contrary to the goal of bitwise-exact reproducibility. There needs to be a policy in place to handle this scenario, and you need to design an API to support it.

from swift-numerics.

SusanDoggie avatar SusanDoggie commented on May 29, 2024

Is there example reproduce the problem?

from swift-numerics.

Related Issues (20)

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.