A couple quick bugs in bignum-to-float division I found: - bignum/f rounds toward zero, when it should respect the floating point rounding mode, or at least round to nearest. An easy test case is to divide a bignum with more than 53 significant bits by 1:
( scratchpad ) HEX: 7f,ffff,ffff,ffff >bignum [ >float .h ] [ 1 /f .h ] bi 1.0p55 1.fffffffffffffp54 ( scratchpad ) HEX: -7f,ffff,ffff,ffff >bignum [ >float .h ] [ 1 /f .h ] bi -1.0p55 -1.fffffffffffffp54 For both of the above inputs, the first line is from >float, which correctly rounds to the nearest floating-point number, and the second is from 1 /f, which rounds toward zero. - Dividing bignum zero by zero gives 0.0, when it should give NAN: ( scratchpad ) 0 0 /f . NAN: 8000000000000 ( scratchpad ) 0 >bignum 0 /f . 0.0 -Joe ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk