Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
TchoBeer
on July 2, 2021
|
parent
|
context
|
favorite
| on:
Copilot regurgitating Quake code, including sweary...
What if I'm calculating sales tax? Can't use an integer anymore.
kyllo
on July 2, 2021
[–]
Yes, you can. There are algorithms for rounding up, rounding down, rounding to nearest, and banker's rounding, on the results of integer division. This is a solved problem.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: