Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Adobe Forms calculation bug?

$
0
0

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.

 

issue.png


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>