Sponsored links: Algebra eBooks
 

Related

if-mod-plot2d
plot2d([g(x),f(x)],[x,-10,10],[y,-2,2]);

f(x):= if(-2<=x an...

g(x):= f(mod(2,x+2)+2);

plot2d([g(x),f(x)],[x...

Calculate

if-plot2d-plot3d
plot2d([f(x)],[x,-1,3],[y,-4,5]);

f(x):=if (x>=0) th...

plot2d([f(x)],[x,-1,3...

g(x):=f(x)/(f(x)+f(1-...

Calculate

if-plot2d
plot2d(f(x),[x,-1,15],[y,-1,11]);

f(x):= if (x<=10 a...

plot2d(f(x),[x,-1,15]...

Calculate

if

m:3;

n:12;

(m+n-2)*(m+n-4)*(m+n-6);

Calculate

if-plot2d
plot2d(f(x), [x, -5, 5]);

f(x):= if(x<0) the...

plot2d(f(x), [x, -5, ...

Calculate

if

m:3;

n:10;

(m+n-2)*(m+n-4)*(m+n-...

Calculate

if-min-plot2d-sqrt
plot2d([r(x),s(x)],[x,-1,1]);

j(x):=if (x<=0.5) ...

f(x):=j(2*x);

h(x):=j(2*x-1);

Calculate

if-plot3d
plot3d(f(x,y),[x,0,5000],[y,1,4]);

p(x):=if(x<1000) t...

f(x,y):=(x-(x/y))-(p(...

f(1000,2.5);

Calculate

if-lambda-let-print-var

:lisp (defmacro fcons...

:lisp (defun zip (l1 ...

:lisp (defun fmap (f ...

Calculate

if

m:3;

n:12;

(m+n-2)*(m+n-4)*(m+n-...

Calculate

if

Run Example
(%i1):lisp (defun r (n) (labels ((f (k l z) (let ((ln (+ (* 1.003 l) (* 0.006 z))) (zn (+ (* 0.0069 l) (* 1.026 z)))) (if (<
 k n) (f (1+ k) ln zn) (cons (/ ln l) (/ zn z)))) (f 0 10 1000))))) (print (r 100));

NIL 
NIL
(%i1) 
Run Example
P [s1,s2,s3,s4,s5] := block ( [tot: s1+s2+s3+s4+s5] , s1/tot*(if (s1>
1) then P [s1-1,s2,s3,s4,s5] else 1)+(if s2<
=1 then 0 else P [s1,s2-1,s3,s4,s5]*s2/tot)+(if s3<
=1 then 0 else P [s1,s2,s3-1,s4,s5]*s3/tot)+(if s4<
=1 then 0 else P [s1,s2,s3,s4-1,s5]*s4/tot)+(if s5<
=1 then 0 else P [s1,s2,s3,s4,s5-1]*s5/tot) );
(%o1) P                   := block([tot : s1 + s2 + s3 + s4 + s5], 
       s1, s2, s3, s4, s5
s1
--- (if s1 > 1 then P                       else 1)
tot                  s1 - 1, s2, s3, s4, s5
                           P                       s2
                            s1, s2 - 1, s3, s4, s5
 + (if s2 <= 1 then 0 else --------------------------)
                                      tot
                           P                       s3
                            s1, s2, s3 - 1, s4, s5
 + (if s3 <= 1 then 0 else --------------------------)
                                      tot
                           P                       s4
                            s1, s2, s3, s4 - 1, s5
 + (if s4 <= 1 then 0 else --------------------------)
                                      tot
                           P                       s5
                            s1, s2, s3, s4, s5 - 1
 + (if s5 <= 1 then 0 else --------------------------))
                                      tot
(%i2) srt[s1,s2,s3,s4,s5] := cons(s1, sort([s2,s3,s4,s5]));
(%o2)      srt                   := cons(s1, sort([s2, s3, s4, s5]))
              s1, s2, s3, s4, s5
(%i3) P [s1,s2,s3,s4,s5] := block ( [tot: s1+s2+s3+s4+s5] , s1/tot*(if (s1>
1) then arrayapply(P, srt[s1-1,s2,s3,s4,s5]) else 1)+(if s2<
=1 then 0 else arrayapply(P, srt[s1,s2-1,s3,s4,s5])*s2/tot)+(if s3<
=1 then 0 else arrayapply(P, srt[s1,s2,s3-1,s4,s5])*s3/tot)+(if s4<
=1 then 0 else arrayapply(P, srt[s1,s2,s3,s4-1,s5])*s4/tot)+(if s5<
=1 then 0 else arrayapply(P, srt[s1,s2,s3,s4,s5-1])*s5/tot) );
(%o3) P                   := block([tot : s1 + s2 + s3 + s4 + s5], 
       s1, s2, s3, s4, s5
s1
--- (if s1 > 1 then arrayapply(P, srt                      ) else 1)
tot                                  s1 - 1, s2, s3, s4, s5
                           arrayapply(P, srt                      ) s2
                                            s1, s2 - 1, s3, s4, s5
 + (if s2 <= 1 then 0 else -------------------------------------------)
                                               tot
                           arrayapply(P, srt                      ) s3
                                            s1, s2, s3 - 1, s4, s5
 + (if s3 <= 1 then 0 else -------------------------------------------)
                                               tot
                           arrayapply(P, srt                      ) s4
                                            s1, s2, s3, s4 - 1, s5
 + (if s4 <= 1 then 0 else -------------------------------------------)
                                               tot
                           arrayapply(P, srt                      ) s5
                                            s1, s2, s3, s4, s5 - 1
 + (if s5 <= 1 then 0 else -------------------------------------------))
                                               tot
(%i4) P[11,12,12,12,12];
                                    497664
(%o4)                               -------
                                    2232265
(%i5) 
Run Example
:lisp (mapcar (lambda (x) (and (atom x) (symbolp x))) '(a * (+ 2 3)));

(T T NIL)
(%i1) :lisp (mapcar (lambda (x) (if (listp x) (cadr x))) '(a * (2 + 3)));

(NIL NIL +)
(%i1) 
[abs,array,do,if,listarray,plot2d,sin] [abs,do,if,is,length,map,ratsimp,realroots,solve] [abs,floor,if,plot2d] [abs,if,plot2d] [append,ascii,block,concat,copylist,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,concat,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring,true] [append,atom,block,delete,do,emptyp,freeof,if,indices,lambda,length,lmax,lmin,makelist,map,member,not,sublist_indices,subst] [append,atom,block,delete,flatten,if,lambda,load,map,return] [append,block,declare,do,factor,if,lsum] [append,block,delete,do,emptyp,if,lambda,length,makelist,map,not,subst] [append,eval,false,if,labels,lambda,quotient,rest,reverse,sum,true] [array,do,if,listarray,plot2d,sin] [arrayinfo,block,if,sort] [bfloat,block,ev,exp,fpprec,if,log,numer,print] [bftorat,block,cons,delete,emptyp,false,first,float2bf,fpprec,if,integerp,kill,lambda,listp,map,mod,ratdenom,ratepsilon,ratprint,rest,return] [bftorat,block,delete,ev,false,float,if,integerp,mod,ratdenom,ratepsilon,ratprint] [bftorat,block,delete,float,if,integerp,mod,rat,ratdenom,ratepsilon,ratprint] [bftorat,block,ev,false,float2bf,fpprec,if,integerp,kill,mod,ratdenom,ratepsilon,ratprint,return] [bftorat,block,false,float2bf,fpprec,if,integerp,kill,mod,ratdenom,ratepsilon,ratprint,return] [block,cons,if,sort,xreduce] [block,cons,if,sort] [block,cos,flatten,if,li,load,makelist,map,numer,outermap,plot2d,sin,sort,unique] [block,do,if,length,while] [block,genmatrix,if,print,random,return,while] [block,genmatrix,if,random,return] [block,if,load,primep] [block,if] [ceiling,if,mod] [coeff,factor,if,product,ratsimp,sum] [display2d,false,if,plot2d,sqrt] [do,evenp,first,if,lambda,makelist,map,return,setify,subset] [do,float,if,print,return] [do,if,is,length,map,ratsimp,realroots,solve,subst] [do,if,lambda,let,or,values] [do,if,mod] [draw,if,load] [eval,if,labels,lambda,rest,reverse,sum] [evenp,first,if,lambda,makelist,map,setify,subset] [evenp,if,lambda,makelist,map,setify,subset] [first,if,lambda,makelist,map,mod,setify,subset] [if,integrate,plot2d,quad_qag,sqrt] [if,lambda,let] [if,let] [if,matrix,sqrt] [if,mod,plot2d] [if,or] [if,plot2d,plot3d] [if,plot2d] [if]

Related Help

Help for If