MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: calculate not in the decimalsystem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8436] Re: [mg8374] calculate not in the decimalsystem
  • From: "Benjamin R. Tubb" <brtubb at cybertron.com>
  • Date: Sat, 30 Aug 1997 00:42:45 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Bernhard Eckert wrote:
> Is it possible to tell mathematica to calculate 2+4 not in the Decimals=
ystem
> but in the 3 System?
---
In[1]:=3DBaseForm[2+4,3]
Out[1]//BaseForm=3D
    20
      3

In[2]:=3D3^^20
Out[2]=3D6
---
The function BaseForm[] is found in the v3.0 Help Browser under Built-in
Functions/Number Formatting/BaseForm

----
BaseForm[expr, n] prints with the numbers in expr given in base n.=20

The maximum allowed base is 36. For bases larger than 10, additional digi=
ts
are chosen from the letters a=96z.=20

You can enter a number in an arbitrary base using base^^digits.=20

When a number in an arbitrary base is given in scientific notation, the
exponent is still given in base 10.=20

You can mix BaseForm with NumberForm and related functions.=20

BaseForm acts as a "wrapper", which affects printing, but not evaluation.=
=20

See the Mathematica book: Section 2.8.7 and=A0Section 3.1.3. [i.e. book's=
 3rd
Edition for v3.0]

See also: IntegerDigits, RealDigits.=20

Benjamin Tubb
brtubb at cybertron.com
http://www.cybertron.com/~brtubb

"Music creates order out of chaos; for rhythm imposes unanimity
upon the divergent, melody imposes continuity upon the disjoin-
ted, and harmony imposes compatibility upon the incongruous."
       - Yehudi Menuhin, from "Theme and Variations"



  • Prev by Date: RE: Sum[1/(n^2 +n+1)^2,{n,1,p}]
  • Next by Date: Re: Graphics manipulation question [revision]
  • Previous by thread: calculate not in the decimalsystem
  • Next by thread: How to draw ...