On this page
  1. DBL_EPSILON
  2. Include
  3. Signature & Overview
  4. Notes & Pitfalls
  5. Example

DBL_EPSILON

Prev: CHAR_BIT | Up: limits.h | Next: ctype.h
Rel: limits.h, stdint, stdbool & limits Guide
Ref: cppreference — DBL_EPSILON
Tags: #public #prog #c #stdlib #limits #tier/specialized


Include

#include <limits.h>

Signature & Overview

#include <float.h>  /* DBL_EPSILON, DBL_MAX */

Difference between 1.0 and the next representable double (~2.22e-16).

Notes & Pitfalls

Example

#include <assert.h>
#include <float.h>

int main(void) { assert(1.0 + DBL_EPSILON > 1.0); }

Linked from

Related notes