Sponsored links: Algebra eBooks
 

Related

not

not((not a or not c) ...

Calculate

not-or-true

f:a0 and a1;

f,...

f:a0 and a2;

Calculate

not

W:not(Spr and Sum and...

Sp:not(Sum and Fall a...

Su:not(Fall and Win a...

Calculate

not-or

f:a0 and a1;

f,...

f:a0 and a2;

Calculate

not

not (p and q);

Calculate

not-or-true

f:a0 and a1;

f,...

f:a0 and a2;

Calculate

not

(not((true and false)...

Calculate

not-or-true

f:a0 and a1;

f,...

f:a0 and a2;

Calculate

not-true

tosi: true;

tosi;

tosi: not(tosi);

Calculate

not-or-true

f:a0 and a1;

f,...

f:a0 and a2;

Calculate

not

Run Example
(%i1)intervals(items):=block([result],  result: if (emptyp(items)) then [] else           if(listp(items)) then          if(emptyp(rest(items))) then [] else          cons(cons(first(items),  [second(items)]),          intervals(rest(items))));
(%o1) intervals(items) := block([result], 
result : if emptyp(items) then [] else (if listp(items)
 then (if emptyp(rest(items)) then [] else cons(cons(first(items), 
[second(items)]), intervals(rest(items))))))
(%i2) intervals(makelist(n, n, 1, 10));
(%o2) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]
(%i3) intervals(makelist(n, n, 1, 11));
(%o3) [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], 
                                                             [9, 10], [10, 11]]
(%i4) ans:errcatch(find_root(sin(x), x, 2, 3));

find_root: function has same sign at endpoints: f(2.0) = 0.90929742682568, 
                                                      f(3.0) = 0.14112000805987
(%o4)                                 []
(%i5) ans;
(%o5)                                 []
(%i6) seq(start,stop,stepping,[shift]) := block([                                            n, y:[],                                             shift: (if (not(emptyp(shift)))                                                         then float(first(shift))                                                            else (0.0))                                            ],            (n:floor((float(stop-start)/float(stepping)))),            (if (start <
 stop)            then            (y:flatten(append([y],                                         makelist(float(start+shift+(stepping*(i-start))),                                         i, start, n+start))))            else            (y:flatten(append([y],                                         makelist(-(float(stop-shift-(stepping*(i-stop)))),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o6) seq(start, stop, stepping, [shift]) := 
block([n, y : [], shift : if not emptyp(shift) then float(first(shift))
                      float(stop - start)
 else 0.0], n : floor(-------------------), 
                        float(stepping)
if start < stop then y : flatten(append([y], 
makelist(float(start + shift + stepping (i - start)), i, start, n + start)))
 else y : flatten(append([y], makelist(- float(stop - shift
 - stepping (i - stop)), i, - (n + stop), stop)))(if n > 1.0 then return(y)
 else return([])))
(%i7) intervals(seq(0,7,1));
(%o7) [[0.0, 1.0], [1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0], 
                                                                    [6.0, 7.0]]
(%i8) ans:[];
(%o8)                                 []
(%i9) %pi;
(%o9)                                 %pi
(%i10) %pi, numer;
(%o10)                         3.141592653589793
(%i11) 2*3.14159/%pi;
                                    6.28318
(%o11)                              -------
                                      %pi
(%i12) block([ans:[]], errormsg:false, for i in intervals(seq(0, 7, 1)) do ans:(append(ans, errcatch(find_root(sin(x), x, first(i), second(i))))), errormsg:true, return(ans));
(%o12)            [0.0, 3.141592653589793, 6.283185307179586]
(%i13) 
Run Example
seq(start,stop,stepping,[shift]) := block([                                            n, y:[],                                             shift: (if (not(emptyp(shift)))                                                         then float(first(shift))                                                            else (0.0))                                            ],            (n:floor((float(stop-start)/float(stepping)))),            (if (start <
 stop)            then            (y:flatten(append([y],                                         makelist(float(start+shift+(stepping*(i-start))),                                         i, start, n+start))))            else            (y:flatten(append([y],                                         makelist(-(float(stop-shift-(stepping*(i-stop)))),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o1) seq(start, stop, stepping, [shift]) := 
block([n, y : [], shift : if not emptyp(shift) then float(first(shift))
                      float(stop - start)
 else 0.0], n : floor(-------------------), 
                        float(stepping)
if start < stop then y : flatten(append([y], 
makelist(float(start + shift + stepping (i - start)), i, start, n + start)))
 else y : flatten(append([y], makelist(- float(stop - shift
 - stepping (i - stop)), i, - (n + stop), stop)))(if n > 1.0 then return(y)
 else return([])))
(%i2) kill(pairs);
(%o2)                                done
(%i3) pairs(items):=block([result],result:if (emptyp(items)) then [] elseif (listp(items)) then     if(emptyp(rest(items))) then cons(last(items), []) else    cons(cons(first(items),  [second(items)]),                     [pairs(rest(rest(items)))]));
(%o3) pairs(items) := block([result], result : 
if emptyp(items) then [] elseif listp(items)
 then (if emptyp(rest(items)) then cons(last(items), [])
 else cons(cons(first(items), [second(items)]), [pairs(rest(rest(items)))])))
(%i4) pairs([1, 2, 3, 4, 5]);
(%o4)                       [[1, 2], [[3, 4], [5]]]
(%i5) kill(pairs);
(%o5)                                done
(%i6) pairs(items):=block([result],result:if (emptyp(items)) then [] elseif (listp(items)) then     if(emptyp(rest(items))) then [last(items), []] else    cons(cons(first(items),  [second(items)]),                     [pairs(rest(rest(items)))]));
(%o6) pairs(items) := block([result], result : 
if emptyp(items) then [] elseif listp(items)
 then (if emptyp(rest(items)) then [last(items), []]
 else cons(cons(first(items), [second(items)]), [pairs(rest(rest(items)))])))
(%i7) pairs([1, 2, 3, 4, 5]);
(%o7)                     [[1, 2], [[3, 4], [5, []]]]
(%i8) first(pairs(seq(1, 10, 1)));
(%o8)                             [1.0, 2.0]
(%i9) test([list]):=map(lambda([x], [first(x), second(x)]),list);
(%o9)    test([list]) := map(lambda([x], [first(x), second(x)]), list)
(%i10) find_root(sin(x), x, 0, %pi);
(%o10)                                0.0
(%i11) 
Run Example
seq(start,stop,[stepping]) := block([ start:floor(start), control:stop, stop:ceiling(stop),n, y:[],stepping: (if (not(emptyp(stepping))) then                     float(first(stepping)) else 1.0),shift: (if (length(stepping)>
1) then                float(second(stepping)) else (0.0)) ],            (n:(float(control-start)/float(stepping))),            (if (start <
 stop)            then            (k:if(float(start+shift+(stepping*(i-start)))<
=control)                     then float(start+shift+(stepping*(i-start))) else [],             y:flatten(append([y],                                         makelist(ev(k),                                         i, ceiling(start), ceiling(n+start)))))            else            (m:if(-(float(stop-shift-(stepping*(i-stop))))<
=control)                      then -(float(stop-shift-(stepping*(i-stop)))) else [],              y:flatten(append([y],                                         makelist(ev(m),                                         i, -(n+stop), stop)))))            (if (n>
1.0)                then return(y)                else return([])));
(%o1) seq(start, stop, [stepping]) := block([start : floor(start), 
control : stop, stop : ceiling(stop), n, y : [], 
stepping : if not emptyp(stepping) then float(first(stepping)) else 1.0, 
shift : if length(stepping) > 1 then float(second(stepping)) else 0.0], 
    float(control - start)
n : ----------------------, if start < stop
       float(stepping)
 then (k : if float(start + shift + stepping (i - start)) <= control
 then float(start + shift + stepping (i - start)) else [], 
y : flatten(append([y], makelist(ev(k), i, ceiling(start), 
ceiling(n + start))))) else (m : if - float(stop - shift
 - stepping (i - stop)) <= control then - float(stop - shift
 - stepping (i - stop)) else [], y : flatten(append([y], 
makelist(ev(m), i, - (n + stop), stop))))(if n > 1.0 then return(y)
 else return([])))
(%i2) seq(1, 10);
(%o2)         [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
(%i3) seq(1, 10, 0.9);
(%o3) [1.0, 1.9, 2.8, 3.7, 4.6, 5.5, 6.4, 7.3, 8.199999999999999, 9.1, 10.0]
(%i4) seq(0.1, 2*%pi, 0.1);
(%o4) [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 
1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 
2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.100000000000001, 
4.2, 4.3, 4.4, 4.5, 4.600000000000001, 4.7, 4.800000000000001, 4.9, 5.0, 
5.100000000000001, 5.2, 5.300000000000001, 5.4, 5.5, 5.600000000000001, 5.7, 
5.800000000000001, 5.9, 6.0, 6.100000000000001, 6.2]
(%i5) 
[abs,append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,numer,rest,second,sin] [and,equal,if,is,not] [and,expand,not,or] [and,if,labels,lambda,let,not,or] [and,not,or] [append,apply,block,emptyp,first,flatten,floor,lambda,makelist,map,not] [append,atom,block,delete,do,emptyp,freeof,if,indices,lambda,length,lmax,lmin,makelist,map,member,not,parse_string,sdowncase,simplode,ssearch,string,sublist_indices,subst] [append,atom,block,delete,do,emptyp,freeof,if,indices,lambda,length,lmax,lmin,makelist,map,member,not,sublist_indices,subst] [append,block,buildq,emptyp,ev,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,buildq,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,ceiling,emptyp,ev,first,flatten,floor,if,length,makelist,not,second] [append,block,ceiling,emptyp,ev,first,flatten,if,length,makelist,not,second] [append,block,ceiling,emptyp,first,flatten,floor,if,length,makelist,not,second] [append,block,cons,emptyp,find_root,first,flatten,floor,if,kill,last,listp,makelist,not,rest,second,sin] [append,block,cons,equal,if,not,return] [append,block,delete,do,emptyp,if,lambda,length,makelist,map,not,subst] [append,block,delete,emptyp,if,lambda,length,makelist,map,not,subst] [append,block,do,emptyp,errcatch,errormsg,false,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,do,emptyp,errcatch,find_root,first,flatten,floor,if,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,false,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,numer,rest,second,sin] [append,block,emptyp,errcatch,errormsg,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,errormsg,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,find_root,first,flatten,floor,if,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,find_root,first,flatten,floor,if,listp,makelist,not,rest,second,sin] [append,block,emptyp,errcatch,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,lambda,last,listp,makelist,map,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,length,listp,makelist,not,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,print,rest,second,sin] [append,block,emptyp,find_root,first,flatten,floor,kill,last,listp,makelist,not,rest,second,sin] [append,block,emptyp,first,flatten,floor,kill,lambda,last,listp,makelist,map,not,rest,second] [bfloat,bftorat,block,emptyp,equal,first,fpprec,if,is,mod,not,numer,ratepsilon,ratprint,return,round] [bfloat,bftorat,block,emptyp,equal,first,if,is,mod,not,numer,ratepsilon,ratprint,return] [bfloat,bftorat,block,emptyp,first,float2bf,fpprec,if,mod,not,numer,ratepsilon,ratprint,return,sum] [bfloat,bftorat,block,emptyp,first,fpprec,if,mod,not,numer,ratepsilon,ratprint,return] [bftorat,block,emptyp,equal,first,float,fpprec,if,is,mod,not,numer,ratepsilon,ratprint,return,round] [bftorat,block,emptyp,first,float,fpprec,if,integerp,mod,not,numer,ratepsilon,ratprint,return] [block,declare,diff,emptyp,evfun,false,get,if,length,makelist,map,not,part,sqrt] [block,declare,dim,emptyp,evfun,false,get,if,length,not,sqrt,subst] [block,declare,dim,emptyp,evfun,false,get,if,length,not,sqrt] [block,delete,emptyp,if,lambda,length,makelist,map,not,subst] [do,if,lambda,let,not,or,reverse] [echelon,is,matrix,not,transpose] [equal,if,lambda,map,not,numberp] [expand,false,freeof,if,isolate_wrt_times,lambda,load,maplist,not,sqrtdispflag,true] [false,not] [not,or,true] [not,or] [not,true] [not]

Related Help

Help for Not