cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect decimal output

Former Member
0 Kudos

Hi ALL,

we recently had a requirement where the unit price needed to be change from 2 decimal to 4 decimal.

we have defined a variable int he global defination with 4 decimal and printing the same in the form but the output i.e decimal places is printing incorrect. eg the actual figure is 1.233, but it prints as 12.3300.

plz suggest as to what is the issue.

regards

Arvind Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

we solved the issue by defining a temp variable with 4 decimal and the storing the actual value in it. once the value is stored, depending on the output required divide it by 2 or 3 and then print the value in temp variable.

Thanks

Arvind Kumar

Former Member
0 Kudos

Dear Arvind kumar,

Are u get the answer: i am aslo same issue Please help me

Warm regards

murali  krishna

Former Member
0 Kudos

How did you define and populate the variable? Is it a numeric data type in a program or ??

If in a program, if both input and target are numeric types, the calculation should always be correct...

do you have (.4)& at the end of your variable name?