Equivalent of evalf for numeric (for fractions)
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Tue Dec 5 16:19:06 CET 2000
On Mon, 4 Dec 2000, Eduardo M Kalinowski wrote:
> How can I convert a GiNaC::numeric that contains a fraction (or even
> a integer, for that matter) into a numeric with the real representation
> of the fraction? Currently I'm adding "0.0" to the numeric to force it
> into a real number. This works, but is ugly. How about an "evalf"
> function for GiNaC::numeric?
This is exactly why GiNaC::numeric has a method "evalf" and internally it
is doing exactly what you are suggesting. :-)
Regards
-richy.
--
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
-
To UNSUBSCRIBE, email to ginac-list at ginac.de with a subject of "unsubscribe".
More information about the GiNaC-list
mailing list