The problem is that I need the DOUBLE not to print with scientific notation. How can I do that? What I want is that the result no matter how long it is printed.
The data type double
is a floating point number; when it exceeds a specific value, it uses scientific notation forcefully. If you need to use very large integers or rationals, I recommend you see these classes / libraries:
System.Numerics.BigInteger
, in the standard .NET 4.0+ library BigRational
of Base Class Libraries I have not tried them; but I hope they serve you. Good luck!
You can use the overload of the ToString
method on which specifies the format.
For example:
double d = Double.Max;
d.ToString("F");