Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions spec/std/float_spec.cr
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ describe "Float" do
65432.1234567891e20.to_s.should eq("6.54321234567891e+24")
(1.0/0.0).to_s.should eq("Infinity")
(-1.0/0.0).to_s.should eq("-Infinity")
(0.99999999999999989).to_s.should eq("1.0")
end

it "does to_s for f32" do
2 changes: 1 addition & 1 deletion src/float.cr
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ struct Float64
# Need to add one and carry to the left
len = max_run_start
index = len - 1
while index > 0
while index >= 0
byte = slice.to_unsafe[index]
case byte
when '.'

0 comments on commit e4dd5b4

Please sign in to comment.