🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4592

Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?

#4592
From: Nick Maclaren
Date: Tue, 09 Jan 1996 11:39
28 lines
1679 bytes
In article <tuent98zl4.fsf@nemo.bedford.waii.com>, gsez020@nemo.bedford.waii.com (Pete Forman) writes:
|> >>>>> "Andreas" == Andreas Schwab <schwab@lamothe.informatik.uni-dortmund.de> writes:
|> >>>>> "Mark" == Mark Brader <msb@sq.com> writes:
|> 
|>     Mark>    #if LONG_MAX * DBL_EPSILON > 1
|> 
|>     Andreas> This doesn't work as floating point numbers aren't
|>     Andreas> allowed in #if expressions.
|> 
|> Try changing to something like
|> 
|>     #if LONG_MAX >> DBL_MANT_DIG > 1

Don't bother - the 'constants' in <float.h> aren't!  This is a specific
exclusion to make life easier for systems with separate floating-point
processors, and makes <float.h> almost useless for numerical analysts.

I tried to get this imbecility (and it IS an imbecility) fixed, but I
failed.  So any portable library of mathematical functions has to define
its own system-dependent constants, and can use <float.h> only for
comparison :-(


Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679
Technical Details
Message-ID: <4ctk66$57j@lyra.csx.cam.ac.uk>
Path: arc1-ca.pugleaf.net!lyra.csx.cam.ac.uk!nmm1
References: <sc3f9vb6gk.fsf@lns101.lns.cornell.edu> <1996Jan5.094122.16151@sq.com> <vyzd98ug7w4.fsf@lamothe.informatik.uni-dortmund.de> <tuent98zl4.fsf@nemo.bedford.waii.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!lyra.csx.cam.ac.uk!nmm1
From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Newsgroups: comp.std.c
Subject: Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?
Date: 9 Jan 1996 11:39:50 GMT
Organization: University of Cambridge, England
Message-ID: <4ctk66$57j@lyra.csx.cam.ac.uk>
References: <sc3f9vb6gk.fsf@lns101.lns.cornell.edu>  <1996Jan5.094122.16151@sq.com>  <vyzd98ug7w4.fsf@lamothe.informatik.uni-dortmund.de> <tuent98zl4.fsf@nemo.bedford.waii.com>
NNTP-Posting-Host: ursa.cus.cam.ac.uk