You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2270, we resolved to remove isInf() and isNan() because they return bogus information in many (all?) situations.
It seems like isNormal will also return bogus information in many (all?) situations. We should determine if we should apply that resolution to isNormal() too.
Looking at this table, isNormal does not seem critical. It would probably be weird / not very useful to have only isNormal and none of the other three.
Activity
dneto0 commentedon Nov 16, 2021
isNormal is a non-trivial testable function, even with fast math variations.
Normal numbers are any floating point number which is:
Another way to write it is that the exponent is neither the largest nor smallest exponent for the format.
I've written a draft CTS test for it
An implementation that cuts the most permissible corners can:
§ 12.5 Floating Point Evaluation says:
As @alan-baker says, this is a distillation of common functionality in underlying platforms.
Altogether, I think isNormal should stay.
dneto0 commentedon Nov 16, 2021
WGSL also has isFinite. That could be removed, by the same argument as removing isNan or isInfinite. #2270
That is, an implementation that cuts as many corners as possible (assumes no infinities and Nans) can reduce it to just returning "true".
edit: That last word should be "true". Thanks @alan-baker
alan-baker commentedon Nov 16, 2021
True you mean.
dneto0 commentedon Nov 18, 2021
Reviewing support:
Looking at this table, isNormal does not seem critical. It would probably be weird / not very useful to have only isNormal and none of the other three.
Remove isFinite, isNormal
Remove isFinite, isNormal (#2325)