File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ Class {
1414 #name : #PMFloatingPointMachine ,
1515 #superclass : #Object ,
1616 #instVars : [
17- ' defaultNumericalPrecision' ,
18- ' negativeMachinePrecision'
17+ ' defaultNumericalPrecision'
1918 ],
2019 #classVars : [
2120 ' UniqueInstance'
@@ -36,30 +35,9 @@ PMFloatingPointMachine class >> reset [
3635 UniqueInstance := nil
3736]
3837
39- { #category : #information }
40- PMFloatingPointMachine >> computeNegativeMachinePrecision [
41-
42- | one zero floatingRadix inverseRadix tmp |
43- one := 1.0 .
44- zero := 0.0 .
45- floatingRadix := Float radix asFloat.
46- inverseRadix := one / floatingRadix.
47- negativeMachinePrecision := one.
48- [
49- tmp := one - negativeMachinePrecision.
50- tmp - one = zero ] whileFalse: [ negativeMachinePrecision := negativeMachinePrecision * inverseRadix ]
51- ]
52-
5338{ #category : #information }
5439PMFloatingPointMachine >> defaultNumericalPrecision [
5540
5641 defaultNumericalPrecision ifNil: [ defaultNumericalPrecision := Float machineEpsilon sqrt ].
5742 ^ defaultNumericalPrecision
5843]
59-
60- { #category : #information }
61- PMFloatingPointMachine >> negativeMachinePrecision [
62-
63- negativeMachinePrecision ifNil: [ self computeNegativeMachinePrecision ].
64- ^ negativeMachinePrecision
65- ]
You can’t perform that action at this time.
0 commit comments