### How to do math with decimals in Polarion

Posted:

**Tue Dec 19, 2017 4:48 pm**I am having completing some basic match operations using the Velocity Templating Language in Polarion ALM.

I was able to do the following with success:

$math.toInteger($requirement.get(3))

$requirement.get(3) is a Long number value. Doing that converts it to the integer value.

So seeing that I have $math available to me, following the documentation for VTL: https://velocity.apache.org/tools/1.2/g ... #toDouble()

I am attempting to use toDouble(). by trying this:

#set($value = $math.toDouble(1.3))

I would have expected $value is a double and equal to 1.3 But that doesn't work. Any ideas on what else to try?

I was able to do the following with success:

$math.toInteger($requirement.get(3))

$requirement.get(3) is a Long number value. Doing that converts it to the integer value.

So seeing that I have $math available to me, following the documentation for VTL: https://velocity.apache.org/tools/1.2/g ... #toDouble()

I am attempting to use toDouble(). by trying this:

#set($value = $math.toDouble(1.3))

I would have expected $value is a double and equal to 1.3 But that doesn't work. Any ideas on what else to try?