f = 0 (slider from -5 to 5)
g(x) = If[x ≥ 0, round((f * x) + 0.5) - 1]
e(x) = If[x ≥ 0, (2 * (round(((2 * f) * x) + 0.5) / 2 - floor(round(((2 * f) * x) + 0.5) / 2)))]
v_c(x) = If[x ≥ 0, e(x) + ((((1 - e(x)) * g(x)) - e(x)) * ℯ^((-x)))]
v_0(x) = If[x ≥ 0, v_c((g(x) * 1 / f) + 1 / ((2 * f)) - 0.001)]