Skip to content

Commit ad4aa90

Browse files
Correct hypot examples
1 parent 60b6f98 commit ad4aa90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/rules.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ true
2626
2727
julia> Δx, Δy = rand(2);
2828
29-
julia> dh(Δx, Δy) == ((y / h) * Δx + (x / h) * Δy)
29+
julia> dh(Δx, Δy) == ((x / h) * Δx + (y / h) * Δy)
3030
true
3131
3232
julia> h, (dx, dy) = rrule(hypot, x, y);
@@ -39,10 +39,10 @@ true
3939
4040
julia> Δh = rand();
4141
42-
julia> dx(Δh) == (y / h) * Δh
42+
julia> dx(Δh) == (x / h) * Δh
4343
true
4444
45-
julia> dy(Δh) == (x / h) * Δh
45+
julia> dy(Δh) == (y / h) * Δh
4646
true
4747
```
4848
@@ -340,10 +340,10 @@ julia> hypotxy, (dx, dy) = rrule(hypot, x, y);
340340
julia> hypotxy == hypot(x, y)
341341
true
342342
343-
julia> dx(1) == (y / hypot(x, y))
343+
julia> dx(1) == (x / hypot(x, y))
344344
true
345345
346-
julia> dy(1) == (x / hypot(x, y))
346+
julia> dy(1) == (y / hypot(x, y))
347347
true
348348
```
349349

0 commit comments

Comments
 (0)