www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/28/11:33:45

Date: Thu, 28 Dec 1995 11:13:51 -0500
From: U-E59264-Osman Buyukisik <Osman DOT Buyukisik AT ae DOT ge DOT com>
To: lav AT video DOT yars DOT free DOT net
Cc: dj AT delorie DOT com, djgpp AT delorie DOT com
Subject: Re: DSIGNIF - where ?

hpux has these in "values.h," as :
 * DSIGNIF      - the number of significant bits in a double
 * FSIGNIF      - the number of significant bits in a float
 * _DEXPLEN     - the number of bits for the exponent of a double
 * _FEXPLEN     - the number of bits for the exponent of a float

#define _DEXPLEN        11     <-----  same as djgppv2
#define _HIDDENBIT      1      <-----  same as djgppv2
#define _FEXPLEN        8      <-----  same as djgppv2

#define BITS(type)      (BITSPERBYTE * (int)sizeof(type))

#define DSIGNIF (BITS(double) - _DEXPLEN + _HIDDENBIT - 1)
#define FSIGNIF (BITS(float)  - _FEXPLEN + _HIDDENBIT - 1)

 * DMAXPOWTWO   - the largest power of two exactly representable as a double
 * FMAXPOWTWO   - the largest power of two exactly representable as a float
#define DMAXPOWTWO      ((double)(1L << BITS(long) - 2) * \
                                (1L << DSIGNIF - BITS(long) + 1))
#define FMAXPOWTWO      ((float)(1L << FSIGNIF - 1))

------------------------------------------------------------------------------
This is all that has to do with D/FSIGNIF.

Hope this helps,
Osman






- Raw text -


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