Just discovered, by accident, that simple calculations in PDF forms can produce unexpected results.
I'm dividing 7 by 100 and multiplying the result by 100. What do you think one should get? 7? Not really.
Adobe form thinks it is: 7.000000000000001
To reproduce the issue:
- create a simple form with two decimal fields (field1 and field2);
- add script for exit event from the second field:
var test = (Field_1.rawValue/Field_2.rawValue)*100;
app.alert(""+test);
Can one tell me what I'm doing wrong? Thanks.