How to convert from Java Math BigDecimal

How do I deal with datatype changing to java math.decimal on the fly, this is because user input decimal point on the numeric input field.

I have a numeric field that represent percentage.
I divide numeric field value by 100 and writes to a document tag.
For some reason when I read the document tag, it will return number with Java Big Decimal.
I received the ff error:

TypeError: unsupported operand type(s) for +: 'int' and 'java.math.BigDecimal'

I am thinking of adding a try except clause.
But can't imagine how it would be.

Any idea?

have you tried to float both numbers?

intVariable = 42

decVariable = 3.1415926

addedVars = float(intVariable) + float(decVariable)

I have experienced a similar issue before: when using 'import ast' to export an XML file into a dictionary, many of the floats were being cast as BigDecimal. I wonder if this is a relic of the Java backend.... Anyways, you may want to "import java.math.BigDecimal" and use the built-in method "someBDNumber.floatValue()" to recast as a float after checking "type(someBDNumber)". Hopefully that may it least lead you to a solution!