[OSC_dev] [ANN] OSC for Squeak
nik gaffney
nik at f0.am
Wed Mar 30 09:13:27 UTC 2005
> - One test is not running due to bizarre floating point arithmetic:
> #('/foo' 1000 -1 'hello' 1.233999967575073 5.67799997329712) is
> certainly not #('/foo' 1000 -1 'hello' 1.234 5.678)
> Hope nobody needs too precise floats...
This arithmetic might not be as bizare as it may seem, floats are not
really as 'exact' as you might first think. im not sure how squeak
represents and/or compares floats (the crosspost/followup might help
find somone who does.. .), but it looks reasonably consistent with the
'error' from ieee754 which you would be using for OSC encoding (ie. <
0.0001 for such values) and are probably 'close enough' for what ever
you are using floats for.
these links might help clarify and/or confuse the issue,.
http://stevehollasch.com/cgindex/coding/ieeefloat.html
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
and the essential "What Every Computer Scientist Should Know About
Floating-Point Arithmetic", by David Goldberg which can be found at
http://docs.sun.com/source/806-3568/ncg_goldberg.html
More information about the Squeak-dev
mailing list
|