www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/18/21:22:56

Message-Id: <199611190329.VAA10794@ghgcorp.ghgcorp.com>
Comments: Authenticated sender is <rbachtel AT mailman DOT ghgcorp DOT com>
From: "Bachtel" <rbachtel AT ghgcorp DOT com>
To: djgpp AT delorie DOT com
Date: Mon, 18 Nov 1996 20:03:46 +0000
MIME-Version: 1.0
Subject: Floating point math.

I'm having a problem using FP math with DJGPP 2.0. (If this is a 
previously reported bug, just let me know. I personally am not sure 
I'm coding this correctly) Anyway, I'm trying to subtract cmin.r from 
cmax.r (both float values in a two member structure) and assign it to 
a float, a.

A snippet follows
a=(cmax.r-cmin.r)

Whatever I do, a is always the trash value the program starts with! 
I've tried explicit typecasting:
a=(float)((cmax.r)-(cmin.r));

to no avail. Any help would be _greatly_ appreciated. I'm running a 
486dx/66, and am linking /w libgrx20 and libm.

Thanks,
Jeff
rbachtel AT ghgcorp DOT com

- Raw text -


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