[CLN-list] Types in cl_R
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Sat Nov 20 16:27:03 CET 2004
yOn Thu, 18 Nov 2004, Isidro Cachadiña Gutiérrez wrote:
[...]
> > > cln::cl_R expt(cln::cl_R x, cln::cl_R y)
> > > {
> > > return exp(x*ln(y));
> > > }
> > >
> > > And It works fine, but I think that It have to be defined somewhere in
> > > the library.
> >
> > Well, only if `x' is positive, right?
> This is ok because the result is a complex number.
> > Or if `y' is integer.
> No, y can be a real number. There isn't any problem with this.
Oops, I hadn't even noticed that you got `x' and `y' interchanged. My
statement about `y' being integer only makes sense when you put `x' and
`y' in the conventional order.
> Normally if you are using real numbers you don't expect to find things like
> this -5.34^7.32.
Since "real number" is well defined, either your definition of "normally"
or your definition of "to expect" does not agree with my definition. :-)
Or, maybe, both. :-)
Saludos quadrados
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the CLN-list
mailing list