tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: your mail
On Wed, May 25, 2016 at 11:15:15AM -0400, Christos Zoulas wrote:
> On May 25, 3:28pm, bouyer%antioche.eu.org@localhost (Manuel Bouyer) wrote:
> -- Subject: Re: your mail
>
> | On Wed, May 25, 2016 at 08:59:12AM -0400, Christos Zoulas wrote:
> | > On May 25, 1:36pm, bouyer%antioche.eu.org@localhost (Manuel Bouyer) wrote:
> | > -- Subject:
> | >
> | > | Hello,
> | > | in xsrc/external/mit/glu/dist/include/GL/glu.h:
> | > | revision 1.2
> | > | date: 2014/12/19 19:07:46; author: christos; state: Exp; lines: +6 -0
> | > | branches: 1.2.2;
> | > | use DBL_MAX instead of 1.0e150...
> | > | +/* GLdouble is double in gl.h so we are DBL_MAX */
> | > | +#include <limits.h> /* Not a good place to do that, but... */
> | > | +#ifndef DBL_MAX
> | > | #define GLU_TESS_MAX_COORD 1.0e150
> | > | +#else
> | > | +#define GLU_TESS_MAX_COORD DBL_MAX
> | > | +#endif
> | > |
> | > | can you explain why ?
> | > | In libtess, values like -2 * GLU_TESS_MAX_COORD, 4 * GLU_TESS_MAX_COORD
> | > | are used, which ends up being +/-inf and causes bad things to happen.
> | >
> | > Well, DBL_MAX is supposed to be defined... This was for the vax (it does
> | > not fit e150).
> |
> | yes it's defined but it's way too large. 2 * DBL_MAX and 4 * DBL_MAX
> | both gives inf, and then ((2 * DBL_MAX) < (4 * DBL_MAX)) is false
> | when it should be true. Or ((2 * DBL_MAX) == (4 * DBL_MAX)) is
> | true when it should be false.
>
> Then we should use DBL_MAX / 32?
I think we should use the value used upstream, or something close,
to be on the safe side.
DBL_MAX / 32 is still way too large, compared to 1e150.
Why not use min(DBL_MAX / 32, 1e150) ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index