[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Incorrect expression calculation between programming languages
- From: wra1th+gavin <gavin@...>
- Date: Fri, 06 Aug 2021 16:05:30 +0100
On 2021-08-06 15:09, Roberto Ierusalimschy wrote:
The difference between the 80... x 82... categories seems a precision
That difference is due to how each language rounds integer divisions
with negative operands.
More ammunition for the proponents of strong typing. As far as I am
concerned % has type
uint*uint->uint, unless you want to use it for polynomials or Gaussian
integers or some other instance of a remainder theorem. The fastidious
mathematician will deprecate the appearance even of negative integers in
the neighbourhood of this symbol.
reminded me of those blackboards filled with fake maths you tend to see
in bad films in which mad scientists figure.