-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Wrong ILogB result for subnormal values #116912
Copy link
Copy link
Closed
Labels
Description
Math.ILogB incorrectly uses TZCNT instead of LZCNT for subnormal values:
| return double.MinExponent - (BitOperations.TrailingZeroCount(x.TrailingSignificand) - double.BiasedExponentLength); |
Math.ILogB(1e-308) returns -1024 on .NET 8, and -1012 on .NET 9. The correct result is -1024.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.