7 May
2019
7 May
'19
12:05 p.m.
On Tue, 7 May 2019 09:50:23 +0000 (UTC), Pedro Sosa via GiNaC-list <ginac-list@ginac.de> said:
PS> Hello, I'm a begginer and I don't find how to convert from ex to PS> double in the tutorialSomebody can help me? Thanks See "4.6.3 Converting numbers" in tutorial. Note that you may need to cast your ex to numeric first, e.g.: ex A = 2; double Ad = ex_to<numeric>(A).to_double(); Sometimes evalf() may be needed as well: ex B = cos(Pi/5); double Bd = ex_to<numeric>(B.evalf()).to_double(); Best wishes, -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/