javacodegeeks.com /2 weeks ago

Money in Java: Why double Ruins Ledgers, and BigDecimal Against Minor Units

Every developer meets the same surprise sooner or later: 0.1 + 0.2 does not equal 0.3. In a toy program, that is a curiosity. In a ledger, it becomes a reconciliation report that n...

Read source
habr.com /4 weeks ago

Почему BigDecimal считает 1.0 и 1.00 разными числами — и к чему это приводит в Java

Цена в базе осталась прежней, но приложение считает, что она изменилась, и повторно отправляет событие. Причина может скрываться в масштабе BigDecimal: equals() сравнивает не тольк...

Read source

Turn fresh research into a full content calendar

Use SocialBu to discover ideas, generate post drafts, and schedule them across your social channels.