mirror of
https://github.com/apple/swift-numerics
synced 2026-11-30 05:28:47 +00:00
Fix typo expMinusOne/exp in near-overflow check.
This commit is contained in:
1 parent
4798b68203
commit
efbe11a734
1 file changed
+1
-1
@@ -48,7 +48,7 @@ final class ElementaryFunctionTests: XCTestCase {
|
||||
// exp((log(gfm) + log(9/8), π/4) = exp((log(gfm*9/8), π/4))
|
||||
// = gfm*9/8 * (1/sqrt(2), 1/(sqrt(2))
|
||||
let x = T.log(.greatestFiniteMagnitude) + T.log(9/8)
|
||||
let huge = Complex<T>.expMinusOne(Complex(x, .pi/4))
|
||||
let huge = Complex<T>.exp(Complex(x, .pi/4))
|
||||
let mag = T.greatestFiniteMagnitude/T.sqrt(2) * (9/8)
|
||||
XCTAssert(huge.real.isApproximatelyEqual(to: mag))
|
||||
XCTAssert(huge.imaginary.isApproximatelyEqual(to: mag))
|
||||
|
||||
Reference in new issue
Block a user