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-diff-disp-print

f(x) := x^2-2;

f(x) := x^3-2*x+2;

f1(x) := ''(diff(f(x)...

Calculate

bfloat-cos-fpprec-pi-product-sqrt

f1(n,h):= sqrt(1-cos(...

f2(n):=product( f1(n,...

bfloat( f2(155)), fpp...

Calculate

bfloat-binomial-exp-pi-sqrt

binomial(100,3)*35^97...

xk: (3-100/36)/sqrt...

Dlta: sqrt(100*1/36*3...

Calculate

bfloat-fpprec-sum

fpprec:100;

term(k) := 1/(16^k)*(...

value(n) := sum (term...

Calculate

bfloat-fpprec-makelist-numer-sum

rieman(s, k):=sum(n^(...

fpprec:40;

%pi, numer;

Calculate

bfloat-pade-plot2d-taylor
plot2d([(f(x) - bfloat(g(x)))/f(x)], [x, 0.8, 1.2]);

f(x) := x^(1/12);

k : 5;

n : 2*k;

Calculate

bfloat-float-fpprec-pi-sqrt

u:sqrt(3)*230;

float(u);

fpprec:50;

Calculate

bfloat-fpprec-substring

n:401;

/* zde se zadá n-té ...

substring(string(bflo...

Calculate

bfloat-ratsimp-sqrt

f(x,a):=(x+a/x)/2;

a: ratsimp(f(x,y));

b: ratsimp(f(a,y));

Calculate

bfloat-fpprec-numer-solve

fpprec: 3;

solve(x-4.33333), numer;

bfloat (%);

Calculate