From: pito <pi...@vo...> - 2010-08-29 16:32:54
|
Leon, simple testing of the floats f*, f/. Some cases results are in error. It seems division is sensitive. Not sure about the result's sign, however the result shall be 31415 in all cases. ------------------- \ test1 float small and large numbers \ needs float constant _pi marker _testfloat_ : test1 10000 s>f fdup fdup fdup fdup fdup f* f* f* f* f* _pi fswap f/ 10000 s>f fdup fdup fdup fdup fdup fdup f* f* f* f* f* f* f* f>s . ( the result shall be 31415 ) ; : test2 _pi 10000 s>f f/ 10000 s>f f/ 10000 s>f fdup fdup f* f* f* f>s . ( the result shall be 31415 ) ; : test3 _pi 10000 s>f f/ 10000 s>f f/ 10000 s>f f/ 10000 s>f fdup fdup fdup f* f* f* f* f>s . ( the result shall be 31415 ) ; : test4 -10000 s>f fdup fdup fdup fdup fdup f* f* f* f* f* _pi fswap f/ 10000 s>f fdup fdup fdup fdup fdup fdup f* f* f* f* f* f* f* f>s . ( the result shall be 31415 ) ; : test5 _pi -10000 s>f f/ 10000 s>f f/ -10000 s>f fdup fdup f* f* f* f>s . ( the result shall be 31415 ) ; : test6 _pi -10000 s>f f/ 10000 s>f f/ 10000 s>f f/ -10000 s>f fdup fdup fdup f* f* f* f* f>s . ( the result shall be -31415 ) ; ------------ Pito |