4 ms·
The problem is that ruby implicitly casts in a way that loses precision, exactly the opposite of what the author (may) desire. Call it whatever you want. 2
by arohner 17y ago
The problem is that ruby implicitly casts in a way that loses precision, exactly the opposite of what the author (may) desire. Call it whatever you want.
2**100
=> 1267650600228229401496703205376
> (2**100).class
=> Bignum
> (2**100)*0.5
=> 6.33825300114115e+29
> ((2**100)*0.5).class
=> Float