www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/20/21:31:50

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Floating Point Exception
Date: Sun, 21 Sep 1997 00:35:21 +0100
Organization: None
Distribution: world
Message-ID: <kAaKEJA52FJ0Ew0F@talula.demon.co.uk>
References: <01bcc6d2$36f52ac0$0bf682c1 AT nicland>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nicholas Law writes:
>What does a floating point exception actually mean? I keep getting it in my
>3D rotation code. Is it something to do with the cos and sin functions, or
>am I dividing by zero or something?

It could be almost anything: division by zero, overflow, taking the
square root of a negative number, or trying to do math operations on a
NaN ("not-a-number", ie. some garbage bit pattern that isn't a valid
floating point value). The coprocessor trig functions only accept a
small range of input values, and will generate an exception if you feed
them anything else, but if you are using the libc sin() and cos()
routines they will convert the parameters into a suitable format for the
hardware to work with, so it's probably something other than that...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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