Test program no longer needs a tolerance. Also add more tests.

Tests all boundary values for all three functions, for exact values. The inexact test is no longer necessary.
This commit is contained in:
Sei Lisa 2016-05-21 04:28:57 +02:00
parent 51a7e6d199
commit a067cc6b7f

View file

@ -831,8 +831,10 @@ def do_tests():
test('llCos(1000000.)', F('0x1.DF9DFAp-1'))
test('llCos(1000000000.)', F('0x1.ACFF8Cp-1'))
test('llCos(-1000000000.)', F('0x1.ACFF8Cp-1'))
#test('llCos(F("0x.FFFFFFp+63"))', F('-0x1.F4E122p-1')) # alas, doesn't match
test('abs(llCos(F("0x.FFFFFFp+63")) - F("-0x1.F4E122p-1")) < 0.003', True) # workaround
test('llCos(F("0x1.FFFFFEp+62"))', F('-0x1.F4E122p-1'))
test('llCos(F("-0x1.FFFFFEp+62"))', F('-0x1.F4E122p-1'))
test('llCos(F("0x1p63"))', F('0x1p63'))
test('llCos(F("-0x1p63"))', F('-0x1p63'))
test('llSin(NaN)', NaN)
test('llSin(Infinity)', Indet)
test('llSin(-Infinity)', Indet)
@ -842,13 +844,19 @@ def do_tests():
test('llSin(1000000000.)', F('0x1.1778CAp-1'))
test('llSin(-1000000000.)', F('-0x1.1778CAp-1'))
test('llSin(F32(1e38))', F32(1e38))
#test('llSin(F("0x.FFFFFFp+63"))', F('0x1.A8862Cp-3')) # alas, doesn't match
test('abs(llSin(F("0x.FFFFFFp+63")) - F("0x1.A8862Cp-3")) < 0.012', True) # workaround
test('llSin(F("0x1.FFFFFEp+62"))', F('0x1.A8862Cp-3'))
test('llSin(F("-0x1.FFFFFEp+62"))', F('-0x1.A8862Cp-3'))
test('llSin(F("0x1p63"))', F('0x1p63'))
test('llSin(F("-0x1p63"))', F('-0x1p63'))
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))', -22877332.)
test('llTan(F("0x1.921FB4p0"))', 13245402.)
test('llTan(F("0x1.FFFFFEp62"))', F('-0x1.B1F30Ep-3'))
test('llTan(F("-0x1.FFFFFEp62"))', F('0x1.B1F30Ep-3'))
test('llTan(F("0x1p63"))', F('0x1p63'))
test('llTan(F("-0x1p63"))', F('-0x1p63'))
test('llAsin(2.0)', NaN)
test('llAcos(2.0)', NaN)
test('llAtan2(0.0, 0.0)', 0.0)