This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: is there a round() function in gcc+ ? thanks, eom
- From: "Rupert Wood" <me at rupey dot net>
- To: <dbisnath at rave-tt dot net>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 31 Jul 2002 09:34:46 +0100
- Subject: RE: is there a round() function in gcc+ ? thanks, eom
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.