#12588: abs(pi*I) should return pi
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner: burcin
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: symbolics | Resolution:
Keywords: absolute value, | Merged in:
symbolic | Reviewers: Karl-Dieter Crisman
Authors: Ralf Stephan | Work issues:
Report Upstream: Fixed upstream, | Commit:
in a later stable release. | 33e868c92e7cb2627739d717b79ad21854033beb
Branch: | Stopgaps:
u/rws/abs_pi_i__should_return_pi |
Dependencies: #18537 |
-------------------------------------+-------------------------------------
Changes (by rws):
* status: needs_info => needs_review
Comment:
Replying to [comment:17 kcrisman]:
> {{{
> sage: abs(i*x)
> abs(I*x)
> }}}
That's because the product's factors are separated into real constants and
the rest. If the rest is constant, take `abs` of it, else `abs().hold()`.
Then multiply together. Here `I*x` has symbols so it is held.
> {{{
> sage: abs(log(2)*I)
> abs(I*log(2))
> }}}
This is because `log(2)` is a function expression.
> {{{
> abs(I*e^5)
> }}}
Here `exp(5)` is just printed as `e^5` but is a function expression as
well.
I haven't thought about how to efficiently determine if an expression with
held function values is constant, but I have opened
https://github.com/pynac/pynac/issues/56. However I'd suggest not to hold
up this ticket for this.
--
Ticket URL: <http://trac.sagemath.org/ticket/12588#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.