Note that Float(1) is not the same as Float(1.0). Fredrik or someone
else would have to explain the details, but I think the reasoning
behind Float(int) => Integer is something related to precision.

Also, as the commit message notes, there is the following
inconsistency in 0.6.7:

In [1]: -1.0*x
Out[1]: -1.0⋅x

In [2]: 1.0*x
Out[2]: x

Which is no longer there in 0.7.0+:

In [1]: -1.0*x
Out[1]: -1.0⋅x

In [2]: 1.0*x
Out[2]: 1.0⋅x

Aaron Meurer

On Sat, Jul 23, 2011 at 5:19 PM, Matthew Brett <[email protected]> wrote:
> Hi,
>
> On Sat, Jul 23, 2011 at 11:26 PM, Aaron Meurer <[email protected]> wrote:
>> Hi.
>>
>> I bisected this to this commit:
>>
>> commit b361ecdaa156e4531d36f853535c23c516d281b2
>> Author: Chris Smith <[email protected]>
>> Date:   Sun May 1 18:56:37 2011 +0545
>>
>>    don't special-case 1.0 in flatten
>>
>>        Real(1.0) was being changed to S.One by flatten. This was removed
>>        since no other Real was being treated that way, e.g. -1.0 is retained.
>>
>>        A couple of test were changed.
>
> I'm just asking - but is that change correct?
>
> The reason to special case it would be that:
>
> sympy.Float(1) == sympy.numbers.One()
>
> and, for me, it's difficult to see the utility of leaving 1.0 in there.
>
> Cheers,
>
> Matthew
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> 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/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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/sympy?hl=en.

Reply via email to