change the behavior of pf_number_div upon divide by zero

This commit is contained in:
hyunghwan.chung
2019-01-10 15:22:43 +00:00
parent 7d3d21b3cf
commit 9cd0b28933
2 changed files with 13 additions and 2 deletions

View File

@ -209,7 +209,18 @@ extend MyObject
[ (16rFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF bitAnd: 16r1111111111111111111111111111111111111111) = 16r1111111111111111111111111111111111111111 ],
## 60-64
[ (-0.1233 * 999999.123) = -123299.8918 ],
[ (-0.1233 * 999999.123) asString = '-123299.8918' ],
[ (-0.1233 - -0.123) = -0.0003 ],
[ (-0.1233 - -0.123) asString = '-0.0003' ],
[ (1.234 - 1.234) = 0 ], ## 0.000
## 65-69
[ (-123897128378912738912738917.112323131233 div: 123.1) = -1006475453931053931053931.089458352000 ],
[ (-1006475453931053931053931.089458352000 * 123.1) = -123897128378912738912738917.112323131200 ],
[
| b |
b := [:n | (n > 0) ifTrue: [ n * (b value: n - 1)] ifFalse: [1]].