1 | initial version |

I fully agree with @tmonteil's answer, in particular

avoiding Sage's

`SymbolicRing`

should be a huge gainusing

`RDF`

should be much faster than`RR`

too.

Two small additional comments:

for pi, I would suggest using

`RDF.pi()`

instead of the norm, using the square of the norm saves extracting square roots, eg instead of testing whether

`sqrt(x^2+y^2) < 2`

, test whether`x^2 + y^2 < 4`

. (You should test whether this really saves you time... it could be that the`norm`

method calls faster code than code you might write yourself for`norm_squared`

)

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.