BASE(<N base>, <N decimal number>)
Converts a decimal number (base 10) to a different base value.
<expC> value of <decimal number> in the mathematical format of <base>.

Maximum <base> is 36, in the format "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Changes negative <decimal numbers> to positive.


BASE( 2, -255 ) returns "11111111" (negative number changed to positive)

BASE( 2, 100 ) returns "1100100"

BASE( 16, 255 ) returns "FF"
BASE( 16, -100 ) returns "64"

BASE( 32, 1023 ) returns "VV"
BASE( 32, 255 ) returns "7V"
BASE( 32, -100 ) returns "34"

BASE( 36, 1295 ) returns "ZZ"
BASE( 36, 255 ) returns "73"
BASE( 36, -100 ) returns "2S"

Hazard
Does not accurately convert negative numbers, so the
absolute value is used to produce all positive numbers.


Placed in the Public Domain by Tom Rettig Assoc.