HeadlinesBriefing favicon HeadlinesBriefing.com

Java Library Bridges BigDecimal, IEEE-754 Formats

Hacker News •
×

The FirebirdSQL project has released decimal-java, a specialized library bridging Java's BigDecimal with IEEE-754 decimal formats. This tool solves a persistent problem for developers working with financial and scientific applications requiring precise decimal arithmetic in Java environments.

The library supports three critical IEEE-754 decimal formats: decimal32, decimal64, and decimal128, providing conversion utilities between these byte representations and BigDecimal objects. Version 2.0.0 requires Java 17 or higher, while earlier versions support Java 7+. The library maintains a stable API and follows MIT licensing.

Mark Rotteveel created this library specifically for Firebird version 4.0's implementation of the SQL DECFLOAT type. After failing to find existing solutions, he developed this standalone utility to handle conversion needs for Jaybird, the Firebird JDBC driver. The library deliberately excludes mathematical operations, focusing purely on format conversion.