[Cuis-dev] More on The Cuis Book

Ignacio Sniechowski 0800nacho at gmail.com
Sun Mar 5 16:51:55 PST 2023


Hi there!
Hope everyone is doing great
First just some minor typo I found in the book:
Page 34: Last line reads "repond", but I guess it's "respond".

Now this one puzzles me. Example 3.4 Interval loops

1 to: 10 do: [:i | Transcript show: 1 / i; space]
⇒ 1 (1/2) (1/3) (1/4) (1/5) (1/6) (1/7) (1/8) (1/9) (1/10)

1 to: 10 by: 2 do: [:i | Transcript show: 1 / i; space] ⇒ 1 (1/3) (1/5)
(1/7) (1/9)

1/10 to: 5/3 by: 1/2 do: [:i | Transcript show: i; space] ⇒ (1/10) (3/5)
(11/10) (8/5) (1/10) (3/5) (11/10) (8/5)

"(1/10) (3/5) (11/10) (8/5)" not two times the series.


Float pi to: 5 by: 1/3 do: [:i | Transcript show: (i roundTo: 0.01) ; space]
 ⇒ 3.14 3.47 3.81 4.14 4.47 4.81
*"*3.14 3.47 3.81 4.14 4.47 4.8100000000000005" the last number is not
rounded...
What is especially intriguing is the last case...that 4.8100000000000005 is
not rounded.
Cheers
Nacho



*Ignacio Sniechowski*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230305/b058aedf/attachment.htm>


More information about the Cuis-dev mailing list