U
utab
Dear all,
On a formatted printing operation that I am trying to accomplish for
doubles, I have a question. I would like to print a double, d, and its
square, d*d, but I would like to make the argument to be computed upon
the length of the numbers(d and d*d) so that it lines up neatly in the
columns. For this operation, I need the number of digits in a double,
however, due to floating point representation, the double values are
not represented exactly. So is there a way to find the number of
digits of a double number in a robust way for print out?
P.S. For integers I coded a similar version like the one I explained
above but for doubles the above problem made me think on that a bit.
Rgds,
On a formatted printing operation that I am trying to accomplish for
doubles, I have a question. I would like to print a double, d, and its
square, d*d, but I would like to make the argument to be computed upon
the length of the numbers(d and d*d) so that it lines up neatly in the
columns. For this operation, I need the number of digits in a double,
however, due to floating point representation, the double values are
not represented exactly. So is there a way to find the number of
digits of a double number in a robust way for print out?
P.S. For integers I coded a similar version like the one I explained
above but for doubles the above problem made me think on that a bit.
Rgds,