Hi,
I am using the following code in flee version 0.9.18.0 to evaluate string expressions passed to a function:
poExpContext = New ExpressionContext
poExpOptions = poExpContext.Options
poExpOptions.ResultType = GetType(Double)
poExpContext.Imports.AddType(GetType(Math))
poExp = ExpressionFactory.CreateGeneric(Of Double)(expression, poExpContext)
Evaluate = poExp.Evaluate
I noticed a strange behaviour in the calculations:
If I pass '8833 * 1016000 * 0.000023' it calculates 7687.86816
If I pass '1.0 * 8833 * 1016000 * 0.000023' then it correctly calculates 179486.56
The expressions are intended to be decimal/real calculations. Is there any way of forcing the engine to treat all numeric values as real?
Or is there a fix in the later releases for this issue?
Thanks
Milesh
