Output a very high-precision number
authorChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2003 00:41:07 +0000 (00:41 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Oct 2003 00:41:07 +0000 (00:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8856 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/StringExtras.h
include/llvm/ADT/StringExtras.h

index 9233d6c0cd4c57bffa35fe86a2dbfd2c7e08cf40..0596b2feb55bce03405ec613d70cc553fc6c403a 100644 (file)
@@ -80,7 +80,7 @@ static inline std::string itostr(int X) {
 
 static inline std::string ftostr(double V) {
   char Buffer[200];
-  snprintf(Buffer, 200, "%e", V);
+  snprintf(Buffer, 200, "%20.6e", V);
   return Buffer;
 }
 
index 9233d6c0cd4c57bffa35fe86a2dbfd2c7e08cf40..0596b2feb55bce03405ec613d70cc553fc6c403a 100644 (file)
@@ -80,7 +80,7 @@ static inline std::string itostr(int X) {
 
 static inline std::string ftostr(double V) {
   char Buffer[200];
-  snprintf(Buffer, 200, "%e", V);
+  snprintf(Buffer, 200, "%20.6e", V);
   return Buffer;
 }