Add Xcode project for building framework (#246)

This commit is contained in:
Nate Cook authored and GitHub committed 2025-01-13 12:56:00 -06:00
1 parent 34eec0dd27
commit acb4100b54
10 files changed
+874 -1

No files matched your search

+22 -1
View File
@@ -10,7 +10,28 @@
//===----------------------------------------------------------------------===//
// For log(_:) and root(_:_:)
#if swift(>=5.11)
#if ALGORITHMS_DARWIN_ONLY
internal import Darwin
extension Double {
@_transparent
internal static func root(_ x: Double, _ n: Int) -> Double {
guard x >= 0 || n % 2 != 0 else { return .nan }
if n == 3 { return cbrt(x) }
return Double(signOf: x, magnitudeOf: pow(x.magnitude, 1/Double(n)))
}
@_transparent
internal static func log(_ x: Double) -> Double {
Darwin.log(x)
}
@_transparent
internal static func log(onePlus x: Double) -> Double {
Darwin.log1p(x)
}
}
#elseif swift(>=5.11)
internal import RealModule
#elseif swift(>=5.10)
import RealModule