Dear CLN List, 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". Thanks, Leo ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
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
participants (2)
-
Bruno Haible
-
Leo Liberti