what belongs in <math.h> (was: volatile isn't necessary,)

Lawrence V. Cipriani lvc at tut.cis.ohio-state.edu
Sat Apr 9 13:19:53 AEST 1988


In article <3377 at haddock.ISC.COM>, karl at haddock.ISC.COM (Karl Heuer) writes:
> In article <10068 at tut.cis.ohio-state.edu> lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
> >I was shocked when I read that abs() was taken out of <math.h> ... abs() is a
> >math function and <math.h> is where it belongs!
> 
> Taken out?  Was it ever *in* math.h?  I just checked two systems (one BSD, one

Thats what the rationale said, but the rational is wrong, see 4.10.6.
If it was in <math.h> then it should have stayed there, vendors stupid
compilers notwithstanding.  I don't use <math.h> so I didn't know any
better when I read 4.10.6.

> USGish), and neither declares the abs() function in any header.  (Why should
> they?  The default declaration suffices.$)  Neither one puts the code in
> libm.a, either.  I don't think it's clear that it "belongs" in <math.h>.

What default declaration suffices for what?  The argument types need to
be declared with a function prototype.  I could live without abs() being
in <math.h> as long as it was in *some* header files.

-- 
Larry Cipriani, AT&T Network Systems and Ohio State University
Domain: lvc at tut.cis.ohio-state.edu
Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (weird but right)



More information about the Comp.lang.c mailing list