On Aug 29, 2009, at 11:05 PM, Rolandb wrote: > Hi, > > Using math.log has a disadvantage; it is less accurate. > > sage: print n(math.log(2),100) > sage: print n(log(2),100) > 0.69314718055994528622676398300 > 0.69314718055994530941723212146
Yes, it is. Accuracy vs. speed is a common tradeoff one needs to make. If you're going for a numerical answer, log(2).n(1000) will give you 1000 bits of precision. Adjust as you see fit for your application. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
