File tree Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Original file line number Diff line number Diff line change 51
51
test_scalar (acscd, 1 / x)
52
52
test_scalar (acotd, 1 / x)
53
53
end
54
- @testset " Multivariate" begin
55
- @testset " atan2" begin
56
- # https://en.wikipedia.org/wiki/Atan2
57
- x, y = rand (2 )
58
- ratan = atan (x, y)
59
- u = x^ 2 + y^ 2
60
- datan = y/ u - 2 x/ u
61
-
62
- r, pushforward = frule (atan, x, y)
63
- @test r === ratan
64
- @test pushforward (NamedTuple (), 1 , 2 ) === datan
65
-
66
- r, pullback = rrule (atan, x, y)
67
- @test r === ratan
68
- dself, df1, df2 = pullback (1 )
69
- @test dself == NO_FIELDS
70
- @test df1 + 2 df2 === datan
71
- end
72
-
73
- @testset " sincos" begin
74
- x, Δx, x̄ = randn (3 )
75
- Δz = (randn (), randn ())
54
+
55
+ @testset " sincos" begin
56
+ x, Δx, x̄ = randn (3 )
57
+ Δz = (randn (), randn ())
76
58
77
- frule_test (sincos, (x, Δx))
78
- rrule_test (sincos, Δz, (x, x̄))
79
- end
59
+ frule_test (sincos, (x, Δx))
60
+ rrule_test (sincos, Δz, (x, x̄))
80
61
end
81
62
end # Trig
82
63
You can’t perform that action at this time.
0 commit comments