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:

Floor Calculator

Floor

Function: floor (<x>) When <x> is a real number, return the largest integer that is less than or equal to <x>.

g1:0.2*r+0.3*s-1.1*t=1.7;
g2:-4.9*r+1.3*s+1.8*t=0.9;
g3:0.2*r+0.4*s-1.1*t=-0.7;
E:solve([g1,g2,g3],[r,s,t]),numer;
floor(E);
L:[r,s,t],E;

If <x> is a constant expression (10 * %pi, for example), floor evaluates <x> using big floating point numbers, and applies floor to the resulting big float. Because floor uses floating point evaluation, its possible, although unlikely, that floor could return an erroneous value for constant inputs. To guard against errors, the floating point evaluation is done using three values for fpprec.

For non-constant inputs, floor tries to return a simplified value. Here are examples of the simplifications that floor knows about:

          (%i1) floor (ceiling (x));
          (%o1)                      ceiling(x)
          (%i2) floor (floor (x));
          (%o2)                       floor(x)
          (%i3) declare (n, integer)$
          (%i4) [floor (n), floor (abs (n)), floor (min (n, 6))];
          (%o4)                [n, abs(n), min(n, 6)]
          (%i5) assume (x > 0, x < 1)$
          (%i6) floor (x);
          (%o6)                           0
          (%i7) tex (floor (a));
          $$\left \lfloor a \right \rfloor$$
          (%o7)                         false

The function floor does not automatically map over lists or matrices. Finally, for all inputs that are manifestly complex, floor returns a noun form.

If the range of a function is a subset of the integers, it can be declared to be integervalued. Both the ceiling and floor functions can use this information; for example:

          (%i1) declare (f, integervalued)$
          (%i2) floor (f(x));
          (%o2)                         f(x)
          (%i3) ceiling (f(x) - 1);
          (%o3)                       f(x) - 1

(%o1)                                true
(%i2) 

Floor Example

Related Examples

floor-numer-solve

g1: 100*k1=30000+8*k2...

g2: 200*k2=10000+10*k...

g3: 300*k3=6000+5*k2+...

Calculate

floor-length-numer-sqrt-sum

X:[1,2,3,4,5];

H:[3,7,11,4,2];

n:length(X);

Calculate

floor-map

Zylinder:[[3,4],[4,3]...

r(x):=x[1];

h(x):=x[2];

Calculate

floor-numer-solve

g1: 100*k1=30000+8*k2...

g2: 200*k2=10000+10*k...

g3: 300*k3=6000+5*k2+...

Calculate

floor-sqrt

A:[1,1];

B:[12,3];

C:[5,7];

Calculate

floor

Formel:K[n]=floor(Ko*...

Formel,Ko=1000,n=5,p=7;

Calculate

floor-log-plot2d
plot2d([S, R20Func], [x, 0.1, 10]);

"Compare R20 function...

S(x):=20*log(x)+80;

R20Func(x):=floor(20*...

Calculate

floor-solve

g1: 1000*k1=10000+100...

g2: 2000*k2=20000+150...

g3: 1200*k3=40000+200...

Calculate

floor-kill-numer-solve

kill(all);

g1: 100*k1=30000+8*k2...

g2: 200*k2=10000+10*k...

Calculate

floor-solve

"*"/* Eingabe von a */;

a:10;

"*"/* Eingabe von b */;

Calculate