1 // check/numeric_output.cpp
3 #include <ginac/ginac.h>
5 unsigned numeric_output(void)
9 cout << "checking output of numeric types..." << flush;
10 clog << "---------output of numeric types:" << endl;
12 unsigned long Digits_before = Digits;
14 clog << "Using " << Digits << " digits" << endl;
15 clog << Pi << " evalfs to: " << Pi.evalf() << endl;
16 clog << Catalan << " evalfs to: " << Catalan.evalf() << endl;
17 clog << EulerGamma << " evalfs to: " << EulerGamma.evalf() << endl;
18 clog << "Complex integers: ";
19 clog << "{(0,0)=" << ex(0 + 0*I) << "} ";
20 clog << "{(1,0)=" << ex(1 + 0*I) << "} ";
21 clog << "{(1,1)=" << ex(1 + 1*I) << "} ";
22 clog << "{(0,1)=" << ex(0 + 1*I) << "} ";
23 clog << "{(-1,1)=" << ex(-1 + 1*I) << "} ";
24 clog << "{(-1,0)=" << ex(-1 + 0*I) << "} ";
25 clog << "{(-1,-1)=" << ex(-1 - 1*I) << "} ";
26 clog << "{(0,-1)=" << ex(0 - 1*I) << "} ";
27 clog << "{(1,-1)=" << ex(1 - 1*I) << "} " << endl;
28 Digits = Digits_before;