I like ".... and NaN should be understood as what you get when any specific result is going to be wrong."
Thanks, Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Raul Miller Sent: Sunday, November 15, 2015 1:12 PM To: Programming forum Subject: Re: [Jprogramming] (no subject) I would start by explaining what fractions are. Then I would go through a few examples involving zero. 0=1*0 0=2*0 And then, for your NaN error, I'd have to get into the concept of infinity, which I would explain as not being a specific number but someone always choosing a number which is bigger than any number you pick. The NaN error comes from _%_ and NaN should be understood as what you get when any specific result is going to be wrong. Once I did this, I'd go back over the relationship between multiplying by zero and dividing by zero and multiplying by infinity and dividing by infinity. I'd probably have the critical facts (division being a reverse of multiplication, and my above definition of infinity especially, plus anything else which can consistently trip people up) printed on a sheet of paper so that people who drift off thinking about examples can re-orient themselves when their attention resumes. Thanks, -- Raul On Sun, Nov 15, 2015 at 3:49 AM, Linda A Alvord <[email protected]> wrote: > How would you explain to a 4th grade student why subtraction and > division of fraction is so difficult for J. Here is a dialog I wrote > to review all the big ideas students should remember from third grade. > Tables show how some verbs like + and times are commutative and * and > % are not. If the verb is commutative you need only "master" a little more than half of the table. > > > > +/~i.5 > > 0 1 2 3 4 > 1 2 3 4 5 > 2 3 4 5 6 > 3 4 5 6 7 > 4 5 6 7 8 > > > > -/~i.5 > > 0 _1 _2 _3 _4 > 1 0 _1 _2 _3 > 2 1 0 _1 _2 > 3 2 1 0 _1 > 4 3 2 1 0 > > > > */~i.5 > > 0 0 0 0 0 > 0 1 2 3 4 > 0 2 4 6 8 > 0 3 6 9 12 > 0 4 8 12 16 > > > > %/~i.5 > > 0 0 0 0 0 > _ 1 0.5 0.333333 0.25 > _ 2 1 0.666667 0.5 > _ 3 1.5 1 0.75 > _ 4 2 1.33333 1 > > > > 1r3%i.5 > > _ 1r3 1r6 1r9 1r12 > > > > +/~ 1r3%i.5 > > _ _ _ _ _ > _ 2r3 1r2 4r9 5r12 > _ 1r2 1r3 5r18 1r4 > _ 4r9 5r18 2r9 7r36 > _ 5r12 1r4 7r36 1r6 > > > > -/~ 1r3%i.5 > > |NaN error > | -/~1r3%i.5 > > > > */~ 1r3%i.5 > > _ _ _ _ _ > _ 1r9 1r18 1r27 1r36 > _ 1r18 1r36 1r54 1r72 > _ 1r27 1r54 1r81 1r108 > _ 1r36 1r72 1r108 1r144 > > > > %/~ 1r3%i.5 > > |NaN error > | %/~1r3%i.5 > > > > t=: 13 :'>:/~i.y' > > t 5 > > 1 0 0 0 0 > 1 1 0 0 0 > 1 1 1 0 0 > 1 1 1 1 0 > 1 1 1 1 1 > > > > (t 5)*+/~i.5 > > 0 0 0 0 0 > 1 2 0 0 0 > 2 3 4 0 0 > 3 4 5 6 0 > 4 5 6 7 8 > > > > (t 5)**/~i.5 > > 0 0 0 0 0 > 0 1 0 0 0 > 0 2 4 0 0 > 0 3 6 9 0 > 0 4 8 12 16 > > > > (t 5)*+/~ 1r3%i.5 > > _ 0 0 0 0 > _ 2r3 0 0 0 > _ 1r2 1r3 0 0 > _ 4r9 5r18 2r9 0 > _ 5r12 1r4 7r36 1r6 > > > > (t 5)**/~ 1r3%i.5 > > _ 0 0 0 0 > _ 1r9 0 0 0 > _ 1r18 1r36 0 0 > _ 1r27 1r54 1r81 0 > _ 1r36 1r72 1r108 1r144 > > > > Linda I > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
