Comment

Comment by John23832

>To store dollars with a precision of 1 cent, you store into your integers cents instead of dollars. No need to mess with anything more complicated.

As someone who does it, financial math is often done at a precision of more than 1 cent. This is the reason that most (high-latency) financial libraries use strings underneath.

This al doesn't address the high order floating point arithmetic of geo-spacial, which was the Patriot issue.

parent John23832 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton