Igor Schein on Tue, 13 May 2003 12:56:50 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: CVS: seriesprecision too large |
On Mon, May 12, 2003 at 05:08:38PM -0700, Ilya Zakharevich wrote: > On Sat, May 10, 2003 at 03:29:23PM -0700, Ilya Zakharevich wrote: > > ? default(seriesprecision,9) > > seriesprecision = 9 significant terms > > ? sin(x+y) > > / 1 3 1 5 1 7 1 9 10 \ > > %2 = | y - -y + ---y - ----y + ------y + O(y ) | + > > \ 6 120 5040 362880 / > > / 1 2 1 4 1 6 1 8 1 10 11 \ > > | 1 - -y + --y - ---y + -----y - -------y + O(y ) | x + > > \ 2 24 720 40320 3628800 / > > OK, I can believe it is an artefact of the used algorithm. But watch this: > > ? sin(x*y/(x+y)) > *** division by zero in gdiv, gdivgs or ginv I am not getting this error (fresh session): GP/PARI CALCULATOR Version 2.2.6 (development CHANGES-1.749) i686 running linux (ix86/GMP-4.1 kernel) 32-bit version compiled: May 1 2003, gcc-3.2 20020903 (Red Hat Linux 8.0 3.2-7) (readline v4.3 enabled, extended help available) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ? sin(x*y/(x+y)) / -1 2 \ | --y + 1 | / 2 \ / 4 2 \ 1 2 | 6 | 3 | -y + 2 | 4 | y - 120y + 120 | 5 %3 = x - -x + | -------- | x + | ------- | x + | ---------------- | x + y | 2 | | 3 | | 4 | \ y / \ -2y / \ 120y / / 4 2 \ / 6 4 2 \ | -y + 40y - 24 | 6 | -y + 630y - 12600y + 5040 | 7 | --------------- | x + | ---------------------------- | x + | 5 | | 6 | \ 24y / \ 5040y / / 6 4 2 \ | y - 210y + 2520y - 720 | 8 | ------------------------- | x + | 7 | \ 720y / / 8 6 4 2 \ | y - 2016y + 211680y - 1693440y + 362880 | 9 10 | ------------------------------------------- | x + O(x ) | 8 | \ 362880y / \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Igor