Fix precision error in llTan special values.
This commit is contained in:
@@ -1606,9 +1606,9 @@ def llTan(f):
|
||||
if -9223372036854775808.0 <= f < 9223372036854775808.0:
|
||||
# We only consider the first turn for anomalous results.
|
||||
if abs(f) == 1.570796251296997:
|
||||
return math.copysign(13245400.0, f);
|
||||
return math.copysign(13245402.0, f);
|
||||
if abs(f) == 1.5707963705062866:
|
||||
return -math.copysign(22877330.0, f);
|
||||
return -math.copysign(22877332.0, f);
|
||||
return F32(math.tan(f))
|
||||
return f
|
||||
|
||||
|
||||
@@ -847,8 +847,8 @@ def do_tests():
|
||||
test('llTan(F32(1e38))', F32(1e38))
|
||||
test('llTan(F32(4e38))', Indet)
|
||||
test('llTan(F32(math.pi))', F('0x1.777A5Cp-24'))
|
||||
test('llTan(F32(math.pi*.5))', -22877330.)
|
||||
test('llTan(F("0x1.921FB4p0"))', 13245400.)
|
||||
test('llTan(F32(math.pi*.5))', -22877332.)
|
||||
test('llTan(F("0x1.921FB4p0"))', 13245402.)
|
||||
test('llAsin(2.0)', NaN)
|
||||
test('llAcos(2.0)', NaN)
|
||||
test('llAtan2(0.0, 0.0)', 0.0)
|
||||
|
||||
Reference in New Issue
Block a user