equal
deleted
inserted
replaced
10 be provided or otherwise made available to, or used by, any |
10 be provided or otherwise made available to, or used by, any |
11 other person. No title to or ownership of the software is |
11 other person. No title to or ownership of the software is |
12 hereby transferred. |
12 hereby transferred. |
13 " |
13 " |
14 "{ Package: 'stx:libbasic' }" |
14 "{ Package: 'stx:libbasic' }" |
|
15 |
|
16 "{ NameSpace: Smalltalk }" |
15 |
17 |
16 Number subclass:#LimitedPrecisionReal |
18 Number subclass:#LimitedPrecisionReal |
17 instanceVariableNames:'' |
19 instanceVariableNames:'' |
18 classVariableNames:'' |
20 classVariableNames:'' |
19 poolDictionaries:'' |
21 poolDictionaries:'' |
1151 t1 inspect. t2 inspect. |
1153 t1 inspect. t2 inspect. |
1152 " |
1154 " |
1153 ! ! |
1155 ! ! |
1154 |
1156 |
1155 |
1157 |
|
1158 |
1156 !LimitedPrecisionReal methodsFor:'printing & storing'! |
1159 !LimitedPrecisionReal methodsFor:'printing & storing'! |
1157 |
1160 |
1158 printOn:aStream |
1161 printOn:aStream |
1159 "append a printed representation of the receiver to |
1162 "append a printed representation of the receiver to |
1160 the argument, aStream. |
1163 the argument, aStream. |
1306 "return true if the receiver is greater or equal to zero" |
1309 "return true if the receiver is greater or equal to zero" |
1307 |
1310 |
1308 ^ self sign >= 0 |
1311 ^ self sign >= 0 |
1309 |
1312 |
1310 "Modified: 17.4.1996 / 13:35:10 / cg" |
1313 "Modified: 17.4.1996 / 13:35:10 / cg" |
|
1314 ! |
|
1315 |
|
1316 sign |
|
1317 "return the sign of the receiver (-1, 0 or 1)" |
|
1318 |
|
1319 self strictlyPositive ifTrue:[^ 1]. |
|
1320 self negative ifTrue:[^ -1]. |
|
1321 ^ 0 |
|
1322 |
|
1323 " |
|
1324 -1.0 sign |
|
1325 -0.0 sign |
|
1326 1.0 sign |
|
1327 0.0 sign |
|
1328 " |
1311 ! ! |
1329 ! ! |
1312 |
1330 |
1313 !LimitedPrecisionReal methodsFor:'truncation & rounding'! |
1331 !LimitedPrecisionReal methodsFor:'truncation & rounding'! |
1314 |
1332 |
1315 ceilingAsFloat |
1333 ceilingAsFloat |
1350 ! ! |
1368 ! ! |
1351 |
1369 |
1352 !LimitedPrecisionReal class methodsFor:'documentation'! |
1370 !LimitedPrecisionReal class methodsFor:'documentation'! |
1353 |
1371 |
1354 version |
1372 version |
1355 ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.81 2014-12-16 12:20:28 stefan Exp $' |
1373 ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.82 2015-02-03 14:15:52 stefan Exp $' |
1356 ! |
1374 ! |
1357 |
1375 |
1358 version_CVS |
1376 version_CVS |
1359 ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.81 2014-12-16 12:20:28 stefan Exp $' |
1377 ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.82 2015-02-03 14:15:52 stefan Exp $' |
1360 ! ! |
1378 ! ! |
1361 |
1379 |
1362 |
1380 |
1363 LimitedPrecisionReal initialize! |
1381 LimitedPrecisionReal initialize! |