Conversation
My guess would be overflow protection for sufficiently large |
quinnj
left a comment
There was a problem hiding this comment.
Most of this was a straight port of the code in this repo, so there are probably ways to simplify/clean up (I think @simonbyrne did some of that initially when reviewing).
|
Do you know if this needs an overflow check? |
|
I don't off the top of my head |
|
Maybe run a PkgEval and merge if it looks ok? |
|
It feels kind of silly to use pkgeval for something this small, but I guess we might as well. |
|
Or just merge, tests pass after all and I guess we will find it in release PkgEval if it is too bad |
|
#yolo |
|
Felt I should look at this since printing numbers incorrectly would be bad. This use of Lines 58 to 66 in f71b839 My reasoning is that Lines 17 to 19 in f71b839 You can see that Lines 152 to 159 in f71b839 Does anyone know what the range of possible values for |
|
Bump: @oscardssmith, @quinnj do you know about the range of values that |
|
ah it appears that |
|
Do you have an example? |
julia> using Printf
julia> @printf "%.8g" 4.645833859177319e63 # master
4.6458338e+63
julia> @printf "%.8g" 4.645833859177319e63 # 1.8
4.6458339e+63There are two ways that pow5 can be wrong,
For the second case, we need to find a So using |
The current algorithm does up to
pdivisions, while this algorithm does only 1. I've assigned @quinnj to review since I'm not 100% sure that there isn't a very good reason that this function isn't written like this.