-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unnecessary multiply and divide in calculation of F_L
#27
Comments
This also happens in the |
It's also worth noting that currently this |
Taking it further, at single precision float, the whole complexity of incorporating
which in our case, where |
I was discussing with Nick and it seems advisable to use an approximation here, especially because >>> import colour
>>> f = lambda x : (x / 200) ** (1/3)
>>> f(100)
0.7937005259840998
>>> colour.appearance.hunt.luminance_level_adaptation_factor(100)
0.79370052754616727
>>> f(10)
0.3684031498640387
>>> colour.appearance.hunt.luminance_level_adaptation_factor(10)
0.36840451910550759
>>> f(1)
0.17099759466766973
>>> colour.appearance.hunt.luminance_level_adaptation_factor(1)
0.17150541623653787
>>> f(0.1)
0.07937005259840998
>>> colour.appearance.hunt.luminance_level_adaptation_factor(0.1)
0.070863964674330454 I would just keep a reference/note to the full equation. |
In the calculation of the viewing condition dependent
F_L
value in the forward and inverse Hellwig conversion there is a multiply by 0.2 followed immediately by a multiply by 5.0. These clearly cancel out to 1.0, but could introduce precision issues in different implementations.The text was updated successfully, but these errors were encountered: