SQLite Forum

What happens if I define LONGDOUBLE_TYPE as double?
That is what happens when using Microsoft compilers (for example Microsoft VIsual Studie on x64) because then the declaration `long double` is ignored (the long part) and it just becomes `double`.  Microsoft compilers no longer generate code that is IEEE compliant.

You can define LONGDOUBLE_TYPE to be whatever you want the LONGDOUBLE_TYPE spelling to be -- it defaults to the spelling `long double` only if no other definition is given.

THe idea is that it gives the spelling of the "extended precision" declaration type for your particular compiler and platform.

It depends what you mean by "broken".  Do you mean "broken" as in the Microsoft way, where the compiler still accepts the `long double` as the spelling for the double precision extended type but does not actually implement the type (it ignores the `long` qualifier).

You can always define LONGTYPE_DOUBLE as double.

Myself, I declare LONGTYPE_DOUBLE as `__float128` so that high precision intermediates use 128-bit IEEE-754 floats.