5 ms·
this is pretty cool, > sqrt(2) 1.41421 > sqrt(2)-1.41421 0.00000356237 > 1.00000356237 + 0.0000001 1 What are the rules you apply wh
by vmarsy 10y ago
this is pretty cool,
> sqrt(2)
1.41421
> sqrt(2)-1.41421
0.00000356237
> 1.00000356237 + 0.0000001
1
What are the rules you apply when truncating results? number of digits displayed?
> 3e6 + 0.1
3000000
> 3e7 + 1
30000001
> 3e7 + 1.1
30000000
> 3e7 + 42.9
30000000
There might be a bug, 42.9 < 1 ?
- sharkdp 10y agoThank you for the feedback! This is not really a bug, but I agree that it looks quite weird right now. Explanation in this comment: https://news.ycombinator.com/item?id=13918393 https://news.ycombinator.com/item?id=13918393