| View previous topic :: View next topic |
| Author |
Message |
saper Guest
|
Posted: Thu Feb 24, 2005 9:03 pm Post subject: printf and 'long double' |
|
|
I use dev-cpp
and use 'long double'
How show this variable in function
printf ("%Lg",ld) is error
|
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Thu Feb 24, 2005 9:21 pm Post subject: Re: printf and 'long double' |
|
|
saper wrote:
| Quote: | I use dev-cpp
and use 'long double'
How show this variable in function
printf ("%Lg",ld) is error
|
What error?
|
|
| Back to top |
|
 |
Ioannis Vranos Guest
|
Posted: Fri Feb 25, 2005 10:08 am Post subject: Re: printf and 'long double' |
|
|
saper wrote:
| Quote: | I use dev-cpp
and use 'long double'
How show this variable in function
printf ("%Lg",ld) is error
|
Unfortunately, MINGW has problem with long double. It is a compiler bug,
which probably is not going to be fixed too.
Consult MINGW users mailing list if you want to more information on this
and to discuss it more.
--
Ioannis Vranos
http://www23.brinkster.com/noicys
|
|
| Back to top |
|
 |
saper Guest
|
Posted: Fri Feb 25, 2005 2:20 pm Post subject: Re: printf and 'long double' |
|
|
Thanks
but when I use
cout << ld
It is OK
"Ioannis Vranos"
| Quote: | saper wrote:
I use dev-cpp
and use 'long double'
How show this variable in function
printf ("%Lg",ld) is error
Unfortunately, MINGW has problem with long double. It is a compiler bug,
which probably is not going to be fixed too.
Consult MINGW users mailing list if you want to more information on this
and to discuss it more.
--
Ioannis Vranos
http://www23.brinkster.com/noicys
|
|
|
| Back to top |
|
 |
Ioannis Vranos Guest
|
Posted: Fri Feb 25, 2005 3:59 pm Post subject: Re: printf and 'long double' |
|
|
saper wrote:
| Quote: | Thanks
but when I use
cout << ld
It is OK
|
It isn't for much large values:
#include
#include <cfloat>
#include <iostream>
int main()
{
using namespace std;
long double ld= numeric_limits<long double>::max();
cout<
ld= LDBL_MAX;
cout<
}
C:c>temp
1.#INF
1.#INF
C:c>
--
Ioannis Vranos
http://www23.brinkster.com/noicys
|
|
| Back to top |
|
 |
|