Support for IEEE754

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

 



Hello,

I recently tried the following code (platform : PC/Linux, gcc version 3.2) :

#include <limits>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
	cout << "is IEEE754   = " << numeric_limits<double>::is_iec559<<endl;
	cout << "has infinity = " << numeric_limits<double>::has_infinity<<endl;

cout << "infinity > 100 ? " << (numeric_limits<double>::infinity() >100) <<endl;
cout << "infinity= " <<numeric_limits<double>::infinity()<<endl;

return 1;
}


It shows that gcc does not handle the IEEE 754 standard on this platform, even if support for this standard is available on this processor (The same program run on win/mscv on the same computer shows handling for IEEE754).

Is there any compiler flag, or anything, to make gcc compatible with this standard? Is there any (good) reason why gcc is not and will never be compliant?

Best regards,

--
Loïc



-- Disclaimer ------------------------------------
Ce message ainsi que les eventuelles pieces jointes constituent une correspondance prive et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme.
***
This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.

[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