7957_Devils_StairCase
v/s v/s a temporal correlation to at the #et7956
timeseries datapoints.
References:
Cold Rex
/* Minkowski's question-mark function */
double minkowski(double x) {
long p=x; if ((double)p>x) --p; /* p=floor(x) */
long q=1, r=p+1, s=1, m, n;
double d=1, y=p;
if (x<(double)p||(p<0)^(r<=0)) return x; /* out of range ?(x) =~ x */
for (;;) /* invariants: q*r-p*s==1 && (double)p/q <= x && x < (double)r/s */
{
d/=2; if (y+d==y) break; /* reached max possible precision */
m=p+r; if ((m<0)^(p<0)) break; /* sum overflowed */
n=q+s; if (n<0) break; /* sum overflowed */
if (x<(double)m/n) r=m, s=n;
else y+=d, p=m, q=n;
}
return y+d; /* final round-off */
}
See files like:
More meta to glob upon!
Definition
!: Cantor function
- To formally define the Cantor function ‘c’ : [0,1] → [0,1], let x be in [0,1] and obtain c(x) by the following steps:
- Express x in base 3.
- If x contains a 1, replace every digit after the first 1 by 0.
- Replace all 2s with 1s.
- Interpret the result as a binary number. The result is c(x)