MyNixOS website logo
Description

Numbers in the range [0.005, 1] as a sum of 2, 3, 4 or 5 unit fractions of special types.

Inspired by the ancient Egyptian mathematics. See the ideas description and formulation in the related draft paper.

Mathematical problem solution

Let's consider the problem of decomposition (approximation) of fractions that lie in the range [0.005, 2/3) by the sum of two fractions with 1 in the numerators (so called unit fractions) and, possibly, natural, unequal numbers in the denominators.

We will consider one of the two denominators to be a natural number, smaller than the other number in the denominator, and we will look for such a pair of numbers that, when rounded to natural numbers, will give the minimum absolute error of the resulting approximation. Mathematically, this leads to a problem and its further solution below.

Finally, we can decompose (approximate) the fraction in the range [0.005, 1] by the sum of 2, 3, 4, 5 or more unit fractions, with likely different denominators, just as like in the Egyptian mathematics.

In relation to music, this means that we can create rhythmic patterns using these unit fractions by treating the 1 as the music bar (notes between two consequtive barlines), but this leads to patterns that use irrational (non-dyadic) music meters and together to slightly different (hopefully, not perceptible) from 1 summary duration.

The tests show that there are some numerical instability for the numbers with more digits after the dot. So we use just 3 digits as correct after the dot, but the errors are calculated with respect to the original value with all the digits included.

More is by the link in the package description.

Relation to music rhythm and meter

It can be used to produce music by approximation of the meter. This leads to interesting structures.

It also is directly connected to the irrational time signatures in music.

General error behaviour

Since the version 0.8.0.0 there is a possibility to use the results with absolute error of some sign.

Sum of 4 unit fractions

Since the version 0.11.0.0 there is a function to decompose the fraction into sum of not more than 4 unit fractions. The precision of this operation is rather high, so for many cases we can with enough precision say that every fraction inside the [0.005, 2/3] range can be approximated with the sum of 4 unit fractions. See the function lessErrSimpleDecomp4PG.

Sum of 5 unit fractions

Since the version 0.12.0.0 there is a function to decompose the fraction into sum of not more than 5 unit fractions. The precision of this operation is better than for 4 unit fractions (see above). See the function lessErrSimpleDecomp5PG.

Ancient Egyptian canonical representation

Since the version 0.13.0.0 there is a function to represent the fraction using the canonical ancient Egyptian representation. Can be interesting from the historical perspective.

Since the version 0.14.0.0 there is a new module EgyptianFractions related to this functionality.

Corrections of the incorrect earlier behaviour

In the version 0.15.0.0 there were fixed issues with ErrorImpact > 0 that led earlier to incorrect behaviour.

Version 0.16.0.0

Since the version 0.16.0.0 there is an approach that preferably the fractions in every number of parts should have the most exact approximation (for 2, 3, 4, 5 unit fractions and probably @2/3@ as as another part).

Acknowledgements

Author would like to support the foundation Gastrostars and its founder Emma Kok. The founder inspired him to conduct such a research. Besides, the author is grateful to the Hackage website for publishing the Haskell code related to the research.

On the 2023-04-19 there is the founder's namesday, the memory of St. Emma of Lesum or Emma of Stiepel (also known as Hemma and Imma).

On the 2023-04-25 there is St. Apostle and Evangelist Mark's Day, he is a patron of Egypt.

If you would like to share some financial support with the Foundation Gastrostars, please, contact the mentioned foundation using the URL:

Contact Foundation GASTROSTARS

or

Donation Page.

Metadata

Version

0.17.0.0

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows