🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #30

Re: Lack of mathematical constants in (ANSI) <math.h>

#30
From: Marc Roussel
Date: Fri, 30 Oct 1992 01:00
25 lines
1681 bytes
In article <Bww9oA.LJI@NCoast.ORG> brown@NCoast.ORG (Stan Brown) writes:
>In article <BwtHFu.qs@research.canon.oz.au> andy@research.canon.oz.au
>(Andy Newman) writes:
>>The constants you used to be able to
>>depend on being there, were:
>>M_PI, M_PI_2, M_PI_4, M_SQRT2, M_E, M_LOG2E, M_LOG10E, M_LN2, M_LN10
>
>I question this.  Perhaps in the particular compiler you were using
>those constants were defined, but I don't recall anything resembling
>them in _any_ C compiler I've ever used.

     For the record, these things are in the HP-UX, Sun S5R2, Apollo
ANSI/XOPEN and Borland Turbo C++ versions of math.h.  Can anyone name a
recent compiler whose math.h does NOT include these?  (I'm satisfied
even if they are buried under an #ifdef.)

>Someone objected tomy statement that providing more named constants
>would load down the language.  It would do so because every identifier
>reserved for use as part of a standard header file is one that every
>programmer must be sure _not_ to use.

     So?  How often are you tempted to call something M_PI?

				Marc R. Roussel
                                mroussel@alchemy.chem.utoronto.ca
Technical Details
Message-ID: <1992Oct30.010005.18407@alchemy.chem.utoronto.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!mroussel
References: <BwMt54.D5I@NCoast.ORG> <BwtHFu.qs@research.canon.oz.au> <Bww9oA.LJI@NCoast.ORG>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.lang.c
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!mroussel
From: mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
Subject: Re: Lack of mathematical constants in (ANSI) <math.h>
Message-ID: <1992Oct30.010005.18407@alchemy.chem.utoronto.ca>
Organization: Department of Chemistry, University of Toronto
References: <BwMt54.D5I@NCoast.ORG> <BwtHFu.qs@research.canon.oz.au> <Bww9oA.LJI@NCoast.ORG>
Date: Fri, 30 Oct 1992 01:00:05 GMT
Lines: 25