Revert "Update to FreeBSD libm r336523."
This reverts commit f86ee10278116d211cfb08679416444e0e714cb5.
Incorrect result for fmodf(3.0f, 0f) = 1.0f breaks ART tests.
Bug: 111710419
Test: art/test/testrunner/testrunner.py -b -t 436-rem-float --target
Change-Id: I7eae68fb92740db33415d16418447bcbbd98ecba
diff --git a/libm/upstream-freebsd/lib/msun/src/e_remainderf.c b/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
index 89cd932..b0014ae 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/lib/msun/src/e_remainderf.c 336362 2018-07-17 07:42:14Z bde $");
+__FBSDID("$FreeBSD$");
#include "math.h"
#include "math_private.h"
@@ -36,10 +36,10 @@
hx &= 0x7fffffff;
/* purge off exception values */
- if((hp==0)|| /* p = 0 */
- (hx>=0x7f800000)|| /* x not finite */
+ if(hp==0) return (x*p)/(x*p); /* p = 0 */
+ if((hx>=0x7f800000)|| /* x not finite */
((hp>0x7f800000))) /* p is NaN */
- return nan_mix(x, p)/nan_mix(x, p);
+ return ((long double)x*p)/((long double)x*p);
if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */