Hi ... you know, just in case Echelon is listening. I'll leave your name out;

Note that, where J does trig one way:

  1 o. x

a common calculator does it the other way:

x sin

Jack Andrews wrote:
hi guys,

i was pondering the benefits pros and cons of a left to right
notation.  common calculators go left to right - 1 + 2 * 3 is 9.  is
the fact that common calculators operate this way due to "common
sense" or an innate intuitiveness?

so ordinary J:

     q=. 2 3 5 7 9

   1 + 2 * q
5 7 11 15 19


then a left to right J could be:

      2 3 5 7 9 =. q

   q * 2 + 1
5 7 11 15 19


=. q may be the most offputting here, but this is just how a common
calculator works -- the "M+" key.

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


--
------------------------------------------------------------------------
|\/| Randy A MacDonald       | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ |                         | The only real problem with APL is that
BSc(Math) UNBF'83            | it is "still ahead of its time."
Sapere Aude                  |     - Morten Kromberg
Natural Born APL'er          |
-----------------------------------------------------(INTP)----{ gnat }-



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

Reply via email to