Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
538
problem parsing a formula with doubles in exponent notation
posted

Why does following formula not parse with the wincalcmanager

"(508767.36+0)/(100-(0+0+0+0+2.8421709430404E-14+7+2.8421709430404E-14))*5"

this is the code used:

calculationformula="(508767.36+0)/(100-(0+0+0+0+2.8421709430404E-14+7+2.8421709430404E-14))*5"

Infragistics.Win.UltraWinCalcManager.UltraCalcManager mgr = new Infragistics.Win.UltraWinCalcManager.UltraCalcManager(null);

 

Infragistics.Win.CalcEngine.UltraCalcValue val = mgr.Calculate(calculationformula);

 

if (val!=null)

result=double.Parse(val.Value.ToString());

Error returned is "Formula syntax error. Unable to compile the formula: Unexpected token \"E\" <TEXT>, expected \")\", on line: 1 column: 44"

If i can not used exponent notation, how do i transform that to something the calculation manager understands? 

 

Parents
No Data
Reply Children
No Data