0

Hi all,

I implemented a C program using my mac book.
Now, my client wants to migrate to windows OS (MinGW).

Program does many calculation using long double: on mac it works fine, otherwise on winz doesn't.

I read on internet the problem is that long double type is supposed to be a double type in WinZ, because it is no supported.

Making sizeof of double and long double, I obtain:
MAC
DOUBLE=8, LONG DOUBLE=16
WINZ
DOUBLE=8, LONG DOUBLE=12

Is there a solution or a workaround?
How can I "force" the use of long double or its simulation?

Sorry for my English.
Thanks in advance

Edited by sangi1981: Incorrect

2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by sangi1981
0

The size of long double is compiler-dependent, not operating system dependent. What compiler did you use on MS-Windows? I know Microsoft VC++ does not support long double -- the name is recognized the but the is the same as double. MinGW on MS-Windows (Code::Blocks) produces the same results that you posted. Why 12 I can only guess is sizeof(long) + sizeof(double).

Edited by Ancient Dragon

0

So, is there any way to bring my program in windows and make sure that is working properly, as it happens on the mac?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.