>> You can prove that any  valid IEEE float is a rational

No ! Why ? Because of the arithmetic rules. You can have approximation to
do. With decimals, you have to do exact calculations.

Christophe BAL.



2014-03-23 22:02 GMT+01:00 Richard Fateman <[email protected]>:

> You can prove that any  valid IEEE float is a rational   (invalid:
> infinities, NaNs) by looking at the definition.
>
> A fraction  (or "mantissa")  times an integer power of 2 is always a
> rational number.  Using "*" as a shorthand
> for "times"   does not mean that the intention was to use the defective
> multiplication in programming languages
> such as python.
> Common Lisp has  the function rational.
>
> (rational 0.1d0)  returns  3602879701896397/36028797018963968
>
> which is  an integer times 2^(-55).
>
> I agree that most hardware and software makes the "inexact" flag difficult
> to access.
> Maybe if someone with a popular language made a sufficient fuss, that
> would change.
>
> RJF
>
>
>
>
> On Saturday, March 22, 2014 6:00:13 PM UTC-7, Aaron Meurer wrote:
>
>> I'm pretty sure that removing it is the same as setting it to None,
>> because it falls back to the superclass which sets unknown assumptions
>> to None. I would set them both explicitly to None to be clear that
>> that really is what we want, and not just that it isn't implemented.
>>
>> Aaron Meurer
>>
>> On Sat, Mar 22, 2014 at 1:25 PM, Kalevi Suominen <[email protected]>
>> wrote:
>> >
>> >
>> > On Saturday, March 22, 2014 6:24:12 PM UTC+2, Aaron Meurer wrote:
>> >>
>> >> Oh, that's good. This was setting is_rational and is_irrational to
>> >> None? I think that's what they should be.
>> >>
>> > I was testing with is_rational commented out (is_irrational does not
>> exist
>> > in Float).
>> > A missing attribute would reveal every attempted use. I think this is
>> how it
>> > should
>> > be in production code, to warn off any accidental use.
>> >
>> > Kalevi Suominen
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "sympy" 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/sympy.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msgid/sympy/ca368bca-abef-
>> 43ec-aba7-7ed55df20d76%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/8913c2fa-e338-4b0d-a6d3-1fe915d6eb07%40googlegroups.com<https://groups.google.com/d/msgid/sympy/8913c2fa-e338-4b0d-a6d3-1fe915d6eb07%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAAb4jG%3DBWwsi3q2SRyPO4uwR%2BeVS2W9OFFpdHod3F9p0gZr-jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to