Re: mingw-64 80 bit precision for doubles works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 18, 2014 at 4:12 AM,  <sisyphus1@xxxxxxxxxxxxxxx> wrote:
> -----Original Message----- From: navin p
>
>>  How can gcc/mingw-64 build x64 executables with double precision set to
>> 80 bits?
>
>
> You'll need to define __USE_MINGW_ANSI_STDIO to 1 at the beginning.
>
> /***************************/
> #define __USE_MINGW_ANSI_STDIO 1
> #include <stdio.h>
>
> int main(void) {
>  long double x = 1.18L;
>  printf("%La\n%.18Lg\n", x, x);
>  return 0;
> }
>
> /***************************/
>
> Outputs (with both 32-bit and 64-bit mingw builds of gcc):
>
> 0x9.70a3d70a3d70a3dp-3
> 1.18
>
> You can, of course, build with -D__USE_MINGW_ANSI_STDIO on the command line
> if you don't want to define the symbol in the script.
>
> Cheers,
> Rob

Sorry if it was not clear. Well i know that mingw can build double in
extended precision mode for x64 executables on windows but visual
studio 2010 can't .

Do we need to set some registers so that even Visual Studio 2010 can build it ?


-
Navin




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux