Skip to content

Commit 16ec82b

Browse files
committed
Add back conj, adjoint, and abs2 for real
1 parent d393d12 commit 16ec82b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/rulesets/Base/base.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
@scalar_rule(deg2rad(x), π / oftype(x, 180))
5151
@scalar_rule(rad2deg(x), oftype(x, 180) / π)
5252

53+
@scalar_rule(conj(x), One())
54+
@scalar_rule(adjoint(x), One())
5355
@scalar_rule(transpose(x), One())
5456

5557
@scalar_rule(abs(x::Real), sign(x))

test/rulesets/Base/base.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
test_scalar(exp2, x)
9292
test_scalar(exp10, x)
9393

94+
test_scalar(conj, x)
95+
test_scalar(adjoint, x)
96+
test_scalar(abs2, x)
97+
9498
x isa Real && test_scalar(cbrt, x)
9599
end
96100
end

0 commit comments

Comments
 (0)