mirror of
https://git.freebsd.org/ports.git
synced 2025-05-31 02:16:27 -04:00
Steve Kargl has noticed severely inaccurate results for some functions and has reported the issue as https://github.com/JuliaMath/openlibm/issues/215 This port update applies the patch he has suggested to the up-stream and which has been tested by him to fix the issue (see the Github issue for details and test results). While here adjust indentation and remove white-space from an empty line. Submitted by: Steve Kargl (sgk at troutmask.apl.washington.edu)
33 lines
798 B
C
33 lines
798 B
C
--- src/math_private.h.orig 2018-06-18 21:22:47 UTC
|
|
+++ src/math_private.h
|
|
@@ -203,10 +203,10 @@ do { \
|
|
} while (0)
|
|
|
|
|
|
+#ifndef __FreeBSD__
|
|
//VBS
|
|
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
|
|
-
|
|
-/* VBS
|
|
+#else
|
|
#ifdef FLT_EVAL_METHOD
|
|
// Attempt to get strict C99 semantics for assignment with non-C99 compilers.
|
|
#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
|
|
@@ -215,7 +215,7 @@ do { \
|
|
#define STRICT_ASSIGN(type, lval, rval) do { \
|
|
volatile type __lval; \
|
|
\
|
|
- if (sizeof(type) >= sizeof(double)) \
|
|
+ if (sizeof(type) >= sizeof(long double)) \
|
|
(lval) = (rval); \
|
|
else { \
|
|
__lval = (rval); \
|
|
@@ -224,7 +224,7 @@ do { \
|
|
} while (0)
|
|
#endif
|
|
#endif
|
|
-*/
|
|
+#endif
|
|
|
|
/*
|
|
* Common routine to process the arguments to nan(), nanf(), and nanl().
|