[q-lang-cvs] qcalc/examples example.qcalc,1.4,1.5
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-15 10:18:13
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12010/examples Modified Files: example.qcalc Log Message: cosmetic changes Index: example.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/example.qcalc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** example.qcalc 12 Nov 2007 20:33:13 -0000 1.4 --- example.qcalc 15 Nov 2007 10:18:09 -0000 1.5 *************** *** 1,5 **** ! // qcalc 1.0, created Mon Nov 12 21:36:00 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"*** Erathosthenes' prime sieve ***"),((2,0),"Q stream of *all* primes"),((2,1),"= primes"),((3,0),"The first 50 primes"),((3,1),"= list $ take 50 B3"),((4,0),"The 111th prime"),((4,1),"= B3!111"),((5,0),"Product of the first 50"),((5,1),"= prd B4"),((6,1),("(This is a HUGE number, make the column bigger to see it all.)",1,2)),((8,1),"*** Linear Regression (Eddie Rucker) ***"),((9,0),"1"),((9,1),"3"),((10,0),"2"),((10,1),"5"),((11,0),"3"),((11,1),"7"),((12,0),"4"),((12,1),"9"),((13,0),"5"),((13,1),"10"),((14,0),"6"),((14,1),"13"),((15,0),"Least squares:"),((15,1),"= regress A10:A15 B10:B15"),((16,0),"Enter X:"),((16,1),"7"),((17,0),"Value at X:"),((17,1),"= B16 B17"),((19,1),"*** Normal Distribution (Eddie Rucker) ***"),((20,0),"Enter A:"),((20,1),"-1"),((21,0),"Enter B:"),((21,1),"1"),((22,0),"P(X>=A):"),((22,1),"= normal_above B21"),((23,0),"P(X<=B):"),((23,1),"= normal_below B22"),((24,0),"P(A<=X<=B):"),((24,1),"= normal B21 B22"),((26,1),"*** Playing with sums etc. ***"),((26,2),"Squares"),((26,3),"Cubes"),((27,1),"1"),((27,2),"= square B28"),((27,3),"= cube B28"),((28,1),"2"),((28,2),"= square B29"),((28,3),"= cube B29"),((29,1),"3"),((29,2),"= square B30"),((29,3),"= cube B30"),((30,1),"4"),((30,2),"= square B31"),((30,3),"= cube B31"),((31,1),"5"),((31,2),"= square B32"),((31,3),"= cube B32"),((32,1),"6"),((32,2),"= square B33"),((32,3),"= cube B33"),((33,1),"7"),((33,2),"= square B34"),((33,3),"= cube B34"),((34,1),"8"),((34,2),"= square B35"),((34,3),"= cube B35"),((35,1),"9"),((35,2),"= square B36"),((35,3),"= cube B36"),((36,1),"10"),((36,2),"= square B37"),((36,3),"= cube B37"),((38,0),"Sum"),((38,1),"= sum B28:B37"),((38,2),"= sum C28:C37"),((38,3),"= sum D28:D37"),((39,0),"Product"),((39,1),"= prd B28:B37"),((39,2),"= prd C28:C37"),((39,3),"= prd D28:D37"),((40,1),"Note that the range B28:B37 becomes a Q list:"),((41,1),"= B28:B37"),((44,1),"*** Geometric series ***"),((45,0),"Enter Q:"),((45,1),"= 1/3"),((46,0),"Series:"),((46,1),"= geom_series B46"),((47,0),"1"),((47,1),"= B$47!A48"),((48,0),"2"),((48,1),"= B$47!A49"),((49,0),"3"),((49,1),"= B$47!A50"),((50,0),"4"),((50,1),"= B$47!A51"),((51,0),"5"),((51,1),"= B$47!A52"),((52,0),"6"),((52,1),"= B$47!A53"),((53,0),"7"),((53,1),"= B$47!A54"),((54,0),"8"),((54,1),"= B$47!A55"),((55,0),"9"),((55,1),"= B$47!A56"),((56,0),"10"),((56,1),"= B$47!A57"),((57,0),"11"),((57,1),"= B$47!A58"),((58,0),"12"),((58,1),"= B$47!A59"),((59,0),"13"),((59,1),"= B$47!A60"),((60,0),"14"),((60,1),"= B$47!A61"),((61,0),"15"),((61,1),"= B$47!A62"),((63,1),"Some calculations with rationals:"),((64,0),"Op1"),((64,1),"= 5%3"),((65,0),"Op2"),((65,1),"= 81%53"),((66,0),"Sum"),((66,1),"= B65+B66"),((67,0),"Product"),((67,1),"= B65*B66"),((68,0),"Quotient"),((68,1),"= B65 % B66"),((70,1),"Complex numbers:"),((71,0),"2^(1/i)"),((71,1),"= 2^(1/i)"),((72,0),"log2 of that"),((72,1),"= lg B72"),((73,0),"abs, arg of the log2"),((73,1),"= (abs B73,arg B73)"),((75,1),"Complex rationals:"),((76,1),"= (1+:2)%(3+:4)"),((77,1),"= square (5+:-5%18)")] ! // [] // [(0,139),(1,308),(2,120),(3,163),(4,188)] // Start of script. Please do not remove this line. --- 1,5 ---- ! // qcalc 1.0, created Thu Nov 15 11:21:15 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"*** Erathosthenes' prime sieve ***"),((2,0),"Q stream of *all* primes"),((2,1),"= primes"),((3,0),"The first 50 primes"),((3,1),"= list $ take 50 B3"),((4,0),"The 111th prime"),((4,1),"= B3!111"),((5,0),"Product of the first 50"),((5,1),"= prd B4"),((6,1),"(This is a HUGE number, make the column bigger to see it all.)"),((8,1),"*** Linear Regression (Eddie Rucker) ***"),((9,0),"1"),((9,1),"3"),((10,0),"2"),((10,1),"5"),((11,0),"3"),((11,1),"7"),((12,0),"4"),((12,1),"9"),((13,0),"5"),((13,1),"10"),((14,0),"6"),((14,1),"13"),((15,0),"Least squares:"),((15,1),"= regress A10:A15 B10:B15"),((16,0),"Enter X:"),((16,1),"7"),((17,0),"Value at X:"),((17,1),"= B16 B17"),((19,1),"*** Normal Distribution (Eddie Rucker) ***"),((20,0),"Enter A:"),((20,1),"-1"),((21,0),"Enter B:"),((21,1),"1"),((22,0),"P(X>=A):"),((22,1),"= normal_above B21"),((23,0),"P(X<=B):"),((23,1),"= normal_below B22"),((24,0),"P(A<=X<=B):"),((24,1),"= normal B21 B22"),((26,1),"*** Playing with sums etc. ***"),((26,2),"Squares"),((26,3),"Cubes"),((27,1),"1"),((27,2),"= square B28"),((27,3),"= cube B28"),((28,1),"2"),((28,2),"= square B29"),((28,3),"= cube B29"),((29,1),"3"),((29,2),"= square B30"),((29,3),"= cube B30"),((30,1),"4"),((30,2),"= square B31"),((30,3),"= cube B31"),((31,1),"5"),((31,2),"= square B32"),((31,3),"= cube B32"),((32,1),"6"),((32,2),"= square B33"),((32,3),"= cube B33"),((33,1),"7"),((33,2),"= square B34"),((33,3),"= cube B34"),((34,1),"8"),((34,2),"= square B35"),((34,3),"= cube B35"),((35,1),"9"),((35,2),"= square B36"),((35,3),"= cube B36"),((36,1),"10"),((36,2),"= square B37"),((36,3),"= cube B37"),((38,0),"Sum"),((38,1),"= sum B28:B37"),((38,2),"= sum C28:C37"),((38,3),"= sum D28:D37"),((39,0),"Product"),((39,1),"= prd B28:B37"),((39,2),"= prd C28:C37"),((39,3),"= prd D28:D37"),((40,1),"Note that the range B28:B37 becomes a Q list:"),((41,1),"= B28:B37"),((44,1),"*** Geometric series ***"),((45,0),"Enter Q:"),((45,1),"= 1/3"),((46,0),"Series:"),((46,1),"= geom_series B46"),((47,0),"1"),((47,1),"= B$47!A48"),((48,0),"2"),((48,1),"= B$47!A49"),((49,0),"3"),((49,1),"= B$47!A50"),((50,0),"4"),((50,1),"= B$47!A51"),((51,0),"5"),((51,1),"= B$47!A52"),((52,0),"6"),((52,1),"= B$47!A53"),((53,0),"7"),((53,1),"= B$47!A54"),((54,0),"8"),((54,1),"= B$47!A55"),((55,0),"9"),((55,1),"= B$47!A56"),((56,0),"10"),((56,1),"= B$47!A57"),((57,0),"11"),((57,1),"= B$47!A58"),((58,0),"12"),((58,1),"= B$47!A59"),((59,0),"13"),((59,1),"= B$47!A60"),((60,0),"14"),((60,1),"= B$47!A61"),((61,0),"15"),((61,1),"= B$47!A62"),((63,1),"Some calculations with rationals:"),((64,0),"Op1"),((64,1),"= 5%3"),((65,0),"Op2"),((65,1),"= 81%53"),((66,0),"Sum"),((66,1),"= B65+B66"),((67,0),"Product"),((67,1),"= B65*B66"),((68,0),"Quotient"),((68,1),"= B65 % B66"),((70,1),"Complex numbers:"),((71,0),"2^(1/i)"),((71,1),"= 2^(1/i)"),((72,0),"log2 of that"),((72,1),"= lg B72"),((73,0),"abs, arg of the log2"),((73,1),"= (abs B73,arg B73)"),((75,1),"Complex rationals:"),((76,1),"= (1+:2)%(3+:4)"),((77,1),"= square (5+:-5%18)")] ! // [(6,37)] // [(0,139),(1,308),(2,120),(3,163),(4,188)] // Start of script. Please do not remove this line. |