From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: FP Error Date: Thu, 24 Jun 1999 13:00:43 -0400 Content-Transfer-Encoding: 7bit References: <377093E6 DOT 7FE94F01 AT addr DOT com> <37710456 DOT D45A1FDC AT swipnet DOT se> X-Posted-Path-Was: not-for-mail X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-ELN-Date: 24 Jun 1999 16:59:25 GMT X-ELN-Insert-Date: Thu Jun 24 10:05:33 1999 Organization: Nocturnal Aviation Lines: 23 Mime-Version: 1.0 NNTP-Posting-Host: 1cust145.tnt12.nyc3.da.uu.net Message-ID: <3772643B.D37DC729@earthlink.net> X-Mailer: Mozilla 4.6 [en] (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Anders David Skarin wrote: > > Ardy Falls wrote: > > > > Hi, I get an FP error occasionaly when I try to cast a float to a char. > > Why? > > ardy > > I won't answere youre question but i can verify it. It has happend to me > aswell, it might be a terrible bug in DJGPP. If i ever find an answer > i'll be sure to send it to you. > Convering a float to a char potentially involves convertin a value that cannor be represented, for which the behavior is undefined. This is a programmer error, not a compiler bug. -- Martin Ambuhl (mambuhl AT earthlink DOT net) Ah! but it is something to have at least the choice of nightmares. - Joseph Conrad