Current issue

Vol.26 No.4

Vol.26 No.4

Volumes

© 1984-2024
British APL Association
All rights reserved.

Archive articles posted online on request: ask the archivist.

archive/22/1

Volume 22, No.1

Fun With Pascal’s Triangle

   Pascal =: i. !/ i.
   Pascal 51 
1 1 1 10 1 2 3 4
0 0 1 3 6
0 0 0 1 4
0 0 0 0 1
   load 'viewmat'
   $pt50=. Pascal 50
50 50
   viewmat 5|pt50
   load 'logo'
   'save*' names 3
saveBMPFl
   saveBMPFl 'C:\amisc\j\nycjug\Pascal50mod5.bmp'

picture of triangles

   viewmat 11|pt50
   saveBMPFl 'C:\amisc\j\nycjug\Pascal50mod11.bmp'

picture of triangles

   viewmat 3|pt50  
   saveBMPFl 'C:\amisc\j\nycjug\Pascal50mod3.bmp'  
   NB. Why does it look "broken" on the right?  
   >./,pt50
6 .3205303e13  
   /:~,pt50
0 0 0 0 0 0...  
   \:~,pt50
6.3205303e13 6.3205303e13 5.8343357e13...  
   3|10{.\:~,pt50
0 0 0 0 0 0 0 0 0 0      NB. Aha! Looks suspicious……………..

picture of triangles

   $pt50=. Pascal 50x
50 50  
   \:~,pt50
63205303218876 63205303218876...  
   3|10{.\:~,pt50
0 0 0 0 1 1 1 1 0 0  
   viewmat 3|pt50  
   saveBMPFl 'C:\amisc\j\nycjug\Pascal50xmod3.bmp'

picture of triangles


script began 13:22:32
caching off
debug mode off
cache time 3600 sec
indmtime not found in cache
cached index is fresh
recompiling index.xml
index compiled in 0.1908 secs
read index
read issues/index.xml
identified 26 volumes, 101 issues
array (
  'id' => '10005355',
)
regenerated static HTML
article source is 'HTML'
source file encoding is ''
read as 'Windows-1252'
URL: pascal1.gif => trad/v221/pascal1.gif
URL: pascal2.gif => trad/v221/pascal2.gif
URL: pascal3.gif => trad/v221/pascal3.gif
URL: pascal4.gif => trad/v221/pascal4.gif
completed in 0.2123 secs