Skip to content

Commit 1749566

Browse files
committed
Fix atan2 rule
1 parent 84a1763 commit 1749566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rulesets/Base/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
@scalar_rule(csch(x), -coth(x) * Ω)
6565
@scalar_rule(hypot(x, y), (x / Ω, y / Ω))
6666
@scalar_rule(sincos(x), @setup((sinx, cosx) = Ω), cosx, -sinx)
67-
@scalar_rule(atan(y, x), @setup(u = hypot(x, y)), (x / u, y / u))
67+
@scalar_rule(atan(x, y), @setup(u = x^2 + y^2), (y / u, -x / u))
6868
@scalar_rule(max(x, y), @setup(gt = x > y), (gt, !gt))
6969
@scalar_rule(min(x, y), @setup(gt = x > y), (!gt, gt))
7070
@scalar_rule(mod(x, y), @setup((u, nan) = promote(x / y, NaN16)),

0 commit comments

Comments
 (0)