Re: OpenEuphoria on the raspberry pi
- Posted by Jerome Feb 18, 2013
- 2311 views
rkdavis said...
object Dand_bits(d_ptr a, d_ptr b) /* double a AND b */ { double maxplus1 = ((double)UINTPTR_MAX) + 1; return and_bits( (uintptr_t)fmod(a->dbl,maxplus1), (uintptr_t)fmod(b->dbl,maxplus1)); }
Ahh, very interesting! The solution provided works well, and I also have 5 failed tests with t_math.e which probably have similar issues:
Failed: or_all (0.000000) expected 0 got 3735928549 Failed: shift_bits left #6 (0.010000) expected 4294967240 got 0 Failed: shift_bits right #6 (0.000000) expected 536870911 got 0 Failed: shift_bits seq (0.000000) expected {0,0,1,7695,207,268433297} got {0,0,1,7695,207,0} Failed: rotate bits #B (0.000000) expected {805306368,1342177280,268435457,805314063,2415919311,2684352401} got {805306368,1342177280,268435457,805314063,2415919311,0}
Thanks,
Ira