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.000000000000000
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to