I have tried to resolve the problem of the following link How can I solve precision problem
I can tell the problem described in that link shortly here, It's no mater how many precision is there after decimal(.) the result should be 2 or 3 precision after decimal as per user requirement.e.g
N[10/3]
3
Output should be as per user wish precision as 2.
3.33
3.00
There I found NumberForm[]
function as a solution, since the NumberForm[]
function is wrap up the result, I can't get the result as number out of it.
I tried like this
NumberForm[N[10/3],{4,2}]
NumberForm[3, {4, 2}]
Output am getting is
3.33
3.00
But when I try to do further operation, it's not computing
NumberForm[N[10/3], {4, 2}] + 1
NumberForm[3, {4, 2}] + 1
Output
1+3.33
1+3.00
I tried other way also which follows
ToExpression[ToString[NumberForm[3, {4, 2}]]]
OutPut
3.
but I need output as 3.00. Help me to find the solution.