HINCRBYFLOAT key field increment

    Time complexity: O(1)

    Increment the specified of a hash stored at , and representing a floating point number, by the specified . If the increment value is negative, the result is to have the hash field value decremented instead of incremented. If the field does not exist, it is set to before performing the operation. An error is returned if one of the following conditions occur:

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

    : the value of after the increment.

    redis> HSET mykey field 10.50

    redis> HINCRBYFLOAT mykey field -5

    redis> HSET mykey field 5.0e3

    redis>

    The command is always propagated in the replication link and the Append Only File as a HSET operation, so that differences in the underlying floating point math implementation will not be sources of inconsistency.