Skip to content

Commit d410970

Browse files
committed
Make pseudocode look less like real code.
There isn't actually an ** operator in Swift, so making the formula that includes ** for exponentiation look like Swift can lead to confusion. Fixes rdar://56184186
1 parent 972e3aa commit d410970

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/FloatingPoint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public protocol FloatingPoint: SignedNumeric, Strideable, Hashable
261261
/// The magnitude of a floating-point value `x` of type `F` can be calculated
262262
/// by using the following formula, where `**` is exponentiation:
263263
///
264-
/// let magnitude = x.significand * F.radix ** x.exponent
264+
/// x.significand * (F.radix ** x.exponent)
265265
///
266266
/// A conforming type may use any integer radix, but values other than 2 (for
267267
/// binary floating-point types) or 10 (for decimal floating-point types)

0 commit comments

Comments
 (0)