hi all,
suppose I have a number like '20.45672987988776880' and I want to truncate all the characters after the second position after the decimal, that means I want to get '20.45' out of it, then what is the syntax? I want the numbers only with atmost 2 characters after the decimal. I'm getting long numbers with the following statement.
set phase [format "%f" [expr $d * 0.00000008381903171539306640625]
but I don't need the long answer after calculation.
thanx in adv,
Raj.
suppose I have a number like '20.45672987988776880' and I want to truncate all the characters after the second position after the decimal, that means I want to get '20.45' out of it, then what is the syntax? I want the numbers only with atmost 2 characters after the decimal. I'm getting long numbers with the following statement.
set phase [format "%f" [expr $d * 0.00000008381903171539306640625]
but I don't need the long answer after calculation.
thanx in adv,
Raj.