DEV Community

Cover image for Winning at floating-point issues: a survival guide

Winning at floating-point issues: a survival guide

Leandro Proença on June 01, 2023

TL;DR For precise calculations, favor arbitrary-precision decimals or equivalents like BigDecimal over floating-point numbers. Addition...
Collapse
 
lucas_montano_8dcc57210c7 profile image
Lucas Montano

great article! so that’s why some banks store the transaction value as a integer. Where 14.67 becomes 1467

Collapse
 
souzagab profile image
Gabriel Silva

01001110 01101001 01100011 01100101 00100000 01100001 01110010 01110100 01101001 01100011 01101100 01100101 !