ConFoo Montreal 2026: Call for Papers

Voting

: max(seven, two)?
(Example: nine)

The Note You're Voting On

mm at mobelt dot com
8 months ago
If you want to compare 2 decimals for equality, bccomp does not works as expected:

bccomp("1.000000000000000","0.999999999999999",2)

returns 1

Instead, use

bcsub("1.000000000000000","0.999999999999999",2) == 0

<< Back to user notes page

To Top