mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1076670 - Workaround VS2013 64-bit returning +0 instead of -0 for sin(-0). r=luke
This commit is contained in:
parent
a67fc34972
commit
3ca3ee107e
@ -878,12 +878,18 @@ js::math_round(JSContext *cx, unsigned argc, Value *vp)
|
||||
double
|
||||
js::math_sin_impl(MathCache *cache, double x)
|
||||
{
|
||||
return cache->lookup(sin, x, MathCache::Sin);
|
||||
return cache->lookup(math_sin_uncached, x, MathCache::Sin);
|
||||
}
|
||||
|
||||
double
|
||||
js::math_sin_uncached(double x)
|
||||
{
|
||||
#ifdef _WIN64
|
||||
// Workaround MSVC bug where sin(-0) is +0 instead of -0 on x64 on
|
||||
// CPUs without FMA3 (pre-Haswell). See bug 1076670.
|
||||
if (IsNegativeZero(x))
|
||||
return -0.0;
|
||||
#endif
|
||||
return sin(x);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user