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.