> With this patch, all the examples originally posted return the correct
> results (calculated with bc). I'd be interested to know how the OP
> constructed these examples, and whether there were any that were off
> by more than 1 ULP.
> Yeah, that would be interesting.
I didn't do anything fancy. I'm learning how to write an arbitrary precision math library.
I couldn't come up with good test cases since so many numbers exist.
So, I sanity-checked my code by testing many random inputs against another library and pg, and compared the results.
Most of the time, the problem would be with my code.
But I found a few cases where it looked like pg was off.
I don't think I found any that were off by more than 1.