www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - How many bits in the mantissa if I declare all floats as long doubles ?

↑ ↓ ← Nicholas Jordan <Nicholas_member pathlink.com> writes:
The source code for an entrophy testing method I am trying to incorporate in my
program has the comment:

/* Bytes used as Monte Carlo co-ordinates.
This should be no more bits than the mantissa
of your "double" floating point type. */

#define MONTEN	6

I cannot determine from either the .asm or the .h or the help files how many
bits are in the mantissa.
Jun 18 2006
↑ ↓ Walter Bright <newshound digitalmars.com> writes:
Nicholas Jordan wrote:
 The source code for an entrophy testing method I am trying to incorporate in my
 program has the comment:
 
 /* Bytes used as Monte Carlo co-ordinates.
 This should be no more bits than the mantissa
 of your "double" floating point type. */
 
 #define MONTEN	6
 
 I cannot determine from either the .asm or the .h or the help files how many
 bits are in the mantissa.

long doubles have a 64 bit mantissa, a 15 bit exponent, and a 1 bit sign.
Jun 18 2006
↑ ↓ → Scott Michel <scottm aero.org> writes:
Walter Bright wrote:
 Nicholas Jordan wrote:
 The source code for an entrophy testing method I am trying to
 incorporate in my
 program has the comment:

 /* Bytes used as Monte Carlo co-ordinates.
 This should be no more bits than the mantissa
 of your "double" floating point type. */

 #define MONTEN    6

 I cannot determine from either the .asm or the .h or the help files
 how many
 bits are in the mantissa.

long doubles have a 64 bit mantissa, a 15 bit exponent, and a 1 bit sign.

I'd really like to see a SEF float format with two or more sign bits. :-)
Jun 19 2006