[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: integer arithmetics
From: |
Jaroslav Hajek |
Subject: |
Re: integer arithmetics |
Date: |
Thu, 2 Oct 2008 09:30:58 +0200 |
On Thu, Oct 2, 2008 at 7:47 AM, Jaroslav Hajek <address@hidden> wrote:
> On Wed, Oct 1, 2008 at 10:36 PM, John W. Eaton <address@hidden> wrote:
>
> I'll resend an update.
>
And here it is.
Btw, further to 64-bit integers, I was thinking about hacking the
parser in such a way that expressions of the form "intXX(<integer
literal>)" would not be interpreted the current way double constant +
conversion, but instead formed directly an integer constant. The
advantage, apart from maybe a slight speed-up, would be that large
64-bit integer constants could be entered properly in the interpreter
as int64(4611686018427387905) without losing precision (currently,
there is no easy way to get such a constant).
The problem is what to do when user locally redefines int64 (unlikely
and maybe a bug, but can happen).
Should we:
1. ignore it (faster - things can be handled directly in the parser
with little work)
2. check for it (a special tree_expression subclass that checks
whether the function has been redefined, then does what is right.
Probably slower, but hard to guess how much slower.)
I think that if we clearly document 1., then it may be OK.
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: integer arithmetics, John W. Eaton, 2008/10/01
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/01
- Re: integer arithmetics, John W. Eaton, 2008/10/01
- Re: integer arithmetics, Jaroslav Hajek, 2008/10/02
- Re: integer arithmetics,
Jaroslav Hajek <=
- 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