Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Result of a "double" division gives an integer with no decimal as result

Avatar

Level 5

Hi,

Hopefully a simple issue:


Making the division (or using a percent function) A = B/C such as A,B,C are "double" typed for some reason the result is rounded to the next integer.

Iif(B=0, 0, (A*100)/B)

or

Iif(B=0, 0, Percent(A,B)*100 )

Example:
B = 2
C = 3
Result A= 67.00
Expected A= 66.66

Any idea ?

Adobe Campaign

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi Florent,

I solved this issue using "Percent" but still I cannot understand why the division of two doubles give as a result an integer number without decimal part.

Salvatore

View solution in original post

3 Replies

Avatar

Level 10

Hi,

Can you try using the Round function in your calculation? Round(<number>, <number of decimals>)

Let me know if that would work for you,

Florent

Avatar

Level 10

Hi Salvatore,

Were you able to get the result you wanted?

Let me know,

Florent

Avatar

Correct answer by
Level 5

Hi Florent,

I solved this issue using "Percent" but still I cannot understand why the division of two doubles give as a result an integer number without decimal part.

Salvatore