abs (was: volatile isn't necessary, but it's there)
Doug Gwyn
gwyn at brl-smoke.ARPA
Fri Apr 8 21:49:06 AEST 1988
In article <10068 at tut.cis.ohio-state.edu> lvc at tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
>Yes. I was shocked when I read that abs() was taken out of <math.h> and
>more so when I read the reason. abs() was removed from <math.h> because
>some compilers will create executable images with unused floating point
>routines in them <math.h> is included.
>
>Flame on: Of all the stupid things I read in the draft this takes the
>cake. Why don't the vendors fix their stupid compilers and leave the
><math.h> users alone! Come on! abs() is a math function and <math.h>
>is where it belongs!
Well, if <math.h> is where it belongs, why isn't it there on UNIX
systems?
All you have uncovered is an error in the Rationale document.
abs() was never in <math.h>, not in UNIX and not in the /usr/group
1984 Standard which served as the base document for the library.
I will ask the Rationale editor to correct his document.
P.S. I don't know of anybody who uses the abs() library routine;
we all use a macro instead. I would be happy if abs() were not
required at all.
More information about the Comp.lang.c
mailing list