I need to specify the exact line length for printing from a double value, but I do not want to limit the output more than necessary.
What is the maximum length that a six-digit double prefix will have when formatting printf ()?
In particular, what value should I give X to printf("%X.6lg",doubleValue);to ensure that the value will not be truncated?
The reason that I have to be specific about the length is because I define an MPI-based data type that consists of many string representations of double values and needs to know their exact length in order to split file regions between MPI processes.
I hope this is clear. Thanks in advance for your reply.
source
share