login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #312 Bug in sqrt() for UnivariateTaylorSeries revision 1 of 2

1 2
Editor:
Time: 2007/11/17 22:24:55 GMT-8
Note: documentation of fix

changed:
-
\begin{axiom}
UTSx := UTS(FRAC INT,x,0)
monx2 := monomial(1,2)$UTSx
sqrt(monx2)
\end{axiom}

The last line should of course be $x$ and not $1$. Clearly, sqrt() shifts the coefficients of the result such that the leading term is always O(1).

From kratt6 Fri Oct 27 03:02:19 -0500 2006
From: kratt6
Date: Fri, 27 Oct 2006 03:02:19 -0500
Subject: Fix by Igor Khavkine
Message-ID: <20061027030219-0500@wiki.axiom-developer.org>

I'm forwarding this fix proposed by Igor himself, lest it is lost in the archives.

The relevant message in axiom-math is

http://lists.gnu.org/archive/html/axiom-math/2006-08/msg00025.html

For simplicity, here is the fix::

  diff -ur axiom-20050901/src/algebra/sttaylor.spad.pamphlet axiom-20050901.new/src/algebra/sttaylor.spad.pamphlet
  --- axiom-20050901/src/algebra/sttaylor.spad.pamphlet	2005-01-30 07:03:10.000000000 -0500
  +++ axiom-20050901.new/src/algebra/sttaylor.spad.pamphlet	2006-08-21 15:49:25.000000000 -0400
  @@ -448,6 +448,9 @@
 
             RATPOWERS => co**rn * YS(powerrn(rn,(invCo :: A) * x,#1))
             error "** rational power of coefficient undefined"
  +        zeropref : ST A := new(ord::I::NNI,0::A)$LA :: ST A
  +        concat(zeropref, power)
  +
 
       if A has Field then
         mapdiv(x,y) == delay

If somebody could complete the documentation as outlined in

http://lists.gnu.org/archive/html/axiom-developer/2006-08/msg00486.html

that would be great.

Finally, I have to confess that it is very likely myself who introduced this bug, while fixing #63

Martin




From kratt6 Fri Oct 27 03:03:15 -0500 2006
From: kratt6
Date: Fri, 27 Oct 2006 03:03:15 -0500
Subject: fix by Igor Khavkine
Message-ID: <20061027030315-0500@wiki.axiom-developer.org>

Status: open => fix proposed 

Here is the documented patch. (Documentation is partially due to Waldek Hebisch)

<a href="powern.patch">powern.patch</a>

Martin


Submitted by : (unknown) at: 2007-11-17T22:24:55-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

axiom
UTSx := UTS(FRAC INT,x,0)
LatexWiki Image(1)
Type: Domain
axiom
monx2 := monomial(1,2)$UTSx
LatexWiki Image(2)
Type: UnivariateTaylorSeries?(Fraction Integer,x,0)
axiom
sqrt(monx2)
LatexWiki Image(3)
Type: UnivariateTaylorSeries?(Fraction Integer,x,0)

The last line should of course be LatexWiki Image and not LatexWiki Image. Clearly, sqrt() shifts the coefficients of the result such that the leading term is always O(1).

Fix by Igor Khavkine --kratt6, Fri, 27 Oct 2006 03:02:19 -0500 reply
I'm forwarding this fix proposed by Igor himself, lest it is lost in the archives.

The relevant message in axiom-math is

http://lists.gnu.org/archive/html/axiom-math/2006-08/msg00025.html

For simplicity, here is the fix:

  diff -ur axiom-20050901/src/algebra/sttaylor.spad.pamphlet axiom-20050901.new/src/algebra/sttaylor.spad.pamphlet
  --- axiom-20050901/src/algebra/sttaylor.spad.pamphlet 2005-01-30 07:03:10.000000000 -0500
  +++ axiom-20050901.new/src/algebra/sttaylor.spad.pamphlet     2006-08-21 15:49:25.000000000 -0400
  @@ -448,6 +448,9 @@

             RATPOWERS => co**rn * YS(powerrn(rn,(invCo :: A) * x,#1))
             error "** rational power of coefficient undefined"
  +        zeropref : ST A := new(ord::I::NNI,0::A)$LA :: ST A
  +        concat(zeropref, power)
  +

       if A has Field then
         mapdiv(x,y) == delay

If somebody could complete the documentation as outlined in

http://lists.gnu.org/archive/html/axiom-developer/2006-08/msg00486.html

that would be great.

Finally, I have to confess that it is very likely myself who introduced this bug, while fixing #63

Martin

fix by Igor Khavkine --kratt6, Fri, 27 Oct 2006 03:03:15 -0500 reply
Status: open => fix proposed

Here is the documented patch. (Documentation is partially due to Waldek Hebisch)

powern.patch

Martin