On 6/2/08, William Stein <[EMAIL PROTECTED]> wrote:
>  > sage: a = e - 1
>  > sage: for i in range(2,200):
>  > ....:     a = (a-1)*i
>  > ....:
>  > sage: float(a)
>  > -inf
>
> <joke>
>  Oh my god, floating point numbers are just broken!
>  </joke>

:-)

>  Seriously, floating point numbers are what they are.

Fair enough. The point I tried to make (not claiming anything is
broken) is perhaps complemented by the following:

sage: expand(a)
3943289336823952517761816069660925311475679888435866316473712666221797249817016714601521420059923119520886060694598194151288213951213185525309633124764149655567314286353816586186984944719612228107258321201270166459320656137141474266387621212037869516201606287027897843301130159520851620311758504293980894611113948118519486873600000000000000000000000000000000000000000000000*e
- 
10718971748644869545882855035558709219326197160960676962072649602582551264719783234505244404668998392076585003319325446678612269966334945842611842879092400407644778161460862429166937616985702801147176754507686032298026763211111234497467428555982733907104528850484797214679822706672415691688065756374587435109932151999457607946738407969860677357914214979720210208723664522819

This is a particular symbolic expression, which has a particular value
in RR, whose best approximation in RDF is far from -inf or

sage: RDF(expand(a))
nan

The "philosophical" question is whether:

sage: RDF(A*e - B)

(where A*e is damn close to B+1)

should be evaluated as

sage: RDF(A)*RDF(e) - RDF(B)

which is definitely nan since RDF(A) == RDF(B) == +inf.

What I mean is, the symbolic expression has (in principle) enough
information to figure out that RDF(A*e-B) is close to 1. Whether it is
reasonable to expect that is the question.

Best, Gonzalo

PS: for the record, this seems to be "broken" in the same way in
mathematica, for one.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to