Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A

Percentage Accurate: 89.7% → 96.7%
Time: 13.4s
Alternatives: 10
Speedup: 0.3×

Specification

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

\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\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: 89.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot t - x\\ t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{+159}:\\ \;\;\;\;y \cdot \frac{\frac{z}{t\_1}}{x + 1}\\ \mathbf{elif}\;t\_2 \leq 10^{+285}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
   (if (<= t_2 -4e+159)
     (* y (/ (/ z t_1) (+ x 1.0)))
     (if (<= t_2 1e+285) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_2 <= -4e+159) {
		tmp = y * ((z / t_1) / (x + 1.0));
	} else if (t_2 <= 1e+285) {
		tmp = t_2;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z * t) - x
    t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0d0)
    if (t_2 <= (-4d+159)) then
        tmp = y * ((z / t_1) / (x + 1.0d0))
    else if (t_2 <= 1d+285) then
        tmp = t_2
    else
        tmp = (x + (y / t)) / (x + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * t) - x;
	double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	double tmp;
	if (t_2 <= -4e+159) {
		tmp = y * ((z / t_1) / (x + 1.0));
	} else if (t_2 <= 1e+285) {
		tmp = t_2;
	} else {
		tmp = (x + (y / t)) / (x + 1.0);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * t) - x
	t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0)
	tmp = 0
	if t_2 <= -4e+159:
		tmp = y * ((z / t_1) / (x + 1.0))
	elif t_2 <= 1e+285:
		tmp = t_2
	else:
		tmp = (x + (y / t)) / (x + 1.0)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * t) - x)
	t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0))
	tmp = 0.0
	if (t_2 <= -4e+159)
		tmp = Float64(y * Float64(Float64(z / t_1) / Float64(x + 1.0)));
	elseif (t_2 <= 1e+285)
		tmp = t_2;
	else
		tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * t) - x;
	t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
	tmp = 0.0;
	if (t_2 <= -4e+159)
		tmp = y * ((z / t_1) / (x + 1.0));
	elseif (t_2 <= 1e+285)
		tmp = t_2;
	else
		tmp = (x + (y / t)) / (x + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+159], N[(y * N[(N[(z / t$95$1), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+285], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+159}:\\
\;\;\;\;y \cdot \frac{\frac{z}{t\_1}}{x + 1}\\

\mathbf{elif}\;t\_2 \leq 10^{+285}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -3.9999999999999997e159

    1. Initial program 66.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative66.6%

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

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

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

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

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

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

        \[\leadsto \frac{y}{x + 1} \cdot \frac{z}{\color{blue}{z \cdot t} - x} \]
      4. associate-*l/95.0%

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

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

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

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

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

    if -3.9999999999999997e159 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999998e284

    1. Initial program 98.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Add Preprocessing

    if 9.9999999999999998e284 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64)))

    1. Initial program 23.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative23.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative85.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq -4 \cdot 10^{+159}:\\ \;\;\;\;y \cdot \frac{\frac{z}{z \cdot t - x}}{x + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1} \leq 10^{+285}:\\ \;\;\;\;\frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 81.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-145} \lor \neg \left(t \leq 3.1 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5000000000000002e-145 or 3.0999999999999997e-76 < t

    1. Initial program 83.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative83.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative82.6%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified82.6%

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

    if -6.5000000000000002e-145 < t < 3.0999999999999997e-76

    1. Initial program 91.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative91.6%

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

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

      \[\leadsto \color{blue}{\frac{1 + \left(x + -1 \cdot \frac{y \cdot z}{x}\right)}{1 + x}} \]
    6. Step-by-step derivation
      1. associate-+r+80.8%

        \[\leadsto \frac{\color{blue}{\left(1 + x\right) + -1 \cdot \frac{y \cdot z}{x}}}{1 + x} \]
      2. +-commutative80.8%

        \[\leadsto \frac{\color{blue}{\left(x + 1\right)} + -1 \cdot \frac{y \cdot z}{x}}{1 + x} \]
      3. mul-1-neg80.8%

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

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

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

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

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

Alternative 3: 81.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-145} \lor \neg \left(t \leq 3.75 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.90000000000000029e-145 or 3.7499999999999998e-76 < t

    1. Initial program 83.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative83.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative82.6%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified82.6%

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

    if -3.90000000000000029e-145 < t < 3.7499999999999998e-76

    1. Initial program 91.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative91.6%

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

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

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

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

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

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

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

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

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

Alternative 4: 80.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-145} \lor \neg \left(t \leq 2.5 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.50000000000000015e-145 or 2.4999999999999999e-76 < t

    1. Initial program 83.9%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative83.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative82.6%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified82.6%

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

    if -5.50000000000000015e-145 < t < 2.4999999999999999e-76

    1. Initial program 91.6%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative91.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}} \]
    8. Taylor expanded in y around 0 80.7%

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

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

Alternative 5: 67.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.8 \cdot 10^{-113}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 2.25 \cdot 10^{-166}:\\ \;\;\;\;\frac{y}{t}\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(1 - x\right)\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -3.8e-113)
   1.0
   (if (<= x 2.25e-166) (/ y t) (if (<= x 1.7e-8) (* x (- 1.0 x)) 1.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.8e-113) {
		tmp = 1.0;
	} else if (x <= 2.25e-166) {
		tmp = y / t;
	} else if (x <= 1.7e-8) {
		tmp = x * (1.0 - x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-3.8d-113)) then
        tmp = 1.0d0
    else if (x <= 2.25d-166) then
        tmp = y / t
    else if (x <= 1.7d-8) then
        tmp = x * (1.0d0 - x)
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.8e-113) {
		tmp = 1.0;
	} else if (x <= 2.25e-166) {
		tmp = y / t;
	} else if (x <= 1.7e-8) {
		tmp = x * (1.0 - x);
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -3.8e-113:
		tmp = 1.0
	elif x <= 2.25e-166:
		tmp = y / t
	elif x <= 1.7e-8:
		tmp = x * (1.0 - x)
	else:
		tmp = 1.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -3.8e-113)
		tmp = 1.0;
	elseif (x <= 2.25e-166)
		tmp = Float64(y / t);
	elseif (x <= 1.7e-8)
		tmp = Float64(x * Float64(1.0 - x));
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -3.8e-113)
		tmp = 1.0;
	elseif (x <= 2.25e-166)
		tmp = y / t;
	elseif (x <= 1.7e-8)
		tmp = x * (1.0 - x);
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.8e-113], 1.0, If[LessEqual[x, 2.25e-166], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.7e-8], N[(x * N[(1.0 - x), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-113}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 2.25 \cdot 10^{-166}:\\
\;\;\;\;\frac{y}{t}\\

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(1 - x\right)\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.79999999999999983e-113 or 1.7e-8 < x

    1. Initial program 84.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.7%

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

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

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

    if -3.79999999999999983e-113 < x < 2.2499999999999999e-166

    1. Initial program 88.5%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.5%

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

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

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

    if 2.2499999999999999e-166 < x < 1.7e-8

    1. Initial program 90.1%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative90.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative63.7%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{\frac{y}{t} + x}}} \]
      2. inv-pow63.5%

        \[\leadsto \color{blue}{{\left(\frac{x + 1}{\frac{y}{t} + x}\right)}^{-1}} \]
      3. +-commutative63.5%

        \[\leadsto {\left(\frac{x + 1}{\color{blue}{x + \frac{y}{t}}}\right)}^{-1} \]
    9. Applied egg-rr63.5%

      \[\leadsto \color{blue}{{\left(\frac{x + 1}{x + \frac{y}{t}}\right)}^{-1}} \]
    10. Step-by-step derivation
      1. unpow-163.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{x + 1}{x + \frac{y}{t}}}} \]
      2. +-commutative63.5%

        \[\leadsto \frac{1}{\frac{\color{blue}{1 + x}}{x + \frac{y}{t}}} \]
    11. Simplified63.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{1 + x}{x + \frac{y}{t}}}} \]
    12. Taylor expanded in y around 0 38.3%

      \[\leadsto \frac{1}{\color{blue}{\frac{1 + x}{x}}} \]
    13. Step-by-step derivation
      1. +-commutative38.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{x + 1}}{x}} \]
    14. Simplified38.3%

      \[\leadsto \frac{1}{\color{blue}{\frac{x + 1}{x}}} \]
    15. Taylor expanded in x around 0 38.5%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot x\right)} \]
    16. Step-by-step derivation
      1. neg-mul-138.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-x\right)}\right) \]
      2. sub-neg38.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - x\right)} \]
    17. Simplified38.5%

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

Alternative 6: 75.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-156} \lor \neg \left(z \leq 2.6 \cdot 10^{-181}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.59999999999999999e-156 or 2.59999999999999999e-181 < z

    1. Initial program 82.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative82.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative77.2%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified77.2%

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

    if -3.59999999999999999e-156 < z < 2.59999999999999999e-181

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative99.7%

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

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

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

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

Alternative 7: 77.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+62}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.75e14

    1. Initial program 85.7%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative85.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1 + \left(x - y \cdot \frac{z}{x}\right)}{x + 1}} \]
    8. Taylor expanded in x around inf 90.4%

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

    if -1.75e14 < x < 1.10000000000000007e62

    1. Initial program 88.4%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative88.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative67.4%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified67.4%

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

    if 1.10000000000000007e62 < x

    1. Initial program 82.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative82.0%

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

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

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

        \[\leadsto \frac{x}{\color{blue}{x + 1}} \]
    7. Simplified91.7%

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

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

Alternative 8: 75.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-84}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.2000000000000001e-84 or 4.20000000000000039e-9 < x

    1. Initial program 84.0%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.0%

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

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

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

    if -8.2000000000000001e-84 < x < 4.20000000000000039e-9

    1. Initial program 89.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative89.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} + x}}{1 + x} \]
      2. +-commutative69.0%

        \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{x + 1}} \]
    7. Simplified69.0%

      \[\leadsto \color{blue}{\frac{\frac{y}{t} + x}{x + 1}} \]
    8. Taylor expanded in x around 0 68.7%

      \[\leadsto \frac{\frac{y}{t} + x}{\color{blue}{1}} \]
    9. Taylor expanded in y around 0 68.7%

      \[\leadsto \color{blue}{x + \frac{y}{t}} \]
    10. Step-by-step derivation
      1. +-commutative68.7%

        \[\leadsto \color{blue}{\frac{y}{t} + x} \]
    11. Simplified68.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.2 \cdot 10^{-84}:\\ \;\;\;\;1\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-9}:\\ \;\;\;\;x + \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-112}:\\
\;\;\;\;1\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.7000000000000001e-112 or 9.4999999999999995e-12 < x

    1. Initial program 84.8%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative84.8%

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

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

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

    if -2.7000000000000001e-112 < x < 9.4999999999999995e-12

    1. Initial program 89.2%

      \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
    2. Step-by-step derivation
      1. *-commutative89.2%

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

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

      \[\leadsto \color{blue}{\frac{y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 53.9% accurate, 17.0× speedup?

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

\\
1
\end{array}
Derivation
  1. Initial program 86.7%

    \[\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1} \]
  2. Step-by-step derivation
    1. *-commutative86.7%

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

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

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

Developer Target 1: 99.5% accurate, 0.8× speedup?

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

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

Reproduce

?
herbie shell --seed 2024160 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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