|
|
last edited 16 years ago by kratt6 |
1 2 | ||
Editor:
Time: 2007/11/17 23:00:39 GMT-8 |
||
Note: |
changed: - Subject: (new) sqrt(-1/abs(x))-1/sqrt(-abs(x))=>0 OVERVIEW of bugs #6357:: URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=6357> Summary: sqrt(-1/abs(x))-1/sqrt(-abs(x))=>0 Project: Axiom Computer Algebra System Submitted by: kratt5 Submitted on: Tue 11/04/2003 at 13:26 Category: algebra Severity: 5 - Average Item Group: code bug Status: transferred Privacy: Public Assigned to: billpage1 Originator Name: kratt5 Originator Email: Open/Closed: Open Release: CVS 3.11.2003 Reproducibility: None Fixed Release: Error message: Example of code trigerring the bug: \begin{axiom} sqrt(-1/abs(x))-1/sqrt(-abs(x)) \end{axiom} should be: \begin{axiom} 2*%i/sqrt(x) \end{axiom} ------------------------------------------------------- Date: Fri 06/11/2004 at 10:43 By: Martin Rubey <kratt6> patched by patch #3089 ------------------------------------------------------- Date: Tue 11/04/2003 at 14:43 By: Martin Rubey <kratt5> The error occurs, because:: sqrt(1/x::Expression Integer)=>1/sqrt(x) From kratt6 Thu Jun 23 07:43:01 -0500 2005 From: kratt6 Date: Thu, 23 Jun 2005 07:43:01 -0500 Subject: patched in axiom-patch-25 Message-ID: <20050623074301-0500@page.axiom-developer.org> Category: => Axiom Compiler Status: => closed From kratt6 Tue Oct 18 06:09:10 -0500 2005 From: kratt6 Date: Tue, 18 Oct 2005 06:09:10 -0500 Subject: Message-ID: <20051018060910-0500@wiki.axiom-developer.org> Just for the archive, here is the patch:: --- /home/rubey/axiom/mnt/linux/src/algebra/algfunc.spad 2004-05-21 18:51:30.000000000 +0200 +++ algfunc.spad 2004-05-25 13:39:19.000000000 +0200 @@ -431,9 +431,20 @@ hackroot(x, n) == -- one? n or one? x => x (n = 1) or (x = 1) => x + +-- the following is FALSE! if x can be negative. Example: x=-1/2 would pass the +-- test and give 1/(-2)^(1/n) ~= (-1/2)^(1/n) -- (x ^= -1) and (one?(num := numer x) or (num = -1)) => - (x ^= -1) and (((num := numer x) = 1) or (num = -1)) => - inv hackroot((num * denom x)::F, n) +-- (x ^= -1) and (((num := numer x) = 1) or (num = -1)) => +-- inv hackroot((num * denom x)::F, n) + +-- permissible when denom x is a positive number + + (((dx := denom x) ^= 1) and + ((rx := retractIfCan(dx)@Union(Integer,"failed")) case Integer) and + positive?(rx)) + => hackroot((numer x)::F, n)/hackroot(rx::Integer::F, n) + (x = -1) and n = 4 => ((-1::F) ** (1::Q / 2::Q) + 1) / ((2::F) ** (1::Q / 2::Q)) kernel(oproot, [x, n::F])
OVERVIEW of bugs #6357:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=6357> Summary: sqrt(-1/abs(x))-1/sqrt(-abs(x))=>0 Project: Axiom Computer Algebra System Submitted by: kratt5 Submitted on: Tue 11/04/2003 at 13:26 Category: algebra Severity: 5 - Average Item Group: code bug Status: transferred Privacy: Public Assigned to: billpage1 Originator Name: kratt5 Originator Email: Open/Closed: Open Release: CVS 3.11.2003 Reproducibility: None Fixed Release: Error message:
Example of code trigerring the bug:
axiomsqrt(-1/abs(x))-1/sqrt(-abs(x))
(1) |
should be:
axiom2*%i/sqrt(x)
(2) |
-------------------------------------------------------
Date: Fri 06/11/2004 at 10:43 By: Martin Rubey
patched by patch #3089
-------------------------------------------------------
Date: Tue 11/04/2003 at 14:43 By: Martin Rubey
The error occurs, because:
sqrt(1/x::Expression Integer)=>1/sqrt(x)
--- /home/rubey/axiom/mnt/linux/src/algebra/algfunc.spad 2004-05-21 18:51:30.000000000 +0200 +++ algfunc.spad 2004-05-25 13:39:19.000000000 +0200 @@ -431,9 +431,20 @@ hackroot(x, n) == -- one? n or one? x => x (n = 1) or (x = 1) => x + +-- the following is FALSE! if x can be negative. Example: x=-1/2 would pass the +-- test and give 1/(-2)^(1/n) ~= (-1/2)^(1/n) -- (x ^= -1) and (one?(num := numer x) or (num = -1)) => - (x ^= -1) and (((num := numer x) = 1) or (num = -1)) => - inv hackroot((num * denom x)::F, n) +-- (x ^= -1) and (((num := numer x) = 1) or (num = -1)) => +-- inv hackroot((num * denom x)::F, n) + +-- permissible when denom x is a positive number + + (((dx := denom x) ^= 1) and + ((rx := retractIfCan(dx)@Union(Integer,"failed")) case Integer) and + positive?(rx)) + => hackroot((numer x)::F, n)/hackroot(rx::Integer::F, n) + (x = -1) and n = 4 => ((-1::F) ** (1::Q / 2::Q) + 1) / ((2::F) ** (1::Q / 2::Q)) kernel(oproot, [x, n::F])