This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/5781] Slow sine function for special values on AMD64 - second attempt


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]