[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: integer arithmetics
From: |
John W. Eaton |
Subject: |
Re: integer arithmetics |
Date: |
Wed, 01 Oct 2008 16:36:23 -0400 |
On 1-Oct-2008, Jaroslav Hajek wrote:
| On Wed, Oct 1, 2008 at 5:14 PM, John W. Eaton <address@hidden> wrote:
| > On 23-Sep-2008, Jaroslav Hajek wrote:
| >
| > | Sorry. I didn't realize that std::abs (int) is declared in cstdlib,
| > | not cmath. Please try again, same location. This new one should also
| > | get rid of the unused vars warnings you see.
| >
| > OK.
| >
| > I applied this changeset.
| >
|
| Hmm, initially I didn't mean this to go into 3.2.x, but if you're fine
| with that, then why not.
Does it work? If so, then I don't see why not. I also built it with
HAVE_FAST_INT_OPS undefined and it seemed to build and function OK, at
least for the minimal tests I tried.
| Please consider also the attached patch, that
| fully implements the 64-bit arithmetics.
| If at least 80-bit wide long double type is discovered, it is used to
| implement 64-bit multiplication and mixed operations, otherwise, more
| complicated non-inline code is employed. In the latter case, some
| operations may suffer from precision loss (converting int64->double)
| or early truncation - see comments in oct-inttypes.cc. I think that
| the important cases (int64 +- double) are OK, and that one can live
| with losing precision when doing, for instance, 4611686018427387901 *
| 0.75. Maybe these emulations will be improved over time (though at a
| performance cost).
Do you mean this comment?
| + // XXX: This trick is to not lose precision for things like 3*2**63 +
intmin('int64')
Can you elaborate?
Also, please use FIXME instead of XXX since some people have
complained in the past about spam filters flagging mails that contain
XXX.
| OK to push?
Probably not yet. What happened here:
| diff -r 1651939a394b -r 836df84b7997 doc/interpreter/contributors.in
| --- a/doc/interpreter/contributors.in Wed Oct 01 11:34:45 2008 -0400
| +++ b/doc/interpreter/contributors.in Wed Oct 01 20:16:39 2008 +0200
| @@ -193,7 +193,6 @@
| Doug Stewart
| Jonathan Stickel
| Thomas Stuart
| -Ivan Sutoris
| John Swensen
| Ariel Tankus
| Georg Thimm
? I just added Ivan to this list.
jwe
- Re: integer arithmetics, John W. Eaton, 2008/10/01
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/01
- Re: integer arithmetics,
John W. Eaton <=
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics, John W. Eaton, 2008/10/02
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics, John W. Eaton, 2008/10/02
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics, John W. Eaton, 2008/10/02
- Re: integer arithmetics, John W. Eaton, 2008/10/02
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02