This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]