2 Replies Latest reply on May 6, 2010 8:54 AM by gkaiseril

    Adobe Forms: math.round / multipication bug in  / java script

    Softare-Management GmbH

      Dear Forum / Dear Adobe Team,

       

      there is a critial bug in the multiplication operation. The problem is that this problem occurs in all latest Adobe Reader Editions and Adobe Acrobat Editions.

       

      See this code as an example

      var f= 367.295;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);
      var f= 567.295;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);
      var f= 567.285;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);
      var f= 567.275;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);
      var f= 567.265;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);
      var f= 567.245;  var dest=f*100; console.println("input:"+f+ " * 100 result in:"+ dest);

      result:

      input:367.295 * 100 result in:36729.5
      input:567.295 * 100 result in:56729.49999999999 //>>>>>> bug and causes critical round erros
      input:567.285 * 100 result in:56728.5
      input:567.275 * 100 result in:56727.5
      input:567.265 * 100 result in:56726.5
      input:567.245 * 100 result in:56724.5

       

      Thank you for your support

      Software-Management GmbH