Comment

Comment by yodacola

I try to avoid using floats when doing business calculations. Base 2 doesn't work well with our base 10 currency.

Real world example: 1.09 - 1.09375

Double: 0.00374999999999992

Decimal: 0.00375

parent yodacola 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton