Newsgroups: comp.unix.ultrix Path: utzoo!utgpu!watserv1!watcgl!idallen From: "Ian! D. Allen [CGL]" Subject: Ultrix 4.x rint() not declared anywhere Message-ID: <1991Mar1.174711.13349@watcgl.waterloo.edu> Sender: idallen@watcgl.waterloo.edu (Ian! D. Allen [CGL]) Organization: Computer Graphics Laboratory, University of Waterloo, Ontario, Canada Date: Fri, 1 Mar 1991 17:47:11 GMT Lines: 45 The Ultrix 4.x rint man page: Syntax #include [...] double rint(x) double x; The program: #include main() { double x = rint(0.0); printf("%f\n",x); return(0); } The output: 4.000000 The lint ("lint i.c -lm"): name declared but never used or defined matherr i.c?(147) value type used inconsistently rint llib-lm(63) :: i.c(4) value type declared inconsistently rint llib-lm(63) :: i.c(4) function returns value which is always ignored printf The problem -- no "extern double rint();" in math.h: % grep -w rint /usr/include/*.h % The declaration for trunc() is missing; floor() is there but ffloor() is not; there may be others missing. The indication to use in the man page is wrong and misleading, since you still have to declare many of the functions. Anyone want to type all this onto an SPR form to DEC? -- -IAN! (Ian! D. Allen) idallen@watcgl.uwaterloo.ca idallen@watcgl.waterloo.edu [129.97.128.64] Computer Graphics Lab/University of Waterloo/Ontario/Canada