[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?
From: |
Eli Zaretskii |
Subject: |
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ? |
Date: |
Sat, 24 Oct 2009 12:11:01 +0200 |
> Date: Sat, 24 Oct 2009 16:46:55 +0900
> Cc: address@hidden
> From: Toru TSUNEYOSHI <address@hidden>
>
> >> So in 64-bit platforms, casting `double' to `int' causes lack of
> >> precision already (because a double does not have 64 bits in the
> >> mantissa), doesn't it?
> >
> > So I make a patch for keep the precision.
> > It tries to deal with the number in type `int' possibly, otherwise it
> > deals with the number in type `double'.
> >
> > Would you like to check it ?
>
> I revised the patch.
I think we should fix the make_fixnum_or_float macro, rather than work
around it in C code.
> +#ifdef _LP64
> + if (v > LONG_MAX / b)
This will probably not portable enough, e.g. on 64-bit Windows. We
have MOST_POSITIVE_FIXNUM precisely for that reason.
- Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, (continued)
Message not available
Message not available
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Andreas Schwab, 2009/10/23
Re: macro FIXNUM_OVERFLOW_P in lisp.h is valid ?, Stefan Monnier, 2009/10/23