Re:The Pitfalls of Comparing BigDecimals in Java
by Igor_Wiwi on Monday June 17, 2024 @06:57PM
(#40712136)
My suggestion would be to use compareTo where possible, and rely on equals only when you know for sure that it's implemented correctly
[ Parent
| on HN ]
Re:The Pitfalls of Comparing BigDecimals in Java
by olliej on Monday June 17, 2024 @07:06PM
(#40712218)
Which implies the type is not compatible with the built in collections? Or have they moved aware from equals?
Re:The Pitfalls of Comparing BigDecimals in Java
by happytoexplain on Monday June 17, 2024 @07:00PM
(#40712169)
>only when you know for sure that it's implemented correctly
This is pretty disappointing advice for a standard/bundled API :(