Karim BELABAS on Sun, 8 Sep 2002 00:31:26 +0200 (MEST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gp: forbidden multiplication t_INT * t_RFRAC


On Mon, 26 Aug 2002, Michael Somos wrote:
> This is a bug in division which may have been triggered by not reducing
> properly a rational fraction. Note that the first example without the
> minus sign is okay. The second example with the '1/Ser(...)' is okay also.
> However, the third example which first does the 'Ser(...)' and then the
> reciprocal triggers the bug.
>
> ==============================================================================
> Reading GPRC: /u/home/somos/.gprc ...Done.
>
>           GP/PARI CALCULATOR Version 2.2.4 (development CHANGES-1.491)
>                  UltraSparc (MicroSparc kernel) 32-bit version
>               (readline v2.2 enabled, extended help not available)
>
>                        Copyright (C) 2002 The PARI Group
>
> PARI/GP is free software, covered by the GNU General Public License, and
> comes WITHOUT ANY WARRANTY WHATSOEVER.
>
> Type ? for help, \q to quit.
> Type ?12 for how to get moral (and possibly technical) support.
>
>    realprecision = 28 significant digits
>    seriesprecision = 16 significant terms
>    format = g0.28
>
> parisize = 4000000, primelimit = 500000
> ? [1/y,1/(y+z)]
> %1 = [1/y, 1/(y + z)]
> ? Ser(%/%[1])
> %2 = 1 + y/(y + z)*x + O(x^2)
> ? 1/%
> %3 = 1 - y/(y + z)*x + O(x^2)
> ? [-1/y,1/(y+z)]
> %4 = [-1/y, 1/(y + z)]
> ? 1/Ser(%/%[1])
> %5 = 1 + y/(y + z)*x + O(x^2)
> ? [-1/y,1/(y+z)]
> %6 = [-1/y, 1/(y + z)]
> ? Ser(%/%[1])
> %7 = 1 + y/(-y - z)*x + O(x^2)
> ? 1/%
>   ***   forbidden multiplication t_INT * t_RFRAC.

This has been fixed as a side effect of my previous patch, about the
(-2/z) / (-1/z) --> (-2 / -1) problem.

Thanks,

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/