diff options
author | alfredoport <doyenatccny@gmail.com> | 2008-08-31 15:46:13 +0000 |
---|---|---|
committer | alfredoport <doyenatccny@gmail.com> | 2008-08-31 15:46:13 +0000 |
commit | 57dc994dc5354c1d8b9d823baa5befc8b2f50b03 (patch) | |
tree | cea042ad15797348882f2ea4b6dcc9ca96c45dba /src | |
parent | 8f29b67f349d337019093f0eeba09cc3bf09bfed (diff) | |
download | open-axiom-57dc994dc5354c1d8b9d823baa5befc8b2f50b03.tar.gz |
Fix Bug AW15.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/algebra/gaussian.spad.pamphlet | 16 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2cfe5721..bc0b9d78 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2008-08-31 Waldek Hebisch <hebisch@math.uni.wroc.pl> + * algebra/gaussian.spad.pamphlet: Fix Bug AW15. + +2008-08-31 Waldek Hebisch <hebisch@math.uni.wroc.pl> + * algebra/manip.spad.pamphlet: Fix Bug AW278. 2008-08-30 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet index b45a902e..e09ed0c5 100644 --- a/src/algebra/gaussian.spad.pamphlet +++ b/src/algebra/gaussian.spad.pamphlet @@ -367,10 +367,18 @@ ComplexCategory(R:CommutativeRing): Category == 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) + if R has RadicalCategory then + argument x == + n1 := sqrt(norm(x)) + x1 := real(x) + n1 + (2::R)*atan(imag(x) * recip(x1)::R) + + else + -- Emulate sqrt using exp and log + argument x == + n1 := exp(half*log(norm(x))) + x1 := real(x) + n1 + (2::R)*atan(imag(x) * recip(x1)::R) pi() == pi()$R :: % |