Skip to content

Commit

Permalink
Merge pull request apple#115 from stephentyrone/remove-broken-derivative
Browse files Browse the repository at this point in the history
Also remove tests for broken derivative.
  • Loading branch information
stephentyrone authored May 1, 2020
2 parents 52fa265 + c111cd0 commit a410fd7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Tests/ComplexTests/DifferentiableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ final class DifferentiableTests: XCTestCase {
Complex(5, 2))
}

func testInitializer() {
let φ1 = pullback(at: 4, -3) { r, i in Complex<Float>(r, i) }
let tan1 = φ1(Complex(-1, 2))
XCTAssertEqual(tan1.0, -1)
XCTAssertEqual(tan1.1, 2)

let φ2 = pullback(at: 4, -3) { r, i in Complex<Float>(r * r, i + i) }
let tan2 = φ2(Complex(-1, 1))
XCTAssertEqual(tan2.0, -8)
XCTAssertEqual(tan2.1, 2)
}

func testConjugate() {
let φ = pullback(at: Complex<Float>(20, -4)) { x in x.conjugate }
XCTAssertEqual(φ(Complex(1, 0)), Complex(1, 0))
Expand Down

0 comments on commit a410fd7

Please sign in to comment.