Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
o-o-
on Sept 20, 2024
|
parent
|
context
|
favorite
| on:
Show HN: Numscript, a declarative language to mode...
So basically Math.round((x*20))/20?
Silphendio
on Sept 20, 2024
[–]
Shouldn't it be `round(x/5)*5` ?
shiandow
on Sept 20, 2024
|
parent
[–]
Depends, are you working in cents or whole euros/dollars?
falcor84
on Sept 20, 2024
|
root
|
parent
[–]
In all use-cases I encountered, working with integer cents is much cleaner than decimals
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: