Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.1% → 94.1%
Time: 10.4s
Alternatives: 8
Speedup: 1.0×

Specification

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\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 8 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: 94.1% accurate, 1.0× speedup?

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

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

Alternative 1: 94.1% accurate, 1.0× speedup?

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Derivation
  1. Initial program 96.5%

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

Alternative 2: 93.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y + t}{z}\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 96.4%

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

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \frac{\color{blue}{y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t}}{z} \]
      3. metadata-evalN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      4. *-lft-identityN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. +-commutativeN/A

        \[\leadsto x \cdot \frac{\color{blue}{t + y}}{z} \]
      6. +-lowering-+.f6495.9

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

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

    if -1 < z < 1

    1. Initial program 96.7%

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

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

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

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

    Alternative 3: 74.3% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z + -1}\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 10^{+134}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (* x (/ t (+ z -1.0)))))
       (if (<= t -1.8e-7) t_1 (if (<= t 1e+134) (* x (/ y z)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = x * (t / (z + -1.0));
    	double tmp;
    	if (t <= -1.8e-7) {
    		tmp = t_1;
    	} else if (t <= 1e+134) {
    		tmp = x * (y / z);
    	} else {
    		tmp = t_1;
    	}
    	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) :: tmp
        t_1 = x * (t / (z + (-1.0d0)))
        if (t <= (-1.8d-7)) then
            tmp = t_1
        else if (t <= 1d+134) then
            tmp = x * (y / z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x * (t / (z + -1.0));
    	double tmp;
    	if (t <= -1.8e-7) {
    		tmp = t_1;
    	} else if (t <= 1e+134) {
    		tmp = x * (y / z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = x * (t / (z + -1.0))
    	tmp = 0
    	if t <= -1.8e-7:
    		tmp = t_1
    	elif t <= 1e+134:
    		tmp = x * (y / z)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(x * Float64(t / Float64(z + -1.0)))
    	tmp = 0.0
    	if (t <= -1.8e-7)
    		tmp = t_1;
    	elseif (t <= 1e+134)
    		tmp = Float64(x * Float64(y / z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = x * (t / (z + -1.0));
    	tmp = 0.0;
    	if (t <= -1.8e-7)
    		tmp = t_1;
    	elseif (t <= 1e+134)
    		tmp = x * (y / z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e-7], t$95$1, If[LessEqual[t, 1e+134], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \frac{t}{z + -1}\\
    \mathbf{if}\;t \leq -1.8 \cdot 10^{-7}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 10^{+134}:\\
    \;\;\;\;x \cdot \frac{y}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.79999999999999997e-7 or 9.99999999999999921e133 < t

      1. Initial program 99.8%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
        4. sub-negN/A

          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
        5. mul-1-negN/A

          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
        6. distribute-neg-inN/A

          \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
        7. metadata-evalN/A

          \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
        8. mul-1-negN/A

          \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
        9. remove-double-negN/A

          \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
        10. +-lowering-+.f6482.3

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

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

      if -1.79999999999999997e-7 < t < 9.99999999999999921e133

      1. Initial program 94.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f6485.2

          \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
      5. Simplified85.2%

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

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

    Alternative 4: 74.1% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (* x (/ t z))))
       (if (<= z -1.8e+62) t_1 (if (<= z 2.05e+33) (* x (- (/ y z) t)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = x * (t / z);
    	double tmp;
    	if (z <= -1.8e+62) {
    		tmp = t_1;
    	} else if (z <= 2.05e+33) {
    		tmp = x * ((y / z) - t);
    	} else {
    		tmp = t_1;
    	}
    	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) :: tmp
        t_1 = x * (t / z)
        if (z <= (-1.8d+62)) then
            tmp = t_1
        else if (z <= 2.05d+33) then
            tmp = x * ((y / z) - t)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x * (t / z);
    	double tmp;
    	if (z <= -1.8e+62) {
    		tmp = t_1;
    	} else if (z <= 2.05e+33) {
    		tmp = x * ((y / z) - t);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = x * (t / z)
    	tmp = 0
    	if z <= -1.8e+62:
    		tmp = t_1
    	elif z <= 2.05e+33:
    		tmp = x * ((y / z) - t)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(x * Float64(t / z))
    	tmp = 0.0
    	if (z <= -1.8e+62)
    		tmp = t_1;
    	elseif (z <= 2.05e+33)
    		tmp = Float64(x * Float64(Float64(y / z) - t));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = x * (t / z);
    	tmp = 0.0;
    	if (z <= -1.8e+62)
    		tmp = t_1;
    	elseif (z <= 2.05e+33)
    		tmp = x * ((y / z) - t);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+62], t$95$1, If[LessEqual[z, 2.05e+33], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \frac{t}{z}\\
    \mathbf{if}\;z \leq -1.8 \cdot 10^{+62}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 2.05 \cdot 10^{+33}:\\
    \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.8e62 or 2.04999999999999997e33 < z

      1. Initial program 95.9%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
        2. distribute-neg-frac2N/A

          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
        4. sub-negN/A

          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
        5. mul-1-negN/A

          \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
        6. distribute-neg-inN/A

          \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
        7. metadata-evalN/A

          \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
        8. mul-1-negN/A

          \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
        9. remove-double-negN/A

          \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
        10. +-lowering-+.f6466.3

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

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

        \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
      7. Step-by-step derivation
        1. Simplified66.3%

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

        if -1.8e62 < z < 2.04999999999999997e33

        1. Initial program 97.1%

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

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

            \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{t}\right) \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 5: 68.0% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -5 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+151}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* x (/ t z))))
           (if (<= t -5e+115) t_1 (if (<= t 4e+151) (* x (/ y z)) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = x * (t / z);
        	double tmp;
        	if (t <= -5e+115) {
        		tmp = t_1;
        	} else if (t <= 4e+151) {
        		tmp = x * (y / z);
        	} else {
        		tmp = t_1;
        	}
        	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) :: tmp
            t_1 = x * (t / z)
            if (t <= (-5d+115)) then
                tmp = t_1
            else if (t <= 4d+151) then
                tmp = x * (y / z)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = x * (t / z);
        	double tmp;
        	if (t <= -5e+115) {
        		tmp = t_1;
        	} else if (t <= 4e+151) {
        		tmp = x * (y / z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = x * (t / z)
        	tmp = 0
        	if t <= -5e+115:
        		tmp = t_1
        	elif t <= 4e+151:
        		tmp = x * (y / z)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(x * Float64(t / z))
        	tmp = 0.0
        	if (t <= -5e+115)
        		tmp = t_1;
        	elseif (t <= 4e+151)
        		tmp = Float64(x * Float64(y / z));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = x * (t / z);
        	tmp = 0.0;
        	if (t <= -5e+115)
        		tmp = t_1;
        	elseif (t <= 4e+151)
        		tmp = x * (y / z);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+115], t$95$1, If[LessEqual[t, 4e+151], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot \frac{t}{z}\\
        \mathbf{if}\;t \leq -5 \cdot 10^{+115}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 4 \cdot 10^{+151}:\\
        \;\;\;\;x \cdot \frac{y}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -5.00000000000000008e115 or 4.00000000000000007e151 < t

          1. Initial program 99.8%

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

            \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
            2. distribute-neg-frac2N/A

              \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
            4. sub-negN/A

              \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
            5. mul-1-negN/A

              \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
            6. distribute-neg-inN/A

              \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
            7. metadata-evalN/A

              \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
            8. mul-1-negN/A

              \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
            9. remove-double-negN/A

              \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
            10. +-lowering-+.f6487.7

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

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

            \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
          7. Step-by-step derivation
            1. Simplified67.3%

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

            if -5.00000000000000008e115 < t < 4.00000000000000007e151

            1. Initial program 95.3%

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

              \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f6477.6

                \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
            5. Simplified77.6%

              \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
          8. Recombined 2 regimes into one program.
          9. Add Preprocessing

          Alternative 6: 45.3% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* x (/ t z))))
             (if (<= z -0.75)
               t_1
               (if (<= z 3800000000000.0) (* t (- 0.0 (fma z x x))) t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = x * (t / z);
          	double tmp;
          	if (z <= -0.75) {
          		tmp = t_1;
          	} else if (z <= 3800000000000.0) {
          		tmp = t * (0.0 - fma(z, x, x));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	t_1 = Float64(x * Float64(t / z))
          	tmp = 0.0
          	if (z <= -0.75)
          		tmp = t_1;
          	elseif (z <= 3800000000000.0)
          		tmp = Float64(t * Float64(0.0 - fma(z, x, x)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, 3800000000000.0], N[(t * N[(0.0 - N[(z * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := x \cdot \frac{t}{z}\\
          \mathbf{if}\;z \leq -0.75:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 3800000000000:\\
          \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -0.75 or 3.8e12 < z

            1. Initial program 96.3%

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

              \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
              2. distribute-neg-frac2N/A

                \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
              3. /-lowering-/.f64N/A

                \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
              4. sub-negN/A

                \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
              5. mul-1-negN/A

                \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
              6. distribute-neg-inN/A

                \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
              7. metadata-evalN/A

                \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
              8. mul-1-negN/A

                \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
              9. remove-double-negN/A

                \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
              10. +-lowering-+.f6463.1

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

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

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

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

              if -0.75 < z < 3.8e12

              1. Initial program 96.8%

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

                \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
                2. distribute-neg-frac2N/A

                  \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                4. sub-negN/A

                  \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                5. mul-1-negN/A

                  \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                6. distribute-neg-inN/A

                  \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
                7. metadata-evalN/A

                  \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
                8. mul-1-negN/A

                  \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
                9. remove-double-negN/A

                  \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
                10. +-lowering-+.f6432.6

                  \[\leadsto x \cdot \frac{t}{\color{blue}{-1 + z}} \]
              5. Simplified32.6%

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

                \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)} \]
              7. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + -1 \cdot \left(t \cdot x\right)} \]
                2. associate-*r*N/A

                  \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z\right)} + -1 \cdot \left(t \cdot x\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(-1 \cdot t\right) \cdot \left(x \cdot z\right) + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
                4. distribute-lft-outN/A

                  \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z + x\right)} \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z + x\right)} \]
                6. mul-1-negN/A

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \left(x \cdot z + x\right) \]
                7. neg-sub0N/A

                  \[\leadsto \color{blue}{\left(0 - t\right)} \cdot \left(x \cdot z + x\right) \]
                8. --lowering--.f64N/A

                  \[\leadsto \color{blue}{\left(0 - t\right)} \cdot \left(x \cdot z + x\right) \]
                9. *-commutativeN/A

                  \[\leadsto \left(0 - t\right) \cdot \left(\color{blue}{z \cdot x} + x\right) \]
                10. accelerator-lowering-fma.f6432.7

                  \[\leadsto \left(0 - t\right) \cdot \color{blue}{\mathsf{fma}\left(z, x, x\right)} \]
              8. Simplified32.7%

                \[\leadsto \color{blue}{\left(0 - t\right) \cdot \mathsf{fma}\left(z, x, x\right)} \]
            8. Recombined 2 regimes into one program.
            9. Final simplification48.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 7: 43.2% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z}\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* t (/ x z))))
               (if (<= z -0.75)
                 t_1
                 (if (<= z 3800000000000.0) (* t (- 0.0 (fma z x x))) t_1))))
            double code(double x, double y, double z, double t) {
            	double t_1 = t * (x / z);
            	double tmp;
            	if (z <= -0.75) {
            		tmp = t_1;
            	} else if (z <= 3800000000000.0) {
            		tmp = t * (0.0 - fma(z, x, x));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	t_1 = Float64(t * Float64(x / z))
            	tmp = 0.0
            	if (z <= -0.75)
            		tmp = t_1;
            	elseif (z <= 3800000000000.0)
            		tmp = Float64(t * Float64(0.0 - fma(z, x, x)));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, 3800000000000.0], N[(t * N[(0.0 - N[(z * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := t \cdot \frac{x}{z}\\
            \mathbf{if}\;z \leq -0.75:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 3800000000000:\\
            \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -0.75 or 3.8e12 < z

              1. Initial program 96.3%

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

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

                  \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
                2. remove-double-negN/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - -1 \cdot t\right)\right)\right)\right)\right)} \cdot x}{z} \]
                3. neg-mul-1N/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(y - -1 \cdot t\right)}\right)\right) \cdot x}{z} \]
                4. distribute-lft-out--N/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(-1 \cdot y - -1 \cdot \left(-1 \cdot t\right)\right)}\right)\right) \cdot x}{z} \]
                5. neg-mul-1N/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{\left(\mathsf{neg}\left(-1 \cdot t\right)\right)}\right)\right)\right) \cdot x}{z} \]
                6. mul-1-negN/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right)\right) \cdot x}{z} \]
                7. remove-double-negN/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{t}\right)\right)\right) \cdot x}{z} \]
                8. distribute-lft-neg-inN/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(-1 \cdot y - t\right) \cdot x\right)}}{z} \]
                9. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{x \cdot \left(-1 \cdot y - t\right)}\right)}{z} \]
                10. mul-1-negN/A

                  \[\leadsto \frac{\color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot y - t\right)\right)}}{z} \]
                11. /-lowering-/.f64N/A

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

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(t + y, x, 0\right)}{z}} \]
              6. Step-by-step derivation
                1. +-rgt-identityN/A

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

                  \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
                4. +-lowering-+.f64N/A

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

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

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

                \[\leadsto \color{blue}{t} \cdot \frac{x}{z} \]
              9. Step-by-step derivation
                1. Simplified58.4%

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

                if -0.75 < z < 3.8e12

                1. Initial program 96.8%

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

                  \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
                  2. distribute-neg-frac2N/A

                    \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                  3. /-lowering-/.f64N/A

                    \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                  4. sub-negN/A

                    \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                  5. mul-1-negN/A

                    \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                  6. distribute-neg-inN/A

                    \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
                  7. metadata-evalN/A

                    \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
                  8. mul-1-negN/A

                    \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
                  9. remove-double-negN/A

                    \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
                  10. +-lowering-+.f6432.6

                    \[\leadsto x \cdot \frac{t}{\color{blue}{-1 + z}} \]
                5. Simplified32.6%

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

                  \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right) + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)} \]
                7. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + -1 \cdot \left(t \cdot x\right)} \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z\right)} + -1 \cdot \left(t \cdot x\right) \]
                  3. associate-*r*N/A

                    \[\leadsto \left(-1 \cdot t\right) \cdot \left(x \cdot z\right) + \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
                  4. distribute-lft-outN/A

                    \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z + x\right)} \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(x \cdot z + x\right)} \]
                  6. mul-1-negN/A

                    \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot \left(x \cdot z + x\right) \]
                  7. neg-sub0N/A

                    \[\leadsto \color{blue}{\left(0 - t\right)} \cdot \left(x \cdot z + x\right) \]
                  8. --lowering--.f64N/A

                    \[\leadsto \color{blue}{\left(0 - t\right)} \cdot \left(x \cdot z + x\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \left(0 - t\right) \cdot \left(\color{blue}{z \cdot x} + x\right) \]
                  10. accelerator-lowering-fma.f6432.7

                    \[\leadsto \left(0 - t\right) \cdot \color{blue}{\mathsf{fma}\left(z, x, x\right)} \]
                8. Simplified32.7%

                  \[\leadsto \color{blue}{\left(0 - t\right) \cdot \mathsf{fma}\left(z, x, x\right)} \]
              10. Recombined 2 regimes into one program.
              11. Final simplification45.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;t \cdot \left(0 - \mathsf{fma}\left(z, x, x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
              12. Add Preprocessing

              Alternative 8: 23.4% accurate, 3.8× speedup?

              \[\begin{array}{l} \\ x \cdot \left(0 - t\right) \end{array} \]
              (FPCore (x y z t) :precision binary64 (* x (- 0.0 t)))
              double code(double x, double y, double z, double t) {
              	return x * (0.0 - t);
              }
              
              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 * (0.0d0 - t)
              end function
              
              public static double code(double x, double y, double z, double t) {
              	return x * (0.0 - t);
              }
              
              def code(x, y, z, t):
              	return x * (0.0 - t)
              
              function code(x, y, z, t)
              	return Float64(x * Float64(0.0 - t))
              end
              
              function tmp = code(x, y, z, t)
              	tmp = x * (0.0 - t);
              end
              
              code[x_, y_, z_, t_] := N[(x * N[(0.0 - t), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x \cdot \left(0 - t\right)
              \end{array}
              
              Derivation
              1. Initial program 96.5%

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

                \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{t}{1 - z}\right)} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
                2. distribute-neg-frac2N/A

                  \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                4. sub-negN/A

                  \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                5. mul-1-negN/A

                  \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                6. distribute-neg-inN/A

                  \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)}} \]
                7. metadata-evalN/A

                  \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)} \]
                8. mul-1-negN/A

                  \[\leadsto x \cdot \frac{t}{-1 + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)} \]
                9. remove-double-negN/A

                  \[\leadsto x \cdot \frac{t}{-1 + \color{blue}{z}} \]
                10. +-lowering-+.f6448.3

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

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

                \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
              7. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot x\right)} \]
                2. neg-sub0N/A

                  \[\leadsto \color{blue}{0 - t \cdot x} \]
                3. --lowering--.f64N/A

                  \[\leadsto \color{blue}{0 - t \cdot x} \]
                4. *-lowering-*.f6421.8

                  \[\leadsto 0 - \color{blue}{t \cdot x} \]
              8. Simplified21.8%

                \[\leadsto \color{blue}{0 - t \cdot x} \]
              9. Final simplification21.8%

                \[\leadsto x \cdot \left(0 - t\right) \]
              10. Add Preprocessing

              Developer Target 1: 94.6% accurate, 0.3× speedup?

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

              Reproduce

              ?
              herbie shell --seed 2024195 
              (FPCore (x y z t)
                :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
                :precision binary64
              
                :alt
                (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))
              
                (* x (- (/ y z) (/ t (- 1.0 z)))))