Hi CLN developers,
Sorry for frequently asking questions. I have checked manual and searched
mailing list for full example, but nothing inside. Moreover, I only
familiar with C...
Question: How to use `print_float()` to print multi-precision floating
number in scientific notation on terminal? below is the full code I have
ever tried, but it always gives me compilation error.
thanks.
#include <cln/io.h>
#include <cln/float.h>
#include <cln/float_io.h>
using namespace cln;
int main( ) {
int N = 10;
cl_F x[N];
for (int i=0 ;i<N;i++) x[i] =
"0.333333333333333333333333333333333333333333333333333333333333";
// cl_print_flags.float_readably = true;
for (int i=0 ;i<N;i++) print_float(stdout,
cl_print_flags.float_readably, x[i]);
return 0 ;
}