Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.15.0
Description
Currently, in `Coder.java` `stringToDouble` and `doubleToString` methods, we return "Infinity" or "-Infinity", but native Redis returns "inf" or "-inf" respectively, as seen in `networking.c`:
void addReplyDouble(client *c, double d) { char dbuf[128], sbuf[128]; int dlen, slen; if (isinf(d)) { /* Libc in odd systems (Hi Solaris!) will format infinite in a * different way, so better to handle it in an explicit way. */ addReplyBulkCString(c, d > 0 ? "inf" : "-inf"); } else { dlen = snprintf(dbuf,sizeof(dbuf),"%.17g",d); slen = snprintf(sbuf,sizeof(sbuf),"$%d\r\n%s\r\n",dlen,dbuf); addReplyString(c,sbuf,slen); } }
We should return "inf" or "-inf" like native Redis.
Attachments
Issue Links
- links to