On Tuesday, March 24, 2015, <[email protected]> wrote: > When using Sage. my students really like using the n() method as in > show(sqrt(2).n(digits=50)) > giving the result rounded off to 50 decimal digits after the decimal point. > > What I'm wondering is where does the n() method come from. Is it peculiar > to Sage or Maxima or what? Is it pure python? The reason I ask is that some > of my independent study student are using mpi4py in openMPI on a Linux > Cluster they put together doing some simple Monte Carlo simulations and > quadrature calculations. If n() is pure python, I'd like to give them the > code so they can get more digits out of their simulations >
Cython. Built into Sage. It's a method on symbolic expressions that evaluates the leaves to the given precision then simplifies the result by evaluating the whole tree to get a single number. > > > Is this doable? What do you think? > > TIA, > A. Jorge Garcia > http://shadowfaxrant.blogspot.com > > > -- > Sent from Mailbox <https://www.dropbox.com/mailbox> > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','sage-support%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- Sent from my massive iPhone 6 plus. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
