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:

Rest

Function: rest (<expr>, <n>)

/*Berechnen der ersten Zweierpotenz der Form 999... ab 2^n*/finde_zweierpotenz(n):=block(		zweier_potenz: 2^n,	found: false,	L:[0,0,0],	while not(found) do [		zweier_potenz: zweier_potenz*2,		n:n+1,		number: zweier_potenz,		zehner_potenz: 10, 		while number>0 do [			rest: mod(number,zehner_potenz),			ziffer: rest / (zehner_potenz / 10),			L[3]: L[2],			L[2]: L[1],			L[1]: ziffer,			zehner_potenz : zehner_potenz * 10,			number : number - rest		],				if is(equal(L,[9,9,9])) then [			found: true,			print(n),			print(zweier_potenz)		]		]);
		finde_zweierpotenz(1)

Function: rest (<expr>) Returns <expr> with its first <n> elements removed if <n> is positive and its last - <n> elements removed if <n> is negative. If <n> is 1 it may be omitted. <expr> may be a list, matrix, or other expression.

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

(%o1)                                true
(%i2) 

Related Examples