ActionsLike0
Bug #20873
closed`printf("%f")` returns wrong result for `Rational` with `FIXNUM_MIN`
Description
Since the beginning, ruby 2.3.
require 'rbconfig/sizeof'
fmin, fmax = RbConfig::LIMITS.values_at("FIXNUM_MIN", "FIXNUM_MAX")
sprintf("%f", Rational(fmin, fmax)) #=> --1.000000
Added by nobu (Nobuyoshi Nakada) 5 months ago
Added by nagachika (Tomoyuki Chikanaga) 5 months ago
merge revision(s) d71be7274bd2623bb521be72c245c08fc38d6ae4: [Backport #20873]
[Bug #20873] Consider `-FIXNUM_MIN` overflow
`-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using
two's complement representation.
Added by k0kubun (Takashi Kokubun) 3 months ago
merge revision(s) d71be7274bd2623bb521be72c245c08fc38d6ae4: [Backport #20873]
[Bug #20873] Consider `-FIXNUM_MIN` overflow
`-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using
two's complement representation.
ActionsLike0
[Bug #20873] Consider
-FIXNUM_MIN
overflow-FIXNUM_MIN
is usually greater thanFIXNUM_MAX
on platforms usingtwo's complement representation.