A non-integer representation uses non-
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
numbers as the
radix
In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal/denary system (the most common system in use today) the radix (base number) is t ...
, or base, of a
positional numeral system. For a non-integer radix ''β'' > 1, the value of
:
is
:
The numbers ''d''
''i'' are non-negative integers less than ''β''. This is also known as a ''β''-expansion, a notion introduced by and first studied in detail by . Every
real number
In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
has at least one (possibly infinite) ''β''-expansion. The
set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...
of all ''β''-expansions that have a finite representation is a
subset
In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
of the
ring
Ring may refer to:
* Ring (jewellery), a round band, usually made of metal, worn as ornamental jewelry
* To make a sound with a bell, and the sound made by a bell
:(hence) to initiate a telephone connection
Arts, entertainment and media Film and ...
Z
−1">'β'', ''β''−1
There are applications of ''β''-expansions in
coding theory and models of
quasicrystals (; ).
Construction
''β''-expansions are a generalization of
decimal expansion
A decimal representation of a non-negative real number is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator:
r = b_k b_\ldots b_0.a_1a_2\ldots
Here is the decimal separator, is ...
s. 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 ''β'' = ''φ'', the
golden ratio. A canonical choice for the ''β''-expansion of a given real number can be determined by the following
greedy algorithm, essentially due to and formulated as given here by .
Let be the base and ''x'' a non-negative real number. Denote by the
floor function of ''x'' (that is, the greatest integer less than or equal to ''x'') and let be the fractional part of ''x''.
There exists an integer ''k'' such that . Set
:
and
:
For , put
:
In other words, the canonical ''β''-expansion of ''x'' is defined by choosing the largest ''d''
''k'' such that , then choosing the largest ''d''
''k''−1 such that , and so on. Thus it chooses the
lexicographically largest string representing ''x''.
With an integer base, this defines the usual radix expansion for the number ''x''. This construction extends the usual algorithm to possibly non-integer values of ''β''.
Conversion
Following the steps above, we can create a ''β''-expansion for a real number
(the steps are identical for an
, although must first be multiplied by to make it positive, then the result must be multiplied by to make it negative again).
First, we must define our value (the exponent of the nearest power of greater than , as well as the amount of digits in
, where
is written in base ). The value for and can be written as:
:
After a value is found,
can be written as , where
:
for . The first values of appear to the left of the decimal place.
This can also be written in the following
pseudocode
In computer science, pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine re ...
:
function toBase(n, b)
Note that the above code is only valid for
and
, as it does not convert each digits to their correct symbols or correct negative numbers. For example, if a digit's value is , it will be represented as instead of .
Example implementation code
To base
*
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
:
function toBasePI(num, precision = 8)
From base
* JavaScript:
function fromBasePI(num)
Examples
Base
Base
behaves in a very similar way to
base 2 as all one has to do to convert a number from
binary
Binary may refer to:
Science and technology Mathematics
* Binary number, a representation of numbers using only two digits (0 and 1)
* Binary function, a function that takes two arguments
* Binary operation, a mathematical operation that t ...
into base is put a zero digit in between every binary digit; for example, 1911
10 = 11101110111
2 becomes 101010001010100010101
and 5118
10 = 1001111111110
2 becomes 1000001010101010101010100
. This means that every integer can be expressed in base without the need of a decimal point. The base can also be used to show the relationship between the
side
Side or Sides may refer to:
Geometry
* Edge (geometry) of a polygon (two-dimensional shape)
* Face (geometry) of a polyhedron (three-dimensional shape)
Places
* Side (Ainis), a town of Ainis, ancient Thessaly, Greece
* Side (Caria), a town of ...
of a
square to its
diagonal as a square with a side length of 1
will have a diagonal of 10
and a square with a side length of 10
will have a diagonal of 100
. Another use of the base is to show the
silver ratio
In mathematics, two quantities are in the silver ratio (or silver mean) if the ratio of the smaller of those two quantities to the larger quantity is the same as the ratio of the larger quantity to the sum of the smaller quantity and twice t ...
as its representation in base is simply 11
. In addition, the area of a
regular octagon
In geometry, an octagon (from the Greek ὀκτάγωνον ''oktágōnon'', "eight angles") is an eight-sided polygon or 8-gon.
A '' regular octagon'' has Schläfli symbol and can also be constructed as a quasiregular truncated square, t, whi ...
with side length 1
is 1100
, the area of a
regular octagon
In geometry, an octagon (from the Greek ὀκτάγωνον ''oktágōnon'', "eight angles") is an eight-sided polygon or 8-gon.
A '' regular octagon'' has Schläfli symbol and can also be constructed as a quasiregular truncated square, t, whi ...
with side length 10
is 110000
, the area of a
regular octagon
In geometry, an octagon (from the Greek ὀκτάγωνον ''oktágōnon'', "eight angles") is an eight-sided polygon or 8-gon.
A '' regular octagon'' has Schläfli symbol and can also be constructed as a quasiregular truncated square, t, whi ...
with side length 100
is 11000000
, etc…
Golden base
In the golden base, some numbers have more than one decimal base equivalent: they are ambiguous. For example:
11
φ = 100
φ.
Base ψ
There are also some numbers in base
ψ are also ambiguous. For example, 101
ψ = 1000
ψ.
Base ''e''
With base
''e'' the
natural logarithm
The natural logarithm of a number is its logarithm to the base of the mathematical constant , which is an irrational and transcendental number approximately equal to . The natural logarithm of is generally written as , , or sometimes, if ...
behaves like the
common logarithm
In mathematics, the common logarithm is the logarithm with base 10. It is also known as the decadic logarithm and as the decimal logarithm, named after its base, or Briggsian logarithm, after Henry Briggs, an English mathematician who pioneered i ...
as ln(1
''e'') = 0, ln(10
''e'') = 1, ln(100
''e'') = 2 and ln(1000
''e'') = 3.
The base ''e'' is the most economical choice of radix ''β'' > 1 , where the
radix 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.
Base π
Base
π can be used to more easily show the relationship between the
diameter
In geometry, a diameter of a circle is any straight line segment that passes through the center of the circle and whose endpoints lie on the circle. It can also be defined as the longest chord of the circle. Both definitions are also valid for ...
of a
circle
A circle is a shape consisting of all points in a plane that are at a given distance from a given point, the centre. Equivalently, it is the curve traced out by a point that moves in a plane so that its distance from a given point is const ...
to its
circumference
In geometry, the circumference (from Latin ''circumferens'', meaning "carrying around") is the perimeter of a circle or ellipse. That is, the circumference would be the arc length of the circle, as if it were opened up and straightened out to ...
, which corresponds to its
perimeter; 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 the
area
Area is the quantity that expresses the extent of a region on the plane or on a curved surface. The area of a plane region or ''plane area'' refers to the area of a shape
A shape or figure is a graphics, graphical representation of an obje ...
= π ×
radius
In classical geometry, a radius ( : radii) of a circle or sphere is any of the line segments from its center to its perimeter, and in more modern usage, it is also their length. The name comes from the latin ''radius'', meaning ray but also the ...
2, 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
π.
Properties
In no positional number system can every number be expressed uniquely. For example, in base ten, the number 1 has two representations: 1.000... and
0.999.... The set of numbers with two different representations is
dense
Density (volumetric mass density or specific mass) is the substance's mass per unit of volume. The symbol most often used for density is ''ρ'' (the lower case Greek letter rho), although the Latin letter ''D'' can also be used. Mathematically ...
in the reals , but the question of classifying real numbers with unique ''β''-expansions is considerably more subtle than that of integer bases .
Another problem is to classify the real numbers whose ''β''-expansions are periodic. Let ''β'' > 1, and Q(''β'') be the smallest
field extension
In mathematics, particularly in algebra, a field extension is a pair of fields E\subseteq F, such that the operations of ''E'' are those of ''F'' restricted to ''E''. In this case, ''F'' is an extension field of ''E'' and ''E'' is a subfield of ...
of the
rationals containing ''β''. Then any real number in
converse need not be true. The converse does hold if ''β'' is a Pisot number , although necessary and sufficient conditions are not known.
See also
* Beta encoder
* Non-standard positional numeral systems
* Decimal expansion
* Power series
*
Ostrowski numeration
In mathematics, Ostrowski numeration, named after Alexander Ostrowski, is either of two related numeration systems based on continued fractions: a non-standard positional numeral system for integers and a non-integer representation of real numbers ...
References
*
*.
*.
*.
*.
*.
*.
*.
*.
*.
*
Further reading
*
External links
*
{{DEFAULTSORT:Non-Integer Representation
Number theory
Ring theory
Coding theory
Non-standard positional numeral systems