--- a/LongFloat.st Fri Oct 16 07:01:59 2015 +0200
+++ b/LongFloat.st Wed Oct 28 07:44:54 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1999 by eXept Software AG
All Rights Reserved
@@ -319,6 +321,8 @@
!
coerce:aNumber
+ "convert the argument aNumber into an instance of the receiver's class and return it."
+
^ aNumber asLongFloat.
!
@@ -927,7 +931,7 @@
Do not check for divide by zero (return NaN or Infinity).
This operation is provided for emulators of other languages/semantics,
where no exception is raised for these results (i.e. Java).
- Its only defined if the arguments type is the same as the receivers."
+ It is only defined if the argument's type is the same as the receiver's."
%{ /* NOCONTEXT */
@@ -935,25 +939,25 @@
LONGFLOAT result, val;
if (__isSmallInteger(aNumber)) {
- val = (LONGFLOAT)(__intVal(aNumber));
+ val = (LONGFLOAT)(__intVal(aNumber));
doDiv:
- result = __longFloatVal(self) / val;
- __qMKLFLOAT(newFloat, result);
- RETURN ( newFloat );
+ result = __longFloatVal(self) / val;
+ __qMKLFLOAT(newFloat, result);
+ RETURN ( newFloat );
}
if (aNumber != nil) {
- if (__qIsLongFloat(aNumber)) {
- val = __longFloatVal(aNumber);
- goto doDiv;
- }
- if (__qIsShortFloat(aNumber)) {
- val = (LONGFLOAT)(__shortFloatVal(aNumber));
- goto doDiv;
- }
- if (__qIsFloatLike(aNumber)) {
- val = (LONGFLOAT)(__floatVal(aNumber));
- goto doDiv;
- }
+ if (__qIsLongFloat(aNumber)) {
+ val = __longFloatVal(aNumber);
+ goto doDiv;
+ }
+ if (__qIsShortFloat(aNumber)) {
+ val = (LONGFLOAT)(__shortFloatVal(aNumber));
+ goto doDiv;
+ }
+ if (__qIsFloatLike(aNumber)) {
+ val = (LONGFLOAT)(__floatVal(aNumber));
+ goto doDiv;
+ }
}
%}.
^ aNumber quotientFromLongFloat:self
@@ -1029,7 +1033,7 @@
!
coerce:aNumber
- "convert the argument aNumber into an instance of the receivers class and return it."
+ "convert the argument aNumber into an instance of the receiver's class and return it."
^ aNumber asLongFloat
!
@@ -2046,7 +2050,7 @@
!
positive
- "return true if the receiver is greater or equal to zero
+ "return true if the receiver is greater or equal to zero (not negative)
0.0 and -0.0 are positive for now."
%{ /* NOCONTEXT */
@@ -2056,12 +2060,12 @@
%}.
"
- 0.0 asLongFloat positive
- -0.0 asLongFloat positive
- 1.0 asLongFloat positive
- -1.0 asLongFloat positive
- (1.0 uncheckedDivide: 0.0) asLongFloat positive
- (-1.0 uncheckedDivide: 0.0) asLongFloat positive
+ 0.0 asLongFloat positive
+ -0.0 asLongFloat positive
+ 1.0 asLongFloat positive
+ -1.0 asLongFloat positive
+ (1.0 uncheckedDivide: 0.0) asLongFloat positive
+ (-1.0 uncheckedDivide: 0.0) asLongFloat positive
"
!
@@ -2844,11 +2848,11 @@
!LongFloat class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.98 2015-05-18 00:08:20 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.98 2015-05-18 00:08:20 cg Exp $'
+ ^ '$Header$'
! !