We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 07d0a62 + 88a042c commit 775a0ecCopy full SHA for 775a0ec
stdlib/public/core/FloatingPointTypes.swift.gyb
@@ -484,6 +484,13 @@ extension ${Self}: BinaryFloatingPoint {
484
exponentBitPattern: exponentBitPattern + 1,
485
significandBitPattern: 0)
486
}
487
+#if arch(arm)
488
+ // On arm, subnormals are skipped.
489
+ if exponentBitPattern == 0 {
490
+ _sanityCheck(self < .leastNonzeroMagnitude, "subnormal out of range")
491
+ return .leastNonzeroMagnitude
492
+ }
493
+#endif
494
return ${Self}(sign: .plus,
495
exponentBitPattern: exponentBitPattern,
496
significandBitPattern: significandBitPattern + 1)
0 commit comments