prints with the numbers in expr given in base n.
- The maximum allowed base is 36. For bases larger than 10, additional digits are chosen from the letters a–z. »
- You can enter a number in an arbitrary base using base^^digits. »
- When a number in an arbitrary base is given in scientific notation, the exponent is still given in base 10. »
- You can mix BaseForm with NumberForm and related functions. »
- BaseForm acts as a "wrapper", which affects printing but not evaluation.
Examplesopen allclose all
Properties & Relations (5)
BaseForm formats numbers in a given base:
IntegerDigits gives a list of the digits:
IntegerString gives the digits as a string:
RealDigits gives a list of the digits and number of digits to the left of the decimal:
Reconstruct the base-10 number from RealDigits output:
Represent the number to be precise to 3 decimal digits using NumberForm: