Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Pred Calculator

Pred

-- Special symbol: pred As an argument in a call to ev (<expr>), pred causes predicates (expressions which evaluate to true or false) to be evaluated. See ev.

Example:

_entropy(x):=if (x=0) then 0 else x*log(x);
entropy(p,b):=-sum(_entropy(p[i])/log(b), i, 1, length(p));
entropy2(p):=entropy(p,2);
_total(x):=sum(x[i],i,1,length(x));
entropyArray(a):=entropy(map(lambda([x], x/_total(a)), a), _total(a));
/* traditional 2-based entropy */e:entropy([1/4,1/4,1/2,0], 2);
/* 1-based */e:entropy([1/4,1/4,1/2,0], 4);
/* over an array */ea:entropyArray([1,1,2,0]);
e=ea,pred;
float(e);

          (%i1) 1<2;
          (%o1)                                1 < 2
          (%i2) 1<2,pred;
          (%o2)                                true

There are also some inexact matches for pred. Try ?? pred to see them.

(%o1)                                true
(%i2) 

Pred Example

Related Examples

pred

A( r ) := 2 * %pi * r...

r : 2;

A(r);

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

res : A(r);

Calculate

pred

x=x,pred;

Calculate

pred

1<2;

1<2,pred;

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

A(r);

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

res : A(r);

Calculate

pred

x=x,pred;

Calculate

pred

1<2;

1<2,pred;

Calculate