SQLite Forum

Decimal128
Login
Yes.  The "standard" value of "epsilon" according to the ISO C standard is the difference between the value 1.0 and the next larger representable value.

```
#include <stdio.h>
#include <float.h>

void main(void)
{
    printf("FLT_EPSILON = %.17g\n", FLT_EPSILON);
    printf("DBL_EPSILON = %.17g\n", DBL_EPSILON);
}

FLT_EPSILON = 1.1920928955078125e-007
DBL_EPSILON = 2.2204460492503131e-016
```

Here are the epsilon values for the most common binary floating formats (Half Precision, Single Precision, Double Precision, Extended Precision, Quadruple Precision and Octuple Precision)

```
sqlite> select epsilon(1,11) as "Epsilon Float16", epsilon(1,24) as "Epsilon Float32", epsilon(1,53) as "Epsilon Float64", epsilon(1,64) as "Epsilon Float80", epsilon(1,113) as "Epsilon Float128", epsilon(1, 237) as "Epsilon Float256";
┌─────────────────┬──────────────────────┬──────────────────────┬─────────────────────┬──────────────────────┬──────────────────────┐
│ Epsilon Float16 │   Epsilon Float32    │   Epsilon Float64    │   Epsilon Float80   │   Epsilon Float128   │   Epsilon Float256   │
├─────────────────┼──────────────────────┼──────────────────────┼─────────────────────┼──────────────────────┼──────────────────────┤
│ 0.0009765625    │ 1.19209289550781e-07 │ 2.22044604925031e-16 │ 1.0842021724855e-19 │ 1.92592994438724e-34 │ 9.05567907882671e-72 │
└─────────────────┴──────────────────────┴──────────────────────┴─────────────────────┴──────────────────────┴──────────────────────┘
```