Hacker News new | past | comments | ask | show | jobs | submit login

Agreed. Not sure how they concluded dividing the denominator was a good idea, seems like this exact problem (minus original float bug) shows up all the time.

The solution is clearly to multiply by 1000 before performing floor division:

`t=(now-start)*1000/freq`




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: