5
1
The blancmange function is used as an example in basic calculus of a function that is continuous everywhere, but differentiable nowhere. It achieves this effect by using the sums of ever-diminishing triangle-wave functions.
Your task is to build a program that takes a binary fractional number in the interval [0, 1] and returns the exact height of the blancmange curve at that position. Both fractions can be represented using the notation of your choice, but if you are using a nonstandard one (e.g. not IEEE floating-point or an integer with a fixed radix point), you must explain it in your solution, and your notation must support an accuracy of at least 2-52.
wait... 'exact', or 'accuracy of at least 2^-52'? – boothby – 2013-09-07T23:05:32.420
The function must take inputs with accuracy up to 2^-52 (and round them to a binary fraction), but must return the exact output for the rounded input (binary fractions have exact representations in blancmange). – Joe Z. – 2013-09-08T00:36:36.363
I don't get what you mean by binary fraction. Is 3/5 a binary fraction? Or it is when I write it 11/101? Or denominator must be a power of 2? Or what? – edc65 – 2017-02-11T10:43:28.983