aboutsummaryrefslogtreecommitdiff
path: root/math/math_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'math/math_private.h')
-rw-r--r--math/math_private.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/math/math_private.h b/math/math_private.h
index c5fbf15..a1ce014 100644
--- a/math/math_private.h
+++ b/math/math_private.h
@@ -358,4 +358,26 @@ extern void __docos (double __x, double __dx, double __v[]);
#define math_force_eval(x) __asm __volatile ("" : : "m" (x))
#endif
+
+/* The standards only specify one variant of the fenv.h interfaces.
+ But at least for some architectures we can be more efficient if we
+ know what operations are going to be performed. Therefore we
+ define additional interfaces. By default they refer to the normal
+ interfaces. */
+#define libc_fegetround() fegetround ()
+#define libc_fegetroundf() fegetround ()
+#define libc_fegetroundl() fegetround ()
+
+#define libc_fesetround(r) (void) fesetround (r)
+#define libc_fesetroundf(r) (void) fesetround (r)
+#define libc_fesetroundl(r) (void) fesetround (r)
+
+#define libc_feholdexcept(e) (void) feholdexcept (e)
+#define libc_feholdexceptf(e) (void) feholdexcept (e)
+#define libc_feholdexceptl(e) (void) feholdexcept (e)
+
+#define libc_fesetenv(e) (void) fesetenv (e)
+#define libc_fesetenvf(e) (void) fesetenv (e)
+#define libc_fesetenvl(e) (void) fesetenv (e)
+
#endif /* _MATH_PRIVATE_H_ */