System.Random.MWC.Distributions:truncatedExp from mwc-random-0.13.3.2

Percentage Accurate: 61.1% → 98.6%
Time: 25.7s
Alternatives: 16
Speedup: 211.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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: 61.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{\mathsf{log1p}\left(\frac{y}{\frac{1}{\mathsf{expm1}\left(z\right)}}\right)}{t} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- x (/ (log1p (/ y (/ 1.0 (expm1 z)))) t)))
double code(double x, double y, double z, double t) {
	return x - (log1p((y / (1.0 / expm1(z)))) / t);
}
public static double code(double x, double y, double z, double t) {
	return x - (Math.log1p((y / (1.0 / Math.expm1(z)))) / t);
}
def code(x, y, z, t):
	return x - (math.log1p((y / (1.0 / math.expm1(z)))) / t)
function code(x, y, z, t)
	return Float64(x - Float64(log1p(Float64(y / Float64(1.0 / expm1(z)))) / t))
end
code[x_, y_, z_, t_] := N[(x - N[(N[Log[1 + N[(y / N[(1.0 / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{\mathsf{log1p}\left(\frac{y}{\frac{1}{\mathsf{expm1}\left(z\right)}}\right)}{t}
\end{array}
Derivation
  1. Initial program 57.9%

    \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
  2. Step-by-step derivation
    1. --lowering--.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
    3. sub-negN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
    4. associate-+l+N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    5. log1p-defineN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    6. log1p-lowering-log1p.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    7. neg-mul-1N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
    9. distribute-rgt-outN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
    11. +-commutativeN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
    12. metadata-evalN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
    14. expm1-defineN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
    15. expm1-lowering-expm1.f6497.8%

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
  3. Simplified97.8%

    \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. flip--N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \frac{e^{z} \cdot e^{z} - 1 \cdot 1}{e^{z} + 1}\right)\right), t\right)\right) \]
    2. clear-numN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \frac{1}{\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}}\right)\right), t\right)\right) \]
    3. un-div-invN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\frac{y}{\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}}\right)\right), t\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}\right)\right)\right), t\right)\right) \]
    5. clear-numN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{1}{\frac{e^{z} \cdot e^{z} - 1 \cdot 1}{e^{z} + 1}}\right)\right)\right), t\right)\right) \]
    6. flip--N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{1}{e^{z} - 1}\right)\right)\right), t\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \left(e^{z} - 1\right)\right)\right)\right), t\right)\right) \]
    8. expm1-defineN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right), t\right)\right) \]
    9. expm1-lowering-expm1.f6497.8%

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{expm1.f64}\left(z\right)\right)\right)\right), t\right)\right) \]
  6. Applied egg-rr97.8%

    \[\leadsto x - \frac{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{1}{\mathsf{expm1}\left(z\right)}}}\right)}{t} \]
  7. Add Preprocessing

Alternative 2: 94.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + y \cdot \left(z \cdot 0.5\right)\right)\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (exp z) 0.0)
   (+ x (/ -1.0 (/ (+ (* 0.5 (* y t)) (/ t (expm1 z))) y)))
   (- x (/ (log1p (* z (+ y (* y (* z 0.5))))) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (exp(z) <= 0.0) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / expm1(z))) / y));
	} else {
		tmp = x - (log1p((z * (y + (y * (z * 0.5))))) / t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (Math.exp(z) <= 0.0) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / Math.expm1(z))) / y));
	} else {
		tmp = x - (Math.log1p((z * (y + (y * (z * 0.5))))) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if math.exp(z) <= 0.0:
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / math.expm1(z))) / y))
	else:
		tmp = x - (math.log1p((z * (y + (y * (z * 0.5))))) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (exp(z) <= 0.0)
		tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(0.5 * Float64(y * t)) + Float64(t / expm1(z))) / y)));
	else
		tmp = Float64(x - Float64(log1p(Float64(z * Float64(y + Float64(y * Float64(z * 0.5))))) / t));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / N[(N[(N[(0.5 * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[1 + N[(z * N[(y + N[(y * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (exp.f64 z) < 0.0

    1. Initial program 81.7%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6484.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified84.2%

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

    if 0.0 < (exp.f64 z)

    1. Initial program 49.0%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6497.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified97.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\color{blue}{\left(z \cdot \left(y + \frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)}\right), t\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \left(y + \frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)\right), t\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\left(\frac{1}{2} \cdot y\right) \cdot z\right)\right)\right)\right), t\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\left(y \cdot \frac{1}{2}\right) \cdot z\right)\right)\right)\right), t\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(y \cdot \left(\frac{1}{2} \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \left(z \cdot \frac{1}{2}\right)\right)\right)\right)\right), t\right)\right) \]
      8. *-lowering-*.f6498.1%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \frac{1}{2}\right)\right)\right)\right)\right), t\right)\right) \]
    7. Simplified98.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;e^{z} \leq 0:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + y \cdot \left(z \cdot 0.5\right)\right)\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (- x (/ (log1p (* y (expm1 z))) t)))
double code(double x, double y, double z, double t) {
	return x - (log1p((y * expm1(z))) / t);
}
public static double code(double x, double y, double z, double t) {
	return x - (Math.log1p((y * Math.expm1(z))) / t);
}
def code(x, y, z, t):
	return x - (math.log1p((y * math.expm1(z))) / t)
function code(x, y, z, t)
	return Float64(x - Float64(log1p(Float64(y * expm1(z))) / t))
end
code[x_, y_, z_, t_] := N[(x - N[(N[Log[1 + N[(y * N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
  2. Step-by-step derivation
    1. --lowering--.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
    3. sub-negN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
    4. associate-+l+N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    5. log1p-defineN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    6. log1p-lowering-log1p.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
    7. neg-mul-1N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
    9. distribute-rgt-outN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
    11. +-commutativeN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
    12. metadata-evalN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
    14. expm1-defineN/A

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
    15. expm1-lowering-expm1.f6497.8%

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
  3. Simplified97.8%

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

Alternative 4: 94.3% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.088:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(\frac{y}{\frac{1}{z \cdot \left(1 + z \cdot \left(0.5 + z \cdot \left(0.16666666666666666 + z \cdot 0.041666666666666664\right)\right)\right)}}\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -0.088)
   (+ x (/ -1.0 (/ (+ (* 0.5 (* y t)) (/ t (expm1 z))) y)))
   (-
    x
    (/
     (log1p
      (/
       y
       (/
        1.0
        (*
         z
         (+
          1.0
          (*
           z
           (+
            0.5
            (* z (+ 0.16666666666666666 (* z 0.041666666666666664))))))))))
     t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.088) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / expm1(z))) / y));
	} else {
		tmp = x - (log1p((y / (1.0 / (z * (1.0 + (z * (0.5 + (z * (0.16666666666666666 + (z * 0.041666666666666664)))))))))) / t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.088) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / Math.expm1(z))) / y));
	} else {
		tmp = x - (Math.log1p((y / (1.0 / (z * (1.0 + (z * (0.5 + (z * (0.16666666666666666 + (z * 0.041666666666666664)))))))))) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -0.088:
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / math.expm1(z))) / y))
	else:
		tmp = x - (math.log1p((y / (1.0 / (z * (1.0 + (z * (0.5 + (z * (0.16666666666666666 + (z * 0.041666666666666664)))))))))) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -0.088)
		tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(0.5 * Float64(y * t)) + Float64(t / expm1(z))) / y)));
	else
		tmp = Float64(x - Float64(log1p(Float64(y / Float64(1.0 / Float64(z * Float64(1.0 + Float64(z * Float64(0.5 + Float64(z * Float64(0.16666666666666666 + Float64(z * 0.041666666666666664)))))))))) / t));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.088], N[(x + N[(-1.0 / N[(N[(N[(0.5 * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[1 + N[(y / N[(1.0 / N[(z * N[(1.0 + N[(z * N[(0.5 + N[(z * N[(0.16666666666666666 + N[(z * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.088:\\
\;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\

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


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

    1. Initial program 81.7%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6484.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified84.2%

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

    if -0.087999999999999995 < z

    1. Initial program 49.0%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6497.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified97.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. flip--N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \frac{e^{z} \cdot e^{z} - 1 \cdot 1}{e^{z} + 1}\right)\right), t\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \frac{1}{\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}}\right)\right), t\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\frac{y}{\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}}\right)\right), t\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{e^{z} + 1}{e^{z} \cdot e^{z} - 1 \cdot 1}\right)\right)\right), t\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{1}{\frac{e^{z} \cdot e^{z} - 1 \cdot 1}{e^{z} + 1}}\right)\right)\right), t\right)\right) \]
      6. flip--N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{1}{e^{z} - 1}\right)\right)\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \left(e^{z} - 1\right)\right)\right)\right), t\right)\right) \]
      8. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right), t\right)\right) \]
      9. expm1-lowering-expm1.f6497.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{expm1.f64}\left(z\right)\right)\right)\right), t\right)\right) \]
    6. Applied egg-rr97.0%

      \[\leadsto x - \frac{\mathsf{log1p}\left(\color{blue}{\frac{y}{\frac{1}{\mathsf{expm1}\left(z\right)}}}\right)}{t} \]
    7. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \color{blue}{\left(z \cdot \left(1 + z \cdot \left(\frac{1}{2} + z \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)}\right)\right)\right), t\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \left(1 + z \cdot \left(\frac{1}{2} + z \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \left(z \cdot \left(\frac{1}{2} + z \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \left(\frac{1}{2} + z \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{2}, \left(z \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(z, \left(\frac{1}{6} + \frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{6}, \left(\frac{1}{24} \cdot z\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{6}, \left(z \cdot \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
      8. *-lowering-*.f6498.1%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(z, \frac{1}{24}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), t\right)\right) \]
    9. Simplified98.1%

      \[\leadsto x - \frac{\mathsf{log1p}\left(\frac{y}{\frac{1}{\color{blue}{z \cdot \left(1 + z \cdot \left(0.5 + z \cdot \left(0.16666666666666666 + z \cdot 0.041666666666666664\right)\right)\right)}}}\right)}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.088:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(\frac{y}{\frac{1}{z \cdot \left(1 + z \cdot \left(0.5 + z \cdot \left(0.16666666666666666 + z \cdot 0.041666666666666664\right)\right)\right)}}\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 92.5% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+38}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(y \cdot z\right)}{t}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+53}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + y \cdot \left(z \cdot 0.5\right)\right)\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -7.6e+38)
   (- x (/ (log1p (* y z)) t))
   (if (<= y 2e+53)
     (- x (* y (/ (expm1 z) t)))
     (- x (/ (log1p (* z (+ y (* y (* z 0.5))))) t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -7.6e+38) {
		tmp = x - (log1p((y * z)) / t);
	} else if (y <= 2e+53) {
		tmp = x - (y * (expm1(z) / t));
	} else {
		tmp = x - (log1p((z * (y + (y * (z * 0.5))))) / t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -7.6e+38) {
		tmp = x - (Math.log1p((y * z)) / t);
	} else if (y <= 2e+53) {
		tmp = x - (y * (Math.expm1(z) / t));
	} else {
		tmp = x - (Math.log1p((z * (y + (y * (z * 0.5))))) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -7.6e+38:
		tmp = x - (math.log1p((y * z)) / t)
	elif y <= 2e+53:
		tmp = x - (y * (math.expm1(z) / t))
	else:
		tmp = x - (math.log1p((z * (y + (y * (z * 0.5))))) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -7.6e+38)
		tmp = Float64(x - Float64(log1p(Float64(y * z)) / t));
	elseif (y <= 2e+53)
		tmp = Float64(x - Float64(y * Float64(expm1(z) / t)));
	else
		tmp = Float64(x - Float64(log1p(Float64(z * Float64(y + Float64(y * Float64(z * 0.5))))) / t));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+38], N[(x - N[(N[Log[1 + N[(y * z), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+53], N[(x - N[(y * N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[1 + N[(z * N[(y + N[(y * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2 \cdot 10^{+53}:\\
\;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.5999999999999996e38

    1. Initial program 44.8%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\color{blue}{\left(y \cdot z\right)}\right), t\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6475.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, z\right)\right), t\right)\right) \]
    7. Simplified75.2%

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

    if -7.5999999999999996e38 < y < 2e53

    1. Initial program 72.9%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot \left(e^{z} - 1\right)}{t}\right)}\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right), \color{blue}{t}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right), t\right)\right) \]
      3. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right), t\right)\right) \]
      4. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right), t\right)\right) \]
    7. Simplified98.4%

      \[\leadsto x - \color{blue}{\frac{y \cdot \mathsf{expm1}\left(z\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{e^{z} - 1}{t}}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{e^{z} - 1}{t} \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{e^{z} - 1}{t}\right), \color{blue}{y}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{z} - 1\right), t\right), y\right)\right) \]
      5. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{expm1}\left(z\right)\right), t\right), y\right)\right) \]
      6. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(z\right), t\right), y\right)\right) \]
    9. Applied egg-rr99.9%

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

    if 2e53 < y

    1. Initial program 3.0%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6490.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified90.8%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\color{blue}{\left(z \cdot \left(y + \frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)}\right), t\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \left(y + \frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)\right), t\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\frac{1}{2} \cdot \left(y \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\left(\frac{1}{2} \cdot y\right) \cdot z\right)\right)\right)\right), t\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(\left(y \cdot \frac{1}{2}\right) \cdot z\right)\right)\right)\right), t\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(y \cdot \left(\frac{1}{2} \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot z\right)\right)\right)\right)\right), t\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \left(z \cdot \frac{1}{2}\right)\right)\right)\right)\right), t\right)\right) \]
      8. *-lowering-*.f6497.3%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \frac{1}{2}\right)\right)\right)\right)\right), t\right)\right) \]
    7. Simplified97.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.6 \cdot 10^{+38}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(y \cdot z\right)}{t}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+53}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + y \cdot \left(z \cdot 0.5\right)\right)\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 94.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0295:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + z \cdot \left(y \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right)\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -0.0295)
   (+ x (/ -1.0 (/ (+ (* 0.5 (* y t)) (/ t (expm1 z))) y)))
   (-
    x
    (/ (log1p (* z (+ y (* z (* y (+ 0.5 (* z 0.16666666666666666))))))) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.0295) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / expm1(z))) / y));
	} else {
		tmp = x - (log1p((z * (y + (z * (y * (0.5 + (z * 0.16666666666666666))))))) / t);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -0.0295) {
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / Math.expm1(z))) / y));
	} else {
		tmp = x - (Math.log1p((z * (y + (z * (y * (0.5 + (z * 0.16666666666666666))))))) / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -0.0295:
		tmp = x + (-1.0 / (((0.5 * (y * t)) + (t / math.expm1(z))) / y))
	else:
		tmp = x - (math.log1p((z * (y + (z * (y * (0.5 + (z * 0.16666666666666666))))))) / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -0.0295)
		tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(0.5 * Float64(y * t)) + Float64(t / expm1(z))) / y)));
	else
		tmp = Float64(x - Float64(log1p(Float64(z * Float64(y + Float64(z * Float64(y * Float64(0.5 + Float64(z * 0.16666666666666666))))))) / t));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.0295], N[(x + N[(-1.0 / N[(N[(N[(0.5 * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[1 + N[(z * N[(y + N[(z * N[(y * N[(0.5 + N[(z * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0295:\\
\;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + z \cdot \left(y \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right)\right)}{t}\\


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

    1. Initial program 81.7%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6484.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified84.2%

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

    if -0.029499999999999998 < z

    1. Initial program 49.0%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6497.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified97.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\color{blue}{\left(z \cdot \left(y + z \cdot \left(\frac{1}{6} \cdot \left(y \cdot z\right) + \frac{1}{2} \cdot y\right)\right)\right)}\right), t\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \left(y + z \cdot \left(\frac{1}{6} \cdot \left(y \cdot z\right) + \frac{1}{2} \cdot y\right)\right)\right)\right), t\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \left(z \cdot \left(\frac{1}{6} \cdot \left(y \cdot z\right) + \frac{1}{2} \cdot y\right)\right)\right)\right)\right), t\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \left(\frac{1}{6} \cdot \left(y \cdot z\right) + \frac{1}{2} \cdot y\right)\right)\right)\right)\right), t\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{1}{6} \cdot \left(y \cdot z\right)\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\left(\frac{1}{6} \cdot y\right) \cdot z\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\left(y \cdot \frac{1}{6}\right) \cdot z\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(y \cdot \left(\frac{1}{6} \cdot z\right)\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \left(\frac{1}{6} \cdot z\right)\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \left(z \cdot \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \frac{1}{6}\right)\right), \left(\frac{1}{2} \cdot y\right)\right)\right)\right)\right)\right), t\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \frac{1}{6}\right)\right), \left(y \cdot \frac{1}{2}\right)\right)\right)\right)\right)\right), t\right)\right) \]
      12. *-lowering-*.f6498.1%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \frac{1}{6}\right)\right), \mathsf{*.f64}\left(y, \frac{1}{2}\right)\right)\right)\right)\right)\right), t\right)\right) \]
    7. Simplified98.1%

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(y + z \cdot \left(y \cdot \left(z \cdot \frac{1}{6}\right) + y \cdot \frac{1}{2}\right)\right) \cdot z\right)\right), t\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\left(y + z \cdot \left(y \cdot \left(z \cdot \frac{1}{6}\right) + y \cdot \frac{1}{2}\right)\right), z\right)\right), t\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \left(z \cdot \left(y \cdot \left(z \cdot \frac{1}{6}\right) + y \cdot \frac{1}{2}\right)\right)\right), z\right)\right), t\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \left(y \cdot \left(z \cdot \frac{1}{6}\right) + y \cdot \frac{1}{2}\right)\right)\right), z\right)\right), t\right)\right) \]
      5. distribute-lft-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \left(y \cdot \left(z \cdot \frac{1}{6} + \frac{1}{2}\right)\right)\right)\right), z\right)\right), t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \left(z \cdot \frac{1}{6} + \frac{1}{2}\right)\right)\right)\right), z\right)\right), t\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \left(\frac{1}{2} + z \cdot \frac{1}{6}\right)\right)\right)\right), z\right)\right), t\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{2}, \left(z \cdot \frac{1}{6}\right)\right)\right)\right)\right), z\right)\right), t\right)\right) \]
      9. *-lowering-*.f6498.1%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(z, \frac{1}{6}\right)\right)\right)\right)\right), z\right)\right), t\right)\right) \]
    9. Applied egg-rr98.1%

      \[\leadsto x - \frac{\mathsf{log1p}\left(\color{blue}{\left(y + z \cdot \left(y \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right) \cdot z}\right)}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0295:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(z \cdot \left(y + z \cdot \left(y \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\right)\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 92.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\mathsf{log1p}\left(y \cdot z\right)}{t}\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- x (/ (log1p (* y z)) t))))
   (if (<= y -7.5e+38) t_1 (if (<= y 2e+49) (- x (* y (/ (expm1 z) t))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x - (log1p((y * z)) / t);
	double tmp;
	if (y <= -7.5e+38) {
		tmp = t_1;
	} else if (y <= 2e+49) {
		tmp = x - (y * (expm1(z) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x - (Math.log1p((y * z)) / t);
	double tmp;
	if (y <= -7.5e+38) {
		tmp = t_1;
	} else if (y <= 2e+49) {
		tmp = x - (y * (Math.expm1(z) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x - (math.log1p((y * z)) / t)
	tmp = 0
	if y <= -7.5e+38:
		tmp = t_1
	elif y <= 2e+49:
		tmp = x - (y * (math.expm1(z) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x - Float64(log1p(Float64(y * z)) / t))
	tmp = 0.0
	if (y <= -7.5e+38)
		tmp = t_1;
	elseif (y <= 2e+49)
		tmp = Float64(x - Float64(y * Float64(expm1(z) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[Log[1 + N[(y * z), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+38], t$95$1, If[LessEqual[y, 2e+49], N[(x - N[(y * N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\
\;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4999999999999999e38 or 1.99999999999999989e49 < y

    1. Initial program 29.8%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6496.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\color{blue}{\left(y \cdot z\right)}\right), t\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6483.1%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, z\right)\right), t\right)\right) \]
    7. Simplified83.1%

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

    if -7.4999999999999999e38 < y < 1.99999999999999989e49

    1. Initial program 72.9%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot \left(e^{z} - 1\right)}{t}\right)}\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right), \color{blue}{t}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right), t\right)\right) \]
      3. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right), t\right)\right) \]
      4. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right), t\right)\right) \]
    7. Simplified98.4%

      \[\leadsto x - \color{blue}{\frac{y \cdot \mathsf{expm1}\left(z\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{e^{z} - 1}{t}}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{e^{z} - 1}{t} \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{e^{z} - 1}{t}\right), \color{blue}{y}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{z} - 1\right), t\right), y\right)\right) \]
      5. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{expm1}\left(z\right)\right), t\right), y\right)\right) \]
      6. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(z\right), t\right), y\right)\right) \]
    9. Applied egg-rr99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+38}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(y \cdot z\right)}{t}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{log1p}\left(y \cdot z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 89.7% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{1}{\frac{\frac{z \cdot \left(0.5 \cdot \left(t - y \cdot t\right)\right) - t}{z}}{y}}\\ \mathbf{if}\;y \leq -7 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+60}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ x (/ 1.0 (/ (/ (- (* z (* 0.5 (- t (* y t)))) t) z) y)))))
   (if (<= y -7e+38) t_1 (if (<= y 9.5e+60) (- x (* y (/ (expm1 z) t))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x + (1.0 / ((((z * (0.5 * (t - (y * t)))) - t) / z) / y));
	double tmp;
	if (y <= -7e+38) {
		tmp = t_1;
	} else if (y <= 9.5e+60) {
		tmp = x - (y * (expm1(z) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = x + (1.0 / ((((z * (0.5 * (t - (y * t)))) - t) / z) / y));
	double tmp;
	if (y <= -7e+38) {
		tmp = t_1;
	} else if (y <= 9.5e+60) {
		tmp = x - (y * (Math.expm1(z) / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x + (1.0 / ((((z * (0.5 * (t - (y * t)))) - t) / z) / y))
	tmp = 0
	if y <= -7e+38:
		tmp = t_1
	elif y <= 9.5e+60:
		tmp = x - (y * (math.expm1(z) / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x + Float64(1.0 / Float64(Float64(Float64(Float64(z * Float64(0.5 * Float64(t - Float64(y * t)))) - t) / z) / y)))
	tmp = 0.0
	if (y <= -7e+38)
		tmp = t_1;
	elseif (y <= 9.5e+60)
		tmp = Float64(x - Float64(y * Float64(expm1(z) / t)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(1.0 / N[(N[(N[(N[(z * N[(0.5 * N[(t - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+38], t$95$1, If[LessEqual[y, 9.5e+60], N[(x - N[(y * N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+60}:\\
\;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.00000000000000003e38 or 9.49999999999999988e60 < y

    1. Initial program 30.4%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6496.5%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified96.5%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6496.5%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr96.5%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6459.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified59.6%

      \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(\frac{t + z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)}{z}\right)}, y\right)\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t + z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right), z\right), y\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \left(z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right)\right), z\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right)\right), z\right), y\right)\right)\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot \left(t \cdot y - t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y - t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\left(t \cdot y\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\left(y \cdot t\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      8. *-lowering-*.f6467.3%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, t\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
    12. Simplified67.3%

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

    if -7.00000000000000003e38 < y < 9.49999999999999988e60

    1. Initial program 72.1%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot \left(e^{z} - 1\right)}{t}\right)}\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right), \color{blue}{t}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right), t\right)\right) \]
      3. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right), t\right)\right) \]
      4. expm1-lowering-expm1.f6498.4%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right), t\right)\right) \]
    7. Simplified98.4%

      \[\leadsto x - \color{blue}{\frac{y \cdot \mathsf{expm1}\left(z\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{e^{z} - 1}{t}}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{e^{z} - 1}{t} \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{e^{z} - 1}{t}\right), \color{blue}{y}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{z} - 1\right), t\right), y\right)\right) \]
      5. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{expm1}\left(z\right)\right), t\right), y\right)\right) \]
      6. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(z\right), t\right), y\right)\right) \]
    9. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{\mathsf{expm1}\left(z\right)}{t} \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+38}:\\ \;\;\;\;x + \frac{1}{\frac{\frac{z \cdot \left(0.5 \cdot \left(t - y \cdot t\right)\right) - t}{z}}{y}}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+60}:\\ \;\;\;\;x - y \cdot \frac{\mathsf{expm1}\left(z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{1}{\frac{\frac{z \cdot \left(0.5 \cdot \left(t - y \cdot t\right)\right) - t}{z}}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 84.3% accurate, 8.4× speedup?

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

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

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

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


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

    1. Initial program 69.9%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr99.8%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6484.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified84.0%

      \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{z \cdot \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right) + \frac{t}{y}}{z}\right)}\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right) + \frac{t}{y}\right), \color{blue}{z}\right)\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{t}{y} + z \cdot \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right)\right), z\right)\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{t}{y}\right), \left(z \cdot \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right)\right)\right), z\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \left(z \cdot \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right)\right)\right), z\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot t - \frac{1}{2} \cdot \frac{t}{y}\right)\right)\right), z\right)\right)\right) \]
      6. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot \left(t - \frac{t}{y}\right)\right)\right)\right), z\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \left(t - \frac{t}{y}\right)\right)\right)\right), z\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(t, \left(\frac{t}{y}\right)\right)\right)\right)\right), z\right)\right)\right) \]
      9. /-lowering-/.f6474.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(t, y\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(t, \mathsf{/.f64}\left(t, y\right)\right)\right)\right)\right), z\right)\right)\right) \]
    12. Simplified74.2%

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

    if -6.49999999999999967e-147 < z < 4.9999999999999999e-224

    1. Initial program 48.4%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6499.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified99.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot \left(e^{z} - 1\right)}{t}\right)}\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right), \color{blue}{t}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right), t\right)\right) \]
      3. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right), t\right)\right) \]
      4. expm1-lowering-expm1.f6497.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right), t\right)\right) \]
    7. Simplified97.8%

      \[\leadsto x - \color{blue}{\frac{y \cdot \mathsf{expm1}\left(z\right)}{t}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{e^{z} - 1}{t}}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{e^{z} - 1}{t} \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{e^{z} - 1}{t}\right), \color{blue}{y}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{z} - 1\right), t\right), y\right)\right) \]
      5. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{expm1}\left(z\right)\right), t\right), y\right)\right) \]
      6. expm1-lowering-expm1.f6498.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(z\right), t\right), y\right)\right) \]
    9. Applied egg-rr98.6%

      \[\leadsto x - \color{blue}{\frac{\mathsf{expm1}\left(z\right)}{t} \cdot y} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\color{blue}{\left(\frac{z}{t}\right)}, y\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f6498.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right) \]
    12. Simplified98.6%

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

    if 4.9999999999999999e-224 < z

    1. Initial program 49.1%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6493.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified93.2%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6493.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr93.2%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6486.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified86.6%

      \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \color{blue}{\left(\frac{t}{z}\right)}\right), y\right)\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f6486.6%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, z\right)\right), y\right)\right)\right) \]
    12. Simplified86.6%

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

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

Alternative 10: 82.2% accurate, 8.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+15}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 84.0%

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f64100.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

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

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

      if -4e15 < z < 8.20000000000000018e-227

      1. Initial program 48.5%

        \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
      2. Step-by-step derivation
        1. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        5. log1p-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        6. log1p-lowering-log1p.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        7. neg-mul-1N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
        9. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
        14. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
        15. expm1-lowering-expm1.f6499.3%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
      3. Simplified99.3%

        \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
        4. log1p-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        5. log1p-lowering-log1p.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        7. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
        8. expm1-lowering-expm1.f6499.2%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
      6. Applied egg-rr99.2%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
      7. Taylor expanded in y around 0

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
        7. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
        8. expm1-lowering-expm1.f6487.2%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
      9. Simplified87.2%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
      10. Taylor expanded in z around 0

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(\frac{t}{z}\right)}, y\right)\right)\right) \]
      11. Step-by-step derivation
        1. /-lowering-/.f6491.1%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(t, z\right), y\right)\right)\right) \]
      12. Simplified91.1%

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

      if 8.20000000000000018e-227 < z

      1. Initial program 48.4%

        \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
      2. Step-by-step derivation
        1. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        5. log1p-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        6. log1p-lowering-log1p.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        7. neg-mul-1N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
        9. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
        14. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
        15. expm1-lowering-expm1.f6493.3%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
      3. Simplified93.3%

        \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
        4. log1p-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        5. log1p-lowering-log1p.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
        7. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
        8. expm1-lowering-expm1.f6493.3%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
      6. Applied egg-rr93.3%

        \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
      7. Taylor expanded in y around 0

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
        7. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
        8. expm1-lowering-expm1.f6486.8%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
      9. Simplified86.8%

        \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
      10. Taylor expanded in z around 0

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \color{blue}{\left(\frac{t}{z}\right)}\right), y\right)\right)\right) \]
      11. Step-by-step derivation
        1. /-lowering-/.f6486.8%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, z\right)\right), y\right)\right)\right) \]
      12. Simplified86.8%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-227}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{t}{z}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{z}}{y}}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 11: 85.0% accurate, 11.1× speedup?

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

      \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
    2. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
      3. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      5. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      6. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
      7. neg-mul-1N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
      14. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
      15. expm1-lowering-expm1.f6497.8%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
    3. Simplified97.8%

      \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
      4. log1p-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      5. log1p-lowering-log1p.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      8. expm1-lowering-expm1.f6497.7%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr97.7%

      \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
    7. Taylor expanded in y around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
      7. expm1-defineN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
      8. expm1-lowering-expm1.f6486.2%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
    9. Simplified86.2%

      \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
    10. Taylor expanded in z around 0

      \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(\frac{t + z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)}{z}\right)}, y\right)\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(t + z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right), z\right), y\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \left(z \cdot \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right)\right), z\right), y\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot \left(t \cdot y\right) - \frac{1}{2} \cdot t\right)\right)\right), z\right), y\right)\right)\right) \]
      4. distribute-lft-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \left(\frac{1}{2} \cdot \left(t \cdot y - t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y - t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\left(t \cdot y\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\left(y \cdot t\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
      8. *-lowering-*.f6484.5%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, t\right), t\right)\right)\right)\right), z\right), y\right)\right)\right) \]
    12. Simplified84.5%

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

      \[\leadsto x + \frac{1}{\frac{\frac{z \cdot \left(0.5 \cdot \left(t - y \cdot t\right)\right) - t}{z}}{y}} \]
    14. Add Preprocessing

    Alternative 12: 69.7% accurate, 12.4× speedup?

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

      1. Initial program 64.1%

        \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
      2. Step-by-step derivation
        1. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
        3. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        5. log1p-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        6. log1p-lowering-log1p.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
        7. neg-mul-1N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
        9. distribute-rgt-outN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
        11. +-commutativeN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
        13. sub-negN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
        14. expm1-defineN/A

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
        15. expm1-lowering-expm1.f6498.2%

          \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
      3. Simplified98.2%

        \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around inf

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

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

        if -4.80000000000000032e-244 < t < 5.80000000000000022e-207

        1. Initial program 17.6%

          \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
        2. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
          3. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
          4. associate-+l+N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
          5. log1p-defineN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
          6. log1p-lowering-log1p.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
          7. neg-mul-1N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
          9. distribute-rgt-outN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
          11. +-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
          12. metadata-evalN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
          13. sub-negN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
          14. expm1-defineN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
          15. expm1-lowering-expm1.f6495.0%

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
        3. Simplified95.0%

          \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
        4. Add Preprocessing
        5. Taylor expanded in z around 0

          \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t} + \frac{y}{t}\right)\right)}\right) \]
        6. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \left(\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t}\right) + \color{blue}{z \cdot \frac{y}{t}}\right)\right) \]
          2. fma-defineN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t}}, z \cdot \frac{y}{t}\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t} \cdot \color{blue}{\frac{1}{2}}, z \cdot \frac{y}{t}\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \left(z \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right) \cdot \frac{1}{2}, z \cdot \frac{y}{t}\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, z \cdot \color{blue}{\left(\frac{y + -1 \cdot {y}^{2}}{t} \cdot \frac{1}{2}\right)}, z \cdot \frac{y}{t}\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{y + -1 \cdot {y}^{2}}{t}}\right), z \cdot \frac{y}{t}\right)\right)\right) \]
          7. fma-undefineN/A

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

            \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right) + \frac{y}{t}\right)}\right)\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \left(\frac{y}{t} + \color{blue}{z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)}\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{y}{t} + z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)}\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{y}{t}\right), \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)}\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(\color{blue}{z} \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)\right)\right)\right) \]
          13. associate-*r/N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(z \cdot \frac{\frac{1}{2} \cdot \left(y + -1 \cdot {y}^{2}\right)}{\color{blue}{t}}\right)\right)\right)\right) \]
          14. associate-*r/N/A

            \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(\frac{z \cdot \left(\frac{1}{2} \cdot \left(y + -1 \cdot {y}^{2}\right)\right)}{\color{blue}{t}}\right)\right)\right)\right) \]
        7. Simplified53.6%

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

          \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(y + \frac{1}{2} \cdot \left(z \cdot \left(y - {y}^{2}\right)\right)\right)}{t}} \]
        9. Step-by-step derivation
          1. mul-1-negN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(y + \frac{1}{2} \cdot \left(z \cdot \left(y - {y}^{2}\right)\right)\right)\right), \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right) \]
        10. Simplified48.3%

          \[\leadsto \color{blue}{\frac{z \cdot \left(y + z \cdot \left(0.5 \cdot \left(y - y \cdot y\right)\right)\right)}{-t}} \]
        11. Taylor expanded in z around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \color{blue}{y}\right), \mathsf{neg.f64}\left(t\right)\right) \]
        12. Step-by-step derivation
          1. Simplified49.6%

            \[\leadsto \frac{z \cdot \color{blue}{y}}{-t} \]
        13. Recombined 2 regimes into one program.
        14. Final simplification72.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-244}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-207}:\\ \;\;\;\;\frac{y \cdot z}{0 - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
        15. Add Preprocessing

        Alternative 13: 81.8% accurate, 15.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -960000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{t}{z}}{y}}\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= z -960000000.0) x (+ x (/ -1.0 (/ (/ t z) y)))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -960000000.0) {
        		tmp = x;
        	} else {
        		tmp = x + (-1.0 / ((t / z) / y));
        	}
        	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 <= (-960000000.0d0)) then
                tmp = x
            else
                tmp = x + ((-1.0d0) / ((t / z) / y))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -960000000.0) {
        		tmp = x;
        	} else {
        		tmp = x + (-1.0 / ((t / z) / y));
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if z <= -960000000.0:
        		tmp = x
        	else:
        		tmp = x + (-1.0 / ((t / z) / y))
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (z <= -960000000.0)
        		tmp = x;
        	else
        		tmp = Float64(x + Float64(-1.0 / Float64(Float64(t / z) / y)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (z <= -960000000.0)
        		tmp = x;
        	else
        		tmp = x + (-1.0 / ((t / z) / y));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[z, -960000000.0], x, N[(x + N[(-1.0 / N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -960000000:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;x + \frac{-1}{\frac{\frac{t}{z}}{y}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -9.6e8

          1. Initial program 84.0%

            \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
          2. Step-by-step derivation
            1. --lowering--.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
            3. sub-negN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
            5. log1p-defineN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
            6. log1p-lowering-log1p.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
            7. neg-mul-1N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
            9. distribute-rgt-outN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
            13. sub-negN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
            14. expm1-defineN/A

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
            15. expm1-lowering-expm1.f64100.0%

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
          4. Add Preprocessing
          5. Taylor expanded in x around inf

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

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

            if -9.6e8 < z

            1. Initial program 48.5%

              \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
            2. Step-by-step derivation
              1. --lowering--.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              5. log1p-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              6. log1p-lowering-log1p.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              7. neg-mul-1N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
              9. distribute-rgt-outN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
              13. sub-negN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
              14. expm1-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
              15. expm1-lowering-expm1.f6497.0%

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
            3. Simplified97.0%

              \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
            4. Add Preprocessing
            5. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}}}\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)}\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\log \left(1 + y \cdot \left(e^{z} - 1\right)\right)}\right)\right)\right) \]
              4. log1p-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \left(\mathsf{log1p}\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
              5. log1p-lowering-log1p.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right)\right)\right)\right) \]
              7. expm1-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right)\right)\right)\right) \]
              8. expm1-lowering-expm1.f6496.9%

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right)\right)\right)\right) \]
            6. Applied egg-rr96.9%

              \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}}} \]
            7. Taylor expanded in y around 0

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}}{y}\right)}\right)\right) \]
            8. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right) + \frac{t}{e^{z} - 1}\right), \color{blue}{y}\right)\right)\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(t \cdot y\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \left(\frac{t}{e^{z} - 1}\right)\right), y\right)\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(e^{z} - 1\right)\right)\right), y\right)\right)\right) \]
              7. expm1-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), y\right)\right)\right) \]
              8. expm1-lowering-expm1.f6487.0%

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, t\right)\right), \mathsf{/.f64}\left(t, \mathsf{expm1.f64}\left(z\right)\right)\right), y\right)\right)\right) \]
            9. Simplified87.0%

              \[\leadsto x - \frac{1}{\color{blue}{\frac{0.5 \cdot \left(y \cdot t\right) + \frac{t}{\mathsf{expm1}\left(z\right)}}{y}}} \]
            10. Taylor expanded in z around 0

              \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left(\frac{t}{z}\right)}, y\right)\right)\right) \]
            11. Step-by-step derivation
              1. /-lowering-/.f6486.3%

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(t, z\right), y\right)\right)\right) \]
            12. Simplified86.3%

              \[\leadsto x - \frac{1}{\frac{\color{blue}{\frac{t}{z}}}{y}} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification80.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -960000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{t}{z}}{y}}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 14: 81.4% accurate, 17.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= z -5.3e-32) x (- x (* y (/ z t)))))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -5.3e-32) {
          		tmp = x;
          	} else {
          		tmp = x - (y * (z / t));
          	}
          	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 <= (-5.3d-32)) then
                  tmp = x
              else
                  tmp = x - (y * (z / t))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= -5.3e-32) {
          		tmp = x;
          	} else {
          		tmp = x - (y * (z / t));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if z <= -5.3e-32:
          		tmp = x
          	else:
          		tmp = x - (y * (z / t))
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (z <= -5.3e-32)
          		tmp = x;
          	else
          		tmp = Float64(x - Float64(y * Float64(z / t)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if (z <= -5.3e-32)
          		tmp = x;
          	else
          		tmp = x - (y * (z / t));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[z, -5.3e-32], x, N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -5.3 \cdot 10^{-32}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;x - y \cdot \frac{z}{t}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -5.3000000000000001e-32

            1. Initial program 78.4%

              \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
            2. Step-by-step derivation
              1. --lowering--.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
              3. sub-negN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              5. log1p-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              6. log1p-lowering-log1p.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
              7. neg-mul-1N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
              9. distribute-rgt-outN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
              12. metadata-evalN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
              13. sub-negN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
              14. expm1-defineN/A

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
              15. expm1-lowering-expm1.f6499.9%

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
            3. Simplified99.9%

              \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
            4. Add Preprocessing
            5. Taylor expanded in x around inf

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

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

              if -5.3000000000000001e-32 < z

              1. Initial program 49.0%

                \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
              2. Step-by-step derivation
                1. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                5. log1p-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                6. log1p-lowering-log1p.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                7. neg-mul-1N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
                8. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
                9. distribute-rgt-outN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
                13. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
                14. expm1-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
                15. expm1-lowering-expm1.f6496.8%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
              3. Simplified96.8%

                \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
              4. Add Preprocessing
              5. Taylor expanded in y around 0

                \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{y \cdot \left(e^{z} - 1\right)}{t}\right)}\right) \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot \left(e^{z} - 1\right)\right), \color{blue}{t}\right)\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right), t\right)\right) \]
                3. expm1-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right), t\right)\right) \]
                4. expm1-lowering-expm1.f6485.8%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right), t\right)\right) \]
              7. Simplified85.8%

                \[\leadsto x - \color{blue}{\frac{y \cdot \mathsf{expm1}\left(z\right)}{t}} \]
              8. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \left(y \cdot \color{blue}{\frac{e^{z} - 1}{t}}\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \left(\frac{e^{z} - 1}{t} \cdot \color{blue}{y}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{e^{z} - 1}{t}\right), \color{blue}{y}\right)\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{z} - 1\right), t\right), y\right)\right) \]
                5. expm1-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{expm1}\left(z\right)\right), t\right), y\right)\right) \]
                6. expm1-lowering-expm1.f6487.7%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(z\right), t\right), y\right)\right) \]
              9. Applied egg-rr87.7%

                \[\leadsto x - \color{blue}{\frac{\mathsf{expm1}\left(z\right)}{t} \cdot y} \]
              10. Taylor expanded in z around 0

                \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\color{blue}{\left(\frac{z}{t}\right)}, y\right)\right) \]
              11. Step-by-step derivation
                1. /-lowering-/.f6487.8%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, t\right), y\right)\right) \]
              12. Simplified87.8%

                \[\leadsto x - \color{blue}{\frac{z}{t}} \cdot y \]
            7. Recombined 2 regimes into one program.
            8. Final simplification80.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{-32}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \end{array} \]
            9. Add Preprocessing

            Alternative 15: 78.8% accurate, 17.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -2.25e-31) x (- x (* z (/ y t)))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -2.25e-31) {
            		tmp = x;
            	} else {
            		tmp = x - (z * (y / t));
            	}
            	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 <= (-2.25d-31)) then
                    tmp = x
                else
                    tmp = x - (z * (y / t))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -2.25e-31) {
            		tmp = x;
            	} else {
            		tmp = x - (z * (y / t));
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -2.25e-31:
            		tmp = x
            	else:
            		tmp = x - (z * (y / t))
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -2.25e-31)
            		tmp = x;
            	else
            		tmp = Float64(x - Float64(z * Float64(y / t)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -2.25e-31)
            		tmp = x;
            	else
            		tmp = x - (z * (y / t));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -2.25e-31], x, N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -2.25 \cdot 10^{-31}:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;x - z \cdot \frac{y}{t}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -2.2500000000000002e-31

              1. Initial program 78.4%

                \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
              2. Step-by-step derivation
                1. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                5. log1p-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                6. log1p-lowering-log1p.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                7. neg-mul-1N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
                8. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
                9. distribute-rgt-outN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
                13. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
                14. expm1-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
                15. expm1-lowering-expm1.f6499.9%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
              3. Simplified99.9%

                \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
              4. Add Preprocessing
              5. Taylor expanded in x around inf

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

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

                if -2.2500000000000002e-31 < z

                1. Initial program 49.0%

                  \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
                2. Step-by-step derivation
                  1. --lowering--.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
                  3. sub-negN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                  5. log1p-defineN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                  6. log1p-lowering-log1p.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                  7. neg-mul-1N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
                  9. distribute-rgt-outN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                  11. +-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
                  12. metadata-evalN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
                  13. sub-negN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
                  14. expm1-defineN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
                  15. expm1-lowering-expm1.f6496.8%

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
                3. Simplified96.8%

                  \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
                4. Add Preprocessing
                5. Taylor expanded in z around 0

                  \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t} + \frac{y}{t}\right)\right)}\right) \]
                6. Step-by-step derivation
                  1. distribute-lft-inN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \left(\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t}\right) + \color{blue}{z \cdot \frac{y}{t}}\right)\right) \]
                  2. fma-defineN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t}}, z \cdot \frac{y}{t}\right)\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \frac{z \cdot \left(y + -1 \cdot {y}^{2}\right)}{t} \cdot \color{blue}{\frac{1}{2}}, z \cdot \frac{y}{t}\right)\right)\right) \]
                  4. associate-/l*N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, \left(z \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right) \cdot \frac{1}{2}, z \cdot \frac{y}{t}\right)\right)\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, z \cdot \color{blue}{\left(\frac{y + -1 \cdot {y}^{2}}{t} \cdot \frac{1}{2}\right)}, z \cdot \frac{y}{t}\right)\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{y + -1 \cdot {y}^{2}}{t}}\right), z \cdot \frac{y}{t}\right)\right)\right) \]
                  7. fma-undefineN/A

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

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right) + \frac{y}{t}\right)}\right)\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \left(z \cdot \left(\frac{y}{t} + \color{blue}{z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)}\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{y}{t} + z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)}\right)\right) \]
                  11. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{y}{t}\right), \color{blue}{\left(z \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)}\right)\right)\right) \]
                  12. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(\color{blue}{z} \cdot \left(\frac{1}{2} \cdot \frac{y + -1 \cdot {y}^{2}}{t}\right)\right)\right)\right)\right) \]
                  13. associate-*r/N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(z \cdot \frac{\frac{1}{2} \cdot \left(y + -1 \cdot {y}^{2}\right)}{\color{blue}{t}}\right)\right)\right)\right) \]
                  14. associate-*r/N/A

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, t\right), \left(\frac{z \cdot \left(\frac{1}{2} \cdot \left(y + -1 \cdot {y}^{2}\right)\right)}{\color{blue}{t}}\right)\right)\right)\right) \]
                7. Simplified74.1%

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

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{y}{t}\right)}\right)\right) \]
                9. Step-by-step derivation
                  1. /-lowering-/.f6481.3%

                    \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right) \]
                10. Simplified81.3%

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

              Alternative 16: 71.0% accurate, 211.0× speedup?

              \[\begin{array}{l} \\ x \end{array} \]
              (FPCore (x y z t) :precision binary64 x)
              double code(double x, double y, double z, double t) {
              	return x;
              }
              
              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
              end function
              
              public static double code(double x, double y, double z, double t) {
              	return x;
              }
              
              def code(x, y, z, t):
              	return x
              
              function code(x, y, z, t)
              	return x
              end
              
              function tmp = code(x, y, z, t)
              	tmp = x;
              end
              
              code[x_, y_, z_, t_] := x
              
              \begin{array}{l}
              
              \\
              x
              \end{array}
              
              Derivation
              1. Initial program 57.9%

                \[x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t} \]
              2. Step-by-step derivation
                1. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \color{blue}{\left(\frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\right)}\right) \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 - y\right) + y \cdot e^{z}\right), \color{blue}{t}\right)\right) \]
                3. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(\left(1 + \left(\mathsf{neg}\left(y\right)\right)\right) + y \cdot e^{z}\right), t\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\log \left(1 + \left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                5. log1p-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\left(\mathsf{log1p}\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                6. log1p-lowering-log1p.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + y \cdot e^{z}\right)\right), t\right)\right) \]
                7. neg-mul-1N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + y \cdot e^{z}\right)\right), t\right)\right) \]
                8. *-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(-1 \cdot y + e^{z} \cdot y\right)\right), t\right)\right) \]
                9. distribute-rgt-outN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\left(y \cdot \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(-1 + e^{z}\right)\right)\right), t\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + -1\right)\right)\right), t\right)\right) \]
                12. metadata-evalN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} + \left(\mathsf{neg}\left(1\right)\right)\right)\right)\right), t\right)\right) \]
                13. sub-negN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(e^{z} - 1\right)\right)\right), t\right)\right) \]
                14. expm1-defineN/A

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \left(\mathsf{expm1}\left(z\right)\right)\right)\right), t\right)\right) \]
                15. expm1-lowering-expm1.f6497.8%

                  \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\mathsf{log1p.f64}\left(\mathsf{*.f64}\left(y, \mathsf{expm1.f64}\left(z\right)\right)\right), t\right)\right) \]
              3. Simplified97.8%

                \[\leadsto \color{blue}{x - \frac{\mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(z\right)\right)}{t}} \]
              4. Add Preprocessing
              5. Taylor expanded in x around inf

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

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

                Developer Target 1: 74.6% accurate, 1.9× speedup?

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

                Reproduce

                ?
                herbie shell --seed 2024138 
                (FPCore (x y z t)
                  :name "System.Random.MWC.Distributions:truncatedExp from mwc-random-0.13.3.2"
                  :precision binary64
                
                  :alt
                  (! :herbie-platform default (if (< z -288746230882079470000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- x (/ (/ (- 1/2) (* y t)) (* z z))) (* (/ (- 1/2) (* y t)) (/ (/ 2 z) (* z z)))) (- x (/ (log (+ 1 (* z y))) t))))
                
                  (- x (/ (log (+ (- 1.0 y) (* y (exp z)))) t)))