decimal - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/decimal

convert to base 10

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert(n, decimal, b)

Parameters

n

-

integer, floating-point number, symbol, or string

b

-

integer from 2 to 36 or one of binary, octal, hexadecimal, or hex

Description

• 

The function convert(n, decimal, b) converts a base b number where b is an integer from 2 through 36) to a decimal number.  If n is a symbol or a string, it is assumed to be in the form of a either an integer or a floating-point number. The letters a (or A) through z (or Z) represent the digit values 10 through 35, respectively. The digits used are not required to be less than the base, so 38B base 4 is equivalent to 1123 base 4, each being converted to the decimal value 91.

• 

The keywords binary, octal, hexadecimal, and hex represent bases 2, 8, 16, and 16, respectively.

Examples

convert101,decimal,binary

5

(1)

convert23,decimal,octal

−19

(2)

convert1A.C,decimal,hex

26.75000000

(3)

convertF39GA.CLH,decimal,24

5.023690538×106

(4)

convertHELLO.WORLD,decimal,36

2.923465291×107

(5)

See Also

convert/base

convert/binary

convert/hex

convert/octal