Windows installer: update SBCL.
[maxima/cygwin.git] / tests / rtest_scalarp.mac
blobc4e32fb8e700e2ee2555fec7dbdce21263ff018c
1 (kill (all), 0);
2 0;
4 (remvalue(a,b,c,d,x,y),0);
5 0$
7 (declare([a,b],scalar),0);
8 0$
10 (sc : [-5 ,0, 8, 7.8, 1.23b0, %pi, %phi, %i, sqrt(1+%pi), a, a*b, a+b, a/b,a^3, b^a, a^sqrt(2)],0);
13 (buggy : [],0);
16 (for si in sc do if not(scalarp(si)) then buggy : cons(si,buggy),0);
19 buggy;
20 []$
22 (nsc : [x,x+y,x*y,x^3, x = y, x < y, x^^5, cosh(x), sqrt(x), [5,x], matrix([1,2],[3,4])],0);
25 (buggy : [],0);
28 (for si in nsc do if scalarp(si) then buggy : cons(si,buggy),0);
31 buggy;
32 []$
34 determinant(matrix([1,2],[3,4]));
35 -2$
37 determinant(matrix([a,b],[c,d]));
38 a*d - b * c$
40 determinant(a);
43 is(verbify(op(determinant(x))) = 'determinant);
44 true$
46 determinant(sqrt(5));
47 sqrt(5)$
49 determinant(7*%i + 5);
50 7*%i + 5$
52 block([matrix_element_add:'f, matrix_element_mult:'g],
53   determinant( matrix([a,b],[c,d]) ) );
54 f(f(0,g(1,a,d)),g(-1,b,c))$
56 (remove([a,b],scalar),0);
59 (remvalue(sc, nsc,buggy),0);