Re: OpenEuphoria on the raspberry pi

new topic     » goto parent     » topic index » view thread      » older message » newer message
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)); 
} 

http://openeuphoria.org/pastey/199.wc

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu