8015396: double a%b returns NaN for some (a,b) (|a| < inf, |b|>0)

Reviewed-by: coleenp, gtriantafill
This commit is contained in:
Christian Tornqvist 2015-12-10 09:42:22 -08:00
parent b7131d3b66
commit a39fa54251
4 changed files with 174 additions and 3 deletions

View file

@ -254,8 +254,10 @@ JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
((ybits.i & float_sign_mask) == float_infinity) ) {
return x;
}
#endif
return ((jfloat)fmod_winx64((double)x, (double)y));
#else
return ((jfloat)fmod((double)x,(double)y));
#endif
JRT_END
@ -269,8 +271,10 @@ JRT_LEAF(jdouble, SharedRuntime::drem(jdouble x, jdouble y))
((ybits.l & double_sign_mask) == double_infinity) ) {
return x;
}
#endif
return ((jdouble)fmod_winx64((double)x, (double)y));
#else
return ((jdouble)fmod((double)x,(double)y));
#endif
JRT_END
#ifdef __SOFTFP__