On Wed, Nov 24, 2021 at 3:04 AM ast wrote:
>
> Le 19/11/2021 à 21:17, Chris Angelico a écrit :
> > On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
> >>
> >> Le 19/11/2021 à 03:51, MRAB a écrit :
> >>> On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
> On 2021-11-18 at 23:16:32 -0300
Le 19/11/2021 à 21:17, Chris Angelico a écrit :
On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
Le 19/11/2021 à 03:51, MRAB a écrit :
On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
>>> 0.3 + 0.3 + 0.3 == 0.9
False
On 22/11/21 4:58 am, Grant Edwards wrote:
Yep, IIRC, it was a 4 bit processor because 4 bits is what it takes to
represent one decimal digit.
That was the Saturn, first used in the HP-71B. The original
architecture (known as the "Nut")was weirder than that. It operated
serially on 56 bit words
On 2021-11-22 05:43:48 +1100, Chris Angelico wrote:
> On Mon, Nov 22, 2021 at 5:42 AM Peter J. Holzer wrote:
> > (I think I used Math::BigRat in Perl, but I've been
> > programming in Perl for a lot longer.)
>
> Rodents Of Unusual Size? I don't think they exist...
https://www.girlgeniusonline.co
On 2021-11-21 10:57:55 +1100, Chris Angelico wrote:
> And if decimal floating point were common, other "surprise" behaviour
> would be cited, like how x < y and (x+y)/2 < x.
Yup. Took me a bit to find an example, but this can happen. My HP-48
calculator uses a mantissa of 12 decimal digits.
6
On Mon, Nov 22, 2021 at 5:42 AM Peter J. Holzer wrote:
> (I think I used Math::BigRat in Perl, but I've been
> programming in Perl for a lot longer.)
>
Rodents Of Unusual Size? I don't think they exist...
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-11-20 03:25:53 +, Ben Bacarisse wrote:
> Chris Angelico writes:
>
> > It does mean exactly what it meant in grade school, just as 1/3 means
> > exactly what it meant in grade school. Now try to represent 1/3 on a
> > blackboard, as a decimal fraction. If that's impossible, does it mea
On 2021-11-19 12:43:07 +0100, ast wrote:
> Le 19/11/2021 à 03:51, MRAB a écrit :
> > On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
> > > On 2021-11-18 at 23:16:32 -0300,
> > > René Silva Valdés wrote:
> > > > Hello, I would like to report the following issue:
> > > >
> > > > Work
On 2021-11-21, Greg Ewing wrote:
> On 21/11/21 2:18 pm, Grant Edwards wrote:
>> My recollection is that it was quite common back in the days before FP
>> hardware was "a thing" on small computers. CPM and DOS compilers for
>> various languages often gave the user a choice between binary FP and
>>
On 21/11/21 2:18 pm, Grant Edwards wrote:
My recollection is that it was quite common back in the days before FP
hardware was "a thing" on small computers. CPM and DOS compilers for
various languages often gave the user a choice between binary FP and
decimal (BCD) FP.
It's also very common for
-
From: Python-list On
Behalf Of Chris Angelico
Sent: Saturday, November 20, 2021 8:03 PM
To: python-list@python.org
Subject: Re: Unexpected behaviour of math.floor, round and int functions
(rounding)
On Sun, Nov 21, 2021 at 11:39 AM Avi Gross via Python-list
wrote:
>
> Can I suggest a
On Sun, Nov 21, 2021 at 1:20 PM Rob Cliffe via Python-list
wrote:
>
>
>
> On 21/11/2021 01:02, Chris Angelico wrote:
> >
> > If you have a number with a finite binary representation, you can
> > guarantee that it can be represented finitely in decimal too.
> > Infinitely repeating expansions come
om: Python-list On
Behalf Of Chris Angelico
Sent: Saturday, November 20, 2021 6:23 PM
To: python-list@python.org
Subject: Re: Unexpected behaviour of math.floor, round and int functions
(rounding)
On Sun, Nov 21, 2021 at 10:01 AM Avi Gross via Python-list
wrote:
> Computers generally
On 21/11/2021 01:02, Chris Angelico wrote:
If you have a number with a finite binary representation, you can
guarantee that it can be represented finitely in decimal too.
Infinitely repeating expansions come from denominators that are
coprime with the numeric base.
Not quite, e.g. 1/14 is
On Sun, Nov 21, 2021 at 12:56 PM Avi Gross via Python-list
wrote:
>
> Not at all, Robb. I am not intending to demean Mathematicians as one of my
> degrees is in that subject and I liked it. I mean that some things in
> mathematics are not as intuitive to people when they first encounter them,
>
not expected
to apply for a non-abelian case.
-Original Message-
From: Python-list On
Behalf Of Rob Cliffe via Python-list
Sent: Saturday, November 20, 2021 6:19 PM
To:
Subject: Re: Unexpected behaviour of math.floor, round and int functions
(rounding)
On 20/11/2021 22:59, Avi Gross
On 2021-11-21, Chris Angelico wrote:
>> I think there have been attempts to use a decimal representation in some
>> accounting packages or database applications that allow any decimal numbers
>> to be faithfully represented and used in calculations. Generally this is not
>> a very efficient proce
On Sun, Nov 21, 2021 at 11:39 AM Avi Gross via Python-list
wrote:
>
> Can I suggest a way to look at it, Grant?
>
> In base 10, we represent all numbers as the (possibly infinite) sum of ten
> raised to some integral power.
Not infinite. If you allow an infinite sequence of digits, you create
num
om: Python-list On
Behalf Of Grant Edwards
Sent: Saturday, November 20, 2021 5:24 PM
To: python-list@python.org
Subject: Re: Unexpected behaviour of math.floor, round and int functions
(rounding)
On 2021-11-20, Ben Bacarisse wrote:
> You seem to be agreeing with me. It's the floating
On Sun, Nov 21, 2021 at 10:55 AM Ben Bacarisse wrote:
>
> Grant Edwards writes:
>
> > On 2021-11-20, Ben Bacarisse wrote:
> >
> >> You seem to be agreeing with me. It's the floating point part that is
> >> the issue, not the base itself.
> >
> > No, it's the base. Floating point can't represent
Grant Edwards writes:
> On 2021-11-20, Ben Bacarisse wrote:
>
>> You seem to be agreeing with me. It's the floating point part that is
>> the issue, not the base itself.
>
> No, it's the base. Floating point can't represent 3/10 _because_ it's
> base 2 floating point. Floating point in base 10
On Sun, Nov 21, 2021 at 10:01 AM Avi Gross via Python-list
wrote:
> Computers generally use finite methods, sometimes too finite. Yes, the
> problem is not Mathematics as a field. It is how humans often generalize or
> analogize from one area into something a bit different. I do not agree with
> a
On 20/11/2021 22:59, Avi Gross via Python-list wrote:
there are grey lines along the way where some
mathematical proofs do weird things like IGNORE parts of a calculation by
suggesting they are going to zero much faster than other parts and then wave
a mathematical wand about what happens when
n
floats but on the design not accommodating the precision needed or perhaps
on the algorithm used not necessarily being expected to reach a certain
level.
-Original Message-----
From: Python-list On
Behalf Of Chris Angelico
Sent: Saturday, November 20, 2021 5:17 PM
To: python-list@python.or
On Sun, Nov 21, 2021 at 9:22 AM Grant Edwards wrote:
>
> On 2021-11-20, Chris Angelico wrote:
>
> > But you learn that it isn't the same as 1/3. That's my point. You
> > already understand that it is *impossible* to write out 1/3 in
> > decimal. Is it such a stretch to discover that you cannot wr
On 2021-11-20, Ben Bacarisse wrote:
> You seem to be agreeing with me. It's the floating point part that is
> the issue, not the base itself.
No, it's the base. Floating point can't represent 3/10 _because_ it's
base 2 floating point. Floating point in base 10 doesn't have any
problem represent
On 2021-11-20, Chris Angelico wrote:
> But you learn that it isn't the same as 1/3. That's my point. You
> already understand that it is *impossible* to write out 1/3 in
> decimal. Is it such a stretch to discover that you cannot write 3/10
> in binary?
For many people, it seems to be.
There ar
On Sun, Nov 21, 2021 at 8:32 AM Avi Gross via Python-list
wrote:
>
> This discussion gets tiresome for some.
>
> Mathematics is a pristine world that is NOT the real world. It handles
> near-infinities fairly gracefully but many things in the real world break
> down because our reality is not infi
On Sun, Nov 21, 2021 at 6:51 AM Ben Bacarisse wrote:
>
> Chris Angelico writes:
>
> > On Sat, Nov 20, 2021 at 3:41 PM Ben Bacarisse wrote:
> >>
> >> Chris Angelico writes:
> >>
> >> > On Sat, Nov 20, 2021 at 12:43 PM Ben Bacarisse
> >> > wrote:
> >> >>
> >> >> Chris Angelico writes:
> >> >>
This discussion gets tiresome for some.
Mathematics is a pristine world that is NOT the real world. It handles
near-infinities fairly gracefully but many things in the real world break
down because our reality is not infinitely divisible and some parts are
neither contiguous nor fixed but in some
Chris Angelico writes:
> On Sat, Nov 20, 2021 at 3:41 PM Ben Bacarisse wrote:
>>
>> Chris Angelico writes:
>>
>> > On Sat, Nov 20, 2021 at 12:43 PM Ben Bacarisse
>> > wrote:
>> >>
>> >> Chris Angelico writes:
>> >>
>> >> > On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse
>> >> > wrote:
>> >>
On Sat, Nov 20, 2021 at 3:41 PM Ben Bacarisse wrote:
>
> Chris Angelico writes:
>
> > On Sat, Nov 20, 2021 at 12:43 PM Ben Bacarisse wrote:
> >>
> >> Chris Angelico writes:
> >>
> >> > On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse
> >> > wrote:
> >> >>
> >> >> Chris Angelico writes:
> >> >>
Chris Angelico writes:
> On Sat, Nov 20, 2021 at 12:43 PM Ben Bacarisse wrote:
>>
>> Chris Angelico writes:
>>
>> > On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse wrote:
>> >>
>> >> Chris Angelico writes:
>> >>
>> >> > On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>> >>
>> >> >> >>> 0.3 + 0.3 +
On Sat, Nov 20, 2021 at 12:43 PM Ben Bacarisse wrote:
>
> Chris Angelico writes:
>
> > On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse wrote:
> >>
> >> Chris Angelico writes:
> >>
> >> > On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
> >>
> >> >> >>> 0.3 + 0.3 + 0.3 == 0.9
> >> >> False
> >> >
> >>
Chris Angelico writes:
> On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse wrote:
>>
>> Chris Angelico writes:
>>
>> > On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>>
>> >> >>> 0.3 + 0.3 + 0.3 == 0.9
>> >> False
>> >
>> > That's because 0.3 is not 3/10. It's not because floats are
>> > "unreliable"
On 20/11/2021 10.21, Chris Angelico wrote:
> On Sat, Nov 20, 2021 at 7:39 AM dn via Python-list
> wrote:
>>> 0.3 + 0.3 + 0.3 == 0.9
False
>>>
>>> That's because 0.3 is not 3/10. It's not because floats are
>>> "unreliable" or "inaccurate". It's because the ones you're entering
>>> are n
On Sat, Nov 20, 2021 at 9:07 AM Ben Bacarisse wrote:
>
> Chris Angelico writes:
>
> > On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>
> >> >>> 0.3 + 0.3 + 0.3 == 0.9
> >> False
> >
> > That's because 0.3 is not 3/10. It's not because floats are
> > "unreliable" or "inaccurate". It's because the on
Chris Angelico writes:
> On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>> >>> 0.3 + 0.3 + 0.3 == 0.9
>> False
>
> That's because 0.3 is not 3/10. It's not because floats are
> "unreliable" or "inaccurate". It's because the ones you're entering
> are not what you think they are.
>
> When will peop
On Sat, Nov 20, 2021 at 7:39 AM dn via Python-list
wrote:
> >> >>> 0.3 + 0.3 + 0.3 == 0.9
> >> False
> >
> > That's because 0.3 is not 3/10. It's not because floats are
> > "unreliable" or "inaccurate". It's because the ones you're entering
> > are not what you think they are.
> >
> > When will p
On 20/11/2021 09.17, Chris Angelico wrote:
> On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>> Le 19/11/2021 à 03:51, MRAB a écrit :
>>> On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
> Working with floats i notic
On Sat, Nov 20, 2021 at 5:08 AM ast wrote:
>
> Le 19/11/2021 à 03:51, MRAB a écrit :
> > On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
> >> On 2021-11-18 at 23:16:32 -0300,
> >> René Silva Valdés wrote:
> >>
> >>> Hello, I would like to report the following issue:
> >>>
> >>> Wor
On 11/18/21 19:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.99/12) returns 1, and
int(23.999/12) returns 2
This im
Le 19/11/2021 à 12:43, ast a écrit :
Le 19/11/2021 à 03:51, MRAB a écrit :
On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.
Le 19/11/2021 à 03:51, MRAB a écrit :
On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.99/12) returns 1, and
int(
On 2021-11-19 02:40, 2qdxy4rzwzuui...@potatochowder.com wrote:
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.99/12) returns 1, and
int(23.999/12) returns 2
This
On 2021-11-18 at 23:16:32 -0300,
René Silva Valdés wrote:
> Hello, I would like to report the following issue:
>
> Working with floats i noticed that:
>
> int(23.99/12) returns 1, and
> int(23.999/12) returns 2
>
> This implies that int() function is rounding ...
It's
Hello, I would like to report the following issue:
Working with floats i noticed that:
int(23.99/12) returns 1, and
int(23.999/12) returns 2
This implies that int() function is rounding, which doesn't appear to be
expected (documentation doesn't say anything about it). Lo
47 matches
Mail list logo