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

Percentage Accurate: 85.8% → 98.4%
Time: 9.2s
Alternatives: 10
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 10 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.8% 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.4% 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}
Derivation
  1. Initial program 83.8%

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

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

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

      \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
    2. un-div-inv98.2%

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

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

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

Alternative 2: 84.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.9 \cdot 10^{+119}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-222}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-55}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+122}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -5.9e+119)
   (+ x y)
   (if (<= t -2.25e-222)
     (+ x (* z (/ y (- a t))))
     (if (<= t 2.75e-55)
       (+ x (* y (/ (- z t) a)))
       (if (<= t 1.12e+122) (+ x (* y (/ z (- a t)))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -5.9e+119) {
		tmp = x + y;
	} else if (t <= -2.25e-222) {
		tmp = x + (z * (y / (a - t)));
	} else if (t <= 2.75e-55) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 1.12e+122) {
		tmp = x + (y * (z / (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 (t <= (-5.9d+119)) then
        tmp = x + y
    else if (t <= (-2.25d-222)) then
        tmp = x + (z * (y / (a - t)))
    else if (t <= 2.75d-55) then
        tmp = x + (y * ((z - t) / a))
    else if (t <= 1.12d+122) then
        tmp = x + (y * (z / (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 (t <= -5.9e+119) {
		tmp = x + y;
	} else if (t <= -2.25e-222) {
		tmp = x + (z * (y / (a - t)));
	} else if (t <= 2.75e-55) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 1.12e+122) {
		tmp = x + (y * (z / (a - t)));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -5.9e+119:
		tmp = x + y
	elif t <= -2.25e-222:
		tmp = x + (z * (y / (a - t)))
	elif t <= 2.75e-55:
		tmp = x + (y * ((z - t) / a))
	elif t <= 1.12e+122:
		tmp = x + (y * (z / (a - t)))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -5.9e+119)
		tmp = Float64(x + y);
	elseif (t <= -2.25e-222)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	elseif (t <= 2.75e-55)
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a)));
	elseif (t <= 1.12e+122)
		tmp = Float64(x + Float64(y * Float64(z / 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 (t <= -5.9e+119)
		tmp = x + y;
	elseif (t <= -2.25e-222)
		tmp = x + (z * (y / (a - t)));
	elseif (t <= 2.75e-55)
		tmp = x + (y * ((z - t) / a));
	elseif (t <= 1.12e+122)
		tmp = x + (y * (z / (a - t)));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.9e+119], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.25e-222], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e-55], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+122], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.9000000000000001e119 or 1.12000000000000002e122 < t

    1. Initial program 68.2%

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

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

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

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

    if -5.9000000000000001e119 < t < -2.25000000000000007e-222

    1. Initial program 92.7%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      2. un-div-inv96.0%

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

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

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

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

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

    if -2.25000000000000007e-222 < t < 2.7499999999999999e-55

    1. Initial program 92.5%

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

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

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

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

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

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

    if 2.7499999999999999e-55 < t < 1.12000000000000002e122

    1. Initial program 87.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.9 \cdot 10^{+119}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-222}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-55}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+122}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a - t}\\ t_2 := x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-226}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y (- a t))))) (t_2 (- x (* y (+ (/ z t) -1.0)))))
   (if (<= t -1.55e+115)
     t_2
     (if (<= t -2.8e-226)
       t_1
       (if (<= t 2.5e-30)
         (+ x (* y (/ (- z t) a)))
         (if (<= t 2.3e+54) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (a - t)));
	double t_2 = x - (y * ((z / t) + -1.0));
	double tmp;
	if (t <= -1.55e+115) {
		tmp = t_2;
	} else if (t <= -2.8e-226) {
		tmp = t_1;
	} else if (t <= 2.5e-30) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 2.3e+54) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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)))
    t_2 = x - (y * ((z / t) + (-1.0d0)))
    if (t <= (-1.55d+115)) then
        tmp = t_2
    else if (t <= (-2.8d-226)) then
        tmp = t_1
    else if (t <= 2.5d-30) then
        tmp = x + (y * ((z - t) / a))
    else if (t <= 2.3d+54) then
        tmp = t_1
    else
        tmp = t_2
    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 - t)));
	double t_2 = x - (y * ((z / t) + -1.0));
	double tmp;
	if (t <= -1.55e+115) {
		tmp = t_2;
	} else if (t <= -2.8e-226) {
		tmp = t_1;
	} else if (t <= 2.5e-30) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 2.3e+54) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / (a - t)))
	t_2 = x - (y * ((z / t) + -1.0))
	tmp = 0
	if t <= -1.55e+115:
		tmp = t_2
	elif t <= -2.8e-226:
		tmp = t_1
	elif t <= 2.5e-30:
		tmp = x + (y * ((z - t) / a))
	elif t <= 2.3e+54:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t))))
	t_2 = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0)))
	tmp = 0.0
	if (t <= -1.55e+115)
		tmp = t_2;
	elseif (t <= -2.8e-226)
		tmp = t_1;
	elseif (t <= 2.5e-30)
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a)));
	elseif (t <= 2.3e+54)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / (a - t)));
	t_2 = x - (y * ((z / t) + -1.0));
	tmp = 0.0;
	if (t <= -1.55e+115)
		tmp = t_2;
	elseif (t <= -2.8e-226)
		tmp = t_1;
	elseif (t <= 2.5e-30)
		tmp = x + (y * ((z - t) / a));
	elseif (t <= 2.3e+54)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+115], t$95$2, If[LessEqual[t, -2.8e-226], t$95$1, If[LessEqual[t, 2.5e-30], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+54], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
t_2 := x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.55000000000000002e115 or 2.29999999999999994e54 < t

    1. Initial program 68.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified99.9%

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

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

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

        \[\leadsto x + \left(-\color{blue}{y \cdot \frac{z - t}{t}}\right) \]
      3. distribute-lft-neg-in91.0%

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \frac{z - t}{t}} \]
      4. div-sub91.0%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)} \]
      5. sub-neg91.0%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(\frac{z}{t} + \left(-\frac{t}{t}\right)\right)} \]
      6. *-inverses91.0%

        \[\leadsto x + \left(-y\right) \cdot \left(\frac{z}{t} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval91.0%

        \[\leadsto x + \left(-y\right) \cdot \left(\frac{z}{t} + \color{blue}{-1}\right) \]
    7. Simplified91.0%

      \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(\frac{z}{t} + -1\right)} \]

    if -1.55000000000000002e115 < t < -2.80000000000000008e-226 or 2.49999999999999986e-30 < t < 2.29999999999999994e54

    1. Initial program 93.4%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      2. un-div-inv96.9%

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

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

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

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

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

    if -2.80000000000000008e-226 < t < 2.49999999999999986e-30

    1. Initial program 93.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-226}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+54}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a - t}\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-219}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y (- a t))))))
   (if (<= t -1.55e+115)
     (- x (* y (+ (/ z t) -1.0)))
     (if (<= t -4e-219)
       t_1
       (if (<= t 4.5e-30)
         (+ x (* y (/ (- z t) a)))
         (if (<= t 2e+54) t_1 (+ x (/ y (/ t (- t z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / (a - t)));
	double tmp;
	if (t <= -1.55e+115) {
		tmp = x - (y * ((z / t) + -1.0));
	} else if (t <= -4e-219) {
		tmp = t_1;
	} else if (t <= 4.5e-30) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 2e+54) {
		tmp = t_1;
	} else {
		tmp = x + (y / (t / (t - z)));
	}
	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 - t)))
    if (t <= (-1.55d+115)) then
        tmp = x - (y * ((z / t) + (-1.0d0)))
    else if (t <= (-4d-219)) then
        tmp = t_1
    else if (t <= 4.5d-30) then
        tmp = x + (y * ((z - t) / a))
    else if (t <= 2d+54) then
        tmp = t_1
    else
        tmp = x + (y / (t / (t - z)))
    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 - t)));
	double tmp;
	if (t <= -1.55e+115) {
		tmp = x - (y * ((z / t) + -1.0));
	} else if (t <= -4e-219) {
		tmp = t_1;
	} else if (t <= 4.5e-30) {
		tmp = x + (y * ((z - t) / a));
	} else if (t <= 2e+54) {
		tmp = t_1;
	} else {
		tmp = x + (y / (t / (t - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / (a - t)))
	tmp = 0
	if t <= -1.55e+115:
		tmp = x - (y * ((z / t) + -1.0))
	elif t <= -4e-219:
		tmp = t_1
	elif t <= 4.5e-30:
		tmp = x + (y * ((z - t) / a))
	elif t <= 2e+54:
		tmp = t_1
	else:
		tmp = x + (y / (t / (t - z)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t))))
	tmp = 0.0
	if (t <= -1.55e+115)
		tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0)));
	elseif (t <= -4e-219)
		tmp = t_1;
	elseif (t <= 4.5e-30)
		tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a)));
	elseif (t <= 2e+54)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y / Float64(t / Float64(t - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / (a - t)));
	tmp = 0.0;
	if (t <= -1.55e+115)
		tmp = x - (y * ((z / t) + -1.0));
	elseif (t <= -4e-219)
		tmp = t_1;
	elseif (t <= 4.5e-30)
		tmp = x + (y * ((z - t) / a));
	elseif (t <= 2e+54)
		tmp = t_1;
	else
		tmp = x + (y / (t / (t - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+115], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e-219], t$95$1, If[LessEqual[t, 4.5e-30], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+54], t$95$1, N[(x + N[(y / N[(t / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\

\mathbf{elif}\;t \leq -4 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.55000000000000002e115

    1. Initial program 68.3%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \frac{z - t}{t}} \]
      4. div-sub87.5%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)} \]
      5. sub-neg87.5%

        \[\leadsto x + \left(-y\right) \cdot \color{blue}{\left(\frac{z}{t} + \left(-\frac{t}{t}\right)\right)} \]
      6. *-inverses87.5%

        \[\leadsto x + \left(-y\right) \cdot \left(\frac{z}{t} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval87.5%

        \[\leadsto x + \left(-y\right) \cdot \left(\frac{z}{t} + \color{blue}{-1}\right) \]
    7. Simplified87.5%

      \[\leadsto x + \color{blue}{\left(-y\right) \cdot \left(\frac{z}{t} + -1\right)} \]

    if -1.55000000000000002e115 < t < -4.0000000000000001e-219 or 4.49999999999999967e-30 < t < 2.0000000000000002e54

    1. Initial program 93.4%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      2. un-div-inv96.9%

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

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

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

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

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

    if -4.0000000000000001e-219 < t < 4.49999999999999967e-30

    1. Initial program 93.1%

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

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

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

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

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

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

    if 2.0000000000000002e54 < t

    1. Initial program 68.5%

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      2. un-div-inv99.9%

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{-\frac{t}{z - t}}} \]
      2. distribute-neg-frac293.3%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{t}{-\left(z - t\right)}}} \]
      3. neg-sub093.3%

        \[\leadsto x + \frac{y}{\frac{t}{\color{blue}{0 - \left(z - t\right)}}} \]
      4. associate--r-93.3%

        \[\leadsto x + \frac{y}{\frac{t}{\color{blue}{\left(0 - z\right) + t}}} \]
      5. neg-sub093.3%

        \[\leadsto x + \frac{y}{\frac{t}{\color{blue}{\left(-z\right)} + t}} \]
    9. Simplified93.3%

      \[\leadsto x + \frac{y}{\color{blue}{\frac{t}{\left(-z\right) + t}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-219}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+54}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{+116} \lor \neg \left(t \leq 2 \cdot 10^{+122}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.52e+116) (not (<= t 2e+122)))
   (+ x y)
   (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.52e+116) || !(t <= 2e+122)) {
		tmp = x + y;
	} else {
		tmp = x + (y * (z / (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 <= (-1.52d+116)) .or. (.not. (t <= 2d+122))) then
        tmp = x + y
    else
        tmp = x + (y * (z / (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 <= -1.52e+116) || !(t <= 2e+122)) {
		tmp = x + y;
	} else {
		tmp = x + (y * (z / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -1.52e+116) or not (t <= 2e+122):
		tmp = x + y
	else:
		tmp = x + (y * (z / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.52e+116) || !(t <= 2e+122))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(y * Float64(z / Float64(a - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -1.52e+116) || ~((t <= 2e+122)))
		tmp = x + y;
	else
		tmp = x + (y * (z / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.52e+116], N[Not[LessEqual[t, 2e+122]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{+116} \lor \neg \left(t \leq 2 \cdot 10^{+122}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.52e116 or 2.00000000000000003e122 < t

    1. Initial program 68.2%

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

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

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

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

    if -1.52e116 < t < 2.00000000000000003e122

    1. Initial program 91.2%

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

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

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

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

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

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

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

Alternative 6: 65.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-32} \lor \neg \left(t \leq 980000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.6000000000000001e-32 or 9.8e8 < t

    1. Initial program 74.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified99.9%

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

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

    if -4.6000000000000001e-32 < t < 9.8e8

    1. Initial program 95.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{-1 \cdot \left(t \cdot y\right)}}{a} \]
    7. Step-by-step derivation
      1. mul-1-neg53.8%

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{a} \]
      2. distribute-lft-neg-out53.8%

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot \left(-t\right)}}{a} \]
    9. Step-by-step derivation
      1. div-inv53.8%

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

        \[\leadsto x + \color{blue}{\left(\left(-t\right) \cdot y\right)} \cdot \frac{1}{a} \]
      3. associate-*l*55.1%

        \[\leadsto x + \color{blue}{\left(-t\right) \cdot \left(y \cdot \frac{1}{a}\right)} \]
      4. add-sqr-sqrt23.4%

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

        \[\leadsto x + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot \left(y \cdot \frac{1}{a}\right) \]
      6. sqr-neg47.9%

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

        \[\leadsto x + \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \left(y \cdot \frac{1}{a}\right) \]
      8. add-sqr-sqrt53.2%

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

        \[\leadsto x + t \cdot \color{blue}{\frac{y}{a}} \]
    10. Applied egg-rr53.2%

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

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

Alternative 7: 77.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+103} \lor \neg \left(t \leq 6.5 \cdot 10^{+40}\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 -8.8e+103) (not (<= t 6.5e+40))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -8.8e+103) || !(t <= 6.5e+40)) {
		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 <= (-8.8d+103)) .or. (.not. (t <= 6.5d+40))) 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 <= -8.8e+103) || !(t <= 6.5e+40)) {
		tmp = x + y;
	} else {
		tmp = x + (y * (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -8.8e+103) or not (t <= 6.5e+40):
		tmp = x + y
	else:
		tmp = x + (y * (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -8.8e+103) || !(t <= 6.5e+40))
		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 <= -8.8e+103) || ~((t <= 6.5e+40)))
		tmp = x + y;
	else
		tmp = x + (y * (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.8e+103], N[Not[LessEqual[t, 6.5e+40]], $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 -8.8 \cdot 10^{+103} \lor \neg \left(t \leq 6.5 \cdot 10^{+40}\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 < -8.7999999999999997e103 or 6.5000000000000001e40 < t

    1. Initial program 69.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified99.9%

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

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

    if -8.7999999999999997e103 < t < 6.5000000000000001e40

    1. Initial program 94.1%

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

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

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

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

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

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

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

Alternative 8: 63.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+93}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -5.2e+37) x (if (<= a 1.7e+93) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -5.2e+37) {
		tmp = x;
	} else if (a <= 1.7e+93) {
		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 (a <= (-5.2d+37)) then
        tmp = x
    else if (a <= 1.7d+93) 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 (a <= -5.2e+37) {
		tmp = x;
	} else if (a <= 1.7e+93) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -5.2e+37:
		tmp = x
	elif a <= 1.7e+93:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -5.2e+37)
		tmp = x;
	elseif (a <= 1.7e+93)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -5.2e+37)
		tmp = x;
	elseif (a <= 1.7e+93)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e+37], x, If[LessEqual[a, 1.7e+93], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{+37}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+93}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.1999999999999998e37 or 1.7e93 < a

    1. Initial program 84.8%

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    6. Taylor expanded in x around inf 65.3%

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

    if -5.1999999999999998e37 < a < 1.7e93

    1. Initial program 83.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+93}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 98.3% 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 83.8%

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

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

    \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
  4. Add Preprocessing
  5. Final simplification98.0%

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

Alternative 10: 52.0% 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 83.8%

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

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

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

    \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
  6. Taylor expanded in x around inf 49.3%

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

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 98.4% 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 2024074 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :alt
  (+ x (/ y (/ (- a t) (- z t))))

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