Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B

Percentage Accurate: 85.2% → 98.1%
Time: 13.4s
Alternatives: 14
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y \cdot \left(z - t\right)}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a):
	return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y * (z - t)) / (a - t));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}

Alternative 1: 98.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (+ x (/ (* y (- z t)) (- a t))) -1e-8)
   (fma (/ y (- a t)) (- z t) x)
   (+ x (* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x + ((y * (z - t)) / (a - t))) <= -1e-8) {
		tmp = fma((y / (a - t)), (z - t), x);
	} else {
		tmp = x + (y * ((z - t) / (a - t)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) <= -1e-8)
		tmp = fma(Float64(y / Float64(a - t)), Float64(z - t), x);
	else
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-8], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))) < -1e-8

    1. Initial program 80.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative80.3%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/100.0%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing

    if -1e-8 < (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)))

    1. Initial program 87.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y}}} \]
      2. associate-/r/99.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{z - t}} \cdot y} \]
      3. clear-num99.9%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    6. Applied egg-rr99.9%

      \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 76.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ t_2 := x - \frac{y}{\frac{t}{z}}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 1360\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y a)))) (t_2 (- x (/ y (/ t z)))))
   (if (<= t -6.5e+186)
     (+ x y)
     (if (<= t -2e+42)
       t_2
       (if (<= t -9.6e-15)
         t_1
         (if (<= t -4.8e-68)
           t_2
           (if (or (<= t -7.5e-83) (not (<= t 1360.0))) (+ x y) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double t_2 = x - (y / (t / z));
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= -2e+42) {
		tmp = t_2;
	} else if (t <= -9.6e-15) {
		tmp = t_1;
	} else if (t <= -4.8e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 1360.0)) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z * (y / a))
    t_2 = x - (y / (t / z))
    if (t <= (-6.5d+186)) then
        tmp = x + y
    else if (t <= (-2d+42)) then
        tmp = t_2
    else if (t <= (-9.6d-15)) then
        tmp = t_1
    else if (t <= (-4.8d-68)) then
        tmp = t_2
    else if ((t <= (-7.5d-83)) .or. (.not. (t <= 1360.0d0))) then
        tmp = x + y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double t_2 = x - (y / (t / z));
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= -2e+42) {
		tmp = t_2;
	} else if (t <= -9.6e-15) {
		tmp = t_1;
	} else if (t <= -4.8e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 1360.0)) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	t_2 = x - (y / (t / z))
	tmp = 0
	if t <= -6.5e+186:
		tmp = x + y
	elif t <= -2e+42:
		tmp = t_2
	elif t <= -9.6e-15:
		tmp = t_1
	elif t <= -4.8e-68:
		tmp = t_2
	elif (t <= -7.5e-83) or not (t <= 1360.0):
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / a)))
	t_2 = Float64(x - Float64(y / Float64(t / z)))
	tmp = 0.0
	if (t <= -6.5e+186)
		tmp = Float64(x + y);
	elseif (t <= -2e+42)
		tmp = t_2;
	elseif (t <= -9.6e-15)
		tmp = t_1;
	elseif (t <= -4.8e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || !(t <= 1360.0))
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / a));
	t_2 = x - (y / (t / z));
	tmp = 0.0;
	if (t <= -6.5e+186)
		tmp = x + y;
	elseif (t <= -2e+42)
		tmp = t_2;
	elseif (t <= -9.6e-15)
		tmp = t_1;
	elseif (t <= -4.8e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || ~((t <= 1360.0)))
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+186], N[(x + y), $MachinePrecision], If[LessEqual[t, -2e+42], t$95$2, If[LessEqual[t, -9.6e-15], t$95$1, If[LessEqual[t, -4.8e-68], t$95$2, If[Or[LessEqual[t, -7.5e-83], N[Not[LessEqual[t, 1360.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
t_2 := x - \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq -2 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -9.6 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.8 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 1360\right):\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186 or -4.79999999999999982e-68 < t < -7.4999999999999997e-83 or 1360 < t

    1. Initial program 66.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 79.4%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative79.4%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified79.4%

      \[\leadsto \color{blue}{y + x} \]

    if -6.4999999999999997e186 < t < -2.00000000000000009e42 or -9.5999999999999998e-15 < t < -4.79999999999999982e-68

    1. Initial program 91.5%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 81.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Taylor expanded in a around 0 76.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg76.9%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot z}{t}\right)} \]
      2. unsub-neg76.9%

        \[\leadsto \color{blue}{x - \frac{y \cdot z}{t}} \]
      3. associate-/l*79.8%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Simplified79.8%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{z}}} \]

    if -2.00000000000000009e42 < t < -9.5999999999999998e-15 or -7.4999999999999997e-83 < t < 1360

    1. Initial program 94.5%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.6%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 79.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. +-commutative79.4%

        \[\leadsto \color{blue}{\frac{y \cdot z}{a} + x} \]
      2. associate-/l*80.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    7. Simplified80.7%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}} + x} \]
    8. Step-by-step derivation
      1. associate-/r/83.5%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    9. Applied egg-rr83.5%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+42}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-15}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{-68}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 1360\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 69.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -7.6 \cdot 10^{+236}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -88:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-156}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y a)))))
   (if (<= x -7.6e+236)
     t_1
     (if (<= x -88.0)
       (- x (/ y (/ t z)))
       (if (<= x -2.9e-49)
         (+ x y)
         (if (<= x 1.85e-156) (* (- z t) (/ y (- a t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double tmp;
	if (x <= -7.6e+236) {
		tmp = t_1;
	} else if (x <= -88.0) {
		tmp = x - (y / (t / z));
	} else if (x <= -2.9e-49) {
		tmp = x + y;
	} else if (x <= 1.85e-156) {
		tmp = (z - t) * (y / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (z * (y / a))
    if (x <= (-7.6d+236)) then
        tmp = t_1
    else if (x <= (-88.0d0)) then
        tmp = x - (y / (t / z))
    else if (x <= (-2.9d-49)) then
        tmp = x + y
    else if (x <= 1.85d-156) then
        tmp = (z - t) * (y / (a - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double tmp;
	if (x <= -7.6e+236) {
		tmp = t_1;
	} else if (x <= -88.0) {
		tmp = x - (y / (t / z));
	} else if (x <= -2.9e-49) {
		tmp = x + y;
	} else if (x <= 1.85e-156) {
		tmp = (z - t) * (y / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	tmp = 0
	if x <= -7.6e+236:
		tmp = t_1
	elif x <= -88.0:
		tmp = x - (y / (t / z))
	elif x <= -2.9e-49:
		tmp = x + y
	elif x <= 1.85e-156:
		tmp = (z - t) * (y / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / a)))
	tmp = 0.0
	if (x <= -7.6e+236)
		tmp = t_1;
	elseif (x <= -88.0)
		tmp = Float64(x - Float64(y / Float64(t / z)));
	elseif (x <= -2.9e-49)
		tmp = Float64(x + y);
	elseif (x <= 1.85e-156)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / a));
	tmp = 0.0;
	if (x <= -7.6e+236)
		tmp = t_1;
	elseif (x <= -88.0)
		tmp = x - (y / (t / z));
	elseif (x <= -2.9e-49)
		tmp = x + y;
	elseif (x <= 1.85e-156)
		tmp = (z - t) * (y / (a - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.6e+236], t$95$1, If[LessEqual[x, -88.0], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-49], N[(x + y), $MachinePrecision], If[LessEqual[x, 1.85e-156], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -7.6 \cdot 10^{+236}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -88:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\

\mathbf{elif}\;x \leq -2.9 \cdot 10^{-49}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x \leq 1.85 \cdot 10^{-156}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -7.59999999999999973e236 or 1.85e-156 < x

    1. Initial program 87.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.4%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.4%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 74.8%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. +-commutative74.8%

        \[\leadsto \color{blue}{\frac{y \cdot z}{a} + x} \]
      2. associate-/l*73.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    7. Simplified73.2%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}} + x} \]
    8. Step-by-step derivation
      1. associate-/r/78.4%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    9. Applied egg-rr78.4%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]

    if -7.59999999999999973e236 < x < -88

    1. Initial program 89.5%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*97.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified97.8%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 93.7%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Taylor expanded in a around 0 74.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg74.7%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot z}{t}\right)} \]
      2. unsub-neg74.7%

        \[\leadsto \color{blue}{x - \frac{y \cdot z}{t}} \]
      3. associate-/l*74.7%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z}}} \]
    8. Simplified74.7%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{z}}} \]

    if -88 < x < -2.9e-49

    1. Initial program 79.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*100.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 79.7%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative79.7%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified79.7%

      \[\leadsto \color{blue}{y + x} \]

    if -2.9e-49 < x < 1.85e-156

    1. Initial program 78.6%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative78.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/95.1%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    3. Simplified95.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.2%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
      2. inv-pow93.2%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    6. Applied egg-rr93.2%

      \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    7. Step-by-step derivation
      1. unpow-193.2%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    8. Simplified93.2%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    9. Taylor expanded in y around -inf 64.2%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    10. Step-by-step derivation
      1. associate-*l/80.7%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      2. *-commutative80.7%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    11. Simplified80.7%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.6 \cdot 10^{+236}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -88:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{-156}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+212} \lor \neg \left(z \leq 5.2 \cdot 10^{+42}\right) \land \left(z \leq 9.5 \cdot 10^{+144} \lor \neg \left(z \leq 6 \cdot 10^{+182}\right)\right):\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -5.2e+212)
         (and (not (<= z 5.2e+42)) (or (<= z 9.5e+144) (not (<= z 6e+182)))))
   (* z (/ y (- a t)))
   (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -5.2e+212) || (!(z <= 5.2e+42) && ((z <= 9.5e+144) || !(z <= 6e+182)))) {
		tmp = z * (y / (a - t));
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-5.2d+212)) .or. (.not. (z <= 5.2d+42)) .and. (z <= 9.5d+144) .or. (.not. (z <= 6d+182))) then
        tmp = z * (y / (a - t))
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -5.2e+212) || (!(z <= 5.2e+42) && ((z <= 9.5e+144) || !(z <= 6e+182)))) {
		tmp = z * (y / (a - t));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -5.2e+212) or (not (z <= 5.2e+42) and ((z <= 9.5e+144) or not (z <= 6e+182))):
		tmp = z * (y / (a - t))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -5.2e+212) || (!(z <= 5.2e+42) && ((z <= 9.5e+144) || !(z <= 6e+182))))
		tmp = Float64(z * Float64(y / Float64(a - t)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -5.2e+212) || (~((z <= 5.2e+42)) && ((z <= 9.5e+144) || ~((z <= 6e+182)))))
		tmp = z * (y / (a - t));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e+212], And[N[Not[LessEqual[z, 5.2e+42]], $MachinePrecision], Or[LessEqual[z, 9.5e+144], N[Not[LessEqual[z, 6e+182]], $MachinePrecision]]]], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+212} \lor \neg \left(z \leq 5.2 \cdot 10^{+42}\right) \land \left(z \leq 9.5 \cdot 10^{+144} \lor \neg \left(z \leq 6 \cdot 10^{+182}\right)\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.1999999999999997e212 or 5.1999999999999998e42 < z < 9.50000000000000031e144 or 6.0000000000000004e182 < z

    1. Initial program 80.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative80.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/97.0%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def97.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    3. Simplified97.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num97.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
      2. inv-pow97.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    6. Applied egg-rr97.0%

      \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    7. Step-by-step derivation
      1. unpow-197.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    8. Simplified97.0%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    9. Taylor expanded in z around inf 63.9%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    10. Step-by-step derivation
      1. *-commutative63.9%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{a - t} \]
      2. associate-*r/73.4%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a - t}} \]
    11. Simplified73.4%

      \[\leadsto \color{blue}{z \cdot \frac{y}{a - t}} \]

    if -5.1999999999999997e212 < z < 5.1999999999999998e42 or 9.50000000000000031e144 < z < 6.0000000000000004e182

    1. Initial program 86.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*98.3%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified98.3%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 67.6%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative67.6%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified67.6%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+212} \lor \neg \left(z \leq 5.2 \cdot 10^{+42}\right) \land \left(z \leq 9.5 \cdot 10^{+144} \lor \neg \left(z \leq 6 \cdot 10^{+182}\right)\right):\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 80.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a - t}\\ \mathbf{if}\;x \leq -9.2 \cdot 10^{-75} \lor \neg \left(x \leq 1.75 \cdot 10^{-170}\right):\\ \;\;\;\;x + z \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (- a t))))
   (if (or (<= x -9.2e-75) (not (<= x 1.75e-170)))
     (+ x (* z t_1))
     (* (- z t) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a - t);
	double tmp;
	if ((x <= -9.2e-75) || !(x <= 1.75e-170)) {
		tmp = x + (z * t_1);
	} else {
		tmp = (z - t) * t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a - t)
    if ((x <= (-9.2d-75)) .or. (.not. (x <= 1.75d-170))) then
        tmp = x + (z * t_1)
    else
        tmp = (z - t) * t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a - t);
	double tmp;
	if ((x <= -9.2e-75) || !(x <= 1.75e-170)) {
		tmp = x + (z * t_1);
	} else {
		tmp = (z - t) * t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a - t)
	tmp = 0
	if (x <= -9.2e-75) or not (x <= 1.75e-170):
		tmp = x + (z * t_1)
	else:
		tmp = (z - t) * t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a - t))
	tmp = 0.0
	if ((x <= -9.2e-75) || !(x <= 1.75e-170))
		tmp = Float64(x + Float64(z * t_1));
	else
		tmp = Float64(Float64(z - t) * t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a - t);
	tmp = 0.0;
	if ((x <= -9.2e-75) || ~((x <= 1.75e-170)))
		tmp = x + (z * t_1);
	else
		tmp = (z - t) * t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -9.2e-75], N[Not[LessEqual[x, 1.75e-170]], $MachinePrecision]], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-75} \lor \neg \left(x \leq 1.75 \cdot 10^{-170}\right):\\
\;\;\;\;x + z \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.2e-75 or 1.74999999999999992e-170 < x

    1. Initial program 87.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*96.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 85.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*l/90.0%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative90.0%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Simplified90.0%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]

    if -9.2e-75 < x < 1.74999999999999992e-170

    1. Initial program 77.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative77.7%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      2. associate-*l/95.8%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} + x \]
      3. fma-def95.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    3. Simplified95.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num93.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
      2. inv-pow93.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    6. Applied egg-rr93.7%

      \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\frac{a - t}{y}\right)}^{-1}}, z - t, x\right) \]
    7. Step-by-step derivation
      1. unpow-193.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    8. Simplified93.7%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\frac{a - t}{y}}}, z - t, x\right) \]
    9. Taylor expanded in y around -inf 64.1%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    10. Step-by-step derivation
      1. associate-*l/82.2%

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      2. *-commutative82.2%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
    11. Simplified82.2%

      \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-75} \lor \neg \left(x \leq 1.75 \cdot 10^{-170}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a - t}\\ \mathbf{if}\;t \leq -3.2 \cdot 10^{+109} \lor \neg \left(t \leq 3.1 \cdot 10^{+125}\right):\\ \;\;\;\;x - t \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (- a t))))
   (if (or (<= t -3.2e+109) (not (<= t 3.1e+125)))
     (- x (* t t_1))
     (+ x (* z t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a - t);
	double tmp;
	if ((t <= -3.2e+109) || !(t <= 3.1e+125)) {
		tmp = x - (t * t_1);
	} else {
		tmp = x + (z * t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a - t)
    if ((t <= (-3.2d+109)) .or. (.not. (t <= 3.1d+125))) then
        tmp = x - (t * t_1)
    else
        tmp = x + (z * t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a - t);
	double tmp;
	if ((t <= -3.2e+109) || !(t <= 3.1e+125)) {
		tmp = x - (t * t_1);
	} else {
		tmp = x + (z * t_1);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a - t)
	tmp = 0
	if (t <= -3.2e+109) or not (t <= 3.1e+125):
		tmp = x - (t * t_1)
	else:
		tmp = x + (z * t_1)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a - t))
	tmp = 0.0
	if ((t <= -3.2e+109) || !(t <= 3.1e+125))
		tmp = Float64(x - Float64(t * t_1));
	else
		tmp = Float64(x + Float64(z * t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a - t);
	tmp = 0.0;
	if ((t <= -3.2e+109) || ~((t <= 3.1e+125)))
		tmp = x - (t * t_1);
	else
		tmp = x + (z * t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -3.2e+109], N[Not[LessEqual[t, 3.1e+125]], $MachinePrecision]], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+109} \lor \neg \left(t \leq 3.1 \cdot 10^{+125}\right):\\
\;\;\;\;x - t \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.2000000000000001e109 or 3.1e125 < t

    1. Initial program 61.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 55.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*r/55.9%

        \[\leadsto x + \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a - t}} \]
      2. mul-1-neg55.9%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{a - t} \]
      3. distribute-lft-neg-out55.9%

        \[\leadsto x + \frac{\color{blue}{\left(-t\right) \cdot y}}{a - t} \]
      4. associate-*r/90.5%

        \[\leadsto x + \color{blue}{\left(-t\right) \cdot \frac{y}{a - t}} \]
      5. distribute-lft-neg-out90.5%

        \[\leadsto x + \color{blue}{\left(-t \cdot \frac{y}{a - t}\right)} \]
      6. unsub-neg90.5%

        \[\leadsto \color{blue}{x - t \cdot \frac{y}{a - t}} \]
    7. Simplified90.5%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{a - t}} \]

    if -3.2000000000000001e109 < t < 3.1e125

    1. Initial program 95.2%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*96.5%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified96.5%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 86.9%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*l/89.5%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative89.5%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Simplified89.5%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+109} \lor \neg \left(t \leq 3.1 \cdot 10^{+125}\right):\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 87.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.0074 \lor \neg \left(t \leq 1.45 \cdot 10^{+76}\right):\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -0.0074) (not (<= t 1.45e+76)))
   (- x (/ y (/ t (- z t))))
   (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.0074) || !(t <= 1.45e+76)) {
		tmp = x - (y / (t / (z - t)));
	} else {
		tmp = x + (z * (y / (a - t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-0.0074d0)) .or. (.not. (t <= 1.45d+76))) then
        tmp = x - (y / (t / (z - t)))
    else
        tmp = x + (z * (y / (a - t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.0074) || !(t <= 1.45e+76)) {
		tmp = x - (y / (t / (z - t)));
	} else {
		tmp = x + (z * (y / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -0.0074) or not (t <= 1.45e+76):
		tmp = x - (y / (t / (z - t)))
	else:
		tmp = x + (z * (y / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -0.0074) || !(t <= 1.45e+76))
		tmp = Float64(x - Float64(y / Float64(t / Float64(z - t))));
	else
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -0.0074) || ~((t <= 1.45e+76)))
		tmp = x - (y / (t / (z - t)));
	else
		tmp = x + (z * (y / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.0074], N[Not[LessEqual[t, 1.45e+76]], $MachinePrecision]], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0074 \lor \neg \left(t \leq 1.45 \cdot 10^{+76}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0074000000000000003 or 1.4500000000000001e76 < t

    1. Initial program 70.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 65.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    6. Step-by-step derivation
      1. mul-1-neg65.3%

        \[\leadsto x + \color{blue}{\left(-\frac{y \cdot \left(z - t\right)}{t}\right)} \]
      2. unsub-neg65.3%

        \[\leadsto \color{blue}{x - \frac{y \cdot \left(z - t\right)}{t}} \]
      3. associate-/l*90.5%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z - t}}} \]
    7. Simplified90.5%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{z - t}}} \]

    if -0.0074000000000000003 < t < 1.4500000000000001e76

    1. Initial program 94.9%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 88.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*l/92.5%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative92.5%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Simplified92.5%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.0074 \lor \neg \left(t \leq 1.45 \cdot 10^{+76}\right):\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 84.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+123}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{t - a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -6.5e+186)
   (+ x y)
   (if (<= t 3.2e+123) (+ x (* z (/ y (- a t)))) (+ x (/ t (/ (- t a) y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= 3.2e+123) {
		tmp = x + (z * (y / (a - t)));
	} else {
		tmp = x + (t / ((t - a) / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-6.5d+186)) then
        tmp = x + y
    else if (t <= 3.2d+123) then
        tmp = x + (z * (y / (a - t)))
    else
        tmp = x + (t / ((t - a) / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= 3.2e+123) {
		tmp = x + (z * (y / (a - t)));
	} else {
		tmp = x + (t / ((t - a) / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -6.5e+186:
		tmp = x + y
	elif t <= 3.2e+123:
		tmp = x + (z * (y / (a - t)))
	else:
		tmp = x + (t / ((t - a) / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -6.5e+186)
		tmp = Float64(x + y);
	elseif (t <= 3.2e+123)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	else
		tmp = Float64(x + Float64(t / Float64(Float64(t - a) / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -6.5e+186)
		tmp = x + y;
	elseif (t <= 3.2e+123)
		tmp = x + (z * (y / (a - t)));
	else
		tmp = x + (t / ((t - a) / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+186], N[(x + y), $MachinePrecision], If[LessEqual[t, 3.2e+123], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+123}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{t - a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186

    1. Initial program 51.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 92.3%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative92.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified92.3%

      \[\leadsto \color{blue}{y + x} \]

    if -6.4999999999999997e186 < t < 3.20000000000000005e123

    1. Initial program 94.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*96.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified96.7%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 86.2%

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*l/88.7%

        \[\leadsto x + \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. *-commutative88.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]
    7. Simplified88.7%

      \[\leadsto x + \color{blue}{z \cdot \frac{y}{a - t}} \]

    if 3.20000000000000005e123 < t

    1. Initial program 62.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 89.8%

      \[\leadsto x + \frac{y}{\color{blue}{-1 \cdot \frac{a - t}{t}}} \]
    6. Step-by-step derivation
      1. associate-*r/89.8%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-1 \cdot \left(a - t\right)}{t}}} \]
      2. neg-mul-189.8%

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-\left(a - t\right)}}{t}} \]
    7. Simplified89.8%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{-\left(a - t\right)}{t}}} \]
    8. Taylor expanded in y around 0 56.5%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{t - a}} \]
    9. Step-by-step derivation
      1. associate-/l*89.7%

        \[\leadsto x + \color{blue}{\frac{t}{\frac{t - a}{y}}} \]
    10. Simplified89.7%

      \[\leadsto x + \color{blue}{\frac{t}{\frac{t - a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+123}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{t - a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.024 \lor \neg \left(t \leq 0.32\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -0.024) (not (<= t 0.32))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.024) || !(t <= 0.32)) {
		tmp = x + y;
	} else {
		tmp = x + (y * (z / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-0.024d0)) .or. (.not. (t <= 0.32d0))) then
        tmp = x + y
    else
        tmp = x + (y * (z / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.024) || !(t <= 0.32)) {
		tmp = x + y;
	} else {
		tmp = x + (y * (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -0.024) or not (t <= 0.32):
		tmp = x + y
	else:
		tmp = x + (y * (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -0.024) || !(t <= 0.32))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(y * Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -0.024) || ~((t <= 0.32)))
		tmp = x + y;
	else
		tmp = x + (y * (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.024], N[Not[LessEqual[t, 0.32]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.024 \lor \neg \left(t \leq 0.32\right):\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.024 or 0.320000000000000007 < t

    1. Initial program 72.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 73.7%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified73.7%

      \[\leadsto \color{blue}{y + x} \]

    if -0.024 < t < 0.320000000000000007

    1. Initial program 94.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.7%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num95.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y}}} \]
      2. associate-/r/95.7%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{z - t}} \cdot y} \]
      3. clear-num95.8%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t}} \cdot y \]
    6. Applied egg-rr95.8%

      \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    7. Taylor expanded in t around 0 79.4%

      \[\leadsto x + \color{blue}{\frac{z}{a}} \cdot y \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.024 \lor \neg \left(t \leq 0.32\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.055 \lor \neg \left(t \leq 0.011\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -0.055) (not (<= t 0.011))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.055) || !(t <= 0.011)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-0.055d0)) .or. (.not. (t <= 0.011d0))) then
        tmp = x + y
    else
        tmp = x + (z * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.055) || !(t <= 0.011)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -0.055) or not (t <= 0.011):
		tmp = x + y
	else:
		tmp = x + (z * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -0.055) || !(t <= 0.011))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(z * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -0.055) || ~((t <= 0.011)))
		tmp = x + y;
	else
		tmp = x + (z * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.055], N[Not[LessEqual[t, 0.011]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.055 \lor \neg \left(t \leq 0.011\right):\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0550000000000000003 or 0.010999999999999999 < t

    1. Initial program 72.0%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.9%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 73.7%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified73.7%

      \[\leadsto \color{blue}{y + x} \]

    if -0.0550000000000000003 < t < 0.010999999999999999

    1. Initial program 94.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.7%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 77.5%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. +-commutative77.5%

        \[\leadsto \color{blue}{\frac{y \cdot z}{a} + x} \]
      2. associate-/l*79.4%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    7. Simplified79.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}} + x} \]
    8. Step-by-step derivation
      1. associate-/r/81.4%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    9. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.055 \lor \neg \left(t \leq 0.011\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-83} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -5.5e-83) (not (<= t 2.6e+110))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -5.5e-83) || !(t <= 2.6e+110)) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-5.5d-83)) .or. (.not. (t <= 2.6d+110))) then
        tmp = x + y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -5.5e-83) || !(t <= 2.6e+110)) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -5.5e-83) or not (t <= 2.6e+110):
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -5.5e-83) || !(t <= 2.6e+110))
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -5.5e-83) || ~((t <= 2.6e+110)))
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.5e-83], N[Not[LessEqual[t, 2.6e+110]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-83} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.49999999999999964e-83 or 2.6e110 < t

    1. Initial program 71.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 73.5%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified73.5%

      \[\leadsto \color{blue}{y + x} \]

    if -5.49999999999999964e-83 < t < 2.6e110

    1. Initial program 95.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*95.6%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified95.6%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 52.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-83} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{a - t} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (a - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Derivation
  1. Initial program 84.6%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-/l*97.6%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num97.5%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y}}} \]
    2. associate-/r/97.6%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{z - t}} \cdot y} \]
    3. clear-num97.6%

      \[\leadsto x + \color{blue}{\frac{z - t}{a - t}} \cdot y \]
  6. Applied egg-rr97.6%

    \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot y} \]
  7. Final simplification97.6%

    \[\leadsto x + y \cdot \frac{z - t}{a - t} \]
  8. Add Preprocessing

Alternative 13: 51.7% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+153}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a) :precision binary64 (if (<= y -1.55e+153) y x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+153) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-1.55d+153)) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.55e+153) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -1.55e+153:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -1.55e+153)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -1.55e+153)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.55e+153], y, x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+153}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55e153

    1. Initial program 53.7%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*99.8%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 31.3%

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative31.3%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified31.3%

      \[\leadsto \color{blue}{y + x} \]
    8. Taylor expanded in y around inf 31.5%

      \[\leadsto \color{blue}{y} \]

    if -1.55e153 < y

    1. Initial program 89.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. associate-/l*97.2%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 56.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+153}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.2% accurate, 11.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 84.6%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. associate-/l*97.6%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
  3. Simplified97.6%

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 49.7%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification49.7%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y}{\frac{a - t}{z - t}} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a):
	return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y / ((a - t) / (z - t)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

  (+ x (/ (* y (- z t)) (- a t))))