is there a round() function in gcc+ ? thanks, eom

Rupert Wood me@rupey.net
Wed Jul 31 01:35:00 GMT 2002


dbisnath wrote:

> is there a round() function in gcc+ ?

This depends on which runtime library you're using and not on GCC. The
best thing to do, if you're on a unix system, is to look in the manual
pages - type 'man round' and see if you get anything. Alternatively, you
can use less or grep to search the system header files in /usr/include.

However, there isn't one available in BSD C-libraries (on FreeBSD, etc.)
or Solaris's C library. It does appear in the most recent C-standard and
also in a recent glibc (on GNU/Linux, etc.) but I don't know how recent
and available it will be.

If you don't have it available, you might consider using floor(), ceil()
or rint().

Rup.



More information about the Gcc-help mailing list