File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
name = " ChainRules"
2
2
uuid = " 082447d4-558c-5d27-93f4-14fc19e9eca2"
3
- version = " 1.5.1 "
3
+ version = " 1.5.2 "
4
4
5
5
[deps ]
6
6
ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change 49
49
@scalar_rule atan (y, x) @setup (u = x ^ 2 + y ^ 2 ) (x / u, - y / u)
50
50
@scalar_rule sincos (x) @setup ((sinx, cosx) = Ω) cosx - sinx
51
51
# the position of the minus sign below warrants the correct type for π
52
- @scalar_rule sincospi (x) @setup ((sinpix, cospix) = Ω) (π * cospix) (π * (- sinpix))
52
+ if VERSION ≥ v " 1.6"
53
+ @scalar_rule sincospi (x) @setup ((sinpix, cospix) = Ω) (π * cospix) (π * (- sinpix))
54
+ end
53
55
54
56
# exponents
55
57
@scalar_rule cbrt (x) inv (3 * Ω ^ 2 )
Original file line number Diff line number Diff line change @@ -64,11 +64,13 @@ const FASTABLE_AST = quote
64
64
test_frule (sincos, randn (T))
65
65
test_rrule (sincos, randn (T); output_tangent= Δz)
66
66
end
67
- @testset " sincospi(x::$T )" for T in (Float64, ComplexF64)
68
- Δz = Tangent {Tuple{T,T}} (randn (T), randn (T))
67
+ if VERSION ≥ v " 1.6"
68
+ @testset " sincospi(x::$T )" for T in (Float64, ComplexF64)
69
+ Δz = Tangent {Tuple{T,T}} (randn (T), randn (T))
69
70
70
- test_frule (sincospi, randn (T))
71
- test_rrule (sincospi, randn (T); output_tangent= Δz)
71
+ test_frule (sincospi, randn (T))
72
+ test_rrule (sincospi, randn (T); output_tangent= Δz)
73
+ end
72
74
end
73
75
end
74
76
end
You can’t perform that action at this time.
0 commit comments