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:

Round

Function: round (<x>) When <x> is a real number, returns the closest integer to <x>. Multiples of 1/2 are rounded to the nearest even integer. Evaluation of <x> is similar to floor and ceiling.

err(x,n) := 10^ceiling(log(abs(x)) / log(10) - n);
ans(x,n) := err(x,n) * round(x / err(x,n));
test(UANS,x,n) := is(abs(UANS-ans(x,n)) < err(x,n));
x : -123.399999;
n : 4;
err(x,n),numer;
ans(x,n),numer;
UANS : -123.456;
test(UANS,x,n);

(%o1)                                true
(%i2) 

Related Examples

round

round((9/(x+9))+(4/(x...

Calculate

round

round(45.892);

round(-23.12);

Calculate

round

round((9/(x+9))+(4/(x...

Calculate

round-sum

N = round(52/9-1);

sum(8^i,i,0,N);

Calculate

round

:lisp (apropos 'round);

:lisp :around;

Calculate

round-sum

N:round(52/9-1);

sum(8^i,i,0,N);

Calculate

round

round(0.5);

Calculate

round-sum

N = round(52/9-1);

sum(8^i,i,0,N);

Calculate

round

:lisp (apropos 'round);

Calculate

round

r : 7/10;

round(r);

Calculate