I want to react to Florian's remark, in the thread "from causal diagram to physical throw"
Maybe we should also allow real fractions?
In social site-swaps, fractions are often rendered decimally, with sometimes round-off errors:
1/5 = 0.2
1/4 = 0.25
1/3 = 0.3
2/5 = 0.4
1/2 = 0.5
3/5 = 0.6
2/3 = 0.7
3/4 = 0.75
4/5 = 0.8
I think that I have never seen a higher denominator (1/6, 1/7, 1/8) in a pattern.
(and I think that jugglers who can actually juggle such a small delay are even rarer)
But JIF should prepare for future developments (and simulators can handel small fractions), and poly-rhythms might lead to higher denominators (imagine juggler A in a 3/4 polyrythm, and B in 3/5, where A's 4 cycle has the same frequency as B's "3" cycle. This would lead to a ratio 5/9)
There is a useful mathematical property:
If n < 10^k,
we need only k decimals to distinguish all fractions p/n (with p = 1, 2, ..., n)
example:
8 is less than 10 = 10^1 , so we need only 1 decimal:
1/8 = 0.1
2/8 = 0.3
3/8 = 0.4
4/8 = 0.5
5/8 = 0.6
7/8 = 0.9
8/8 = 1.0
If we want to distinguish fractions of, say, 8 and 9, we must use 72 as the denominator (8*9 =72).
So 2 decimals will be enough.
For 6 and 8, the denominator would be 24 (the smallest common multiple of 6 and 8). Still 2 decimals.
There are simple algorithms to find the smallest common multiple, so it is easy to know how many digits we need to distinguish the fractions that we need.
The denominator that the pattern uses, could be specified in the meta-data, so we can convert back to exact fractions.
Otherwise, I can think of an algorithm that decides that 0.33 means 1/3 and 0.34 means something different (I think 17/50):
- take n = 2
- multiply by n (2 * 0.33 = 0.66)
- round of (0.66 --> 1)
- divide by n (1/2 = 0.5)
- is this the original number? then n is the denominator
otherwise, increase n by 1 and repeat.
This algorithm would find 3*0.33=0.99 --> 1.0 --> 1/3 = 0.33 (OK!)
and 3*0.34=1.02 --> 1.0 --> 1/3 = 0.33 (not equal to 0.34, so continue)
Such an algorithm will find the exact multiples of 1/8 and 1/9, if 2 digits are present.
For physical parameters (for example, a dwell duration) we do not require perfect fractions, only the specified precision.
So the software may treat 0.33 as it wants: 33/100, or 1/3 , because 1/3 is rounded off to 0.33
But 0.34 should never be treated like 1/3, because 1/3 would be rounded off to 0.33, not to 0.34
0.3 however, would be converted to 1/3, so if you want a value to be 0.3 , you should write 0.30
So, my proposal is:
- use decimal fractions everywhere
- specify (in the metadata) to which fraction decimal fractions should be converted
or derive this by an algorithm
- if a decimal fraction cannot be converted correctly, it will remain a decimal fraction.
So physical parameters won't suffer from inaccuracy - as long as you write out all decimals. (I admit that this can lead to errors)
By the way, if all fractions of 2, 3, etc. till 10, can be expressed as multiples of 1/2520.
So we would need 4 digits for 1/2, 1/3, 1/4, till 1/10.
Co Stuifbergen
=========================
in...@jacos.nlwww.jacos.nl+31 6 13 02 44 69 (mobile)
Kloosterwei 102
2361 XN Warmond
the Netherlands
=========================