>
> Need a function that view an generic numerical expression of any lenght
> like:
>
> 0.5 + 1/3 - 3/8 +0.3*1/4
>
> detect the decimal number, convert it for rational number, show the
> convertion
> of this decimal to rational and show the result in a rational number.
>
> This is for teaching childrens to calculate the num=E9rical expressions a
nd
> return its value in a simplificated form.
>
If you set simp:false, then all simplifications will be turned off. You ca
n
write any code you want to operate on the resulting expression.
If, on the other hand, you care about the difference between 0.5 = 5/10 a
nd
0.50 = 50/100, you will have to parse the input yourself. If you don't
parse the input yourself, but convert the floats, you need to be careful
about comparisons in your float-to-rational conversion. For example,
0.29*100-29 is not 0.
-s