Merge pull request #63 from NevinBR/patch-1

Fixed typo in a comment
This commit is contained in:
Stephen Canon authored and GitHub committed 2019-11-10 13:58:16 -05:00
commit db2046b7ed
1 file changed
+1 -1
+1 -1
View File
@@ -43,7 +43,7 @@ extension Real {
public static func root(_ x: Self, _ n: Int) -> Self {
guard x >= 0 || n % 2 != 0 else { return .nan }
// TODO: this implementation is not quite correct, because n may be
// rounded in conversion to Self. This only effects very extreme cases,
// rounded in conversion to Self. This only affects very extreme cases,
// so we'll leave it alone for now.
return Self(signOf: x, magnitudeOf: pow(x.magnitude, 1/Self(n)))
}