my 2 cents worth in extra comments
Donna
[EMAIL PROTECTED]



On 30-Jun-06, at 6:28 PM, Miller, Raul D wrote:

Dan Bron wrote:
Can you now explain why I was taught, in elementary math, to express
%:4  as  (+,-)2  instead of just  2  ?

because the square root of a positive number can be positive or negative

You were being taught about the relationship between the set 2 _2,
the concept of "square root" and the number 4.

J's %: is a function, it's not the concept "square root".

Why not use the J term VERB?
Why does the definition of monadic %: say Square Root but you say it is not the concept of "square route"?
Square Root
%:  0 0 0
Root

%: y is the square root of y . If y is negative, the result is an imaginary number. For example, %:-4 ↔ 0j2 .


x %: y is the x root of y . Thus, 3%:8 is 2, and 2%:y is %:y . In general, x %: y ↔ y^%x .




Of course, if you want both of the values which are valid square
roots, J allows you to express this unambiguously:
  (,-)@%: 4

Why not include the result

 (,-)@%: 4
2 _2

Why not show this too

(,-)@%: 1j1
1.09868j0.45509 _1.09868j_0.45509

(+,-)%:1j1
1.09868j_0.45509 _1.09868j_0.45509

and this

(,-)@%: 0j1
0.707107j0.707107 _0.707107j_0.707107




But note that (+,-)%: is not quite right.  Consider
   *:(+,-)%:1j1
1j_1 1j1

*:%:1j1
1j1

*:%:1j_1
1j_1

Then again, in most contexts it's far more useful to have
a result with exactly the same shape as the argument than it
is to have two values (one of which is trivially derived from
the other) mixed together.

If I have to write  (%:4) = (+,-)2   why do I not have to write
  (^._1) = 0 j. 1p1 * 1 + 2 * i: _  ?  Is it because  the former
has only 2 elements, but the latter infinitely many?
If I have to write the square root of 4 is plus or minus 2
why do I not need to write ???? (I am not sure what the balance means either)

^._1
1j_1



I do not understand the above question.  In my opinion, you do
not have to write (%:4) = (+,-)2 so the rest of the question
makes no sense to me.

By the way, I'm pretty sure  0 j. 1p1 * 1 + 2 * i: N
(scalar positive integer  N )  is the right expression for
generating for the logs of  _1  but J doesn't agree:

   ^0 j. 1p1*1+2*i:3
_1 _1 _1 _1 _1 _1 _1

Looks right to me.

0     j.3.14159*1+2*i:3
15.708 9.42477 3.14159 3.14159 9.42477 15.708 21.9911



Of course, for large values of N, you start running into the
limits of precision expressible using floating point numbers,
so you get numbers which are "nearly 1, but not quite".

--
Raul


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

Reply via email to