[Dev-C++] RES: Reading and printing long double values
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: André M. B. <and...@su...> - 2008-04-30 15:03:19
|
But MigGW does this distinction.
Please try:
printf(sizeof(double)) and
printf(sizeof(long double))
Does anybody know who wrote a printf or
a full stdio.h (fprintf, sprintf, etc) which
supports long doubles for MingGW?
Regards
André
-----Mensagem original-----
De: Per Westermark [mailto:pw...@ia...]
Enviada em: terça-feira, 29 de abril de 2008 02:39
Para: André Macário Barros
Cc: Lista do Dev-C++
Assunto: Re: [Dev-C++] Reading and printing long double values
MinGW is using the M$ libraries, so to my knowledge it isn't possible to
print a long double using printf().
Note that M$ does not distinguish between double and long double, so they
don't have a need for a long double formatting prefix.
/pwm
On Sun, 27 Apr 2008, André Macário Barros wrote:
> Dear users,
>
> I´m having some problems trying to read/print
> a long double value in C.
>
> Based on a documentation I´ve found, one of the
> attempts was:
>
> ...
> long double var=3.0;
> ...
> printf("printing a long double value-->%5.0Lg\n", var);
> ...
>
> I´ve already tested: %LE and %LF and none of these
> options worked.
>
> Does anybody know how to read and print?
> Thanks!
>
> Andre
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.5/1400 - Release Date: 27/4/2008
> 09:39
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao
ne
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.5/1401 - Release Date: 28/4/2008
07:18
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.6/1407 - Release Date: 30/4/2008
11:35
|