How to Increment a Decimal Number in Valkey (INCRBYFLOAT)
Add a decimal number such as 1.25 to a value in Valkey with INCRBYFLOAT, or subtract one with a negative number.
- Database
- Valkey
Add a decimal number such as 1.25 to a value in Valkey with INCRBYFLOAT, or subtract one with a negative number.
On a Mac with Apple silicon, Valkey’s INCRBYFLOAT can reply 9.99000000000000021 instead of 9.99. Here’s why the extra digits appear and how to keep amounts exact.