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

Yoshiki Ohshima yoshiki at vpri.org
Mon Jul 20 19:33:09 EDT 2009


At Mon, 20 Jul 2009 12:43:24 -0400,
USeITWes wrote:
> 
> Yes, Yoshiki you are right. He is using a Text and using its numeric value. I have included the project he made. We
> cheated a little with the scripts, I showed him a little bit of SmallTalk to get the appropriate value. This was only
> his first week using Etoys.

  Unfortunately, the project contains some USeIT specific things and
couldn't open it (but that is ok; you explained what he did).  And
text morph shouldn't round numbers.

> Are there any plans to add the base 10 exponent or better still an equivalent to the "raisedTo:" method into etoys? Many
> of the teachers I am working with teach high school math and science and they could sure use that capability. If not,
> perhaps you can direct me where I could add such a feature in my image.

  The problem with raisedTo: is that the function would require two
arguments, and it is pretty much beyond what Etoys provides.

  However, adding a new one-argument function to the function tile is
relatively easy.  You add a line that looks like:

	(exp10	exp10	'exponential (10 to the power of the argument)')

in StandardScriptingSystem>>tableOfNumericFunctions, and define a
method for a Number that looks like:

	exp10
		^ 10 raisedTo: self.

and that is it.

-- Yoshiki


More information about the etoys-dev mailing list