delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/04/07:01:16

Date: Tue, 4 Mar 1997 13:47:48 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Ove Kaaven <ovek AT arcticnet DOT no>
cc: djgpp AT delorie DOT com
Subject: Re: Allegro perspective-correct texture mapping
In-Reply-To: <5fg3s0$hob$1@troll.powertech.no>
Message-ID: <Pine.SUN.3.91.970304134700.12059M-100000@is>
MIME-Version: 1.0

On Mon, 3 Mar 1997, Ove Kaaven wrote:

> [some irrelevant selectors]

Bad judgement, IMHO.  You should never omit parts of the traceback,
because they might give people here vital clues about the true nature
of your problem.

> I realize that this is probably a floating-point overflow, but is
> there a good way around it?

I suggest you first verify that the problem is indeed an overflow (it
might be some other FP-related trouble, like passing an invalid
argument to a math function).  Once you did that, there are three ways
around this that I can think of:

	1) Include run-time tests in your program that would prevent
the FP error from happening in the first place (once you understand
what exactly causes it to bomb, this should be easy).

	2) Cause your program to ignore FP exceptions by including the
following somewhere at its beginning:

	#include <signal.h>
	...
	signal (SIGFPE, SIG_IGN);

	3) Use the `_control87' library function to mask off some (or
all) of the causes for FP exceptions.

> 4. Where should I post this to keep it from being off-topic?

This is perfectly on-topic for this news group.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019