Random numbers keep appearing after the decimal for the numbers. (47.3 shows as 47.3000000004, etc.)

Certified Associate Developer

We are trying to enter a decimal value into a!floatingPointField(), where the datatype is Number(Decimal) and applying rounddown(value,2) to limit the decimal values to 2 places based on the requirement we recieved. This is being done in editable grids. But it seems that random numbers keep appearing after the decimal for the numbers. (47.3 shows as 47.3000000004, etc.). This case is specifically occurring for only certain numbers in certains fields, such as 47.300909 shows as 47.3000000004 only in 1 particular field for the a specific number starting with 47.30x.. If we enter 47.32x, it will correctly round down to 47.32.

We tried using round(), roundup(), rounddown(), floor() functions also, but it keeps occurring atleast in 1 row in any one of our grids.

What might be the reason behind it and is there any fix??

  Discussion posts and replies are publicly visible