[CLN-list] converting cl_F to double?
Bruno Haible
bruno at clisp.org
Mon Jul 11 12:51:49 CEST 2005
Leo Liberti wrote:
> could anyone please tell me how to convert
> a cl_F to a double? I would like to write
> something like
>
> cl_F var = 1.0;
> double d = var;
>
> but the error is "`class cln::cl_F' used where a
> floating point value was expected".
Try
double d = double_approx (var);
As the name indicates, this returns an approximation, because it loses
precision beyond the 16th decimal digit.
Bruno
More information about the CLN-list
mailing list