Skip to content

Commit

Permalink
Merge 278767b into e85af82
Browse files Browse the repository at this point in the history
  • Loading branch information
githubtomtom committed Jul 20, 2020
2 parents e85af82 + 278767b commit abbfbfd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/unary.jl
Expand Up @@ -375,14 +375,28 @@ julia> Algebra.ceiling(:(-a))
@doc """
conj(r)
This operator returns the ceiling (i.e., the least integer greater than the given argument) if its single argument has a numerical value. A non-numerical argument is returned as an expression in the original operator. For example:
This returns the complex conjugate of an expression, if that argument has a numerical value. By default the complex conjugate of a non-numerical argument is returned as an expression in the operators
`repart` and `impart`. For example:
```Julia
julia> Algebra.conj(1+im)
1 - 1im
julia> Algebra.conj(:(a+im*b))
:(repart(a) - ((impart(a) + repart(b)) * im + impart(b)))
However, if rules have been previously defined for the complex conjugate(s) of one or more non-numerical terms appearing in the argument, these rules are applied and the expansion in terms of the operators `repart` and `impart` is suppressed.
For example:
```
realvalued a,b;
conj(a+i*b) -> a-b*i
let conj z => z!*, conj c => c!*;
conj(a+b*z*z!*+z*c!*) -> a+b*z*z* + c*z*
conj atan z -> atan(z*)
```
Note that in defining the rule `conj z => z!*`, the rule `conj z!* => z` is (in effect) automatically defined. Note also that the standard elementary functions and their inverses (where appropriate) are automatically defined to be `selfconjugate` so that `conj(f(z)) => f(conj(z))`.
```
""" Reduce.Algebra.conj

Expand Down

0 comments on commit abbfbfd

Please sign in to comment.