LongFloat.st
changeset 21868 f568817ef1d5
parent 21857 76798ae913d1
child 21869 6b8b35c2fe74
--- a/LongFloat.st	Tue Jun 20 17:58:19 2017 +0200
+++ b/LongFloat.st	Tue Jun 20 18:04:20 2017 +0200
@@ -494,6 +494,7 @@
 
 initialize
     DefaultPrintFormat := '.19'.  "/ 19 valid digits
+    DefaultPrintfFormat := '%19f'.
 
     "
      self initialize
@@ -517,7 +518,7 @@
     "return a longFloat which represents not-a-Number (i.e. an invalid number)"
 
     NaN isNil ifTrue:[
-        NaN := super NaN
+	NaN := super NaN
     ].
     ^ NaN
 
@@ -544,7 +545,7 @@
     "return a shortFloat which represents positive infinity"
 
     PositiveInfinity isNil ifTrue:[
-        PositiveInfinity := Float infinity asLongFloat
+	PositiveInfinity := Float infinity asLongFloat
     ].
     ^ PositiveInfinity
 
@@ -559,7 +560,7 @@
     "return a shortFloat which represents positive infinity"
 
     NegativeInfinity isNil ifTrue:[
-        NegativeInfinity := Float negativeInfinity asLongFloat
+	NegativeInfinity := Float negativeInfinity asLongFloat
     ].
     ^ NegativeInfinity
 
@@ -612,9 +613,9 @@
     ^ 8
 
     "
-     ShortFloat defaultPrintPrecision 
-     Float defaultPrintPrecision      
-     LongFloat defaultPrintPrecision  
+     ShortFloat defaultPrintPrecision
+     Float defaultPrintPrecision
+     LongFloat defaultPrintPrecision
     "
 
     "Created: / 17-06-2017 / 02:58:42 / cg"
@@ -1420,35 +1421,35 @@
     if (val > 0.0)
 # endif
     {
-        __threadErrno = 0;
-        rslt = LONG_log10(val);
+	__threadErrno = 0;
+	rslt = LONG_log10(val);
 # ifdef LONG_isnan
-        if (! LONG_isnan(rslt))
+	if (! LONG_isnan(rslt))
 # endif
-        {
-            if (__threadErrno == 0) {
-                __qMKLFLOAT(newFloat, rslt);
-                RETURN ( newFloat );
-            }
-        }
+	{
+	    if (__threadErrno == 0) {
+		__qMKLFLOAT(newFloat, rslt);
+		RETURN ( newFloat );
+	    }
+	}
     }
 #else
     useFallBack = true;
 #endif
 %}.
     useFallBack notNil ifTrue:[
-        ^ super log10
+	^ super log10
     ].
 
     "
      an invalid value for logarithm
     "
     ^ self class
-        raise:#domainErrorSignal
-        receiver:self
-        selector:#log10
-        arguments:#()
-        errorString:'bad receiver in log10'
+	raise:#domainErrorSignal
+	receiver:self
+	selector:#log10
+	arguments:#()
+	errorString:'bad receiver in log10'
 
     "Modified (comment): / 16-06-2017 / 10:42:30 / cg"
 !