mirror of
https://github.com/apple/swift-numerics
synced 2026-11-27 05:04:26 +00:00
Merge pull request #114 from stephentyrone/remove-broken-derivative
The derivative of Complex.init(_:_:) is broken with the current Xcode
This commit is contained in:
1 file changed
-10
@@ -19,16 +19,6 @@ where RealType: Differentiable, RealType.TangentVector == RealType {
|
||||
|
||||
extension Complex
|
||||
where RealType: Differentiable, RealType.TangentVector == RealType {
|
||||
@derivative(of: init(_:_:))
|
||||
@usableFromInline
|
||||
static func _derivativeInit(
|
||||
_ real: RealType,
|
||||
_ imaginary: RealType
|
||||
) -> (value: Complex, pullback: (Complex) -> (RealType, RealType)) {
|
||||
(value: .init(real, imaginary), pullback: { v in
|
||||
(v.real, v.imaginary)
|
||||
})
|
||||
}
|
||||
|
||||
@derivative(of: real)
|
||||
@usableFromInline
|
||||
|
||||
Reference in new issue
Block a user