Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Non-integer base of numeration

From Wikipedia, the free encyclopedia
Number systems with a non-integer radix (base), such as base 2.5
This article mayrequirecleanup to meet Wikipedia'squality standards. The specific problem is:the article does not meet Wikipedia’s quality standards. Please helpimprove this article if you can.(July 2025) (Learn how and when to remove this message)
This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(March 2019) (Learn how and when to remove this message)
Part ofa series on
Numeral systems
List of numeral systems

Anon-integer representation uses non-integer numbers as theradix, or base, of apositional numeral system. For a non-integer radixβ > 1, the value of

x=dnd2d1d0.d1d2dm{\displaystyle x=d_{n}\dots d_{2}d_{1}d_{0}.d_{-1}d_{-2}\dots d_{-m}}

is

x=βndn++β2d2+βd1+d0+β1d1+β2d2++βmdm.{\displaystyle {\begin{aligned}x&=\beta ^{n}d_{n}+\cdots +\beta ^{2}d_{2}+\beta d_{1}+d_{0}\\&\qquad +\beta ^{-1}d_{-1}+\beta ^{-2}d_{-2}+\cdots +\beta ^{-m}d_{-m}.\end{aligned}}}

The numbersdi are non-negative integers less thanβ. This is also known as aβ-expansion, a notion introduced byRényi (1957) and first studied in detail byParry (1960). Everyreal number has at least one (possibly infinite)β-expansion. Theset of allβ-expansions that have a finite representation is asubset of theringZ[β, β−1].

There are applications ofβ-expansions incoding theory[1] and models ofquasicrystals.[2]

Construction

[edit]

β-expansions are a generalization ofdecimal expansions. While infinite decimal expansions are not unique (for example, 1.000... =0.999...), all finite decimal expansions are unique. However, even finiteβ-expansions are not necessarily unique, for exampleφ + 1 =φ2 forβ =φ, thegolden ratio. A canonical choice for theβ-expansion of a given real number can be determined by the followinggreedy algorithm, essentially due toRényi (1957) and formulated as given here byFrougny (1992).

Letβ > 1 be the base andx a non-negative real number. Denote byx thefloor function ofx (that is, the greatest integer less than or equal tox) and let{x} =x − ⌊x be the fractional part ofx.There exists an integerk such thatβkx <βk+1. Set

dk=x/βk{\displaystyle d_{k}=\lfloor x/\beta ^{k}\rfloor }

and

rk={x/βk}.{\displaystyle r_{k}=\{x/\beta ^{k}\}.\,}

Fork − 1 ≥  j > −∞, put

dj=βrj+1,rj={βrj+1}.{\displaystyle d_{j}=\lfloor \beta r_{j+1}\rfloor ,\quad r_{j}=\{\beta r_{j+1}\}.}

In other words, the canonicalβ-expansion ofx is defined by choosing the largestdk such thatβkdkx, then choosing the largestdk−1 such thatβkdk + βk−1dk−1x, and so on. Thus it chooses thelexicographically largest string representingx.

With an integer base, this defines the usual radix expansion for the numberx. This construction extends the usual algorithm to possibly non-integer values ofβ.

Conversion

[edit]

Following the steps above, we can create aβ-expansion for a real numbern0{\displaystyle n\geq 0} (the steps are identical for ann<0{\displaystyle n<0}, althoughn must first be multiplied by−1 to make it positive, then the result must be multiplied by−1 to make it negative again).

First, we must define ourk value (the exponent of the nearest power ofβ greater thann, as well as the amount of digits innβ{\displaystyle \lfloor n_{\beta }\rfloor }, wherenβ{\displaystyle n_{\beta }} isn written in baseβ). Thek value forn andβ can be written as:

k=logβ(n)+1{\displaystyle k=\lfloor \log _{\beta }(n)\rfloor +1}

After ak value is found,nβ{\displaystyle n_{\beta }} can be written asd, where

dj=(n/βj)modβ,n=ndjβj{\displaystyle d_{j}=\lfloor (n/\beta ^{j}){\bmod {\beta }}\rfloor ,\quad n=n-d_{j}*\beta ^{j}}

fork − 1 ≥  j > −∞. The firstk values ofd appear to the left of the decimal place.

This can also be written in the followingpseudocode:[3]

functiontoBase(n,b){k=floor(log(b,n))+1precision=8result=""for(i=k-1,i>-precision-1,i--){if(result.length==k)result+="."digit=floor((n/b^i)modb)n-=digit*b^iresult+=digit}returnresult}

Note that the above code is only valid for1<β10{\displaystyle 1<\beta \leq 10} andn0{\displaystyle n\geq 0}, as it does not convert each digits to their correct symbols or correct negative numbers. For example, if a digit's value is10, it will be represented as10 instead ofA.

Example implementation code

[edit]

To baseπ

[edit]
  • JavaScript:[3]
    functiontoBasePI(num,precision=8){letk=Math.floor(Math.log(num)/Math.log(Math.PI))+1;if(k<0)k=0;letdigits=[];for(leti=k-1;i>(-1*precision)-1;i--){letdigit=Math.floor((num/Math.pow(Math.PI,i))%Math.PI);num-=digit*Math.pow(Math.PI,i);digits.push(digit);if(num<0.1**(precision+1)&&i<=0)break;}if(digits.length>k)digits.splice(k,0,".");returndigits.join("");}

From baseπ

[edit]
  • #"#cite_note-DecimalSystem-3">[3]
    functionfromBasePI(num){letnumberSplit=num.split(/\./g);letnumberLength=numberSplit[0].length;letoutput=0;letdigits=numberSplit.join("");for(leti=0;i<digits.length;i++){output+=digits[i]*Math.pow(Math.PI,numberLength-i-1);}returnoutput;}

Examples

[edit]

Base2

[edit]

Base2 behaves in a very similar way tobase 2 as all one has to do to convert a number frombinary into base2 is put a zero digit in between every binary digit; for example, 191110 = 111011101112 becomes 1010100010101000101012 and 511810 = 10011111111102 becomes 10000010101010101010101002. This means that every integer can be expressed in base2 without the need of a radix point. The base can also be used to show the relationship between theside of asquare to itsdiagonal as a square with a side length of 12 will have a diagonal of 102 and a square with a side length of 102 will have a diagonal of 1002. Another use of the base is to show thesilver ratio as its representation in base2 is simply 112. In addition, the area of aregular octagon with side length 12 is 11002, the area of a regular octagon with side length 102 is 1100002, the area of a regular octagon with side length 1002 is 110000002, etc...

Golden base

[edit]
Main article:Golden ratio base

In the golden base, some numbers have more than one decimal base equivalent: they areambiguous. For example, 11φ = 100φ, since φ² = φ + 1.

Base ψ

[edit]

There are some numbers in baseψ, the supergolden ratio, that are also ambiguous. For example, 101ψ = 1000ψ, since ψ³ = ψ² + 1.

Basee

[edit]

With basee thenatural logarithm behaves like thecommon logarithm in base 10, as ln(1e) = 0, ln(10e) = 1, ln(100e) = 2 and ln(1000e) = 3 (or more precisely the representation in basee of 3, which is of course a non-terminating number). This means that the integer part of the natural logarithm of a number in basee counts the number of digits before the separating point in that number, minus one.

The basee is the most economical choice of radixβ > 1,[4] where theradix economy is measured as the product of the radix and the length of the string of symbols needed to express a given range of values. A binary number uses only two different digits, but it needs a lot of digits for representing a number; base 10 writes shorter numbers, but it needs 10 different digits to write them. The balance between those is basee, which therefore would store numbers optimally.

Base π

[edit]

Baseπ can be used to more easily show the relationship between thediameter of acircle to itscircumference, which corresponds to itsperimeter; since circumference = diameter × π, a circle with a diameter 1π will have a circumference of 10π, a circle with a diameter 10π will have a circumference of 100π, etc. Furthermore, since thearea = π ×radius2, a circle with a radius of 1π will have an area of 10π, a circle with a radius of 10π will have an area of 1000π and a circle with a radius of 100π will have an area of 100000π.[5]

Properties

[edit]

In every positional number system, not all numbers are expressed uniquely. For example, in base 10, the number 1 has two representations: 1.000... and0.999.... The set of numbers with two different representations isdense in the reals,[6] but the question of classifying real numbers with uniqueβ-expansions is considerably more subtle than that of integer bases.[7]

Another problem is to classify the real numbers whoseβ-expansions are periodic. Letβ > 1, andQ(β) be the smallestfield extension of therationals containingβ. Then any real number in [0,1) having a periodicβ-expansion must lie inQ(β). On the other hand, theconverse need not be true. The converse does hold ifβ is aPisot number,[8] although necessary and sufficient conditions are not known.

See also

[edit]

References

[edit]

Footnotes

[edit]
  1. ^Kautz 1965
  2. ^Burdik et al. 1998;Thurston 1989
  3. ^abc"Home",decimalsystem.js.org
  4. ^Hayes 2001
  5. ^"Weird Number Bases",DataGenetics, retrieved2018-02-01
  6. ^Petkovšek 1990
  7. ^Glendinning & Sidorov 2001
  8. ^Schmidt 1980

Sources

[edit]

Further reading

[edit]
  • Sidorov, Nikita (2003), "Arithmetic dynamics", in Bezuglyi, Sergey; Kolyada, Sergiy (eds.),Topics in dynamics and ergodic theory. Survey papers and mini-courses presented at the international conference and US-Ukrainian workshop on dynamical systems and ergodic theory, Katsiveli, Ukraine, August 21–30, 2000, Lond. Math. Soc. Lect. Note Ser., vol. 310, Cambridge:Cambridge University Press, pp. 145–189,ISBN 978-0-521-53365-2,Zbl 1051.37007

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Non-integer_base_of_numeration&oldid=1329328549"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp