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

Percentage Accurate: 85.0% → 98.5%
Time: 10.9s
Alternatives: 15
Speedup: 0.6×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\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 15 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+248}:\\
\;\;\;\;x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000021e35

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{z - a} + x \]
      5. associate-*r*99.8%

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

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

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

    if -5.00000000000000021e35 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.00000000000000005e248

    1. Initial program 99.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing

    if 1.00000000000000005e248 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{z - a} + x \]
      5. associate-*r*99.5%

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

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{z - a}} + x \]
    6. Applied egg-rr99.7%

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

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

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

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

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

Alternative 2: 98.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(z - a)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Derivation
  1. Initial program 85.9%

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

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

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

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

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

Alternative 3: 98.5% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000021e35 or 1.00000000000000005e248 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{z - a} + x \]
      5. associate-*r*99.7%

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

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

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

    if -5.00000000000000021e35 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.00000000000000005e248

    1. Initial program 99.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 4: 77.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+92}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-90}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\

\mathbf{elif}\;z \leq 2.65 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.4999999999999995e92 or 2.6500000000000002e28 < z

    1. Initial program 69.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.9%

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

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

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

    if -9.4999999999999995e92 < z < -9.99999999999999995e-91

    1. Initial program 97.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 75.7%

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

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

        \[\leadsto x + \left(-\color{blue}{t \cdot \frac{y}{z - a}}\right) \]
      3. distribute-rgt-neg-in78.4%

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{y}{z - a}\right)} \]
      4. distribute-frac-neg278.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. clear-num69.6%

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    10. Applied egg-rr69.6%

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

    if -9.99999999999999995e-91 < z < 2.6500000000000002e28

    1. Initial program 95.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+92}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-90}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+93}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-93}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999994e93 or 2.29999999999999984e28 < z

    1. Initial program 69.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.9%

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

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

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

    if -1.84999999999999994e93 < z < -1.8999999999999999e-93

    1. Initial program 97.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 75.7%

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

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

        \[\leadsto x + \left(-\color{blue}{t \cdot \frac{y}{z - a}}\right) \]
      3. distribute-rgt-neg-in78.4%

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{y}{z - a}\right)} \]
      4. distribute-frac-neg278.4%

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

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

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

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

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

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

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

    if -1.8999999999999999e-93 < z < 2.29999999999999984e28

    1. Initial program 95.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+93}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-93}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+94}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.94999999999999993e94

    1. Initial program 61.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 55.9%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{z - a}} \]
    5. Simplified91.6%

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

    if -1.94999999999999993e94 < z < 2.2499999999999998e165

    1. Initial program 95.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing

    if 2.2499999999999998e165 < z

    1. Initial program 48.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 48.5%

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

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

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

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

      \[\leadsto x + \color{blue}{y \cdot \left(1 - \frac{t}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 81.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-101} \lor \neg \left(z \leq 1.65 \cdot 10^{-92}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.49999999999999994e-101 or 1.64999999999999999e-92 < z

    1. Initial program 80.3%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 66.2%

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

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

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

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

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

    if -3.49999999999999994e-101 < z < 1.64999999999999999e-92

    1. Initial program 95.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 82.0%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative82.0%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a} + x} \]
    8. Step-by-step derivation
      1. clear-num84.9%

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

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

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

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

Alternative 8: 87.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+91}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 3.85 \cdot 10^{+28}:\\ \;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.9e+91)
   (+ x (* y (/ z (- z a))))
   (if (<= z 3.85e+28) (- x (/ t (/ (- z a) y))) (+ x (* y (- 1.0 (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e+91) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 3.85e+28) {
		tmp = x - (t / ((z - a) / y));
	} else {
		tmp = x + (y * (1.0 - (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) :: tmp
    if (z <= (-2.9d+91)) then
        tmp = x + (y * (z / (z - a)))
    else if (z <= 3.85d+28) then
        tmp = x - (t / ((z - a) / y))
    else
        tmp = x + (y * (1.0d0 - (t / z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e+91) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 3.85e+28) {
		tmp = x - (t / ((z - a) / y));
	} else {
		tmp = x + (y * (1.0 - (t / z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.9e+91:
		tmp = x + (y * (z / (z - a)))
	elif z <= 3.85e+28:
		tmp = x - (t / ((z - a) / y))
	else:
		tmp = x + (y * (1.0 - (t / z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.9e+91)
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	elseif (z <= 3.85e+28)
		tmp = Float64(x - Float64(t / Float64(Float64(z - a) / y)));
	else
		tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.9e+91)
		tmp = x + (y * (z / (z - a)));
	elseif (z <= 3.85e+28)
		tmp = x - (t / ((z - a) / y));
	else
		tmp = x + (y * (1.0 - (t / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+91], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.85e+28], N[(x - N[(t / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+91}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.90000000000000014e91

    1. Initial program 61.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 55.9%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{z - a}} \]
    5. Simplified91.6%

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

    if -2.90000000000000014e91 < z < 3.8499999999999999e28

    1. Initial program 95.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 86.3%

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

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

        \[\leadsto x + \left(-\color{blue}{t \cdot \frac{y}{z - a}}\right) \]
      3. distribute-rgt-neg-in88.7%

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{y}{z - a}\right)} \]
      4. distribute-frac-neg288.7%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{\sqrt{z - a} \cdot \sqrt{z - a}}} \cdot t \]
      6. add-sqr-sqrt53.6%

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

        \[\leadsto \color{blue}{x - \left(-\frac{y}{z - a}\right) \cdot t} \]
      8. distribute-frac-neg253.6%

        \[\leadsto x - \color{blue}{\frac{y}{-\left(z - a\right)}} \cdot t \]
      9. *-commutative53.6%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{-\left(z - a\right)}} \]
      10. clear-num53.6%

        \[\leadsto x - t \cdot \color{blue}{\frac{1}{\frac{-\left(z - a\right)}{y}}} \]
      11. un-div-inv53.6%

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

        \[\leadsto x - \frac{t}{\frac{\color{blue}{\sqrt{-\left(z - a\right)} \cdot \sqrt{-\left(z - a\right)}}}{y}} \]
      13. sqrt-unprod63.9%

        \[\leadsto x - \frac{t}{\frac{\color{blue}{\sqrt{\left(-\left(z - a\right)\right) \cdot \left(-\left(z - a\right)\right)}}}{y}} \]
      14. sqr-neg63.9%

        \[\leadsto x - \frac{t}{\frac{\sqrt{\color{blue}{\left(z - a\right) \cdot \left(z - a\right)}}}{y}} \]
      15. sqrt-unprod45.3%

        \[\leadsto x - \frac{t}{\frac{\color{blue}{\sqrt{z - a} \cdot \sqrt{z - a}}}{y}} \]
    7. Applied egg-rr88.8%

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

    if 3.8499999999999999e28 < z

    1. Initial program 76.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 67.0%

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

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

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

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

      \[\leadsto x + \color{blue}{y \cdot \left(1 - \frac{t}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 82.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-89}:\\
\;\;\;\;x + \left(y - t \cdot \frac{y}{z}\right)\\

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.00000000000000015e-89

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{z - a} + x \]
      5. associate-*r*95.0%

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

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{z - a}} + x \]
    6. Applied egg-rr95.1%

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{\frac{z - a}{y}}} + x \]
    9. Step-by-step derivation
      1. div-sub88.9%

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

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

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

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

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

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

    if -4.00000000000000015e-89 < z < 1.64999999999999999e-92

    1. Initial program 95.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 87.1%

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

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

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

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

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

    if 1.64999999999999999e-92 < z

    1. Initial program 84.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 69.0%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub82.4%

        \[\leadsto x + y \cdot \color{blue}{\left(\frac{z}{z} - \frac{t}{z}\right)} \]
      3. *-inverses82.4%

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

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

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

Alternative 10: 81.8% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.55e-93

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(z - t\right) \cdot y\right)} \cdot \frac{1}{z - a} + x \]
      5. associate-*r*95.0%

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

        \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{z - a}} + x \]
    6. Applied egg-rr95.1%

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{\frac{z - a}{y}}} + x \]
    9. Step-by-step derivation
      1. div-sub88.9%

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

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

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

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

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

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

    if -1.55e-93 < z < 1.64999999999999999e-92

    1. Initial program 95.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 82.0%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative82.0%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a} + x} \]
    8. Step-by-step derivation
      1. clear-num84.9%

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

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

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

    if 1.64999999999999999e-92 < z

    1. Initial program 84.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 69.0%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub82.4%

        \[\leadsto x + y \cdot \color{blue}{\left(\frac{z}{z} - \frac{t}{z}\right)} \]
      3. *-inverses82.4%

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

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

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

Alternative 11: 77.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+76} \lor \neg \left(z \leq 1.38 \cdot 10^{+28}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3999999999999999e76 or 1.38000000000000003e28 < z

    1. Initial program 70.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.8%

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

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

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

    if -1.3999999999999999e76 < z < 1.38000000000000003e28

    1. Initial program 95.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.3%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative73.3%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a} + x} \]
    8. Step-by-step derivation
      1. clear-num75.1%

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

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

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

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

Alternative 12: 76.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+78} \lor \neg \left(z \leq 1.8 \cdot 10^{+29}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.80000000000000014e78 or 1.79999999999999988e29 < z

    1. Initial program 70.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.8%

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

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

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

    if -6.80000000000000014e78 < z < 1.79999999999999988e29

    1. Initial program 95.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.3%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative73.3%

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

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

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

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

Alternative 13: 75.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+77} \lor \neg \left(z \leq 3.9 \cdot 10^{+28}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7999999999999999e77 or 3.8999999999999999e28 < z

    1. Initial program 70.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.8%

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

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

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

    if -1.7999999999999999e77 < z < 3.8999999999999999e28

    1. Initial program 95.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 73.3%

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

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

Alternative 14: 64.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-77} \lor \neg \left(z \leq 0.0034\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.7999999999999998e-77 or 0.00339999999999999981 < z

    1. Initial program 76.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 69.6%

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

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

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

    if -4.7999999999999998e-77 < z < 0.00339999999999999981

    1. Initial program 96.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 58.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-77} \lor \neg \left(z \leq 0.0034\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.1% 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 85.9%

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 51.6%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 98.4% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))

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