[etoys-dev] Need more decimal places (more than 10)

Edward Cherlin echerlin at gmail.com
Thu Jul 16 15:52:42 EDT 2009


On Thu, Jul 16, 2009 at 12:27 PM,
USeITWes<etoys-dev-forum at squeakland.org> wrote:
> I have an unusual request. I know etoys allows the user to view up to 10
> decimal places in a number. I was wondering if there was a way to increase
> this number.

Yes, certainly. You can redefine or subclass any object class in the
system. Open a code viewer on the object that does the calculation,
and take a look at the class of the result. There are 15 or 16 digits
of usable precision in IEEE floating point numbers.

> I have a project participant who is using etoys with a Vernier
> pH sensor and he is using calculations that that result in extremely small
> numbers.

To how many significant digits? Calculations resulting in extremely
small numbers are notorious for losing precision. Thus, for example,
1.00001-1.00000 = 0.00001, with only one significant digit remaining,
if that.

Your explanation is not adequate, unless you are using fixed-point
arithmetic where you should use floating-point. I don't think there
has ever been a measurement of anything to better than ten significant
figures. Thus, for example,

0.0000000000123

should be written as 1.23E-11, with only three digits of precision.

> I am familiar with programming in Squeak and can alter our
> project's image if necessary.
>
> ________________________________
> Wesley Williams
> Project Assistant
> USeIT Project
>
>
>
> -------------------- m2f --------------------
>
> (from forum)
> http://forums.squeakland.org/viewtopic.php?p=9562#9562
>
> -------------------- m2f --------------------
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
>



-- 
Silent Thunder (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) is my name
And Children are my nation.
The Cosmos is my dwelling place, The Truth my destination.
http://earthtreasury.org/worknet (Edward Mokurai Cherlin)


More information about the etoys-dev mailing list