--- a/ShortFloat.st Mon Dec 02 10:43:47 2019 +0100
+++ b/ShortFloat.st Mon Dec 02 10:45:32 2019 +0100
@@ -53,9 +53,7 @@
# include <locale.h>
#endif
-#if defined (__aix__)
-# include <float.h>
-#endif
+#include <float.h>
#if defined(__irix__)
# include <nan.h>
@@ -699,7 +697,6 @@
"The largest exponent value allowed by instances of this class."
%{ /* NOCONTEXT */
-#include <float.h>
#if defined(FLT_MAX)
RETURN(__MKSFLOAT(FLT_MAX));
#endif
@@ -718,7 +715,6 @@
"The largest exponent value allowed by instances of this class."
%{ /* NOCONTEXT */
-#include <float.h>
#if defined(FLT_MIN)
RETURN(__MKSFLOAT(FLT_MIN));
#endif
@@ -759,9 +755,9 @@
numBitsInMantissa
"answer the number of bits in the mantissa (the significant).
- This is an IEEE single (binary32), where 23 bits are available
+ This is an IEEE single (binary32), where 23 bits are available
(the hidden bit is not counted here):
- seeeeeee emmmmmmm mmmmmmmm mmmmmmmm
+ seeeeeee emmmmmmm mmmmmmmm mmmmmmmm
"
^ 23
@@ -1784,24 +1780,24 @@
int len;
if (__isStringLike(formatString)) {
- /*
- * actually only needed on sparc: since thisContext is
- * in a global register, which gets destroyed by printf,
- * manually save it here - very stupid ...
- */
- __BEGIN_PROTECT_REGISTERS__
-
- len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __shortFloatVal(self));
-
- __END_PROTECT_REGISTERS__
-
- if (len < 0) goto fail;
- if (len >= sizeof(buffer)) goto fail;
-
- s = __MKSTRING_L(buffer, len);
- if (s != nil) {
- RETURN (s);
- }
+ /*
+ * actually only needed on sparc: since thisContext is
+ * in a global register, which gets destroyed by printf,
+ * manually save it here - very stupid ...
+ */
+ __BEGIN_PROTECT_REGISTERS__
+
+ len = snprintf(buffer, sizeof(buffer), __stringVal(formatString), __shortFloatVal(self));
+
+ __END_PROTECT_REGISTERS__
+
+ if (len < 0) goto fail;
+ if (len >= sizeof(buffer)) goto fail;
+
+ s = __MKSTRING_L(buffer, len);
+ if (s != nil) {
+ RETURN (s);
+ }
}
fail: ;
#endif /* not __SCHTEAM__ */
@@ -2084,11 +2080,11 @@
#endif
{
#if defined(__i386__) && defined(__GNUC__)
- float frac = frexpf(myVal, &exp);
- RETURN (__MKSFLOAT(frac));
+ float frac = frexpf(myVal, &exp);
+ RETURN (__MKSFLOAT(frac));
#else
- double frac = frexp( (double)(myVal), &exp);
- RETURN (__MKFLOAT(frac));
+ double frac = frexp( (double)(myVal), &exp);
+ RETURN (__MKFLOAT(frac));
#endif
}
%}.