Rounding

From Xenharmonic Wiki
Jump to navigation Jump to search

Rounding can be challenging. Especially if the decimal you have to remove is a five, or the decimals you are up to remove are near 498… or 502…, or – even worse – 5001…. Keep strong! There are simple rules for it. If not stated otherwise, we use commercial rounding (or rounding half away from zero) in this wiki, trailing decimals 0,…,4 are rounded towards zero, 5,…,9 are rounded away from zero.

Fourtunately, cent values of just intervals (except 1/1 and 2/1) are irrational.

Example

Rounding the size of 3/2 in cents [1]
Decimals Result
20 701.9550008653874177445
19 701.955000865387417744
18 701.95500086538741774
17 701.9550008653874177
16 701.955000865387418
15 701.95500086538742
14 701.9550008653874
13 701.955000865387
12 701.95500086539
11 701.9550008654
10 701.955000865
8 701.95500087
7 701.9550009
6 701.955001
5 701.95500
4 701.9550
3 701.955
2 701.96
1 702.0
0 702
  1. Alpha: log2(3/2)*1200 gives 701.95500086538741774448673273737981051177728923097727254690318544

See also