图片附件: 游客没有浏览图片的权限,请
登录 或
注册
1) MinGW supports 80-bit long doubles; MSVC uses only 64-bits,
(exactly the same as double).
2) MinGW uses Microsoft's MSVCRT runtime; the printf() routines
in that can't interpret 80-bit long doubles.
In the majority of the references, turned up by the above links,
that is made abundantly clear; most suggest casting long double
to double, in the printf() call, so MSVCRT's printf() can format
the data, albeit with loss of precision.
The alternative, as most of the references state, is to wait for
some kind soul to provide an alternative printf() implementation,
which can interpret 80-bit long doubles.
What makes most of
those references obsolete is, that since mingwrt-3.15 was released,
that alternative implementation is available; however, the default
is still to use the MSVCRT implementation.
If you want to use the
alternative implementation, you have to request it; you do this
by adding `-ansi' or `-posix' to your compile options, or by adding
any of the related defines, as specified in _mingw.h.