ceil

Synopsis

#include <math.h>

double ceil(double x);

float ceilf(float x);

Status

Partially implemented

Conformance

IEEE Std 1003.1-2017

Description

These functions shall compute the smallest integral value not less than x.

Return value

The result shall have the same sign as x.

Upon successful completion, ceil() and ceilf() shall return the smallest integral value not less than x, expressed as a type double, float, or long double, respectively.

  • If x is NaN, a NaN shall be returned.

  • If x is ±0 or ±Inf, x shall be returned.

Errors

No errors are defined.

Tests

Untested

Known bugs

None

See Also

  1. Standard library functions
  2. Table of Contents