carta
rintf(3)

rintf3

Round to integral value in floating-point format

Part of nearbyint(3).

Usage

double

float

long double

double

float

long double

Library

Math Library (libm, -lm)

Overview

The rint(), rintf(), and rintl() functions return the integral value nearest to x according to the prevailing rounding mode. These functions raise an inexact exception when the original argument is not an exact integer.

The nearbyint(), nearbyintf(), and nearbyintl() functions perform the same operation, except that they do not raise an inexact exception.

History

  • FreeBSD 16.0-CURRENT (2026-10-27) to FreeBSD 15.0-RELEASE: the text shown here
  • FreeBSD 14.5-RELEASE to FreeBSD 13.3-RELEASE
  • FreeBSD 13.2-RELEASE to FreeBSD 13.0-RELEASE
  • FreeBSD 12.4-RELEASE
  • FreeBSD 12.3-RELEASE
  • FreeBSD 12.2-RELEASE
  • FreeBSD 12.1-RELEASE
  • FreeBSD 12.0-RELEASE
  • FreeBSD 11.4-RELEASE
  • FreeBSD 11.3-RELEASE
  • FreeBSD 11.2-RELEASE
  • FreeBSD 11.1-RELEASE
  • FreeBSD 11.0-RELEASE
  • FreeBSD 10.4-RELEASE
  • FreeBSD 10.3-RELEASE
  • FreeBSD 10.2-RELEASE
  • FreeBSD 10.1-RELEASE
  • FreeBSD 10.0-RELEASE
  • FreeBSD 9.3-RELEASE
  • FreeBSD 9.2-RELEASE
  • FreeBSD 9.1-RELEASE
  • FreeBSD 9.0-RELEASE
  • FreeBSD 8.4-RELEASE
  • FreeBSD 8.3-RELEASE
  • FreeBSD 8.2-RELEASE
  • FreeBSD 8.1-RELEASE
  • FreeBSD 8.0-RELEASE
  • FreeBSD 7.4-RELEASE
  • FreeBSD 7.3-RELEASE
  • FreeBSD 7.2-RELEASE
  • FreeBSD 7.1-RELEASE
  • FreeBSD 7.0-RELEASE
  • FreeBSD 6.4-RELEASE
  • FreeBSD 6.3-RELEASE
  • FreeBSD 6.2-RELEASE to FreeBSD 6.0-RELEASE
  • FreeBSD 5.5-RELEASE to FreeBSD 5.4-RELEASE
  • FreeBSD 5.3-RELEASE
  • FreeBSD 5.2.1-RELEASE to FreeBSD 5.0-RELEASE
  • FreeBSD 4.11-RELEASE to FreeBSD 4.5-RELEASE
  • FreeBSD 4.4-RELEASE
  • FreeBSD 4.3-RELEASE to FreeBSD 4.0-RELEASE
  • FreeBSD 3.5.1-RELEASE to FreeBSD 3.3-RELEASE
  • FreeBSD 3.2-RELEASE to FreeBSD 3.0-RELEASE
  • FreeBSD 2.2.9-RELEASE
  • FreeBSD 2.2.8-RELEASE to FreeBSD 2.2.2-RELEASE

Standards

These functions conform to ISO/IEC 9899:1999 (“ISO C99”).

History

A rint() function appeared in Version 6 AT&T UNIX. The nearbyint() and nearbyintf() functions appeared in FreeBSD 5.3, and the long double variants were first available in FreeBSD 8.0.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.