summaryrefslogtreecommitdiffstats
path: root/mathfuncs_sin.h
Commit message (Collapse)AuthorAgeFilesLines
* Reduce accuracy of sin when no FP_CONTRACT is requiredErik Schnetter2013-06-201-0/+19
|
* Add rint(), correct round()Erik Schnetter2013-02-191-1/+1
|
* Replace all assert() by VML_ASSERT()Erik Schnetter2013-02-151-1/+0
|
* Update sin() coefficientsErik Schnetter2013-02-141-18/+16
|
* Fold Chebyshev versions of sin and cos back into the main versionsErik Schnetter2013-02-141-195/+38
|
* Added optimized versions of sin and cos.Jesse W. Towner2013-02-111-5/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new functions have been added to the mathfuncs template class, and are named vml_sin_chebyshev_single, vml_sin_chebyshev_double, vml_cos_chebyshev_single, and vml_cos_chebyshev_double. The corresponding sin and cos member functions in the vector template structs have been updated to call into the new implementations. These functions use float optimized minimaxed Chebyshev polynomial approximations. They have good relative error distributions for IEEE-754 floating point numbers, as the highest contributing coefficient is selected to precisely map to either a 32-bit or 64-bit IEEE number for the _single and _double function variants respectively. The _single variants produce approximately ~30-bits of precision in the mantissa, and the _double variants produce around ~60-bits, which is more than enough to produce accurate values. The vml_tan function hasn't been updated, so it calls both sin and cos as it used to, and thus relies on the compiler to factor out common code. It's possible to implement a sincos function using these polynomials that interleaves the fmas, and since the fma instructions in both the sin and cos paths don't have any dependencies on one another, one of the paths is computed for essentially free on x86-64 platforms due to instruction parallelism. Alternatiely, tan can be implemented in terms of a specifically optimized Chebyshev rational function with good performance and properties.
* Remove comments for implementing real-valued countersErik Schnetter2013-01-301-3/+0
|
* Avoid compiler warningErik Schnetter2013-01-301-1/+1
|
* Allow round-off in sin()Erik Schnetter2013-01-281-3/+8
|
* Implement sin, make optimised builds workErik Schnetter2012-12-011-0/+96
OpenPOWER on IntegriCloud