mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
ECMA-262 implies that `MIN_VALUE` should be a denormalized value if denormal arithmetic is supported. This is the case on x86-64 and AArch64 using standard GCC/Clang compilation settings. test262 checks whether `Number.MIN_VALUE / 2.0` is equal to 0, which only holds if `MIN_VALUE` is the smallest denormalized value. This commit renames the existing `NumericLimits<FloatingPoint>::min()` to `min_normal()` and adds a `min_denormal()` method to force users to explicitly think about which one is appropriate for their use case. We shouldn't follow the STL's confusingly designed interface in this regard.
5.8 KiB
5.8 KiB