next up previous contents
Next: Multiple occurrences of variables: Up: Utilities procedures of ALIAS-Maple Previous: Reusing a compiled program:   Contents

Expression conversion: Convert_Frac_Cons

ALIAS uses a special mechanism to convert an expression into an equivalent C++ sentence that can be interval evaluated. This conversion is based on the conversion of the expression into a string in which all mathematical functions are substituted by their interval equivalent. This causes a problem if rational numbers are present in the expression as rational such as 1/6 will lead to 0 in C++. This procedure returns a string that describes the interval equivalent of the expression in which rational such as 1/6 as 1./6. and constant such as Pi have been converted into their C++ equivalent. For example

 
Convert_Frac_Cons(1/6*Sin(v_IS(1))+Pi+2/3*Cos(v_IS(2)));

1./6.Sin(v_IS(1))+BiasPi+2./3.*Cos(v_IS(2))


Jean-Pierre Merlet 2012-12-20