1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2022-06-26 14:50:14 +02:00
parent f616e81637
commit d3d5ef0cca
74 changed files with 1201 additions and 324 deletions

View file

@ -45,6 +45,12 @@ describe "Math.ldexp" do
it "accepts any second argument that can be coerced with Integer()" do
Math.ldexp(3.23, MathSpecs::Integer.new).should be_close(12.92, TOLERANCE)
end
it "returns correct value that closes to the max value of double type" do
Math.ldexp(0.5122058490966879, 1024).should == 9.207889385574391e+307
Math.ldexp(0.9999999999999999, 1024).should == 1.7976931348623157e+308
Math.ldexp(0.99999999999999999, 1024).should == Float::INFINITY
end
end
describe "Math#ldexp" do