Output format.

Added by: ~onto, 2011 II 20

Hello. When have long float number(like 9999.9999^10), in output of ToString() i have 9.9999990000000449999988000000209999997480000020999999880000 000449999999e+39
How i can make output format like 999999900000004499999880000002099999974.80000020999999880000 000449999999 ?

Sorry for my bad english.

Added by: tomek, 2011 II 20

You should use 'Conv' struct in such a way:

#include <ttmath/ttmath.h>
#include <iostream>

int main()
{
ttmath::Conv conv;
ttmath::Big<1, 3> a, b;

conv.scient_from = 2000;
// 2000 digits before comma are printed

a = "9999.9999";
b = 10;
a.Pow(b);

std::cout << a.ToString(conv) << std::endl;
}

Struct Conv is defined in ttmathtypes.h and there is a description there.