octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: integer arithmetics


From: John W. Eaton
Subject: Re: integer arithmetics
Date: Thu, 02 Oct 2008 15:05:10 -0400

On  2-Oct-2008, Jaroslav Hajek wrote:

| 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.

I think it would be best to not break the overloading rules.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]