This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/5781] Slow sine function for special values on AMD64 - second attempt
- From: "grugh at centrum dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Feb 2008 09:00:56 -0000
- Subject: [Bug math/5781] Slow sine function for special values on AMD64 - second attempt
- References: <20080221091038.5781.grugh@centrum.cz>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From grugh at centrum dot cz 2008-02-22 09:00 -------
Is there any compile flag or #define, which can disable the <=0.5 ulp precision
and the math sin function will use only the fast built-in fp intructions?
For our real-time software it is necessary to be "quick", the ultra precision
has low priority.
Now we are using a workaround: I can put the original argument to long double
variable and call sinl function with long double result. Both, the new argument
and the result, have to be volatile to disable the compiler optimization of it
(probably uses the "fast" sin instead).
Results of sin(0.93340582292648832662962377071381)
----------------------------------------------------
distr function value result_type printf_format
--------------------------------------------------------------------
32 sin 0.80365140438773496889268699305831 double "%.32g"
32 sinl 0.80365140438773496889268699305831 double "%.32g"
32 sinl 0.80365140438773491338153576180048 long double "%.32Lg
64 sin 0.80365140438773485787038453054265 double "%.32g"
(~ -5.5511151231257827021181583404541e-17 difference from 80bit value)
64 sinl 0.80365140438773496889268699305831 double "%.32g"
(~ +5.5511151231257827021181583404541e-17 difference from 80bit value )
64 sinl 0.80365140438773491338153576180048 long double "%.32Lg"
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5781
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.