[math-fun] Ptolemaic synthesis of a triangle-valued step function,