This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/5781] Slow dbl-64 sin/cos/sincos for special values
- From: "grugh at centrum dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 14 Feb 2014 09:51:05 +0000
- Subject: [Bug math/5781] Slow dbl-64 sin/cos/sincos for special values
- Auto-submitted: auto-generated
- References: <bug-5781-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=5781
--- Comment #16 from Petr Cervenka <grugh at centrum dot cz> ---
Simple workaround to use fast computation is to use functions from spec. header
similar to following:
#ifndef FAST_MATH_H
#define FAST_MATH_H
#include <cmath>
inline double fast_sin(long double x) {
return sinl(x);
}
inline double fast_cos(long double x) {
return cosl(x);
}
inline double fast_tan(long double x) {
return tanl(x);
}
inline double fast_asin(long double x) {
return asinl(x);
}
inline double fast_acos(long double x) {
return acosl(x);
}
inline double fast_atan(long double x) {
return atanl(x);
}
inline double fast_atan2(long double x, long double y) {
return atan2l(x, y);
}
inline double fast_sinh(long double x) {
return sinhl(x);
}
inline double fast_cosh(long double x) {
return coshl(x);
}
inline double fast_asinh(long double x) {
return asinhl(x);
}
inline double fast_acosh(long double x) {
return acoshl(x);
}
inline double fast_pow(long double x, long double y) {
return powl(x, y);
}
inline double fast_sqrt(long double x) {
return sqrtl(x);
}
inline double fast_exp(long double x) {
return expl(x);
}
inline double fast_log(long double x) {
return logl(x);
}
inline double fast_log10(long double x) {
return log10l(x);
}
#endif /* FAST_MATH_H */
--
You are receiving this mail because:
You are on the CC list for the bug.