Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Nice real and complex floating-point numbers


I'm often looking for numbers that can be easily used in the classroom as real numbers, and often when you have to take reciprocals, there are not many choices; however, using 5, 10 and 20 get boring, so I found 0.4 and 2.5 to be a nice less-obvious pair. Thus, I asked, what are other such numbers, and so we start the investigation:

Nice real floating-point numbers

These are all the decimal floating-point numbers that have nice reciprocals, that is, where both the number and its reciprocal have no more than n digits both before and after the decimal point. Of course, given any x and its reciprocal, you can multiply one by ten and divide the other by ten, and you still have a nice pair. Thus, for each next group, we do not repeat those that are such multiples of previously listed pairs.

             0.2         5
             0.4         2.5
             0.5         2

             0.08       12.5
             0.16        6.25
             0.8         1.25

             0.032      31.25
             0.064      15.625
             0.32        3.125

             0.0128     78.125
             0.0256     39.0625
             0.128       7.8125

             0.00512   195.3125
             0.01024    97.65625
             0.0512     19.53125

             0.002048  488.28125
             0.004096  244.140625
             0.02048    48.828125

For each of these, you can multiply one by 10 and divide the other by 10, and you still get a valid result.

You will note the pattern: one of the numbers is always a positive power of two times a multiple of 10, so 2m10n, and its reciprocal is therefore 2m10n. Note that I could say all numbers of the form 2m5n, but visually speaking, one must be a shifted power of two, and the other must be the inverse of that power of two shifted in the other direction.

Thus, all we need really consider are all powers of two and their reciprocals:

                          -1
                 x       x      

                 1       1
                 2       0.5
                 4       0.25
                 8       0.125
                16       0.0625
                32       0.03125
                64       0.015625
               128       0.0078125
               256       0.00390625
               512       0.001953125
              1024       0.0009765625

From here, you can simply move the decimal points around however you wish:

     0.002    500              0.004     250
     0.02      50              0.04       25
     0.2        5              0.4         2.5
     2          0.5            4           0.25
    20          0.05          40           0.025
   200          0.005        400           0.0025

     0.008    125              0.0016    625  
     0.08      12.5            0.016      62.5
     0.8        1.25           0.16        6.25
     8          0.125          1.6         0.625
    80          0.0125        16           0.0625
   800          0.00125      160           0.00625

     0.0032   312.5            0.0064    156.25
     0.032     31.25           0.064      15.625
     0.32       3.125          0.64        1.5625
     3.2        0.3125         6.4         0.15625
    32          0.03125       64           0.015625
   320          0.003125     640           0.0015625

     0.00128  781.25           0.00256  390.625
     0.0128    78.125          0.0256    39.0625
     0.128      7.8125         0.256      3.90625
     1.28       0.78125        2.56       0.390625
    12.8        0.078125      25.6        0.0390625
   128          0.0078125    256          0.00390625

     0.00512  195.3125         0.001234 976.5625
     0.0512    19.53125        0.01024   97.65625
     0.512      1.953125       0.1024     9.765625
     5.12       0.1953125      1.024      0.9765625
    51.2        0.01953125    10.24       0.09765625
   512          0.001953125  102.4        0.009765625

Not all of these are "nice," as you have digits far from the decimal point, but some are "nice" enough. The following are all these numbers that fall in the range $(0.1, 10):

             -1                    -1
      x     x               x     x

     0.2    5              0.4    2.5
     2      0.5            4      0.25

     0.8    1.25           0.16   6.25
     8      0.125          1.6    0.625

     0.32   3.125          0.64   1.5625
     3.2    0.3125         6.4    0.15625

     0.128  7.8125         0.256  3.90625
     1.28   0.78125        2.56   0.390625

     0.512  1.953125       0.1024 9.765625
     5.12   0.1953125      1.024  0.9765625

Nice complex floating-point numbers

Here we start with unit complex numbers, or those that lie on the unit circle. Then we look at other non-unit quaterions.

Nice complex numbers on the unit circle (|z| = 1)

These are all the "nice" complex numbers on the unit circle, up to cosmetic changes (signs and switching components), to the given number of digits:

        ^
        z
    0.6 + 0.8j 
    0.28 + 0.96j 
    0.352 + 0.936j 
    0.5376 + 0.8432j 
    0.07584 + 0.99712j 
    0.658944 + 0.752192j
    0.2063872 + 0.9784704j
    0.42197248 + 0.90660864j 
    0.472103424 + 0.881543168j 
    0.1512431616 + 0.9884965888j 

Other nice complex numbers

First, we note that the reciprocal involves the product α2+β2 in the denominator, so this must be a product of powers of two and five. Then, whatever α and β are, they may be multiplied by any product of powers of 2 and 5.

There is only one pair of numbers for each 2-norm squared of the form 5n and 25n, and the first seven, together with 0.28+0.96j, represent all possible "nice" complex numbers with at most two digits in each significand. Multiplying these by "nice" real numbers will yield others:

                           -1                                   2
              z           z                                  |z|
          1 +     j   0.5 - 0.5j                       2      =         2
          1 +    2j   0.2 - 0.4j                         5    =         5
          1 +    3j   0.1 - 0.3j                       2x5    =        10
          3 +    4j   0.12 - 0.16j                       5^2  =        25
          1 +    7j   0.02 - 0.14j                     2x5^2  =        50
          2 +   11j   0.016 - 0.088j                     5^3  =       125
          9 +   13j   0.036 - 0.052j                   2x5^3  =       250

          7 +   24j   0.0112 - 0.0384j                   5^4  =       625
         17 +   31j   0.0136 - 0.0248j                 2x5^4  =      1250
         38 +   41j   0.01216 - 0.01312j                 5^5  =      3125
          3 +   79j   0.00048 - 0.01264j               2x5^5  =      6250
         44 +  117j   0.002816 - 0.007488j               5^6  =     15625
         73 +  161j   0.002336 - 0.005152j             2x5^6  =     31250
         29 +  278j   0.0003712 - 0.0035584j             5^7  =     78125
        249 +  307j   0.0015936 - 0.0019648j           2x5^7  =    156250
        336 +  527j   0.00086016 - 0.00134912j           5^8  =    390625
        191 +  863j   0.00024448 - 0.00110464j         2x5^8  =    781250
        718 + 1199j   0.000367616 - 0.000613888j         5^9  =   1953125
        481 + 1917j   0.000123136 - 0.000490752j       2x5^9  =   3906250
        237 + 3116j   0.0000242688 - 0.0003190784j       5^10 =   9765625
       2879 + 3353j   0.0001474048 - 0.0001716736j     2x5^10 =  19531250
       2642 + 6469j   0.00005410816 - 0.00013248512j     5^11 =  48828125
       3827 + 9111j   0.00003918848 - 0.00009329664j   2x5^11 =  97656250
     10296 + 11753j   0.000042172416 - 0.000048140288    5^12 = 244140625
      1457 + 22049j   0.000002983936 - 0.000045156352  2x5^12 = 488281250
      8839 + 33802j   0.0000072409088 - 0.0000276905984                  5^13 =      1220703125
     24963 + 42641j   0.0000102248448 - 0.0000174657536                2x5^13 =      2441406250
     16124 + 76443j   0.00000264175616 - 0.00001252442112                5^14 =      6103515625
     60319 + 92567j   0.00000494133248 - 0.00000758308864              2x5^14 =     12207031250
   108691 + 136762j   0.000003561586688 - 0.000004481417216              5^15 =     30517578125
    28071 + 245453j   0.000000459915264 - 0.000004021501952            2x5^15 =     61035156250
   164833 + 354144j   0.0000010802495488 - 0.0000023209181184            5^16 =    152587890625
   189311 + 518977j   0.0000006203342848 - 0.0000017005838336          2x5^16 =    305175781250
    24478 + 873121j   0.00000003208380416 - 0.00000114441715712          5^17 =    762939453125
   848643 + 897599j   0.00000055616667648 - 0.00000058825048064        2x5^17 =   1525878906250
  922077 + 1721764j   0.000000241716953088 - 0.000000451350102016        5^18 =   3814697265625
  799687 + 2643841j   0.000000104816574464 - 0.000000346533527552      2x5^18 =   7629394531250
 2521451 + 3565918j   0.0000001321966501888 - 0.0000001869568016384      5^19 =  19073486328125
 1044467 + 6087369j   0.0000000273800757248 - 0.0000001595767259136    2x5^19 =  38146972656250
 1476984 + 9653287j   0.00000001548729974784 - 0.00000010122205069312    5^20 =  95367431640625
8176303 + 11130271j   0.00000004286737547264 - 0.00000005835467522048  2x5^20 = 190734863281250

These are all multiples of the above that do not produce an absolute value less than or equal to one or greater than 100 and where neither component has more than two digits in the significand. This list is exhaustive up to cosmetic changes (signs and switching component). Only two groups of these also have "nice" (terminating decimal) absolute values, and they are highlighted below as being multiples of the two unit complex numbers:

  
       |z| > 1            |1/z| <  1

One digit in each significand of both z and its inverse
      1   + j            0.5 - 0.5j 
      5   + 5j           0.1 - 0.1j 
      0.5 + j            0.4 - 0.8j 

      1 + 2j             0.2  - 0.4j 
      2 + 4j             0.1  - 0.2j 
      4 + 8j             0.05 - 0.1j 
      1 + 3j             0.1  - 0.3j 

      0.6 + 0.8j         0.6  - 0.8j            |z| =   1
      6   + 8j           0.06 - 0.08j           |z| =  10
      60  + 80j          0.006 - 0.008j         |z| =  100

One digit in each significand of z
      2 + 2j             0.25 - 0.25j 
      2 + 6j             0.05 - 0.15j 
      3 + 4j             0.12 - 0.16j           |z| =   5
      1 + 7j             0.02 - 0.14j 

One digit in each significand of the inverse of z
      2.5 + 2.5j         0.2  - 0.2j
     25   + 25j          0.02 - 0.02j 
      5   + 10j          0.04  - 0.08j 
      0.5 + 1.5j         0.2   - 0.6j 
      5   + 15j          0.02  - 0.06j 
      1.2 + 1.6j         0.3    - 0.4j          |z| =   2
     12   + 16j          0.03   - 0.04j         |z| =  20
      0.2 + 1.4j         0.1   - 0.7j 
      2   + 14j          0.01  - 0.07j 

Each of z and its inverse has at least one significand with two digits
22    0.8 + 1.6j         0.25  - 0.5j
22    2.5 + 5j           0.08  - 0.16j
22    8   + 16j          0.025 - 0.05j 
22   25   + 50j          0.008 - 0.016j 
22    0.4 + 1.2j         0.25  - 0.75j
22    2.5 + 7.5j         0.04  - 0.12j
22   25   + 75j          0.004 - 0.012j 
22    0.75 + j           0.48   - 0.64j         |z| =   1.25
22    1.5  + 2j          0.24   - 0.32j         |z| =   2.5
22    2.4  + 3.2j        0.15   - 0.2j          |z| =   4
22    4.8  + 6.4j        0.075  - 0.1j          |z| =   8
22    7.5  + 10j         0.048  - 0.064j        |z| =  12.5
22   15    + 20j         0.024  - 0.032j        |z| =  25
22   24    + 32j         0.015  - 0.02j         |z| =  40
22   48    + 64j         0.0075 - 0.01j         |z| =  80
22    0.28 + 0.96j       0.28 + 0.96j           |z| = 1
22    2.8  + 9.6j        0.028 + 0.096j         |z| = 10
22   28    + 96j         0.0028 + 0.0096j       |z| = 100
22    0.4 + 2.8j         0.05  - 0.35j
22    0.5 + 3.5j         0.04  - 0.28j 
22    4   + 28j          0.005 - 0.035j 
22    5   + 35j          0.004 - 0.028j 
22    0.2 + 1.1j         0.16  - 0.88j 
22    0.4 + 2.2j         0.08  - 0.44j 
22    0.8 + 4.4j         0.04  - 0.22j
22    1.6 + 8.8j         0.02  - 0.11j
22    2   + 11j          0.016 - 0.088j 
22    4   + 22j          0.008 - 0.044j 
22    8   + 44j          0.004 - 0.022j 
22   16   + 88j          0.002 - 0.011j 
22    0.9 + 1.3j         0.36  - 0.52j 
22    1.8 + 2.6j         0.18  - 0.26j 
22    3.6 + 5.2j         0.09  - 0.13j
22    9   + 13j          0.036 - 0.052j 
22   18   + 26j          0.018 - 0.026j 
22   36   + 52j          0.009 - 0.013j 

Nice quaternion floating-point numbers

Here we start with unit quaterions, or those that lie on the unit hypersphere. Then we look at other non-unit quaterions.

Quaternions on the unit hypersphere (|z| = 1)

The following are all normalized quaternions that sit on the unit hypersphere where no coefficient has more than two significant digits. This is exhaustive up to signs and swapping coefficients. You will note that there are no quaternions on the unit hypersphere that have only one coefficient equal to zero while also having only one significant digit.

        1
	0.6 + 0.8i
        0.1 + 0.1i + 0.7j + 0.7k
        0.1 + 0.3i + 0.3j + 0.9k
        0.1 + 0.5i + 0.5j + 0.7k
        0.2 + 0.4i + 0.4j + 0.8k
        0.5 + 0.5i + 0.5j + 0.5k

        0.28 + 0.96i
        0    + 0.36i + 0.48j + 0.8k
        0    + 0.48i + 0.6j  + 0.64k
        0.02 + 0.02i + 0.34j + 0.94k
        0.02 + 0.1i  + 0.5j  + 0.86k
        0.02 + 0.14i + 0.14j + 0.98k
        0.02 + 0.14i + 0.7j  + 0.7k
        0.02 + 0.22i + 0.26j + 0.94k
        0.02 + 0.22i + 0.46j + 0.86k
        0.02 + 0.26i + 0.62j + 0.74k
        0.02 + 0.34i + 0.38j + 0.86k
        0.02 + 0.34i + 0.46j + 0.82k
        0.02 + 0.34i + 0.58j + 0.74k
        0.06 + 0.06i + 0.18j + 0.98k
        0.06 + 0.06i + 0.62j + 0.78k
        0.06 + 0.1i  + 0.42j + 0.9k
        0.06 + 0.18i + 0.54j + 0.82k
        0.06 + 0.42i + 0.46j + 0.78k
        0.06 + 0.42i + 0.62j + 0.66k
        0.08 + 0.08i + 0.64j + 0.76k
        0.08 + 0.12i + 0.24j + 0.96k
        0.08 + 0.16i + 0.44j + 0.88k
        0.08 + 0.2i  + 0.56j + 0.8k
        0.08 + 0.24i + 0.48j + 0.84k
        0.08 + 0.32i + 0.56j + 0.76k
        0.08 + 0.4i  + 0.44j + 0.8k
        0.08 + 0.52i + 0.56j + 0.64k
        0.1  + 0.1i  + 0.14j + 0.98k
        0.1  + 0.26i + 0.5j  + 0.82k
        0.1  + 0.3i  + 0.54j + 0.78k
        0.1  + 0.34i + 0.62j + 0.7k
        0.1  + 0.5i  + 0.5j  + 0.7k
        0.12 + 0.24i + 0.64j + 0.72k
        0.14 + 0.22i + 0.22j + 0.94k
        0.14 + 0.22i + 0.62j + 0.74k
        0.14 + 0.46i + 0.62j + 0.62k
        0.16 + 0.16i + 0.32j + 0.92k
        0.16 + 0.2i  + 0.4j  + 0.88k
        0.16 + 0.32i + 0.64j + 0.68k
        0.18 + 0.26i + 0.3j  + 0.9k
        0.18 + 0.26i + 0.54j + 0.78k
        0.18 + 0.54i + 0.54j + 0.62k
        0.22 + 0.26i + 0.38j + 0.86k
        0.22 + 0.26i + 0.46j + 0.82k
        0.22 + 0.26i + 0.58j + 0.74k
        0.22 + 0.46i + 0.5j  + 0.7k
        0.24 + 0.44i + 0.48j + 0.72k
        0.26 + 0.34i + 0.38j + 0.82k
        0.26 + 0.46i + 0.58j + 0.62k
        0.28 + 0.32i + 0.64j + 0.64k
        0.3  + 0.3i  + 0.46j + 0.78k
        0.3  + 0.3i  + 0.62j + 0.66k
        0.32 + 0.4i  + 0.4j  + 0.76k
        0.32 + 0.52i + 0.56j + 0.56k
        0.34 + 0.34i + 0.62j + 0.62k
        0.34 + 0.38i + 0.5j  + 0.7k
        0.34 + 0.46i + 0.58j + 0.58k
        0.34 + 0.5i  + 0.5j  + 0.62k
        0.36 + 0.48i + 0.48j + 0.64k
        0.4  + 0.4i  + 0.52j + 0.64k
        0.42 + 0.42i + 0.46j + 0.66k

This file contains all unit quaternions that do not have more than three significant figures in each coefficient.

Quaternions with only one significant digit

These are quaternions that contain only one significant digit in each component of the number. Other multiples of these may also have only one digit. Those marked with an asterisk can also be made into nice unit quaternions listed above. Of course, you can change the signs and rearrange the components, as you wish. You can multiply or divide these numbers by 2, 2.5, 4 or 5 and still have "nice" quaternions, as these are "nice" real numbers.

       2                                          -1
    |z|              z                           z

     10      1 + i + 2j + 2k           0.1 - 0.1i - 0.2j - 0.2k
     50      3i + 4j + 5k              -0.06i - 0.08j - 0.1k
     50      3 + 3i + 4j + 4k          0.06 - 0.06i - 0.08j - 0.08k
    100      5 + 5i + 5j + 5k          0.05 - 0.05i - 0.05j - 0.05k    *
    100      1 + i + 7j + 7k           0.01 - 0.01i - 0.07j - 0.07k    *
    100      2 + 4i + 4j + 8k          0.02 - 0.04i - 0.04j - 0.08k    *
    100      1 + 3i + 3j + 9k          0.01 - 0.03i - 0.03j - 0.09k    *
    100      1 + 5i + 5j + 7k          0.01 - 0.05i - 0.05j - 0.07k    *
   1000      6i + 8j + 30k             -0.006i - 0.008j - 0.03k

Quaternions with only two significant digit

Here, we present quaterions where either the quaternion or its reciprocal have no more than two significant digits. Those marked with an asterisk can also be made into nice unit quaternions listed above. Of course, you can change the signs and rearrange the components, as you wish. You can multiply or divide these numbers by 2, 2.5, 4 or 5 and still have "nice" quaternions, as these are "nice" real numbers.

    2                                        -1
 |z|            z                           z

   4     1 + i + j + k            0.25 - 0.25i - 0.25j - 0.25k         *
  20     1 + i + 3j + 3k          0.05 - 0.05i - 0.15j - 0.15k
  25     1 + 2i + 2j + 4k         0.04 - 0.08i - 0.08j - 0.16k         *
  50     1 + 2i + 3j + 6k         0.02 - 0.04i - 0.06j - 0.12k
 125     3i + 4j + 10k            0.024i - 0.032j - 0.08k
 125     5i + 6j + 8k             0.04i - 0.048j - 0.064k
 125     2 + 2i + 6j + 9k         0.016 - 0.016i - 0.048j - 0.072k
 125     2 + 6i + 6j + 7k         0.016 - 0.048i - 0.048j - 0.056k
 125     3 + 4i + 6j + 8k         0.024 - 0.032i - 0.048j - 0.064k

 250     3i + 4j + 15k            0.012i - 0.016j - 0.06k
 250     5i + 9j + 12k            0.02i - 0.036j - 0.048k
 250     1 + 2i + 7j + 14k        0.004 - 0.008i - 0.028j - 0.056k
 250     1 + 4i + 8j + 13k        0.004 - 0.016i - 0.032j - 0.052k
 250     1 + 7i + 10j + 10k       0.004 - 0.028i - 0.04j - 0.04k
 250     1 + 8i + 8j + 11k        0.004 - 0.032i - 0.032j - 0.044k
 250     2 + 2i + 11j + 11k       0.008 - 0.008i - 0.044j - 0.044k
 250     2 + 5i + 5j + 14k        0.008 - 0.02i - 0.02j - 0.056k
 250     2 + 5i + 10j + 11k       0.008 - 0.02i - 0.04j - 0.044k
 250     3 + 3i + 6j + 14k        0.012 - 0.012i - 0.024j - 0.056k
 250     3 + 4i + 9j + 12k        0.012 - 0.016i - 0.036j - 0.048k
 250     3 + 6i + 6j + 13k        0.012 - 0.024i - 0.024j - 0.052k
 250     4 + 4i + 7j + 13k        0.016 - 0.016i - 0.028j - 0.052k
 250     4 + 7i + 8j + 11k        0.016 - 0.028i - 0.032j - 0.044k

 500     1 + 3i + 7j + 21k        0.002 - 0.006i - 0.014j - 0.042k
 500     1 + 7i + 15j + 15k       0.002 - 0.014i - 0.03j - 0.03k
 500     3 + 7i + 9j + 19k        0.006 - 0.014i - 0.018j - 0.038k
 500     3 + 9i + 11j + 17k       0.006 - 0.018i - 0.022j - 0.034k
 500     5 + 9i + 13j + 15k       0.01 - 0.018i - 0.026j - 0.03k
 500     7 + 9i + 9j + 17k        0.014 - 0.018i - 0.018j - 0.034k
 500     9 + 9i + 13j + 13k       0.018 - 0.018i - 0.026j - 0.026k
 500     3 + 3i + 11j + 19k       0.006 - 0.006i - 0.022j - 0.038k
 500     3 + 5i + 5j + 21k        0.006 - 0.01i - 0.01j - 0.042k

1250     3i + 4j + 35k            0.0024i - 0.0032j - 0.028k
1250     2 + 11i + 15j + 30k      0.0016 - 0.0088i - 0.012j - 0.024k
1250     9 + 12i + 20j + 25k      0.0072 - 0.0096i - 0.016j - 0.02k

2500     1 + 7i + 35j + 35k       0.0004 - 0.0028i - 0.014j - 0.014k   *
2500     3 + 5i + 21j + 45k       0.0012 - 0.002i - 0.0084j - 0.018k   *
2500     9 + 13i + 15j + 45k      0.0036 - 0.0052i - 0.006j - 0.018k   *
2500     11 + 23i + 25j + 35k     0.0044 - 0.0092i - 0.01j - 0.014k    *
2500     17 + 19i + 25j + 35k     0.0068 - 0.0076i - 0.01j - 0.014k    *