On Mon, Dec 30, 2002 at 10:23:16AM -0500, H. S. Teoh wrote: > Hi, I just confirmed that trunc() is missing from /usr/include/math.h. > Furthermore, the following are also missing (referenced from the manpage > of trunc()): > - lrint > - nearbyint > - round > > Oddly, these functions do *not* appear in the libc info pages. > Nevertheless, they are definitely in libm:
How did you confirm that they were not in <math.h>? Judging from your previous messages, by using cpp or building a test program. I always recommend actually grepping around in /usr/include for them; it can be enlightening. Consider this case: #ifdef __USE_ISOC99 /* Return X times (2 to the Nth power). */ __MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ __MATHCALL (nearbyint,, (_Mdouble_ __x)); /* Round X to nearest integral value, rounding halfway cases away from zero. */ __MATHCALL (round,, (_Mdouble_ __x)); /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); They are only declared in C99 mode. I believe that is correct. > This is on libc6 2.3.1-8. I'm not sure I understand why they are in the > .so but not in any header files nor in the info docs. Are there some > standard compliance issues here that I'm not aware of? They're in my copy of the info docs. Try: "info libc Arithmetic Arithmetic\ Functions Rounding\ Functions" -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer

