How to write this function in a "well-formed" way

73 Views Asked by At

Given an input $0 \lt x \lt 1$, find $x$'s Nearest Integer Continued Fraction with structure

$$x = a_0 \pm \cfrac{1}{a_1 \pm \cfrac{1}{a_2 \pm \cdots}}.$$

Then

$$f(c) = a_0 + 1 \mp \cfrac{1}{a_1 + 1 \mp \cfrac{1}{a_2 + 1 \mp \cdots}}.$$

That is, replace each instance of "$a_i +$" with "$(a_i + 1) -$" and of "$a_i -$" with "$(a_i + 1) +$". See here for the motivation behind the following questions.

Questions

I know that $f$ is a function, but I can't type this definition into a graphing calculator directly (that I know of).

  1. How can this function be written in a "well-formed" way, without english and with the ability to type it directly into a graphing calculator?
  2. Do there exist functions that can't be written in a "well-formed" way? What are they called?