[GiNaC-list] Problem: Floating point overflow

Chris.Dams at mi.infn.it Chris.Dams at mi.infn.it
Thu Mar 29 13:37:32 CEST 2007


Caro Alberto,

>     GiNaC::ex pp("sin(sin(sin(sin(log(-0.760)))))",GiNaC::lst(x));

> 1) Why does it  not throw and exception?

Numerical evaluations are delegated to the underlying CLN library. That
library does not do exceptions.

> 2) Is it possible to stop ginac tries to evaluate the numeric expressions?

Yes, but not from a string. In normal code you can type

sin(sin(sin(sin(log(-0.760).hold()))))

The .hold() method is used to indicate that an object should not be
evaluated.

Saluti,
Chris



More information about the GiNaC-list mailing list