Dmn table variable rounding using Camunda and SpringBoot (double calculation precision problem)

180 Views Asked by At

I use Camunda and Spring Boot.

I created a dmn-table. But i discoverd a double precision calculation problem.

enter image description here

I need to calculate result with this dmn table. We have two variables that come from java: float a, double b. For example: a= 0.2, b=0.6 And the interval: enter image description here

But the precision problem gives me b=0.600000000001~ insted of 0.6 and table gives me another interval enter image description here

How can i place rounding inside the dmn table to receive variable result as #.#?

I found a way to round variable, but i doesn't work enter image description here

1

There are 1 best solutions below

0
On

I found solution. The problem was exactly with the float-values

Camunda

I just added script in the Expression field