--- a/ShortFloat.st Fri Dec 17 12:32:53 1999 +0100
+++ b/ShortFloat.st Fri Dec 17 12:35:57 1999 +0100
@@ -215,7 +215,7 @@
num := super readFrom:aStringOrStream onError:[self error:'conversion error for: ' , self name].
num notNil ifTrue:[
- num := num asShortFloat
+ num := num asShortFloat
].
^ num
@@ -237,7 +237,7 @@
num := super readFrom:aStringOrStream onError:nil.
num isNil ifTrue:[
- ^ exceptionBlock value
+ ^ exceptionBlock value
].
^ num asShortFloat
@@ -389,32 +389,32 @@
double dResult, dVal;
if (__isSmallInteger(aNumber)) {
- if (aNumber != __MKSMALLINT(0)) {
- result = __shortFloatVal(self) / (float)(__intVal(aNumber));
+ if (aNumber != __MKSMALLINT(0)) {
+ result = __shortFloatVal(self) / (float)(__intVal(aNumber));
retResult:
- __qMKSFLOAT(newFloat, result);
- RETURN ( newFloat );
- }
+ __qMKSFLOAT(newFloat, result);
+ RETURN ( newFloat );
+ }
} else if (__isShortFloat(aNumber)) {
- val = __shortFloatVal(aNumber);
- if (val != 0.0) {
- result = __shortFloatVal(self) / val;
- goto retResult;
- }
+ val = __shortFloatVal(aNumber);
+ if (val != 0.0) {
+ result = __shortFloatVal(self) / val;
+ goto retResult;
+ }
} else if (__isFloatLike(aNumber)) {
- dVal = __floatVal(aNumber);
- if (dVal != 0.0) {
- dResult = (double) __shortFloatVal(self) / dVal;
- __qMKFLOAT(newFloat, dResult);
- RETURN ( newFloat );
- }
+ dVal = __floatVal(aNumber);
+ if (dVal != 0.0) {
+ dResult = (double) __shortFloatVal(self) / dVal;
+ __qMKFLOAT(newFloat, dResult);
+ RETURN ( newFloat );
+ }
}
%}.
((aNumber == 0) or:[aNumber = 0.0]) ifTrue:[
- "
- No, you shalt not divide by zero
- "
- ^ DivisionByZeroSignal raiseRequest.
+ "
+ No, you shalt not divide by zero
+ "
+ ^ DivisionByZeroSignal raiseRequest.
].
^ aNumber quotientFromShortFloat:self
@@ -631,10 +631,10 @@
|i|
(self >= SmallInteger minVal and:[self <= SmallInteger maxVal]) ifTrue:[
- i := self asInteger.
- self = i ifTrue:[
- ^ i hash
- ].
+ i := self asInteger.
+ self = i ifTrue:[
+ ^ i hash
+ ].
].
^ self asFloat hash
@@ -742,9 +742,9 @@
double frac;
INT exp;
- errno = 0;
+ __threadErrno = 0;
frac = frexp( (double)(__shortFloatVal(self)), &exp);
- if (errno == 0) {
+ if (__threadErrno == 0) {
RETURN (__MKSMALLINT(exp));
}
%}.
@@ -773,9 +773,9 @@
double frac;
INT exp;
- errno = 0;
+ __threadErrno = 0;
frac = frexp( (double)(__shortFloatVal(self)), &exp);
- if (errno == 0) {
+ if (__threadErrno == 0) {
RETURN (__MKFLOAT(frac));
}
%}.
@@ -972,9 +972,9 @@
double modf();
double frac, trunc;
- errno = 0;
+ __threadErrno = 0;
frac = modf((double)(__shortFloatVal(self)), &trunc);
- if (errno == 0) {
+ if (__threadErrno == 0) {
RETURN (__MKSFLOAT(frac));
}
%}.
@@ -994,5 +994,5 @@
!ShortFloat class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.54 1999-09-27 10:32:33 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.55 1999-12-17 11:35:55 cg Exp $'
! !