-
Notifications
You must be signed in to change notification settings - Fork 25
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
Accuracy with Float32s is bad #98
Comments
If I'm not mistaken, the parameter For the particular case of |
Might make sense to cast it explicitly wherever it's used to the element type of the thing that it's being added to. This way if (for some reason) we ever use |
Yes, that's a good suggestion. We should carefully check the code, to ensure that the assumption of |
Actually, it might make sense just to replace |
Yes, that's an even better solution. |
Do we have a good example where the accuracy for |
@wesselb and I had a discussion about this a while ago, and I completely forgot to raise an issue about it. While
FiniteDifferences
accuracy for functions ofFloat64
s is as you would expect, other types are a different matter. Of particular concern isFloat32
as it's almost certainty the next most used type.IIRC the issue is an issue of defaults. Specifically this one.
float
always yields aFloat64
, andeps(::Float64)
is very different fromeps(Float32)
. This changes the step-size calculation here.If someone has time to look into this it would be greatly appreciated. I'm not entirely sure what the correct solution is, but a good approach to solving it might be
eps
parameter that is causing the problems (perhaps @wesselb could help here?)eps
based on this and make the appropriate changesThe text was updated successfully, but these errors were encountered: