[R] Ryacas and fractions with simultaenously very large numerators and denominators

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Nov 23 20:17:15 CET 2006


"Paul Smith" <phhs80 at gmail.com> writes:

> Dear All
> 
> I am doing the following:
> 
> > x <- yacas("3/2")
> > for (i in 2:400)
> +    x <- yacas(paste(x,"*",x))
> > x
> expression(Inf^1.260864167e+117/Inf^6.304320836e+116)
> > Eval(x)
> [1] NaN
> 
> No luck this way. However, I am successful with
> 
> > y <- yacas("(3/2)^400")
> > y
> expression(7.05507910865533e+190/2.58224987808691e+120)
> > Eval(y)
> [1] 2.732144e+70
> 
> If Ryacas/Yacas cannot multiply fractions with simultaenously very
> large numerators and denominators, what else should I use?

I don't think they are the same: the latter example has 400 terms, the
other about 2^400 terms....

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list