[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [#47 complexForm(log(%i) - log(-%i))] (new)
From: |
anonymous |
Subject: |
[Axiom-developer] [#47 complexForm(log(%i) - log(-%i))] (new) |
Date: |
Sat, 22 Jan 2005 04:20:27 -0600 |
Is the following a case of total simplification failure (a certain
bug from the user's point... unless AXIOM is not targeted for
Martians who as known have no need in simplification whatsoever :)
or
it is still possible to get %pi out of the lengthy expression
%i*log(-%i) - %i*log(%i)
?
Given my previous posting about complexForm, I mean maybe just a way
to expel those nasty logarithms and see the real and imaginary parts
not intertwined rather than a correct answer.
Any, maybe even a very cumbersome way?
.....................................................................
-> simplify(%i*log(-%i) - %i*log(%i))
%i log(- %i) - %i log( %i)
-> normalize(%i*log(-%i) - %i*log(%i))
%i log(- %i) - %i log( %i)
-> complexNormalize(%i*log(-%i) - %i*log(%i))
%i log(- %i) - %i log( %i)
.....................................................................
======================================================================
AXIOM Version of Wednesday December 15, 2004 at 00:50:38
AXIOM -> complexForm(log(%i) - log(-%i))
0
COMPARE:
Derive 6.1> LOG(#i) - LOG(-#i)
Maple 9.5.2> ln(I) - ln(-I);
MuPAD 3.1> ln(I) - ln(-I);
Mathematica 5.1> Log[I] - Log[-I]
Maxima 5.9.1> RECTFORM(LOG(%I) - LOG(-%I));
#i*pi
I*Pi
I*PI
I*Pi
%I %PI
======================================================================
Vladimir Bondarenko writes:
> AXIOM -> complexForm(log(%i) - log(-%i))
>
> 0
could you please file this as a bug on issuetracker? The problem is in the
operation "argument":
(8) -> argument(%i)
%pi
(8) ---
2
Type: Expression Integer
(9) -> argument(-%i)
%pi
(9) ---
2
Type: Expression Integer
the latter should be -pi/2, of course. The problem is in gaussian.spad,
COMPCAT:
if R has TranscendentalFunctionCategory then
half := recip(2::R)::R
if R has RealNumberSystem then
atan2loc(y: R, x: R): R ==
pi1 := pi()$R
pi2 := pi1 * half
x = 0 => if y >= 0 then pi2 else -pi2
-- Atan in (-pi/2,pi/2]
theta := atan(y * recip(x)::R)
while theta <= -pi2 repeat theta := theta + pi1
while theta > pi2 repeat theta := theta - pi1
x >= 0 => theta -- I or IV
if y >= 0 then
theta + pi1 -- II
else
theta - pi1 -- III
argument x == atan2loc(imag x, real x)
else
-- Not ordered so dictate two quadrants
argument x ==
zero? real x => pi()$R * half
atan(imag(x) * recip(real x)::R)
so the problem occurs if R does not have "RealNumberSystem":
(15) -> argument(-%i*1.0)
(15) - 1.5707963267 948966192
since Float does have RNS, but INT does not. I'm not quite sure what the
condition should be. OrderedSet?
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden
- [Axiom-developer] [#47 complexForm(log(%i) - log(-%i))] (new),
anonymous <=