[ENH] fltconsts-raok

Stephan Rudlof squeak-dev at lists.squeakfoundation.org
Fri Oct 25 12:51:14 UTC 2002


Correction:

I've had some private conversation with Richard:
the conclusion is that Float>>epsilon is 100% correct as he wrote it,
even if it does have one more digit than Squeak happens to need.

My example below leads to wrong thinking paths:
- the input conversion methods are not as accurate as the output methods,
- conversion from decimal to dual gives roundup errors,
- 1.0 + 2.0e-16 = (1.0 + 2.220446049250313e-16) in Squeak, 2.0e-16 is far
away from the real epsilon.

Greetings,

Stephan

Stephan Rudlof wrote:
> Richard,
> 
> I have tried (first num is the given epsilon):
> 
> {2.220446049250313e-16. 2.220446049250312e-16. 2.220446049250311e-16.
> 2.220446049250312e-16 + 2.220446049250312e-16. 0 + 2.220446049250312e-16. 1
> + 2.220446049250312e-16}
>   collect:
>     [:num | String streamContents: [:s | num absPrintExactlyOn: s base: 10]]
> 
> ->
> #('2.220446049250313e-16' '2.220446049250312e-16' '2.2204460492503109e-16'
> '4.440892098500624e-16' '2.220446049250312e-16' '1.0000000000000002')
> 
> 
> Not a big difference, but: could it be that 2.220446049250312e-16 is the
> real epsilon? At least it is exactly representable and gives a new number if
> added to 0.0 or 1.0 ...
> 
> 
> Greetings,
> 
> Stephan
> 
> 
> ok at cs.otago.ac.nz wrote:
> 
>>from preamble:
>>
>>"Change Set:		fltconsts-raok
>>Date:			10 October 2002
>>Author:			Richard A. O'Keefe
>>
>>Provide maxVal, minVal, and epsilon for Float"!
> 
> 
> 


-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3




More information about the Squeak-dev mailing list