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:

Ibase Calculator

Ibase

-- Option variable: ibase Default value: 10

ibase is the base for integers read by Maxima.

x:148567057139183671451044399427106182623978448999523623903321975285081697242581760204254009330266510;
ibase : 16;
y:07783e648390c4a18551ee7fcfe75a1607f0f7f854cc1d6b5c7ec9ccb402c9a03;
x / y;
y / x;

ibase may be assigned any integer between 2 and 36 (decimal), inclusive. When ibase is greater than 10, the numerals comprise the decimal numerals 0 through 9 plus letters of the alphabet A, B, C, ..., as needed to make ibase digits in all. Letters are interpreted as digits only if the first digit is 0 through 9. Uppercase and lowercase letters are not distinguished. The numerals for base 36, the largest acceptable base, comprise 0 through 9 and A through Z.

Whatever the value of ibase, when an integer is terminated by a decimal point, it is interpreted in base 10.

See also obase.

Examples:

ibase less than 10.

          (%i1) ibase : 2 $
          (%i2) obase;
          (%o2)                          10
          (%i3) 1111111111111111;
          (%o3)                         65535

ibase greater than 10. Letters are interpreted as digits only if the first digit is 0 through 9.

          (%i1) ibase : 16 $
          (%i2) obase;
          (%o2)                          10
          (%i3) 1000;
          (%o3)                         4096
          (%i4) abcd;
          (%o4)                         abcd
          (%i5) symbolp (abcd);
          (%o5)                         true
          (%i6) 0abcd;
          (%o6)                         43981
          (%i7) symbolp (0abcd);
          (%o7)                         false

When an integer is terminated by a decimal point, it is interpreted in base 10.

          (%i1) ibase : 36 $
          (%i2) obase;
          (%o2)                          10
          (%i3) 1234;
          (%o3)                         49360
          (%i4) 1234.;
          (%o4)                         1234

(%o1)                                true
(%i2) 

Ibase Example

Related Examples

ibase-obase

ibase:16;

obase:10;

0A;

Calculate

ibase-obase

ibase:16;

obase:10;

0a;

Calculate

ibase

ibase : 16;

x:0ff0;

y:0ff;

Calculate

ibase

ibase : 16;

a:08000;

b:0f0;

Calculate

ibase-obase

ibase : 16;

obase:16;

a:08000;

Calculate

ibase-obase

obase : 2;

2^8 - 1;

obase : 8;

Calculate

ibase-obase

ibase:16;

obase:10;

0A;

Calculate

ibase-obase

ibase:16 ;

obase;

a;

Calculate

ibase

ibase : 16;

a:800080;

b:800000;

Calculate