Hi all,

On Mon, Sep 1, 2014 at 6:05 AM, Tomas Hlavaty <t...@logand.com> wrote:
>> : (* 1.0 1.0)
>> -> 100
>
> You want: (*/ 1.0 1.0 1.0), see http://software-lab.de/doc/ref_.html#*/

That's funny because I read about */ right before posting my email but
couldn't connect with my problem. If there is room for clarification, here
is my suggestion:
«…by multiplying with (or dividing by) the scale factor.»
could become
«…by multiplying with (or dividing by) the scale factor, which is always `1.0`.»
Suggested examples:
: (scl 1)
-> 1
: 1.0
-> 10
: (* 1.0 1.0)
-> 100
: (*/ 1.0 1.0 1.0)
-> 10

On Mon, Sep 1, 2014 at 6:23 AM, Alexander Burger <a...@software-lab.de> wrote:
>
> The solution would be to extend the internal representation of numbers,
> e.g. with an additional bit to distinguish between non-scaled and scaled
> integers.

I guess that you don't plan to alter PicoLisp this way.
And there is no magic way to alter the reader, or from Lisp?

> In fact, I would not try to explain it with these examples, but
> work _only_ with scaled integers first. Should be no problem for
> you as a math teacher.
> And then explain that the dot is just a read macro, not part of
> the language machinery per se.

My strategy for now is to only work with integers first, even with /.
Then explain that if decimals are needed, a scale must be choosen,
and numbers must be entered with a dot, or they will be read as
tenths for a scale of 1, millionths for a scale of 6…

I'll try to show, for a scale of 1, «1» instead of «10» using 'format cleverly.


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to