Fractals/Mathematics/Numbers

From Wikibooks, open books for an open world
Jump to navigation Jump to search
        "Many questions concerning (discrete) dynamical systems are of a number theoretic or combinatorial nature." Christian Krattenthaler
The set of real numbers

Intro[edit]

Number types[edit]

Number can be used as :

  • a numerical values used in numerical computations
  • a symbols used in symbolic computations

Number ( for example angle in turns ) can be:[1]

  • decimal number (base = 10 ) [2]
    • integer
    • real number
      • ratio = fraction ( Finite continued fraction ) = rational number ( if number can not be represented as a ratio then it is irrational number )
        • in lowest terms ( irreducible form ) :
        • reducible form
          • in explicit normalized form ( only when denominator is odd ):[3]
      • irrational number
    • decimal floating point number [4][5]
      • finite expansion
      • infinite (endless) expansion
        • continue infinitely without repeating (in which case the number is called irrational = non-repeating non-terminating decimal numbers[6])
        • Recurring or repeating
          • (strictly) periodic ( preperiod = 0 , preiod > 0 )
          • mixed = eventually periodic ( preperiod > 0 , period > 0 )
  • binary number ( base = 2 )[7]
    • binary rational number ( ratio)
    • binary real number
      • binary floating point number ( scientific notation )
      • Raw binary ( raw IEEE format )
      • binary fixed point number ( notation)
        • with repeating sequences :
        • with endless expansion


dimension[edit]

expansion/representation[edit]

  • finite = terminating
  • infinite = non-teminating
    • periodic = infite repeating
    • preperiodic = eventually periodic
    • non-periodic: binary numerals which neither terminate nor recur represent irrational numbers

base[edit]

radix or base of a positional numeral system[11]

  • 2 ( binary number)
  • 8 ( octal number)
  • 10 ( decimal umber)
  • 16 ( hexadecimal)

form/notation[edit]

  • ratio of integers
    • in lowest terms ( irreducible form ) :
    • reducible form
      • in explicit normalized form ( only when denominator is odd ):[12]
  • floating point form
  • scientific (exponential) form or notation: like 6.022e23
  • continued fraction :

Examples of binary expansions[edit]

First check if the ratio is in the lowest terms ( reducible)

Binary expansion can be :

Conversions[edit]

Conversion between :

  • bases ( from binary to decimal, ...)
  • forms ( rational to expansion, ...) [13]
    • Recognizing Rational Numbers From Their Decimal Expansion:[14] "to compute the simple continued fraction of the approximation, and truncate it before a large partial quotient a_n, then compute the value of the truncated continued fraction."
    • converting-repeating-decimals-to-fractions [15]
    • fraction to recurring decimal[16]
      • use of Floyd's Cycle Detection Algorithm for finding of the first repetitive remainder
      • recursive division and collection of remainders (associated with pieces of decimal fraction)

Using :

Algorithms[edit]

  • Find
    • strictly repeating patterns (that you do not know in advance) in a binary string/sequence[22] "If there is a pattern => its length must divide the string length "AnotherGeek[23]
    • non-repeating and strictly repeating patterns (that you do not know in advance) in a binary string/sequence
  • convert a number with a repeating fractional part


Reducing Fractions to Lowest Terms[edit]

A fraction that is reducible can be reduced by dividing both the numerator and denominator by a common factor. It can be fully reduced to lowest terms if both are divided by their greatest common divisor

Algorithms for finding the greatest common divisor:

  • the Euclidean algorithm
  • prime factorization

The Euclidean algorithm is commonly preferred because it allows one to reduce fractions with numerators and denominators too large to be easily factored

Examples:

convert decimal fraction to binary[edit]

"... we repeatedly multiply the decimal fraction by 2. If the result is greater than or equal to 1, we add a 1 to our answer. If the result is less than 1, we add a 0 to our answer." (from Virginia Tech Online CS module [27])

Algorithm:[28]

  • Multiply the input decimal fraction by two
  • from above result
    • take integer part as the binary digit
    • take the fractional part as the starting point for the next step
  • repeat until you either get to 0 or a periodic number
  • read the number starting from the top - the first binary digit is the first digit after the comma

Example of conversion 0.1 decimal fraction to binary fraction :

   0.1 * 2 = 0.2 -> 0
   0.2 * 2 = 0.4 -> 0
   0.4 * 2 = 0.8 -> 0
   0.8 * 2 = 1.6 -> 1
   0.6 * 2 = 1.2 -> 1
   0.2 * 2 = 0.4 -> 0
   0.4 * 2 = 0.8 -> 0
   0.8 * 2 = 1.6 -> 1
   0.6 * 2 = 1.2 -> 1
   0.2 * 2 = 0.4 -> 0
   0.4 * 2 = 0.8 -> 0
   0.8 * 2 = 1.6 -> 1
   0.6 * 2 = 1.2 -> 1
   0.2 * 2 = 0.4 -> 0

Result:


Repeating fractions :[29]

0.(567) = 567/999 = 189/333 = 63/111
0.(0011) = 0011 / 1111 =(in decimal) 3/15 = 1/5

Graphical conversion

code examples[edit]

C[edit]

itoa[edit]

itoa function [31]

/* 
 itoa example 
 http://www.cplusplus.com/reference/cstdlib/itoa/
*/
#include <stdio.h>
#include <stdlib.h>

int main ()
{
  int i;
  char buffer [33];
  printf ("Enter a number: ");

  scanf ("%d",&i);
  itoa (i,buffer,10);
  printf ("decimal: %s\n",buffer);

  itoa (i,buffer,16);
  printf ("hexadecimal: %s\n",buffer);

  itoa (i,buffer,2);
  printf ("binary: %s\n",buffer);

  return 0;
}

Binary integer constant[edit]

Binary integer constant[32]

"Integer constants can be written as binary constants, consisting of a sequence of ‘0’ and ‘1’ digits, prefixed by ‘0b’ or ‘0B’. This is particularly useful in environments that operate a lot on the bit level (like microcontrollers).

The following statements are identical:

     i =       42;
     i =     0x2a;
     i =      052;
     i = 0b101010;

The type of these constants follows the same rules as for octal or hexadecimal integer constants, so suffixes like ‘L’ or ‘UL’ can be applied."

gmp[edit]

/*

C programme using gmp

gcc r.c -lgmp -Wall

http://gmplib.org/manual/Rational-Number-Functions.html#Rational-Number-Functions

*/

#include <stdio.h>
#include <gmp.h>

int main ()
{
        
        // input = binary fraction as a string 
        char  *sbr = "01001010010010100101001001010010010100101001001010010100100101001001010010100100101001010/11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
        
        mpq_t q;   // rational number; 
        int b =2 ; // base of numeral system
        mpz_t  n ;
        mpz_t  d ;
        mpf_t f;

        // init and set variables 
        mpq_init (q); // Initialize r and set it to 0/1.
        mpq_set_str (q, sbr ,  b);
        mpq_canonicalize (q); // It is the responsibility of the user to canonicalize the assigned variable before any arithmetic operations are performed on that variable. 
        mpq_canonicalize (q); // It is the responsibility of the user to canonicalize the assigned variable before any arithmetic operations are performed on that variable.

        // n , d
        mpz_inits(n,d,NULL); 
        mpq_get_num(n,q);
        mpq_get_den(d, q);

        //
        mpf_init2(f, 100); // http://stackoverflow.com/questions/12804362/gmp-division-precision-or-printing-issue
        mpf_set_q(f,q); // There is no rounding, this conversion is exact.

        // print 
        gmp_printf ("decimal fraction =  %Zd / %Zd \ndecimal canonical form =  %Qd\n",n,d, q); // 
        gmp_printf ("binary fraction  = %s \n", sbr); // 
        gmp_printf ("decimal floating point number : %.30Ff \n", f); // 
        
        
        
        // clear memory
        mpq_clear (q);
        mpz_clear (n);
        mpz_clear (d);
        mpf_clear (f);
        
        return 0;
}

Output :

decimal fraction =  179622968672387565806504266 / 618970019642690137449562111 
decimal canonical form =  179622968672387565806504266/618970019642690137449562111
binary fraction  = 01001010010010100101001001010010010100101001001010010100100101001001010010100100101001010/11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 
decimal floating point number : 0.290196557138708685358212602171 

Haskell[edit]

Code by Claude Heiland-Allen:[33]

--  http://mathr.co.uk/blog/2014-10-13_converting_fractions_to_strings_of_digits.html

 import Data.Fixed (mod')
 import Data.List (nub)
 import Data.Ratio ((%), denominator)
 import Data.Numbers.Primes (primeFactors)
 import System.Environment (getArgs)

 data Digits = Digits
  { dNegative :: Bool
  , dInteger
  , dPreperiodic
  , dPeriodic :: [Int]
  } deriving Show

preperiod :: Digits -> Int
preperiod = length . dPreperiodic

period :: Digits -> Int
period = length . dPeriodic

digitsAtBase :: Int -> Rational -> Digits
digitsAtBase base rational
  = Digits
  { dNegative = rational < 0
  , dInteger = int
  , dPreperiodic = pre
  , dPeriodic = per
  }
  where
    integer :: Integer
    fraction :: Rational
    (integer, fraction) = properFraction (abs rational)
    int | integer == 0 = [0]
        | otherwise = goInt integer []
    goInt i ds
      | i == 0 = ds
      | otherwise = goInt i' (fromInteger d : ds)
      where
        (i', d) = i `divMod` baseZ
    factors :: [Integer]
    factors = map fromIntegral . nub . primeFactors $ base
    isPreperiodic :: Rational -> Bool
    isPreperiodic x = any (`divides` denominator x) factors
    baseZ :: Integer
    baseZ = fromIntegral base
    baseQ :: Rational
    baseQ = fromIntegral base
    (pre, per) = goPre fraction
      where
        goPre :: Rational -> ([Int], [Int])
        goPre x
          | isPreperiodic x = first (d:) (goPre x')
          | otherwise = ([], d : goPer x x')
          where (d, x') = properFraction (baseQ * x)
        goPer :: Rational -> Rational -> [Int]
        goPer x0 x
          | x0 == x = []
          | otherwise = d : goPer x0 x'
          where (d, x') = properFraction (baseQ * x)
    first :: (a -> c) -> (a, b) -> (c, b)
    first f (a, b) = (f a, b)
    divides :: Integer -> Integer -> Bool
    factor `divides` number = number `mod` factor == 0

digitsToString :: [String] -> Digits -> String
digitsToString digits Digits
  { dNegative = sign
  , dInteger = int
  , dPreperiodic = pre
  , dPeriodic = per
  }
  = (if sign then "-" else "")
  ++ d int ++ "." ++ d pre ++ "(" ++ d per ++ ")"
  where
    d = concatMap (digits !!)

atBase :: Int -> Rational -> String
atBase base rational = digitsToString ds (digitsAtBase base rational)
  where
    ds | base <= 62 = map (:[]) $ ['0'..'9'] ++ ['A'..'Z'] ++ ['a'..'z']
       | otherwise = [ "<" ++ show d ++ ">" | d <- [0 .. base - 1] ]

main :: IO ()
main = do
  [sbase, sfraction] <- getArgs
  let (snum, _:sden) = break ('/' ==) sfraction
      base = read sbase
      num = read snum
      den = read sden
      rational = num % den
  putStrLn (atBase base rational)

Python[edit]

# https://wiki.python.org/moin/BitManipulation
# binary string to integer 
>>> int('00100001', 2)
33
# conversion from binary string to  hex string
>>> print "0x%x" % int('11111111', 2)
0xff
>>> print "0x%x" % int('0110110110', 2)
0x1b6
>>> print "0x%x" % int('0010101110101100111010101101010111110101010101', 2)
0xaeb3ab57d55

Other methods [34]

How to use numbers in computer programs ?[edit]

First read:

integer[edit]

  • types
  • limits and overflow

Limit[edit]

/*

gcc l.c -lm -Wall
./a.out

http://stackoverflow.com/questions/29592898/do-long-long-and-long-have-same-range-in-c-in-64-bit-machine
*/
#include <stdio.h>
#include <math.h> // M_PI; needs -lm also 
#include <limits.h> // INT_MAX, http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html

int main(){

double lMax;

 lMax = log2(INT_MAX);
 printf("INT_MAX \t= %25d ; lMax = log2(INT_MAX) \t= %.0f \n",INT_MAX,  lMax);

 lMax = log2(UINT_MAX);
 printf("UINT_MAX \t= %25u ; lMax = log2(UINT_MAX) \t= %.0f \n", UINT_MAX,  lMax);

 lMax = log2(LONG_MAX);
 printf("LONG_MAX \t= %25ld ; lMax = log2(LONG_MAX) \t= %.0f \n",LONG_MAX,  lMax);

 lMax = log2(ULONG_MAX);
 printf("ULONG_MAX \t= %25lu ; lMax = log2(ULONG_MAX) \t= %.0f \n",ULONG_MAX,  lMax);

 lMax = log2(LLONG_MAX);
 printf("LLONG_MAX \t= %25lld ; lMax = log2(LLONG_MAX) \t= %.0f \n",LLONG_MAX, lMax);

 lMax = log2(ULLONG_MAX);
 printf("ULLONG_MAX \t= %25llu ; lMax = log2(ULLONG_MAX) \t= %.0f \n",ULLONG_MAX, lMax);

return 0;
}

Results :

INT_MAX 	=                2147483647 ; lMax = log2(INT_MAX) 	= 31 
UINT_MAX 	=                4294967295 ; lMax = log2(UINT_MAX) 	= 32 
LONG_MAX 	=       9223372036854775807 ; lMax = log2(LONG_MAX) 	= 63 
ULONG_MAX 	=      18446744073709551615 ; lMax = log2(ULONG_MAX) 	= 64 
LLONG_MAX 	=       9223372036854775807 ; lMax = log2(LLONG_MAX) 	= 63 
ULLONG_MAX 	=      18446744073709551615 ; lMax = log2(ULLONG_MAX) 	= 64 

For example Wolf Jung in program Mandel makes a silent bounds check:[36]

// mndynamo.h  by Wolf Jung (C) 2007-2014
typedef  unsigned long long int  qulonglong;

// mndcombi.cpp  by Wolf Jung (C) 2007-2014
 qulonglong mndAngle::wake(int k, int r, qulonglong &n)
{  if (k <= 0 || k >= r || r > 64) return 0LL;

If r is to big for unsigned long long int type it returns 0 to prevent ineger overflow.

GMP library has arbitrary precision rationals.

floating point[edit]

precision[edit]

Precision

  • GMP : The mantissa of each float has a user-selectable precision ( variable prec type mp_bitcnt_t ). Counts of bits of a multi-precision number are represented in the C type mp_bitcnt_t. Currently this is always an unsigned long
  • MPFR : The precision is the number of bits used to represent the significand ( mantissa) of a floating-point number; the corresponding C data type is mpfr_prec_t.

Rational[edit]

The rational points on a circle correspond, under stereographic projection, to the rational points of the line.

"Any number with a finite decimal expansion is a rational number. " In other words : "any floating point number can be converted to a rational number." [37]

So in numerical computations one can use only integer of floating points numbers ( rational ).

Decimal[edit]

Binary[edit]

Numbers[edit]

In C one can use :

  • bitwise operators [38]

In Maxima CAS one can use :

(%i1) ibase;
(%o1) 10
(%i2) obase;
(%o2) 10
(%i3) ibase:2;
(%o3) 2
(%i4) x=1001110;
(%o4) x=78

String[edit]

Calculation of binary numbers with as a string with replicating parts in Haskell (ghci):

-- by Claude Heiland-Allen
-- http://mathr.co.uk/blog/haskell.html
Prelude> let rep n s = concat (replicate n s)
Prelude> putStrLn $ ".(" ++ rep 88 "001" ++ "010)"
.(001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001010)

putStrLn $ ".(" ++ rep 87 "001" ++ "010001)"
.(001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001010001)

Prelude> putStrLn $ ".(" ++ rep 88 "001" ++ "0001)"
.(0010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010001)

Prelude> putStrLn $ ".(" ++ rep 88 "001" ++ "0010)"
.(0010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010)

In Python :

>>> bin(173)
'0b10101101'
>>> int('01010101111',2)
687

Literal[edit]

In python one can use binary literals :[39]

python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 0b101111
47

Irrational = not rational[edit]

Irrational numbers
            The problem is that we are exploring environments based upon irrational numbers through computer machinery which works with finite rationals ! ( Alessandro Rosa )

Expansion is non terminating and non repeating

Types:

  • Algebraic Numbers = roots of Algebraic Equations. Examplle : sqrt(2),
  • transcendental numbers = non algebraic


If one wants use irrational number then should check :

  • symbolic computations :
    • exact number can be used as a symbol, but "you cannot print the whole irrational number"
    • infinite continued fraction
  • numerical computations : close rational approximations to irrational numbers [40] (the Diophantine Approximation [41])
    • ratio of integers
    • floating point number
    • finite continued fractions

Inverse golden mean[edit]

The most irrational number[42] In a continued fraction all numbers are 1 = the slowest convergence of all the irrational numbers


Using Maxima CAS :

(%i10) print(float(%phi-1));
(%o10).6180339887498949
(%i11) rationalize(float(%phi-1));
(%o11) 347922205179541/562949953421312

and :


(%i14) print(float(1/%phi));
(%o14) .6180339887498948
(%i15) rationalize(float(1/%phi));
(%o15) 5566755282872655/9007199254740992

where denominator :


complex[edit]

  • the multi-valued nature of complex powers can cause big troubles ( artifacts of branch cuts, arbitrary principal value of arg)
  • domain coloring [43][44]


Examples

How to find number type[edit]

Note that in numerical computations with finite precision ( on computer) :

  • if number is represented as a ratio ( of integers) then it is a rational number
  • if number has a floating point representation the it is also a rational number because of limited precision = finite expansion
/*

Maxima CAS batch file

*/

remvalue(all);
kill(all);

/*
input = ratio, which automaticaly changed to lowest terms by Maxima CAS
output = string describing a type of decimal expansion

---------------------------------------------------------------------------------
" The rules that determine whether a fraction has recurring decimals or 
not are really quite simple.

1. First represent the fraction in its simplest form, by dividing both 
numerator and denominator by common factors.

2. Now, look at the denominator.

3.
3.1 If the prime factorization of the denominator contains only the 
factors 2 and 5, then the decimal fraction of that fraction will not 
have recurring digits. In other words : Terminating decimals represent 
rational numbers of the form k/(2^n*5^m)

3.2
  A fraction in lowest terms with a prime denominator other than 2 or 5 
(i.e. coprime to 10) always produces a repeating decimal.

3.2.1
  If the prime factorization yields factors like 3, 7, 11 or other 
primes (other than 2 and 5), then that fraction will have a decimal 
representation that includes recurring digits.

3.2.2
   Moreover, if the denominator's prime factors include 2 and/or 5 in 
addition to other prime factors like 3, 7, etc., the decimal 
representation of the fraction will start with a few non-recurring 
decimals before the recurring part."

http://blogannath.blogspot.com/2010/04/vedic-mathematics-lesson-49-recurring.html

check :
http://www.knowledgedoor.com/2/calculators/convert_a_ratio_of_integers.html

wikipedia: Repeating_decimal
" A fraction in lowest terms with a prime denominator other than 2 or 5 (i.e. coprime to 10) always produces a repeating decimal.
The length of the repetend (period of the repeating decimal) of 1/p is equal to the order of 10 modulo p. 
If 10 is a primitive root modulo p, the repetend length is equal to p − 1; if not, 
the repetend length is a factor of p − 1. 
This result can be deduced from Fermat's little theorem, which states that 10p−1 = 1 (mod p)."

---------------------------------------------------------------------------------------

*/

GiveRatioType(ratio):=
block
(
   [denominator:denom(ratio),
    FactorsList ,
    Factor,
    Has25:false,
    HasAlsoOtherPrimes:false,
    type ], /* type of decimal expansion of the ratio of integers */

   /* compute list of prime factors ofd denominator */
   FactorsList:ifactors(denominator),
   FactorsList:map(first,FactorsList),
   print(denominator, FactorsList),
   /* check factors type :
          only 2 or 5
          also other primes then 2 or 5
  */
   if (member(2,FactorsList) or member(5,FactorsList)) then Has25:true,

   for Factor in FactorsList do
    if (not member(Factor,[2,5])) then
          HasAlsoOtherPrimes:true,
   print(Has25, HasAlsoOtherPrimes),

   /* find type of decimal expansion */
   if (not Has25 and HasAlsoOtherPrimes)     then type:"periodic",
   if (Has25 and HasAlsoOtherPrimes)     then type:"preperiodic",
   if (Has25 and not HasAlsoOtherPrimes) then type:"finite",

   return(type)
)$

compile(all)$

/* input numbers*/
a:1 $
b:3 $

r:a/b$

type :  GiveRatioType(r);

tools[edit]

  • dumpfp: A Tool to Inspect Floating-Point Numbers by Joshua Haberman[46]

More[edit]

Cardinality[edit]

In mathematic ( theory) :

  • "... the rational numbers are a countable set whereas the irrational numbers are an uncountable set. In other words, there are more irrational numbers than there are rational. " [47]
  • "... in the set of real numbers there is continuum of irrational numbers and only aleph-zero rational numbers. Thus probability that any random number is irrational is 1;" ( Bartek Ogryczak) [48] "To be pedantically correct you should have said almost certainly is 1. " – David Hammen


height of a rational number in lowest term[edit]

Thomae function = 1/q
  "a “height function” is some real-valued function that defines the “arithmetic complexity” of a point ... " Brian Lawrence[49]

Types of the height functions defined on the set of rational numbers :

  • for the (multiplicative) height of a rational number[50] also called naive height
  • the logarithmic height or additive[51]

where:

  • p/q is a rational number in lowest term


  "How complicated is a rational number? Its size is not a very good indicator for this. For instance, 1987985792837/1987985792836 is approximately 1, but so much more complicated than 1. We'll explain how to measure the complexity of a rational number using various notions of height. We'll  then see how heights are used to prove some basic finiteness theorems in number theory. One example will be the Mordell-Weil theorem: that on any rational elliptic curve, the group of rational points is finitely generated. " Alina Bucur (UCSD): Size Doesn't Matter: Heights in Number Theory


Key words:

  • number field
  • Height Functions in Number Theory

Paritition[edit]

  • paritition function : "partition numbers behave like fractals, possessing an infinitely-repeating structure" [52]

Random number[edit]

The probability that any random number :

  • is irrational is almost 1 ( in theory because of cardinality )
  • is rational is 1 ( in numerical computations because of limited precision )

Fields[edit]

  • generalisation : scalar / vector / tensor
  • fields : scalar , vector, tensor

References[edit]

  1. exploring binary: nine-ways-to-display-a-floating-point-number
  2. wikipedia : Number base
  3. HOW TO WORK WITH ONE-DI MENSIONAL QUADRATIC MAPS G. Pastor , M. Romera, G. Álvarez, and F. Montoya
  4. What Every Programmer Should Know About Floating-Point Arithmetic
  5. Stackoverflow : Why Are Floating Point Numbers Inaccurate?
  6. home school math : The fascinating irrational numbers
  7. Tutorial: Floating-Point Binary by Kip Irvine
  8. Dual Numbers & Automatic Differentiation
  9. videos: Imaginary Numbers are Real from Welch Labs
  10. math stackexchange question: is-there-a-third-dimension-of-numbers
  11. wikipedia: Radix
  12. HOW TO WORK WITH ONE-DI MENSIONAL QUADRATIC MAPS G. Pastor , M. Romera, G. Álvarez, and F. Montoya
  13. Converting fractions to strings of digits by Claude Heiland-Allen
  14. Rational Numbers From Their Decimal Expansion by William Stein
  15. basic-mathematics : converting-repeating-decimals-to-fractions
  16. Recurring decimal of a rational number by Yurii Lahodiuk
  17. knowledgedoor calculators: convert_a_ratio_of_integers
  18. R.Knott : Fractions – Decimals Calculator
  19. Base Number - Decimal Number Conversion
  20. Decimal to Floating-Point Converter By Rick Regan
  21. wolframalpha binary to decimal conversion
  22. stackoverflow question : best-algorithm-to-find-a-repeating-pattern
  23. stackoverflow questions : method-to-find-repeated-pattern-in-string-apart-from-regex?noredirect=1&lq=1
  24. stackoverflow question: finding-a-repeated-pattern-in-a-string
  25. stackoverflow question: finding-a-pattern-in-a-binary-string
  26. jsfiddle by Jan Turoń
  27. Virginia Tech Online CS module
  28. Stackoverflow : How do you convert a fraction to binary ?
  29. Converting a repeating binary number to decimal (express as a series?)
  30. Where is the itoa function in Linux?
  31. itoa with GCC by Stuart
  32. gcc - Binary-constants
  33. Converting fractions to strings of digits by Claude Heiland-Allen
  34. stackoverflow : python int to binary
  35. What Every Computer Scientist Should Know About Floating-Point Arithmetic by DAVID GOLDBERG
  36. wikipedia : Bounds checking
  37. stackoverflow questions : check-if-a-number-is-rational-in-python
  38. Joe McCullough : bitwise operators
  39. Stackoverflow : How do you express binary literals in Python?
  40. John D Cook : best-rational-approximation
  41. DISCOVERING EXACTLY WHEN A RATIONAL IS A BEST APPROXIMATE OF AN IRRATIONAL By KARI LOCK
  42. ams : The Most Irrational Number
  43. complex beauties : math-calendar
  44. David Bau : complex function viewer
  45. Complex Numbers in VBA by Pfadintegral
  46. dumpfp: A Tool to Inspect Floating-Point Numbers by Joshua Haberman
  47. home school math : The fascinating irrational numbers
  48. stackoverflow questions : irrational-number-check-function
  49. Introduction to Heights by Brian Lawrence
  50. sagemath : Rational.global_height
  51. Height Functions by Michael Tepper
  52. Fractal Structure to Partition Function.

See also[edit]