After watching a math video on YouTube I started to investigate the 
implementation of alternating sequences in J.

Using the site search function, (alternating sequences site:jsoftware.com)  I 
discovered an entry in the NYCJUG of 2022-11-08 which contains an excellent 
example:


   calce=: 13 : '%-/%!2+i.x: y'
   calce 10
3991680r1468457
   20j18":calce 10      NB. Format rational to 20-digit decimal with 18 places 
past the decimal
2.718281842777827338

Using this as a startpoint, I followed the logic thru but couldn't understand 
why 2 is added to i. x: y

Removing the 2+ doesn't seem to affect the result in any of the cases I tried.


Thanks in advance,

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

Reply via email to