Live data from Hacker News

0.30000000000000004

0.30000000000000004.com

1–10 of 140 posts

Re: 0.30000000000000004

#9
post #4

Previous discussions: https://news.ycombinator.com/item?id=10558871 (1.5 years ago, 240 comments) https://news.ycombinator.com/item?id=1846926 (6.5 years ago, 128 comments)

Someone should figure out the mean length of time between article repeats on HN. And then find some correlation with university degrees and job tenure.

Re: 0.30000000000000004

#10

Why does PHP produce 0.3 instead? edit: Not sure how I missed that. Thanks!

PHP converts 0.30000000000000004 to a string and shortens it to "0.3". To achieve the desired floating point result, adjust the precision ini setting: ini_set("precision", 17).
Post reply on HN