C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

printf and 'long double'

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
saper
Guest





PostPosted: Thu Feb 24, 2005 9:03 pm    Post subject: printf and 'long double' Reply with quote



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





PostPosted: Thu Feb 24, 2005 9:21 pm    Post subject: Re: printf and 'long double' Reply with quote



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





PostPosted: Fri Feb 25, 2005 10:08 am    Post subject: Re: printf and 'long double' Reply with quote



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





PostPosted: Fri Feb 25, 2005 2:20 pm    Post subject: Re: printf and 'long double' Reply with quote

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





PostPosted: Fri Feb 25, 2005 3:59 pm    Post subject: Re: printf and 'long double' Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.