On Tue, Jun 12, 2012 at 4:11 PM, William Stein wrote:
> On Tue, Jun 12, 2012 at 3:54 PM, rych wrote:
>> Interval arithmetics also gives False,
>>
>> sage: from mpmath import iv
>> sage: # iv.prec = 24
>> sage: # iv.prec = 53 # for double precision
>> sage: x = 0.1
>> sage: iv.prec = x.prec() # p
On Tue, Jun 12, 2012 at 3:54 PM, rych wrote:
> Interval arithmetics also gives False,
>
> sage: from mpmath import iv
> sage: # iv.prec = 24
> sage: # iv.prec = 53 # for double precision
> sage: x = 0.1
> sage: iv.prec = x.prec() # precision of Sage Real numbers, 53
> sage: iv.pretty = True
> sag
Interval arithmetics also gives False,
sage: from mpmath import iv
sage: # iv.prec = 24
sage: # iv.prec = 53 # for double precision
sage: x = 0.1
sage: iv.prec = x.prec() # precision of Sage Real numbers, 53
sage: iv.pretty = True
sage: iv.mpf('10.44')
[10.439503, 10.441
On Tuesday, June 12, 2012 3:16:15 AM UTC+1, Jason Grout wrote:
>
> You never compare decimal numbers exactly on a computer. Because of
> finite precision, there almost always will be corner cases that will
> catch you. Instead, do something like:
>
sage: 10.44-10.30
0.139
Don't f
On 6/11/12 6:45 PM, Kwankyu wrote:
Hi all,
I am puzzled.
sage: 10.44-10.30==0.14
False
How should I compare them to get True? Suddenly Sage feels very alien to
me. :-)
You never compare decimal numbers exactly on a computer. Because of
finite precision, there almost always will be corner