Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: arithmetic anomaly
- X-seq: zsh-users 26611
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: arithmetic anomaly
- Date: Fri, 26 Mar 2021 08:35:47 -0700
- Archived-at: <https://zsh.org/users/26611>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-03/691e63e8-aff6-cce6-d7b4-7bf6de10363a%40eastlink.ca>
- In-reply-to: <CAN=4vMqMe-dFWSWLnsn=K9e_gqs+-QedXU_QqOtiqeYO6cV8bg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <0227b30d-4f09-2c8b-1248-557859d875ce@eastlink.ca> <91303-1616717760.288585@Iyj2.F9RA.VD0P> <cb16b987-9521-e2b7-3bbc-8b71677b913c@eastlink.ca> <CAN=4vMpq2ECpWkFt5mAO1rwCGp0Q+UYCxnPr5kT6fReXhycSZQ@mail.gmail.com> <6d70bc8d-73d3-7866-6485-ee89dafdebc9@eastlink.ca> <CAN=4vMqMe-dFWSWLnsn=K9e_gqs+-QedXU_QqOtiqeYO6cV8bg@mail.gmail.com>
On 2021-03-26 7:49 a.m., Roman Perepelitsa wrote:
Aborted based on which condition? If the result of an operation is not
representable exactly in a double? If so, then even `1. / 10` would
abort because the real number 0.1 is not representable.
Ha! You have a point there! The article you linked talked about some
of these issues, but surely in my case it's simply a plain fact that no
decimal past 15 can be accurate ever? Perhaps in practice this is not
so easy to distinguish but we used to end rounding errors with that
(what's it called?) the 'S' on it's side, the 'approximation' symbol.
Anyway, it's easy for me to preach since I don't have to figure out how
this would work in practice. It's easy to talk about but perhaps not so
easy to code. For now I'm awake to the issue: no accuracy past 15 digits.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author