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:

Bfloat

Function: bfloat (<expr>) Converts all numbers and functions of numbers in <expr> to bigfloat numbers. The number of significant digits in the resulting bigfloats is specified by the global variable fpprec.

_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]);
ev(e=ea);
bfloat(e);

When float2bf is false a warning message is printed when a floating point number is converted into a bigfloat number (since this may lead to loss of precision).

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

(%o1)                                true
(%i2) 

Related Examples

bfloat-binomial-block-distrib-floor-load-sum

load(distrib);

trufas(brotes):=block...

total(n,k,d,esp,p):=b...

Calculate

bfloat-bftorat-block-float2bf-makelist-mod-ratepsilon-ratprint-return

pidigits(prec):=block...

makelist(pidigits(n),...

lastdigits(fnum, last...

Calculate

bfloat-block-denom-false-float-mod-ratprint-ratsimp

ratprint:false;

lastdigits(fnum, last...

rat(0.1234);

Calculate

bfloat-bftorat-block-ev-float2bf-makelist-mod-ratepsilon-ratprint-return

pidigits(prec):=block...

makelist(pidigits(n),...

lastdigits(fnum, last...

Calculate

bfloat

A:1;

B:1;

u:A;

Calculate

bfloat-fpprec-hypergeometric-sqrt

fpprec:1000;

bfloat(hypergeometric...

Calculate

bfloat-eigenvectors-load-matrix

load(eigen);

M1 : matrix ([11, -2,...

[vals, vecs] : eigenv...

Calculate

bfloat-fpprec-load-numer-pi-sum

load(basic);

load(functs);

bfloat(%pi), fpprec:10;

Calculate

bfloat-fpprec-hypergeometric-pi-sqrt

fpprec:1000;

bfloat(47/15*hypergeo...

Calculate