Article View: comp.std.c
Article #4594Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?
From: James Kanze US/ESC 60/3/141 #407...
Date: Tue, 09 Jan 1996 12:57
Date: Tue, 09 Jan 1996 12:57
33 lines
2263 bytes
2263 bytes
In article <4ctk66$57j@lyra.csx.cam.ac.uk> nmm1@cus.cam.ac.uk (Nick
Maclaren) writes:
|> 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 :-(
Is this true for all of the ``constants'' in float.h, or only some of
them? I don't have my C standard here to check, but I thought that
this was only true of the constants whose type was non-integral.
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
-- A la recherche d'une activité dans une region francophone
Technical Details
Message-ID:
<KANZE.96Jan9135752@slsvewt.lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!blackbush.xlink.net!slsv6bt!slsv6bt!kanzeReferences:
<sc3f9vb6gk.fsf@lns101.lns.cornell.edu> <1996Jan5.094122.16151@sq.com> <vyzd98ug7w4.fsf@lamothe.informatik.uni-dortmund.de> <tuent98zl4.fsf@nemo.bedford.waii.com> <4ctk66$57j@lyra.csx.cam.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!blackbush.xlink.net!slsv6bt!slsv6bt!kanze From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Subject: Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ? In-Reply-To: nmm1@cus.cam.ac.uk's message of 9 Jan 1996 11:39:50 GMT Message-ID: <KANZE.96Jan9135752@slsvewt.lts.sel.alcatel.de> Sender: news@lts.sel.alcatel.de Organization: SEL 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> <4ctk66$57j@lyra.csx.cam.ac.uk> Date: 09 Jan 1996 12:57:52 GMT