[sage-support] Re: Arbitrary precision computations?
Thanks very much! -Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Arbitrary precision computations?
On Apr 29, 2009, at 6:17 PM, Alasdair wrote: > Here's my input: > > h=10.0^(-20) > ex=(2.7^h-1)/h > > and my output: > > 0.000 > > How to I coerce Sage to work with arbitrary precision, and to return > the correct value, which is about 0.99? Try sage: R = RealField(500) sage: h = R(10)^-20 sage: print (R(2.7)^h-1)/h 0.9932517730102833901726770015061532639415526726048180749159032931769966 089695123374514625906903549365273146831326783123824292605435199290675977 83729094 - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Arbitrary precision computations?
On Wed, Apr 29, 2009 at 6:17 PM, Alasdair wrote: > > Here's my input: > > h=10.0^(-20) > ex=(2.7^h-1)/h > > and my output: > > 0.000 > > How to I coerce Sage to work with arbitrary precision, and to return > the correct value, which is about 0.99? Here's one way: sage: R = RealField(200) sage: h = R(10^(-20)) sage: (R(2.7)^h-1)/h 0.99325177301028339017267700150615326394159909466200116916687 --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---