Comments (7)
Could you explain in what situation argument reduction for such huge arguments is needed?
I think you are the 4th person who asked me to implement that feature, but no one has explained that point.
from sleef.
See i.e. Derek O'Conners quote on the Python bug tracker https://bugs.python.org/issue8309
I quote from Ng's paper :
http://www.derekroconnor.net/Software/Ng--ArgReduction.pdf
It is often argued that being concerned about large arguments is unnecessary, because sophisticated users simply know better than to compute with large angles. It is our contention that this position is suboptimal, because:
- It places an unnecessary burden on the user.
- The consequences of producing incorrect (inaccurate)answers may be catastrophic; many people assume that computers can do arithmetic very well. While numerical analysts know better, not all programmers are numerical analysts, nor should they be.
- It is a vendors responsibility to provide answers that are as correct as possible.
Derek O'Connor
I think the non-vectorized trig functions should be as exact as possible even for huge arguments mainly because of the 2nd argument.
EDIT
The bug mentions above has nothing to do with sleef. However, it can be assumed that most developers assume at least valid calculations from mid term sized arguments as supported from the INTEL hardware (FPU).
For the vectorized variants it is more easy to find arguments for a reduzed range of valid arguments.
I stumbled about this issue, because the range for floats RANGEMAXS
is really small according to your specifications
from sleef.
If the argument is very large, obviously ULP of that argument becomes large.
So, the result of computation of trig functions become inaccurate anyway.
The assumption that computers always do arithmetic very well is just wrong.
This burden exists since when the user decides to use FP numbers of limited precision.
from sleef.
At least the reduced range for trig functions should also be mentioned in the README.
BTW: An accuracy problem for trigs was found in the FPU hardware, see Intel overstates FPU accuracy even for small sized arguments near PI. Numerical deviations in such cases can be avoided with using sleef AFAIK. This could be mentioned as well.
from sleef.
Please see doc/SPECIFICATION.
SLEEF is accurate for small sized arguments near (n PI).
from sleef.
Thanks
from sleef.
You're welcome.
Please don't hesitate to ask me if you have other questions.
from sleef.
Related Issues (20)
- Segfault when building with Apple Clang 15 HOT 12
- Unable to disable optional dependencies HOT 5
- Testvecabi fails to build on some x86 arch with `-march=native`
- unknown type name ‘__float128’ on loongarch64
- Tests fail to build with inline headers on for armhf
- Restart/Fix CI tests HOT 4
- Failures on various archs for gcc 12 HOT 2
- Failures for s390x VXE2 with qemu HOT 2
- Some tests fail on AArch64 with LLVM 17 HOT 1
- Deprecated usage of MD5 API
- Fix RVV inline header generation HOT 1
- Test more OS-es in Github Actions
- Add GNU make as potential generator in CI
- Please, create tag release HOT 3
- dft test gets stuck during initialisation when hardware vector length is very long HOT 2
- Failure on ppc64 when cross compiled with gcc-11 toolchain
- Inaccuracy for f32 erf on non-FMA instruction set
- New test failures in 3.6 HOT 7
- F64 exp returns infinity slightly too soon
- RISC-V architecture missing on https://sleef.org/ HOT 1
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 sleef.