Comments (2)
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).
- 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.
Is there example reproduce the problem?
from swift-numerics.
Related Issues (20)
- Implicit assumptions that Complex.RealType : BinaryFloatingPoint HOT 1
- test issue
- ComplexTests.DifferentiableTests/testZeroTangentVectorInitializer no longer compiles with Swift trunk HOT 3
- Meaning of pre‐semantic versioning? HOT 7
- Missing required module HOT 7
- Add a script to generate the CMakeLists files? HOT 1
- Feature request for "relaxed" floating-point semantics HOT 2
- Floating point exponent `pow` returns NaN for integer exponents HOT 2
- Possible improvement in 'pow' Elementary Function when operands are zero HOT 5
- Should complex multiplication use augmented arithmetic? HOT 1
- Warnings in `Double.testIntegerExponent()` HOT 1
- [BigInt] Using tests from “Violet - Python VM written in Swift” HOT 5
- Duplicate symbols on Windows
- "^=" xor function code was incorrect. HOT 1
- Improve String init() execution time and fix Violet bugs
- Change default branch from `Quaternions` to `main`
- `** ARCHIVE FAILED **` due to `_NumericsShims` missing HOT 4
- Crash in `DoubleWidth` HOT 4
- Variadic GCD and LCM
- Feature request: GCD for floating-point HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-numerics.