
I have tried the floating_point_utilities_v2 which is very good for inf and nan. Thanks! Why isn't it part of boost? However, there is still the problem with the number of digits in the exponent: 2 with unix/cygwin (1e12) and 3 with windows (1e012). Regards, F. Bron ___________________________________ Frédéric Bron (frederic.bron@alcan.com) Unité ALT, Alcan CRV, BP 27, 38341 Voreppe téléphone : +33 4 76 57 81 72 télécopie : +33 4 76 57 80 99 Jeff Garland <jeff@crystalclearso Pour : boost@lists.boost.org ftware.com> cc : (ccc : Frederic Bron/Alcan) Envoyé par : Objet : Re: [boost] [format] - exponential format, NaN and infinity boost-bounces@lists. boost.org 15/03/2007 00:14 Veuillez répondre à boost frederic.bron@alcan.com wrote:
This is about output of real values (float, double, ...) in exponential format and output of not a number and infinity. My concern is that in C++, the output differs from one compiler/machine to another. It would be very nice if boost::format could garantee the same output on every computer.
I'm not 100% sure this will solve your problem, but you should have a look at the floating_point_utils from Johan Rade with help from John Maddock and others. You can find it in the vault here http://boost-consulting.com/vault/index.php?&direction=0&order=&directory=Math%20-%20Numerics It's not an official lib yet, but I believe it's been testing on a whole bunch of compilers and platforms. There's a long discussion of this in the mail archive -- look for 'fpclassify' on this page: http://lists.boost.org/Archives/boost/2006/12/index.php HTH, Jeff _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.