[ 
https://issues.apache.org/jira/browse/GEODE-8624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294958#comment-17294958
 ] 

ASF subversion and git services commented on GEODE-8624:
--------------------------------------------------------

Commit d201090a6ae6ef4d591e936ffce776b3f8919e89 in geode's branch 
refs/heads/support/1.14 from Jens Deppe
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=d201090 ]

GEODE-8624: Support Redis HINCRBYFLOAT command (#5986)

- Switch to using BigDecimal instead of double for increment value.
- Improve HINCRBYFLOAT output accuracy for very large values.
- Add concurrency tests.
- Mark HINCRBYFLOAT as supported.

(cherry-picked from 8a0dc1aae8636a44c4fa4d5d30dcbc0efafb4430)


> Improve INCRBYFLOAT accuracy for very large values
> --------------------------------------------------
>
>                 Key: GEODE-8624
>                 URL: https://issues.apache.org/jira/browse/GEODE-8624
>             Project: Geode
>          Issue Type: Improvement
>          Components: redis
>            Reporter: Jens Deppe
>            Priority: Major
>              Labels: blocks-1.14.0​, pull-request-available
>             Fix For: 1.14.0
>
>
> Currently native redis appears to be able to apply {{INCRBYFLOAT}} on values 
> that are below the max of unsigned long long (18446744073709551615). However, 
> since we're treating numbers as {{double}}s we can lose precision for very 
> large values. For example:
> {noformat}
> set val 18446744073709551614
> incrbyfloat val 1{noformat}
> incorrectly returns {{18446744073709552000}}
> Native redis produces a correct result.
> We should consider switching to using {{BigInteger}} for all commands which 
> perform calculations: {{INCR, INCR, INCRBYFLOAT, HINCRBY, HINCRBYFLOAT}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to