Karim BELABAS on Sat, 12 Oct 2002 18:34:25 +0200 (MEST)


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

Re: gp: x^(1/2) and (1/x)^(1/2) and sqrt(x)


On Sat, 5 Oct 2002, Michael Somos wrote:
> ? (1/x)^(1/2)
>   ***   log is not analytic at 0.
> ? x^(1/2)
>   ***   not an integer exponent for non invertible series in gpow.
> ? sqrt(x)
>   ***   odd exponent in gsqrt
>
> It seems to me that this is a confusing variety of error messages.
> Perhaps there might be a way to make them more comparable?  It
> is further interesting that :
>
> ? (1/x^2)^(1/2)
>   ***   log is not analytic at 0.
> ? (x^2)^(1/2)
>   ***   not an integer exponent for non invertible series in gpow.
> ? sqrt(x^2)
> %3 = x + O(x^15)
>
> Perhaps it would be easy to make these comparable also?

I have written a common driver for sqrt, sqrtn and x^(a/b) [a,b integers].
I now get (\ps 16)

(18:24) gp > (1/x)^(1/2)
  ***   2 should divide valuation (= -1) in sqrtn.
(18:24) gp > x^(1/2)
  ***   2 should divide valuation (= 1) in sqrtn.
(18:24) gp > sqrt(x)
  ***   2 should divide valuation (= 1) in sqrtn.

(18:24) gp > (1/x^2)^(1/2)
%1 = x^-1 + O(x^15)

(18:24) gp > (x^2)^(1/2)
%2 = x + O(x^17)

(18:24) gp > sqrt(x^2)
%3 = x + O(x^17)

[ note I get the requested 16 significant terms now ]

Cheers,

    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/