These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

IEEE 754 standard Rounding Issue

jhosch
Registered: Feb 18 2010
Posts: 10
Answered

Hello,

I am experiencing another rounding issue. I am sure that it has to do with the IEEE 754 standard. For example, I need to multiply $1275.00 * .589 (two existing fields called TOTINST_CHG and PERCENT_UNEARNEDT4). The answer then will show up in a third field called UNEARNEDCHG_AMT. The answer to the math is $750.975 (which, should be rounded to $750.98). However, the round function is causing the number to round to $750.97.

I understand that this is compliant with the IEEE 754 standard. However, this is a Title 4 Financial Aid form/calculation, and must be correct to the penny. If anyone has any work-around solutions, I would appreciate it!

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hmm, that's interesting.

I dont have this rounding issue.
What script do you use to calculate? I tried this one.

var MyResult =  TOTINST_CHG *  PERCENT_UNEARNEDT4$ = Round(MyResult ,2)

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

jhosch
Registered: Feb 18 2010
Posts: 10
I was using Round ( (xfa.form.topmostSubform.Page2.TOTINST_CHG[0] * (xfa.form.topmostSubform.Page2.PERCENT_UNEARNEDT4 /100)) , 2). H

owever, the script that you provided works perfectly!

Thank you for your help. This is the first time I have ever used this program, and am not a tech oriented person! Thanks again!
jhosch
Registered: Feb 18 2010
Posts: 10
I ran into the same problem using the script that was provided by radzmar. This seems to happen only randomly and I am not sure why. If anyone has more information on the issue, please let me know. It is causing quite a headache for me. It is weird sometimes some rounding methods work while others don't. As I said before I understand that this is a IEEE 754 standard issue. So, if there are any ways around this issue let me know. Thank you.