[PPL-devel] [GIT] ppl/ppl(ppl-0_10-branch): Do not use fma(), fmaf() and fmal() on FreeBSD.

Roberto Bagnara roberto at freebsd.homenet.telecomitalia.it
Fri Apr 10 22:41:09 CEST 2009


Module: ppl/ppl
Branch: ppl-0_10-branch
Commit: b6a0450ea6bdef2e4aaac3184f0ff42045eb5781
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=b6a0450ea6bdef2e4aaac3184f0ff42045eb5781

Author: Roberto Bagnara <roberto at freebsd.homenet.telecomitalia.it>
Date:   Fri Apr 10 21:31:37 2009 +0200

Do not use fma(), fmaf() and fmal() on FreeBSD.
fma() does not respect rounding, fmaf() and fmal() may have the same problem.

---

 src/checked_float.inlines.hh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 16f891f..828ef0e 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -34,7 +34,7 @@ namespace Checked {
 
 inline float
 fma(float x, float y, float z) {
-#if PPL_HAVE_DECL_FMAF && !defined(__alpha)
+#if PPL_HAVE_DECL_FMAF && !defined(__alpha) && !defined(__FreeBSD__)
   return ::fmaf(x, y, z);
 #else
   return x*y + z;
@@ -43,7 +43,7 @@ fma(float x, float y, float z) {
 
 inline double
 fma(double x, double y, double z) {
-#if PPL_HAVE_DECL_FMA && !defined(__alpha)
+#if PPL_HAVE_DECL_FMA && !defined(__alpha) && !defined(__FreeBSD__)
   return ::fma(x, y, z);
 #else
   return x*y + z;
@@ -52,7 +52,7 @@ fma(double x, double y, double z) {
 
 inline long double
 fma(long double x, long double y, long double z) {
-#if PPL_HAVE_DECL_FMAL && !defined(__alpha)
+#if PPL_HAVE_DECL_FMAL && !defined(__alpha) && !defined(__FreeBSD__)
   return ::fmal(x, y, z);
 #else
   return x*y + z;




More information about the PPL-devel mailing list