(version J504)
   1%3
0.333333
   1x%3
1r3
   1%3x
1r3
   2x*1%3
0.666667
   2*1%3x
2r3

When the result is 2r3 the result can be used as an argument to the next function but for example the results of z2 and z3 are displayed the same but differ enough that they do not meet comparison tolerance (which I would also like to know how to examine)

z1=: 2*o.2r3
   z1
4.18879
   z2=:2*1p1^2r3
   z2
4.29006


z3=:2*3.14159^2*1%3
   z3
4.29006


z2=z3
0



Donna
[EMAIL PROTECTED]



On 26-Jun-06, at 10:28 AM, John Randall wrote:

GerryLowry1(905)825-9582{AbilityBusinessComputerServices} wrote:
(a) 111 divided by 333 reduces to 1 divided by 3
    but is not 1 divided by 3 ... hence
   111 % 333x
111r333        NB. non reduced representation

(b) x could give something like
   111 % 333x
0.33333333333333333333333333333333...

I don't see what you are getting at here.  If you want to define
arithmetic for nonreduced fractions, fine. But 111%333 and 1%3 represent
the same rational number and 1 % 3x should give the same result.  What
distinction are you drawing?

Best wishes,

John

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to