SQLite Forum

ORDER BY not working for a specific DB/table
Login
Further to this I have done some more experimenting comparing between MinGW GCC 9.1.0 x64 and the current MSVC compiler (19.25.28614 it claims in cl.exe /? or 16.5.4 by the Installer) on Windows.  (both generating x64 code).

```
>testmsvc
Sizeof        Float (binary32) =  4, epsilon = 5.9604644775390625e-08
Sizeof       Double (binary64) =  8, epsilon = 1.11022302462515654e-16
Sizeof  Long Double (binary80) =  8, epsilon = 1.11022302462515654e-16

>testgcc
Sizeof        Float (binary32) =  4, epsilon = 5.9604644775390625e-008
Sizeof       Double (binary64) =  8, epsilon = 1.1102230246251565e-016
Sizeof  Long Double (binary80) = 16, epsilon = 5.4210108624275222e-020
Sizeof  __float128 (binary128) = 16, epsilon = 9.6296497219361793e-035
```

Epsilon is computed using the following loop:

```
(float|double|long double|__float128) x, x1;

    x = 1.0;
    while (1)
    {
        x1 = x + 1.0;
        if (x1 <= 1.0)
            break;
        x /= 2.0;
    }
```

which finds the smallest value which when added to 1.0 is still bigger than 1.0.  So the epsilon is the same for binary32 and binary64, but MSVC appears not to support extended precision at all.