Comment

Comment by samueldr

I can't find a proper citation, but rounding is undefined.

The recommended guideline[0] is to round to the nearest 5¢.

This article from 2013 is my closest citation to "undefined behaviour"[1]

> These guidelines are only a suggestion though and there is currently no law that specifies how retailers must round.

I don't know since ~2013 if anything has been decided to make those guidelines "law". I couldn't find anything quickly in the SEO cesspool that is modern web search.

[0] https://www.canada.ca/en/revenue-agency/programs/about-canad... [1] https://cba.ca/phasing-out-the-penny-in-canada

parent samueldr 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton