{"push_id":1369881141,"size":1,"distinct_size":1,"ref":"refs/heads/log-scale","head":"fd60277b2fdf5664068240a852435653e8713468","before":"abac2fbfa87a61f05a89c87267805663918d4045","commits":[{"sha":"fd60277b2fdf5664068240a852435653e8713468","author":{"name":"Matt Jibson","email":"e67f95f42c4959cac33fbbbc1922229fe473494d@gmail.com"},"message":"sql: fix LOG of very large numbers\n\nPreviously a LOG of a large number would result in the server consuming\nall CPU and hanging. This is because our LOG implementation would take 1/x\nat a precision low enough that the division of the large x would result\nin a 0. The algorithm would proceed to double it until it reached 0.5,\nwhich obviously would never succeed. Fix this by using a high enough\nprecision to prevent 0 from being returned.\n\nDuring the investigation of this bug, it was also discovered that if a\nlarge number was near the vicinity of producing a 0, it would incorrectly\ntruncate some precision of the division, thus producing slightly incorrect\nresults to the LOG function.\n\nThis thus fixes various bugs and hangs in the POW, LOG, and LN builtins.\n\nFixes current RSG test failures.\n\nBenchmark shows no change:\n\nname          old time/op  new time/op  delta\nDecimalLog-4   106µs ± 3%   105µs ± 1%  -1.26%  (p=0.029 n=10+10)\nDecimalExp-4  18.6ms ±17%  18.4ms ± 8%    ~     (p=0.897 n=10+8)\nDecimalPow-4  1.25ms ±18%  1.25ms ±21%    ~     (p=0.853 n=10+10)","distinct":true,"url":"https://api.github.com/repos/mjibson/cockroach/commits/fd60277b2fdf5664068240a852435653e8713468"}]}
{"actor":{"display_login":"mjibson"}}