RegressionTests__FloatTest.st
changeset 198 1416c2f26d02
parent 197 ca25ba718565
child 199 0a895cfee047
equal deleted inserted replaced
197:ca25ba718565 198:1416c2f26d02
   292     "
   292     "
   293 !
   293 !
   294 
   294 
   295 test06_MiscMath
   295 test06_MiscMath
   296     #(
   296     #(
   297         sqrt
   297         sqrt       0.5
   298         exp
   298         exp        0.5
   299         ln
   299         ln         0.5
   300         log10
   300         log10      0.5
   301         sin
   301         sin        0.5
   302         cos
   302         cos        0.5
   303         tan
   303         tan        0.5
   304         arcSin
   304         arcSin     0.5
   305         arcCos
   305         arcCos     0.5
   306         arcTan
   306         arcTan     0.5
   307         sinh
   307 
   308         cosh
   308         sinh       0.5 
   309         tanh
   309         cosh       0.5
   310         arcSinh
   310         tanh       0.5
   311         arcCosh
   311         arcSinh    0.5
   312         arcTanh
   312         arcCosh    1.5
   313     ) do:[:op |
   313         arcTanh    0.5
   314         self assert:( 0.5 perform:op ) class == Float.
   314     ) pairWiseDo:[:op :arg |
   315         self assert:( 0.5 asShortFloat perform:op ) class == Float.
   315         self assert:( arg perform:op ) class == Float.
   316         self assert:( 0.5 asLongFloat perform:op ) class == LongFloat.
   316         self assert:( arg asShortFloat perform:op ) class == Float.
   317 
   317         self assert:( arg asLongFloat perform:op ) class == LongFloat.
   318         self assert:( (0.5 perform:op) - (0.5 asShortFloat perform:op) ) < 0.000001.
   318 
   319         self assert:( (0.5 perform:op) - (0.5 asLongFloat perform:op) ) < 0.000001.
   319         self assert:( (arg perform:op) - (arg asShortFloat perform:op) ) < 0.000001.
   320         self assert:( (0.5 perform:op) - (0.5 perform:op) asShortFloat ) < 0.000001.
   320         self assert:( (arg perform:op) - (arg asLongFloat perform:op) ) < 0.000001.
   321         self assert:( (0.5 perform:op) - (0.5 perform:op) asLongFloat ) < 0.000001.
   321         self assert:( (arg perform:op) - (arg perform:op) asShortFloat ) < 0.000001.
   322     ]
   322         self assert:( (arg perform:op) - (arg perform:op) asLongFloat ) < 0.000001.
       
   323     ].
   323 
   324 
   324     "
   325     "
   325      self basicNew test06_MiscMath
   326      self basicNew test06_MiscMath
   326     "
   327     "
   327 !
   328 !