-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
midpoint(x,x) != x #1
Comments
(gdb) p K The logic takes the route with both variables normalized. |
If differing by eps is allowed then a*.5+b*.5 is enough, no need your midpoint |
differing by eps/2 is unavoidable |
So K/2+K/2 != (K+K)/2 We may not be able to do better that (a+b)/2. I'll read the paper and see if there was a rationale for the existing implementation. |
These values are much smaller than epsilon though. These are large compared to the denormalization point which for doubles is 4.9406564584124654e-324. It's puzzling what the arithmetic does though. This is some bug but below the level of this library. I might file a bug report and see if any language people have any ideas. Actually, the difference might be on the order of denorm_min. |
Here by eps I mean [the smallest value larger than x]-x. (a+b)/2 should work on this magnitude |
Integral midpoint is broken due to the wrong parentheses. |
Ugh. That was bad. Sorry. |
https://gcc.godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAMzwBtMA7AQwFtMQByARg9KtQYEAysib0QXACx8BBAKoBnTAAUAHpwAMvAFYTStJg1DIApACYAQuYukl9ZATwDKjdAGFUtAK4sGISQDMpK4AMngMmAByPgBGmMT%2B0gAOqAqETgwe3r7%2BQSlpjgJhEdEscQmS0naYDhlCBEzEBFk%2BfoG2mPaFDPWNBMVRsfGJtg1NLTntCmP94YNlw5UAlLaoXsTI7BzmAXhUDFhUANQAsgCSACLKAPJnkQAqAPoAEiYaAII7h3Onlzd3T2eRy4b0%2BHx24WQ3iwRxMATcyBYTAICDh2FBEIYUK8MLhCOm%2BEEaIxH2YbAUSSYmyOBIxAHYrOCPkcjgRMCwkgY2XiCABPJKMViYI6PM5EgLo5kso5oBjTTCqJLEGkEdAgECCmL0R57R4EPEE9V4BQ6wSYYDEMSPABueNF4slYIAnG8XRondLzAA2b1HMBgQ0gY2PBRCm12sUEUhHGKoTxo6P2/US0HSo4sPDoFLhAgQJMix5MR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