INCRBYFLOAT key increment

    Time complexity: O(1)

    Increment the string representing a floating point number stored at by the specified . By using a negative value, the result is that the value stored at the key is decremented (by the obvious properties of addition). If the key does not exist, it is set to before performing the operation. An error is returned if one of the following conditions occur:

    • The current key content or the specified increment are not parsable as a double precision floating point number.

    If the command is successful the new incremented value is stored as the new value of the key (replacing the old one), and returned to the caller as a string.

    The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation.

    : the value of after the increment.

    redis> SET mykey 10.50

    redis> INCRBYFLOAT mykey -5

    redis> SET mykey 5.0e3

    redis> INCRBYFLOAT mykey 2.0e2

    redis>