[CLN-list] Constructing floating-point numbers

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Wed May 26 08:26:13 CEST 2010


On Tue, May 25, 2010 at 03:02:56PM -0400, Joshua Friedman wrote:

> I say,
> cln_R  x = 3.4;
> then I computer exp(x),
> now I convert it to cln_F,
> Can I do so at any precision.

No. 3.4 is a double precision number, so the result is a double precision too.
You have to use cl_float if you need a better precision, i.e.

cl_F x = cl_float(34, float_format_t(128))/10;
cl_F y = exp(x);

> Is exp(x) just a symbolic computation

No, it's a function call.

Best regards,

More information about the CLN-list mailing list