Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2

Percentage Accurate: 100.0% → 100.0%
Time: 11.8s
Alternatives: 23
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ e^{\left(x + y \cdot \log y\right) - z} \end{array} \]
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
	return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
	return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z):
	return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z)
	return exp(Float64(Float64(x + Float64(y * log(y))) - z))
end
function tmp = code(x, y, z)
	tmp = exp(((x + (y * log(y))) - z));
end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
e^{\left(x + y \cdot \log y\right) - z}
\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 23 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: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ e^{\left(x + y \cdot \log y\right) - z} \end{array} \]
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
	return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
	return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z):
	return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z)
	return exp(Float64(Float64(x + Float64(y * log(y))) - z))
end
function tmp = code(x, y, z)
	tmp = exp(((x + (y * log(y))) - z));
end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ e^{\left(x + y \cdot \log y\right) - z} \end{array} \]
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
	return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
	return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z):
	return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z)
	return exp(Float64(Float64(x + Float64(y * log(y))) - z))
end
function tmp = code(x, y, z)
	tmp = exp(((x + (y * log(y))) - z));
end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Derivation
  1. Initial program 100.0%

    \[e^{\left(x + y \cdot \log y\right) - z} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 73.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x + y \cdot \log y\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-10}:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;t\_0 \leq -1 \cdot 10^{-122}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-39}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;{y}^{y}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ x (* y (log y)))))
   (if (<= t_0 -2e-10)
     (exp x)
     (if (<= t_0 -1e-122)
       (/ 1.0 (fma z (fma z (fma (* z z) -0.25 0.5) 1.0) 1.0))
       (if (<= t_0 5e-39)
         (fma
          (fma z 0.5 -1.0)
          (* z (* (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0)))))
          1.0)
         (pow y y))))))
double code(double x, double y, double z) {
	double t_0 = x + (y * log(y));
	double tmp;
	if (t_0 <= -2e-10) {
		tmp = exp(x);
	} else if (t_0 <= -1e-122) {
		tmp = 1.0 / fma(z, fma(z, fma((z * z), -0.25, 0.5), 1.0), 1.0);
	} else if (t_0 <= 5e-39) {
		tmp = fma(fma(z, 0.5, -1.0), (z * (fma(z, 0.5, -1.0) * (z * (z * fma(z, 0.5, -1.0))))), 1.0);
	} else {
		tmp = pow(y, y);
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(x + Float64(y * log(y)))
	tmp = 0.0
	if (t_0 <= -2e-10)
		tmp = exp(x);
	elseif (t_0 <= -1e-122)
		tmp = Float64(1.0 / fma(z, fma(z, fma(Float64(z * z), -0.25, 0.5), 1.0), 1.0));
	elseif (t_0 <= 5e-39)
		tmp = fma(fma(z, 0.5, -1.0), Float64(z * Float64(fma(z, 0.5, -1.0) * Float64(z * Float64(z * fma(z, 0.5, -1.0))))), 1.0);
	else
		tmp = y ^ y;
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-10], N[Exp[x], $MachinePrecision], If[LessEqual[t$95$0, -1e-122], N[(1.0 / N[(z * N[(z * N[(N[(z * z), $MachinePrecision] * -0.25 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-39], N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[Power[y, y], $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x + y \cdot \log y\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-10}:\\
\;\;\;\;e^{x}\\

\mathbf{elif}\;t\_0 \leq -1 \cdot 10^{-122}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\

\mathbf{else}:\\
\;\;\;\;{y}^{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (*.f64 y (log.f64 y))) < -2.00000000000000007e-10

    1. Initial program 100.0%

      \[e^{\left(x + y \cdot \log y\right) - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{e^{x - z}} \]
    4. Step-by-step derivation
      1. lower-exp.f64N/A

        \[\leadsto \color{blue}{e^{x - z}} \]
      2. lower--.f6497.4

        \[\leadsto e^{\color{blue}{x - z}} \]
    5. Applied rewrites97.4%

      \[\leadsto \color{blue}{e^{x - z}} \]
    6. Taylor expanded in z around 0

      \[\leadsto \color{blue}{e^{x}} \]
    7. Step-by-step derivation
      1. lower-exp.f6487.8

        \[\leadsto \color{blue}{e^{x}} \]
    8. Applied rewrites87.8%

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

    if -2.00000000000000007e-10 < (+.f64 x (*.f64 y (log.f64 y))) < -1.00000000000000006e-122

    1. Initial program 100.0%

      \[e^{\left(x + y \cdot \log y\right) - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
      2. lower-neg.f6499.0

        \[\leadsto e^{\color{blue}{-z}} \]
    5. Applied rewrites99.0%

      \[\leadsto e^{\color{blue}{-z}} \]
    6. Taylor expanded in z around 0

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

        \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
      3. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
      6. lower-fma.f6454.3

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
    8. Applied rewrites54.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
    9. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
      2. flip-+N/A

        \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
      3. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
      5. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
      6. flip-+N/A

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
      7. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
      8. lower-/.f6454.3

        \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
    10. Applied rewrites54.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
    11. Taylor expanded in z around 0

      \[\leadsto \frac{1}{\color{blue}{1 + z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right)}} \]
    12. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right) + 1}} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right), 1\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right) + 1}, 1\right)} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}, 1\right)}, 1\right)} \]
      5. +-commutativeN/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{4} \cdot {z}^{2} + \frac{1}{2}}, 1\right), 1\right)} \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{{z}^{2} \cdot \frac{-1}{4}} + \frac{1}{2}, 1\right), 1\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left({z}^{2}, \frac{-1}{4}, \frac{1}{2}\right)}, 1\right), 1\right)} \]
      8. unpow2N/A

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, \frac{-1}{4}, \frac{1}{2}\right), 1\right), 1\right)} \]
      9. lower-*.f6472.4

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, -0.25, 0.5\right), 1\right), 1\right)} \]
    13. Applied rewrites72.4%

      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}} \]

    if -1.00000000000000006e-122 < (+.f64 x (*.f64 y (log.f64 y))) < 4.9999999999999998e-39

    1. Initial program 100.0%

      \[e^{\left(x + y \cdot \log y\right) - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
      2. lower-neg.f64100.0

        \[\leadsto e^{\color{blue}{-z}} \]
    5. Applied rewrites100.0%

      \[\leadsto e^{\color{blue}{-z}} \]
    6. Taylor expanded in z around 0

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

        \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
      3. sub-negN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
      6. lower-fma.f6480.3

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
    8. Applied rewrites80.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
    9. Step-by-step derivation
      1. lift-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
      2. flip3-+N/A

        \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
    10. Applied rewrites58.9%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
    11. Taylor expanded in z around 0

      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
    12. Step-by-step derivation
      1. Applied rewrites86.8%

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]

      if 4.9999999999999998e-39 < (+.f64 x (*.f64 y (log.f64 y)))

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto e^{\color{blue}{-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)}} \]
        3. log-recN/A

          \[\leadsto e^{y \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right)} \]
        4. remove-double-negN/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        5. lower-*.f64N/A

          \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
        6. lower-log.f6474.5

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
      5. Applied rewrites74.5%

        \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
      6. Step-by-step derivation
        1. lift-log.f64N/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        2. *-commutativeN/A

          \[\leadsto e^{\color{blue}{\log y \cdot y}} \]
        3. lift-log.f64N/A

          \[\leadsto e^{\color{blue}{\log y} \cdot y} \]
        4. exp-to-powN/A

          \[\leadsto \color{blue}{{y}^{y}} \]
        5. lower-pow.f6474.5

          \[\leadsto \color{blue}{{y}^{y}} \]
      7. Applied rewrites74.5%

        \[\leadsto \color{blue}{{y}^{y}} \]
    13. Recombined 4 regimes into one program.
    14. Final simplification78.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \cdot \log y \leq -2 \cdot 10^{-10}:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;x + y \cdot \log y \leq -1 \cdot 10^{-122}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\ \mathbf{elif}\;x + y \cdot \log y \leq 5 \cdot 10^{-39}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;{y}^{y}\\ \end{array} \]
    15. Add Preprocessing

    Alternative 3: 80.9% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x + y \cdot \log y\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+23}:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;t\_0 \leq 10^{+29}:\\ \;\;\;\;e^{-z}\\ \mathbf{else}:\\ \;\;\;\;{y}^{y}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (+ x (* y (log y)))))
       (if (<= t_0 -4e+23) (exp x) (if (<= t_0 1e+29) (exp (- z)) (pow y y)))))
    double code(double x, double y, double z) {
    	double t_0 = x + (y * log(y));
    	double tmp;
    	if (t_0 <= -4e+23) {
    		tmp = exp(x);
    	} else if (t_0 <= 1e+29) {
    		tmp = exp(-z);
    	} else {
    		tmp = pow(y, y);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = x + (y * log(y))
        if (t_0 <= (-4d+23)) then
            tmp = exp(x)
        else if (t_0 <= 1d+29) then
            tmp = exp(-z)
        else
            tmp = y ** y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = x + (y * Math.log(y));
    	double tmp;
    	if (t_0 <= -4e+23) {
    		tmp = Math.exp(x);
    	} else if (t_0 <= 1e+29) {
    		tmp = Math.exp(-z);
    	} else {
    		tmp = Math.pow(y, y);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = x + (y * math.log(y))
    	tmp = 0
    	if t_0 <= -4e+23:
    		tmp = math.exp(x)
    	elif t_0 <= 1e+29:
    		tmp = math.exp(-z)
    	else:
    		tmp = math.pow(y, y)
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(x + Float64(y * log(y)))
    	tmp = 0.0
    	if (t_0 <= -4e+23)
    		tmp = exp(x);
    	elseif (t_0 <= 1e+29)
    		tmp = exp(Float64(-z));
    	else
    		tmp = y ^ y;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = x + (y * log(y));
    	tmp = 0.0;
    	if (t_0 <= -4e+23)
    		tmp = exp(x);
    	elseif (t_0 <= 1e+29)
    		tmp = exp(-z);
    	else
    		tmp = y ^ y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+23], N[Exp[x], $MachinePrecision], If[LessEqual[t$95$0, 1e+29], N[Exp[(-z)], $MachinePrecision], N[Power[y, y], $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := x + y \cdot \log y\\
    \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+23}:\\
    \;\;\;\;e^{x}\\
    
    \mathbf{elif}\;t\_0 \leq 10^{+29}:\\
    \;\;\;\;e^{-z}\\
    
    \mathbf{else}:\\
    \;\;\;\;{y}^{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 x (*.f64 y (log.f64 y))) < -3.9999999999999997e23

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{e^{x - z}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x - z}} \]
        2. lower--.f64100.0

          \[\leadsto e^{\color{blue}{x - z}} \]
      5. Applied rewrites100.0%

        \[\leadsto \color{blue}{e^{x - z}} \]
      6. Taylor expanded in z around 0

        \[\leadsto \color{blue}{e^{x}} \]
      7. Step-by-step derivation
        1. lower-exp.f6493.3

          \[\leadsto \color{blue}{e^{x}} \]
      8. Applied rewrites93.3%

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

      if -3.9999999999999997e23 < (+.f64 x (*.f64 y (log.f64 y))) < 9.99999999999999914e28

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
        2. lower-neg.f6492.2

          \[\leadsto e^{\color{blue}{-z}} \]
      5. Applied rewrites92.2%

        \[\leadsto e^{\color{blue}{-z}} \]

      if 9.99999999999999914e28 < (+.f64 x (*.f64 y (log.f64 y)))

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto e^{\color{blue}{-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)}} \]
        3. log-recN/A

          \[\leadsto e^{y \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right)} \]
        4. remove-double-negN/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        5. lower-*.f64N/A

          \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
        6. lower-log.f6476.6

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
      5. Applied rewrites76.6%

        \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
      6. Step-by-step derivation
        1. lift-log.f64N/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        2. *-commutativeN/A

          \[\leadsto e^{\color{blue}{\log y \cdot y}} \]
        3. lift-log.f64N/A

          \[\leadsto e^{\color{blue}{\log y} \cdot y} \]
        4. exp-to-powN/A

          \[\leadsto \color{blue}{{y}^{y}} \]
        5. lower-pow.f6476.6

          \[\leadsto \color{blue}{{y}^{y}} \]
      7. Applied rewrites76.6%

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

    Alternative 4: 94.9% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot \log y \leq 20:\\ \;\;\;\;e^{x - z}\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{fma}\left(y, \log y, x\right)}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= (* y (log y)) 20.0) (exp (- x z)) (exp (fma y (log y) x))))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((y * log(y)) <= 20.0) {
    		tmp = exp((x - z));
    	} else {
    		tmp = exp(fma(y, log(y), x));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if (Float64(y * log(y)) <= 20.0)
    		tmp = exp(Float64(x - z));
    	else
    		tmp = exp(fma(y, log(y), x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], 20.0], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Exp[N[(y * N[Log[y], $MachinePrecision] + x), $MachinePrecision]], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \cdot \log y \leq 20:\\
    \;\;\;\;e^{x - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;e^{\mathsf{fma}\left(y, \log y, x\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 y (log.f64 y)) < 20

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{e^{x - z}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x - z}} \]
        2. lower--.f6498.7

          \[\leadsto e^{\color{blue}{x - z}} \]
      5. Applied rewrites98.7%

        \[\leadsto \color{blue}{e^{x - z}} \]

      if 20 < (*.f64 y (log.f64 y))

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{e^{x + y \cdot \log y}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x + y \cdot \log y}} \]
        2. +-commutativeN/A

          \[\leadsto e^{\color{blue}{y \cdot \log y + x}} \]
        3. lower-fma.f64N/A

          \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log y, x\right)}} \]
        4. lower-log.f6491.4

          \[\leadsto e^{\mathsf{fma}\left(y, \color{blue}{\log y}, x\right)} \]
      5. Applied rewrites91.4%

        \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log y, x\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 5: 31.7% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + y \cdot \log y\right) - z\\ t_1 := 0.5 \cdot \left(x \cdot x\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+126}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (- (+ x (* y (log y))) z)) (t_1 (* 0.5 (* x x))))
       (if (<= t_0 -1e+26) t_1 (if (<= t_0 5e+126) (+ x 1.0) t_1))))
    double code(double x, double y, double z) {
    	double t_0 = (x + (y * log(y))) - z;
    	double t_1 = 0.5 * (x * x);
    	double tmp;
    	if (t_0 <= -1e+26) {
    		tmp = t_1;
    	} else if (t_0 <= 5e+126) {
    		tmp = x + 1.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: tmp
        t_0 = (x + (y * log(y))) - z
        t_1 = 0.5d0 * (x * x)
        if (t_0 <= (-1d+26)) then
            tmp = t_1
        else if (t_0 <= 5d+126) then
            tmp = x + 1.0d0
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = (x + (y * Math.log(y))) - z;
    	double t_1 = 0.5 * (x * x);
    	double tmp;
    	if (t_0 <= -1e+26) {
    		tmp = t_1;
    	} else if (t_0 <= 5e+126) {
    		tmp = x + 1.0;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = (x + (y * math.log(y))) - z
    	t_1 = 0.5 * (x * x)
    	tmp = 0
    	if t_0 <= -1e+26:
    		tmp = t_1
    	elif t_0 <= 5e+126:
    		tmp = x + 1.0
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(Float64(x + Float64(y * log(y))) - z)
    	t_1 = Float64(0.5 * Float64(x * x))
    	tmp = 0.0
    	if (t_0 <= -1e+26)
    		tmp = t_1;
    	elseif (t_0 <= 5e+126)
    		tmp = Float64(x + 1.0);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = (x + (y * log(y))) - z;
    	t_1 = 0.5 * (x * x);
    	tmp = 0.0;
    	if (t_0 <= -1e+26)
    		tmp = t_1;
    	elseif (t_0 <= 5e+126)
    		tmp = x + 1.0;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+26], t$95$1, If[LessEqual[t$95$0, 5e+126], N[(x + 1.0), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(x + y \cdot \log y\right) - z\\
    t_1 := 0.5 \cdot \left(x \cdot x\right)\\
    \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+26}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+126}:\\
    \;\;\;\;x + 1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z) < -1.00000000000000005e26 or 4.99999999999999977e126 < (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z)

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{e^{x - z}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x - z}} \]
        2. lower--.f6476.8

          \[\leadsto e^{\color{blue}{x - z}} \]
      5. Applied rewrites76.8%

        \[\leadsto \color{blue}{e^{x - z}} \]
      6. Taylor expanded in z around 0

        \[\leadsto \color{blue}{e^{x}} \]
      7. Step-by-step derivation
        1. lower-exp.f6446.4

          \[\leadsto \color{blue}{e^{x}} \]
      8. Applied rewrites46.4%

        \[\leadsto \color{blue}{e^{x}} \]
      9. Taylor expanded in x around 0

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

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
        2. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
        4. lower-fma.f6422.5

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
      11. Applied rewrites22.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
      12. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
      13. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
        2. unpow2N/A

          \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
        3. lower-*.f6426.2

          \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
      14. Applied rewrites26.2%

        \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]

      if -1.00000000000000005e26 < (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z) < 4.99999999999999977e126

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{e^{x - z}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x - z}} \]
        2. lower--.f6480.0

          \[\leadsto e^{\color{blue}{x - z}} \]
      5. Applied rewrites80.0%

        \[\leadsto \color{blue}{e^{x - z}} \]
      6. Taylor expanded in z around 0

        \[\leadsto \color{blue}{e^{x}} \]
      7. Step-by-step derivation
        1. lower-exp.f6461.3

          \[\leadsto \color{blue}{e^{x}} \]
      8. Applied rewrites61.3%

        \[\leadsto \color{blue}{e^{x}} \]
      9. Taylor expanded in x around 0

        \[\leadsto \color{blue}{1 + x} \]
      10. Step-by-step derivation
        1. lower-+.f6443.0

          \[\leadsto \color{blue}{1 + x} \]
      11. Applied rewrites43.0%

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

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

    Alternative 6: 89.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot \log y \leq 5 \cdot 10^{+127}:\\ \;\;\;\;e^{x - z}\\ \mathbf{else}:\\ \;\;\;\;{y}^{y}\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= (* y (log y)) 5e+127) (exp (- x z)) (pow y y)))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((y * log(y)) <= 5e+127) {
    		tmp = exp((x - z));
    	} else {
    		tmp = pow(y, y);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if ((y * log(y)) <= 5d+127) then
            tmp = exp((x - z))
        else
            tmp = y ** y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if ((y * Math.log(y)) <= 5e+127) {
    		tmp = Math.exp((x - z));
    	} else {
    		tmp = Math.pow(y, y);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if (y * math.log(y)) <= 5e+127:
    		tmp = math.exp((x - z))
    	else:
    		tmp = math.pow(y, y)
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (Float64(y * log(y)) <= 5e+127)
    		tmp = exp(Float64(x - z));
    	else
    		tmp = y ^ y;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if ((y * log(y)) <= 5e+127)
    		tmp = exp((x - z));
    	else
    		tmp = y ^ y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], 5e+127], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \cdot \log y \leq 5 \cdot 10^{+127}:\\
    \;\;\;\;e^{x - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;{y}^{y}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 y (log.f64 y)) < 5.0000000000000004e127

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{e^{x - z}} \]
      4. Step-by-step derivation
        1. lower-exp.f64N/A

          \[\leadsto \color{blue}{e^{x - z}} \]
        2. lower--.f6492.2

          \[\leadsto e^{\color{blue}{x - z}} \]
      5. Applied rewrites92.2%

        \[\leadsto \color{blue}{e^{x - z}} \]

      if 5.0000000000000004e127 < (*.f64 y (log.f64 y))

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto e^{\color{blue}{-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y \cdot \log \left(\frac{1}{y}\right)\right)}} \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)}} \]
        3. log-recN/A

          \[\leadsto e^{y \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right)}\right)\right)} \]
        4. remove-double-negN/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        5. lower-*.f64N/A

          \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
        6. lower-log.f6493.3

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
      5. Applied rewrites93.3%

        \[\leadsto e^{\color{blue}{y \cdot \log y}} \]
      6. Step-by-step derivation
        1. lift-log.f64N/A

          \[\leadsto e^{y \cdot \color{blue}{\log y}} \]
        2. *-commutativeN/A

          \[\leadsto e^{\color{blue}{\log y \cdot y}} \]
        3. lift-log.f64N/A

          \[\leadsto e^{\color{blue}{\log y} \cdot y} \]
        4. exp-to-powN/A

          \[\leadsto \color{blue}{{y}^{y}} \]
        5. lower-pow.f6493.3

          \[\leadsto \color{blue}{{y}^{y}} \]
      7. Applied rewrites93.3%

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

    Alternative 7: 53.5% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(x + y \cdot \log y\right) - z \leq 0.002:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= (- (+ x (* y (log y))) z) 0.002)
       (/ 1.0 (fma z (fma z (fma (* z z) -0.25 0.5) 1.0) 1.0))
       (fma
        (fma z 0.5 -1.0)
        (* z (* (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0)))))
        1.0)))
    double code(double x, double y, double z) {
    	double tmp;
    	if (((x + (y * log(y))) - z) <= 0.002) {
    		tmp = 1.0 / fma(z, fma(z, fma((z * z), -0.25, 0.5), 1.0), 1.0);
    	} else {
    		tmp = fma(fma(z, 0.5, -1.0), (z * (fma(z, 0.5, -1.0) * (z * (z * fma(z, 0.5, -1.0))))), 1.0);
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if (Float64(Float64(x + Float64(y * log(y))) - z) <= 0.002)
    		tmp = Float64(1.0 / fma(z, fma(z, fma(Float64(z * z), -0.25, 0.5), 1.0), 1.0));
    	else
    		tmp = fma(fma(z, 0.5, -1.0), Float64(z * Float64(fma(z, 0.5, -1.0) * Float64(z * Float64(z * fma(z, 0.5, -1.0))))), 1.0);
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[LessEqual[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], 0.002], N[(1.0 / N[(z * N[(z * N[(N[(z * z), $MachinePrecision] * -0.25 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\left(x + y \cdot \log y\right) - z \leq 0.002:\\
    \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z) < 2e-3

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
        2. lower-neg.f6471.7

          \[\leadsto e^{\color{blue}{-z}} \]
      5. Applied rewrites71.7%

        \[\leadsto e^{\color{blue}{-z}} \]
      6. Taylor expanded in z around 0

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

          \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
        2. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
        3. sub-negN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
        6. lower-fma.f6429.4

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
      8. Applied rewrites29.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
      9. Step-by-step derivation
        1. lift-fma.f64N/A

          \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
        2. flip-+N/A

          \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
        3. clear-numN/A

          \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
        4. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
        5. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
        6. flip-+N/A

          \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
        7. lift-fma.f64N/A

          \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
        8. lower-/.f6429.4

          \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
      10. Applied rewrites29.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
      11. Taylor expanded in z around 0

        \[\leadsto \frac{1}{\color{blue}{1 + z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right)}} \]
      12. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right) + 1}} \]
        2. lower-fma.f64N/A

          \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right), 1\right)}} \]
        3. +-commutativeN/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right) + 1}, 1\right)} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}, 1\right)}, 1\right)} \]
        5. +-commutativeN/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{4} \cdot {z}^{2} + \frac{1}{2}}, 1\right), 1\right)} \]
        6. *-commutativeN/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{{z}^{2} \cdot \frac{-1}{4}} + \frac{1}{2}, 1\right), 1\right)} \]
        7. lower-fma.f64N/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left({z}^{2}, \frac{-1}{4}, \frac{1}{2}\right)}, 1\right), 1\right)} \]
        8. unpow2N/A

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, \frac{-1}{4}, \frac{1}{2}\right), 1\right), 1\right)} \]
        9. lower-*.f6471.5

          \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, -0.25, 0.5\right), 1\right), 1\right)} \]
      13. Applied rewrites71.5%

        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}} \]

      if 2e-3 < (-.f64 (+.f64 x (*.f64 y (log.f64 y))) z)

      1. Initial program 100.0%

        \[e^{\left(x + y \cdot \log y\right) - z} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
        2. lower-neg.f6437.0

          \[\leadsto e^{\color{blue}{-z}} \]
      5. Applied rewrites37.0%

        \[\leadsto e^{\color{blue}{-z}} \]
      6. Taylor expanded in z around 0

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

          \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
        2. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
        3. sub-negN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
        6. lower-fma.f6425.0

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
      8. Applied rewrites25.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
      9. Step-by-step derivation
        1. lift-fma.f64N/A

          \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
        2. flip3-+N/A

          \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
        3. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
      10. Applied rewrites6.9%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
      11. Taylor expanded in z around 0

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
      12. Step-by-step derivation
        1. Applied rewrites48.2%

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
      13. Recombined 2 regimes into one program.
      14. Final simplification57.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y \cdot \log y\right) - z \leq 0.002:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \end{array} \]
      15. Add Preprocessing

      Alternative 8: 71.1% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{elif}\;z \leq 2150000000000:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;e^{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= z -3.6e+55)
         (fma
          (fma z 0.5 -1.0)
          (* z (* (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0)))))
          1.0)
         (if (<= z 2150000000000.0)
           (exp x)
           (if (<= z 6.8e+155) (exp z) (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0))))))
      double code(double x, double y, double z) {
      	double tmp;
      	if (z <= -3.6e+55) {
      		tmp = fma(fma(z, 0.5, -1.0), (z * (fma(z, 0.5, -1.0) * (z * (z * fma(z, 0.5, -1.0))))), 1.0);
      	} else if (z <= 2150000000000.0) {
      		tmp = exp(x);
      	} else if (z <= 6.8e+155) {
      		tmp = exp(z);
      	} else {
      		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	tmp = 0.0
      	if (z <= -3.6e+55)
      		tmp = fma(fma(z, 0.5, -1.0), Float64(z * Float64(fma(z, 0.5, -1.0) * Float64(z * Float64(z * fma(z, 0.5, -1.0))))), 1.0);
      	elseif (z <= 2150000000000.0)
      		tmp = exp(x);
      	elseif (z <= 6.8e+155)
      		tmp = exp(z);
      	else
      		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := If[LessEqual[z, -3.6e+55], N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 2150000000000.0], N[Exp[x], $MachinePrecision], If[LessEqual[z, 6.8e+155], N[Exp[z], $MachinePrecision], N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\
      
      \mathbf{elif}\;z \leq 2150000000000:\\
      \;\;\;\;e^{x}\\
      
      \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
      \;\;\;\;e^{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if z < -3.59999999999999987e55

        1. Initial program 100.0%

          \[e^{\left(x + y \cdot \log y\right) - z} \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
          2. lower-neg.f6492.1

            \[\leadsto e^{\color{blue}{-z}} \]
        5. Applied rewrites92.1%

          \[\leadsto e^{\color{blue}{-z}} \]
        6. Taylor expanded in z around 0

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

            \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
          2. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
          3. sub-negN/A

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
          6. lower-fma.f6456.9

            \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
        8. Applied rewrites56.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
        9. Step-by-step derivation
          1. lift-fma.f64N/A

            \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
          2. flip3-+N/A

            \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
        10. Applied rewrites4.0%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
        11. Taylor expanded in z around 0

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
        12. Step-by-step derivation
          1. Applied rewrites92.1%

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]

          if -3.59999999999999987e55 < z < 2.15e12

          1. Initial program 100.0%

            \[e^{\left(x + y \cdot \log y\right) - z} \]
          2. Add Preprocessing
          3. Taylor expanded in y around 0

            \[\leadsto \color{blue}{e^{x - z}} \]
          4. Step-by-step derivation
            1. lower-exp.f64N/A

              \[\leadsto \color{blue}{e^{x - z}} \]
            2. lower--.f6469.1

              \[\leadsto e^{\color{blue}{x - z}} \]
          5. Applied rewrites69.1%

            \[\leadsto \color{blue}{e^{x - z}} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{e^{x}} \]
          7. Step-by-step derivation
            1. lower-exp.f6464.4

              \[\leadsto \color{blue}{e^{x}} \]
          8. Applied rewrites64.4%

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

          if 2.15e12 < z < 6.8000000000000002e155

          1. Initial program 100.0%

            \[e^{\left(x + y \cdot \log y\right) - z} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
            2. lower-neg.f6434.4

              \[\leadsto e^{\color{blue}{-z}} \]
          5. Applied rewrites34.4%

            \[\leadsto e^{\color{blue}{-z}} \]
          6. Step-by-step derivation
            1. neg-sub0N/A

              \[\leadsto e^{\color{blue}{0 - z}} \]
            2. flip3--N/A

              \[\leadsto e^{\color{blue}{\frac{{0}^{3} - {z}^{3}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}}} \]
            3. metadata-evalN/A

              \[\leadsto e^{\frac{\color{blue}{0} - {z}^{3}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            4. neg-sub0N/A

              \[\leadsto e^{\frac{\color{blue}{\mathsf{neg}\left({z}^{3}\right)}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            5. cube-negN/A

              \[\leadsto e^{\frac{\color{blue}{{\left(\mathsf{neg}\left(z\right)\right)}^{3}}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            6. lift-neg.f64N/A

              \[\leadsto e^{\frac{{\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}^{3}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            7. sqr-powN/A

              \[\leadsto e^{\frac{\color{blue}{{\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(z\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            8. unpow-prod-downN/A

              \[\leadsto e^{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot \left(\mathsf{neg}\left(z\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            9. lift-neg.f64N/A

              \[\leadsto e^{\frac{{\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot \left(\mathsf{neg}\left(z\right)\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            10. lift-neg.f64N/A

              \[\leadsto e^{\frac{{\left(\left(\mathsf{neg}\left(z\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            11. sqr-negN/A

              \[\leadsto e^{\frac{{\color{blue}{\left(z \cdot z\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            12. pow-prod-downN/A

              \[\leadsto e^{\frac{\color{blue}{{z}^{\left(\frac{3}{2}\right)} \cdot {z}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            13. sqr-powN/A

              \[\leadsto e^{\frac{\color{blue}{{z}^{3}}}{0 \cdot 0 + \left(z \cdot z + 0 \cdot z\right)}} \]
            14. metadata-evalN/A

              \[\leadsto e^{\frac{{z}^{3}}{\color{blue}{0} + \left(z \cdot z + 0 \cdot z\right)}} \]
            15. +-lft-identityN/A

              \[\leadsto e^{\frac{{z}^{3}}{\color{blue}{z \cdot z + 0 \cdot z}}} \]
            16. distribute-rgt-outN/A

              \[\leadsto e^{\frac{{z}^{3}}{\color{blue}{z \cdot \left(z + 0\right)}}} \]
            17. +-commutativeN/A

              \[\leadsto e^{\frac{{z}^{3}}{z \cdot \color{blue}{\left(0 + z\right)}}} \]
            18. +-lft-identityN/A

              \[\leadsto e^{\frac{{z}^{3}}{z \cdot \color{blue}{z}}} \]
            19. pow2N/A

              \[\leadsto e^{\frac{{z}^{3}}{\color{blue}{{z}^{2}}}} \]
            20. pow-divN/A

              \[\leadsto e^{\color{blue}{{z}^{\left(3 - 2\right)}}} \]
            21. metadata-evalN/A

              \[\leadsto e^{{z}^{\color{blue}{1}}} \]
            22. unpow1N/A

              \[\leadsto e^{\color{blue}{z}} \]
            23. lower-exp.f6467.2

              \[\leadsto \color{blue}{e^{z}} \]
          7. Applied rewrites67.2%

            \[\leadsto \color{blue}{e^{z}} \]

          if 6.8000000000000002e155 < z

          1. Initial program 100.0%

            \[e^{\left(x + y \cdot \log y\right) - z} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
            2. lower-neg.f6486.3

              \[\leadsto e^{\color{blue}{-z}} \]
          5. Applied rewrites86.3%

            \[\leadsto e^{\color{blue}{-z}} \]
          6. Taylor expanded in z around 0

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

              \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
            2. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
            3. sub-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
            6. lower-fma.f6415.2

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
          8. Applied rewrites15.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
          9. Step-by-step derivation
            1. lift-fma.f64N/A

              \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
            2. flip-+N/A

              \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
            3. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
            4. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
            5. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
            6. flip-+N/A

              \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
            7. lift-fma.f64N/A

              \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
            8. lower-/.f6415.2

              \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
          10. Applied rewrites15.2%

            \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
          11. Taylor expanded in z around 0

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

              \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
            2. lower-fma.f64N/A

              \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
            4. lower-fma.f6486.3

              \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
          13. Applied rewrites86.3%

            \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
        13. Recombined 4 regimes into one program.
        14. Final simplification73.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{elif}\;z \leq 2150000000000:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;e^{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \]
        15. Add Preprocessing

        Alternative 9: 70.7% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+51}:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0
                 (fma
                  (fma z 0.5 -1.0)
                  (* z (* (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0)))))
                  1.0)))
           (if (<= z -3.6e+55)
             t_0
             (if (<= z 3.3e+51)
               (exp x)
               (if (<= z 6.8e+155) t_0 (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0)))))))
        double code(double x, double y, double z) {
        	double t_0 = fma(fma(z, 0.5, -1.0), (z * (fma(z, 0.5, -1.0) * (z * (z * fma(z, 0.5, -1.0))))), 1.0);
        	double tmp;
        	if (z <= -3.6e+55) {
        		tmp = t_0;
        	} else if (z <= 3.3e+51) {
        		tmp = exp(x);
        	} else if (z <= 6.8e+155) {
        		tmp = t_0;
        	} else {
        		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	t_0 = fma(fma(z, 0.5, -1.0), Float64(z * Float64(fma(z, 0.5, -1.0) * Float64(z * Float64(z * fma(z, 0.5, -1.0))))), 1.0)
        	tmp = 0.0
        	if (z <= -3.6e+55)
        		tmp = t_0;
        	elseif (z <= 3.3e+51)
        		tmp = exp(x);
        	elseif (z <= 6.8e+155)
        		tmp = t_0;
        	else
        		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[z, -3.6e+55], t$95$0, If[LessEqual[z, 3.3e+51], N[Exp[x], $MachinePrecision], If[LessEqual[z, 6.8e+155], t$95$0, N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\
        \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 3.3 \cdot 10^{+51}:\\
        \;\;\;\;e^{x}\\
        
        \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -3.59999999999999987e55 or 3.2999999999999997e51 < z < 6.8000000000000002e155

          1. Initial program 100.0%

            \[e^{\left(x + y \cdot \log y\right) - z} \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

            \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
            2. lower-neg.f6472.2

              \[\leadsto e^{\color{blue}{-z}} \]
          5. Applied rewrites72.2%

            \[\leadsto e^{\color{blue}{-z}} \]
          6. Taylor expanded in z around 0

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

              \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
            2. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
            3. sub-negN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
            6. lower-fma.f6439.6

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
          8. Applied rewrites39.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
          9. Step-by-step derivation
            1. lift-fma.f64N/A

              \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
            2. flip3-+N/A

              \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
            3. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
          10. Applied rewrites7.7%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
          11. Taylor expanded in z around 0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
          12. Step-by-step derivation
            1. Applied rewrites82.3%

              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]

            if -3.59999999999999987e55 < z < 3.2999999999999997e51

            1. Initial program 100.0%

              \[e^{\left(x + y \cdot \log y\right) - z} \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto \color{blue}{e^{x - z}} \]
            4. Step-by-step derivation
              1. lower-exp.f64N/A

                \[\leadsto \color{blue}{e^{x - z}} \]
              2. lower--.f6468.8

                \[\leadsto e^{\color{blue}{x - z}} \]
            5. Applied rewrites68.8%

              \[\leadsto \color{blue}{e^{x - z}} \]
            6. Taylor expanded in z around 0

              \[\leadsto \color{blue}{e^{x}} \]
            7. Step-by-step derivation
              1. lower-exp.f6463.6

                \[\leadsto \color{blue}{e^{x}} \]
            8. Applied rewrites63.6%

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

            if 6.8000000000000002e155 < z

            1. Initial program 100.0%

              \[e^{\left(x + y \cdot \log y\right) - z} \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
              2. lower-neg.f6486.3

                \[\leadsto e^{\color{blue}{-z}} \]
            5. Applied rewrites86.3%

              \[\leadsto e^{\color{blue}{-z}} \]
            6. Taylor expanded in z around 0

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

                \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
              2. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
              3. sub-negN/A

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
              6. lower-fma.f6415.2

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
            8. Applied rewrites15.2%

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
            9. Step-by-step derivation
              1. lift-fma.f64N/A

                \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
              2. flip-+N/A

                \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
              3. clear-numN/A

                \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
              4. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
              5. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
              6. flip-+N/A

                \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
              7. lift-fma.f64N/A

                \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
              8. lower-/.f6415.2

                \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
            10. Applied rewrites15.2%

              \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
            11. Taylor expanded in z around 0

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

                \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
              2. lower-fma.f64N/A

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
              3. +-commutativeN/A

                \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
              4. lower-fma.f6486.3

                \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
            13. Applied rewrites86.3%

              \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
          13. Recombined 3 regimes into one program.
          14. Final simplification72.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+55}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+51}:\\ \;\;\;\;e^{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \]
          15. Add Preprocessing

          Alternative 10: 57.3% accurate, 2.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{if}\;z \leq -5 \cdot 10^{-83}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-275}:\\ \;\;\;\;\frac{t\_0}{\left(z \cdot \left(z \cdot \left(z \cdot z\right)\right)\right) \cdot 0.25}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+45}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0
                   (fma
                    (fma z 0.5 -1.0)
                    (* z (* (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0)))))
                    1.0)))
             (if (<= z -5e-83)
               t_0
               (if (<= z 2.75e-275)
                 (/ t_0 (* (* z (* z (* z z))) 0.25))
                 (if (<= z 9e+45)
                   (fma (* x (fma (* x x) 0.25 -1.0)) (/ 1.0 (fma x 0.5 -1.0)) 1.0)
                   (if (<= z 6.8e+155) t_0 (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0))))))))
          double code(double x, double y, double z) {
          	double t_0 = fma(fma(z, 0.5, -1.0), (z * (fma(z, 0.5, -1.0) * (z * (z * fma(z, 0.5, -1.0))))), 1.0);
          	double tmp;
          	if (z <= -5e-83) {
          		tmp = t_0;
          	} else if (z <= 2.75e-275) {
          		tmp = t_0 / ((z * (z * (z * z))) * 0.25);
          	} else if (z <= 9e+45) {
          		tmp = fma((x * fma((x * x), 0.25, -1.0)), (1.0 / fma(x, 0.5, -1.0)), 1.0);
          	} else if (z <= 6.8e+155) {
          		tmp = t_0;
          	} else {
          		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	t_0 = fma(fma(z, 0.5, -1.0), Float64(z * Float64(fma(z, 0.5, -1.0) * Float64(z * Float64(z * fma(z, 0.5, -1.0))))), 1.0)
          	tmp = 0.0
          	if (z <= -5e-83)
          		tmp = t_0;
          	elseif (z <= 2.75e-275)
          		tmp = Float64(t_0 / Float64(Float64(z * Float64(z * Float64(z * z))) * 0.25));
          	elseif (z <= 9e+45)
          		tmp = fma(Float64(x * fma(Float64(x * x), 0.25, -1.0)), Float64(1.0 / fma(x, 0.5, -1.0)), 1.0);
          	elseif (z <= 6.8e+155)
          		tmp = t_0;
          	else
          		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[z, -5e-83], t$95$0, If[LessEqual[z, 2.75e-275], N[(t$95$0 / N[(N[(z * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+45], N[(N[(x * N[(N[(x * x), $MachinePrecision] * 0.25 + -1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 6.8e+155], t$95$0, N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\
          \mathbf{if}\;z \leq -5 \cdot 10^{-83}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq 2.75 \cdot 10^{-275}:\\
          \;\;\;\;\frac{t\_0}{\left(z \cdot \left(z \cdot \left(z \cdot z\right)\right)\right) \cdot 0.25}\\
          
          \mathbf{elif}\;z \leq 9 \cdot 10^{+45}:\\
          \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\
          
          \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z < -5e-83 or 8.9999999999999997e45 < z < 6.8000000000000002e155

            1. Initial program 100.0%

              \[e^{\left(x + y \cdot \log y\right) - z} \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
              2. lower-neg.f6468.8

                \[\leadsto e^{\color{blue}{-z}} \]
            5. Applied rewrites68.8%

              \[\leadsto e^{\color{blue}{-z}} \]
            6. Taylor expanded in z around 0

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

                \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
              2. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
              3. sub-negN/A

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
              5. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
              6. lower-fma.f6435.4

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
            8. Applied rewrites35.4%

              \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
            9. Step-by-step derivation
              1. lift-fma.f64N/A

                \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
              2. flip3-+N/A

                \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
              3. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
            10. Applied rewrites12.4%

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
            11. Taylor expanded in z around 0

              \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]
            12. Step-by-step derivation
              1. Applied rewrites70.4%

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{1}} \]

              if -5e-83 < z < 2.74999999999999994e-275

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6415.9

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites15.9%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6415.9

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites15.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip3-+N/A

                  \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
                3. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}^{3} + {1}^{3}}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(1 \cdot 1 - \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot 1\right)}} \]
              10. Applied rewrites15.9%

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right), \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right), 1\right)}} \]
              11. Taylor expanded in z around inf

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{\frac{1}{4} \cdot {z}^{4}}} \]
              12. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{{z}^{4} \cdot \frac{1}{4}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{{z}^{4} \cdot \frac{1}{4}}} \]
                3. metadata-evalN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{{z}^{\color{blue}{\left(3 + 1\right)}} \cdot \frac{1}{4}} \]
                4. pow-plusN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{\left({z}^{3} \cdot z\right)} \cdot \frac{1}{4}} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{\left(z \cdot {z}^{3}\right)} \cdot \frac{1}{4}} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\color{blue}{\left(z \cdot {z}^{3}\right)} \cdot \frac{1}{4}} \]
                7. cube-multN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \color{blue}{\left(z \cdot \left(z \cdot z\right)\right)}\right) \cdot \frac{1}{4}} \]
                8. unpow2N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \left(z \cdot \color{blue}{{z}^{2}}\right)\right) \cdot \frac{1}{4}} \]
                9. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \color{blue}{\left(z \cdot {z}^{2}\right)}\right) \cdot \frac{1}{4}} \]
                10. unpow2N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \left(z \cdot \color{blue}{\left(z \cdot z\right)}\right)\right) \cdot \frac{1}{4}} \]
                11. lower-*.f6464.1

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \left(z \cdot \color{blue}{\left(z \cdot z\right)}\right)\right) \cdot 0.25} \]
              13. Applied rewrites64.1%

                \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\color{blue}{\left(z \cdot \left(z \cdot \left(z \cdot z\right)\right)\right) \cdot 0.25}} \]

              if 2.74999999999999994e-275 < z < 8.9999999999999997e45

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6464.6

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites64.6%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6463.3

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites63.3%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6445.6

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites45.6%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right)} + 1 \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right) \cdot x} + 1 \]
                3. lift-fma.f64N/A

                  \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot x + 1\right)} \cdot x + 1 \]
                4. flip-+N/A

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

                  \[\leadsto \color{blue}{\frac{\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x}{\frac{1}{2} \cdot x - 1}} + 1 \]
                6. div-invN/A

                  \[\leadsto \color{blue}{\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x\right) \cdot \frac{1}{\frac{1}{2} \cdot x - 1}} + 1 \]
                7. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x, \frac{1}{\frac{1}{2} \cdot x - 1}, 1\right)} \]
              13. Applied rewrites46.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.25, -1\right) \cdot x, \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)} \]

              if 6.8000000000000002e155 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6486.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites86.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6415.2

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites15.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
                6. flip-+N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
                7. lift-fma.f64N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
                8. lower-/.f6415.2

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              10. Applied rewrites15.2%

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              11. Taylor expanded in z around 0

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

                  \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
                2. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
                3. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
                4. lower-fma.f6486.3

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
              13. Applied rewrites86.3%

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
            13. Recombined 4 regimes into one program.
            14. Final simplification64.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-83}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-275}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)}{\left(z \cdot \left(z \cdot \left(z \cdot z\right)\right)\right) \cdot 0.25}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+45}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(\mathsf{fma}\left(z, 0.5, -1\right) \cdot \left(z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right)\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \]
            15. Add Preprocessing

            Alternative 11: 52.9% accurate, 3.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+100}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, z \cdot 0.25, -1\right), \frac{-1}{\mathsf{fma}\left(z, -0.5, -1\right)}, 1\right)\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right), -1\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right)}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -2e+100)
               (fma (* z (fma z (* z 0.25) -1.0)) (/ -1.0 (fma z -0.5 -1.0)) 1.0)
               (if (<= z -1.2e+56)
                 (/
                  (fma (fma z 0.5 -1.0) (* z (* z (fma z 0.5 -1.0))) -1.0)
                  (fma z (fma z 0.5 -1.0) -1.0))
                 (if (<= z 6.8e+155)
                   (fma (* x (fma (* x x) 0.25 -1.0)) (/ 1.0 (fma x 0.5 -1.0)) 1.0)
                   (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0))))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -2e+100) {
            		tmp = fma((z * fma(z, (z * 0.25), -1.0)), (-1.0 / fma(z, -0.5, -1.0)), 1.0);
            	} else if (z <= -1.2e+56) {
            		tmp = fma(fma(z, 0.5, -1.0), (z * (z * fma(z, 0.5, -1.0))), -1.0) / fma(z, fma(z, 0.5, -1.0), -1.0);
            	} else if (z <= 6.8e+155) {
            		tmp = fma((x * fma((x * x), 0.25, -1.0)), (1.0 / fma(x, 0.5, -1.0)), 1.0);
            	} else {
            		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -2e+100)
            		tmp = fma(Float64(z * fma(z, Float64(z * 0.25), -1.0)), Float64(-1.0 / fma(z, -0.5, -1.0)), 1.0);
            	elseif (z <= -1.2e+56)
            		tmp = Float64(fma(fma(z, 0.5, -1.0), Float64(z * Float64(z * fma(z, 0.5, -1.0))), -1.0) / fma(z, fma(z, 0.5, -1.0), -1.0));
            	elseif (z <= 6.8e+155)
            		tmp = fma(Float64(x * fma(Float64(x * x), 0.25, -1.0)), Float64(1.0 / fma(x, 0.5, -1.0)), 1.0);
            	else
            		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -2e+100], N[(N[(z * N[(z * N[(z * 0.25), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[(z * -0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, -1.2e+56], N[(N[(N[(z * 0.5 + -1.0), $MachinePrecision] * N[(z * N[(z * N[(z * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[(z * N[(z * 0.5 + -1.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+155], N[(N[(x * N[(N[(x * x), $MachinePrecision] * 0.25 + -1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -2 \cdot 10^{+100}:\\
            \;\;\;\;\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, z \cdot 0.25, -1\right), \frac{-1}{\mathsf{fma}\left(z, -0.5, -1\right)}, 1\right)\\
            
            \mathbf{elif}\;z \leq -1.2 \cdot 10^{+56}:\\
            \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right), -1\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right)}\\
            
            \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
            \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if z < -2.00000000000000003e100

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6490.4

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites90.4%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6468.3

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites68.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot z} + 1 \]
                3. lift-fma.f64N/A

                  \[\leadsto \color{blue}{\left(z \cdot \frac{1}{2} + -1\right)} \cdot z + 1 \]
                4. flip-+N/A

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

                  \[\leadsto \color{blue}{\frac{\left(\left(z \cdot \frac{1}{2}\right) \cdot \left(z \cdot \frac{1}{2}\right) - -1 \cdot -1\right) \cdot z}{z \cdot \frac{1}{2} - -1}} + 1 \]
                6. div-invN/A

                  \[\leadsto \color{blue}{\left(\left(\left(z \cdot \frac{1}{2}\right) \cdot \left(z \cdot \frac{1}{2}\right) - -1 \cdot -1\right) \cdot z\right) \cdot \frac{1}{z \cdot \frac{1}{2} - -1}} + 1 \]
                7. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(z \cdot \frac{1}{2}\right) \cdot \left(z \cdot \frac{1}{2}\right) - -1 \cdot -1\right) \cdot z, \frac{1}{z \cdot \frac{1}{2} - -1}, 1\right)} \]
              10. Applied rewrites90.4%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, z \cdot 0.25, -1\right), \frac{-1}{\mathsf{fma}\left(z, -0.5, -1\right)}, 1\right)} \]

              if -2.00000000000000003e100 < z < -1.20000000000000007e56

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f64100.0

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites100.0%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f645.0

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites5.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                4. metadata-evalN/A

                  \[\leadsto \frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - \color{blue}{1}}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                5. sub-negN/A

                  \[\leadsto \frac{\color{blue}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                6. associate-*r*N/A

                  \[\leadsto \frac{\color{blue}{\left(\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot z\right) \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + \left(\mathsf{neg}\left(1\right)\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                7. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot z\right)} + \left(\mathsf{neg}\left(1\right)\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                8. metadata-evalN/A

                  \[\leadsto \frac{\mathsf{fma}\left(z, \frac{1}{2}, -1\right) \cdot \left(\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot z\right) + \color{blue}{-1}}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                9. lower-fma.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot z, -1\right)}}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                10. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), \color{blue}{z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}, -1\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                11. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), \color{blue}{z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}, -1\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                12. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \color{blue}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right)}, -1\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1} \]
                13. sub-negN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right), -1\right)}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                14. metadata-evalN/A

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, \frac{1}{2}, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right), -1\right)}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + \color{blue}{-1}} \]
                15. lower-fma.f6478.7

                  \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right), -1\right)}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right)}} \]
              10. Applied rewrites78.7%

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right), -1\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right)}} \]

              if -1.20000000000000007e56 < z < 6.8000000000000002e155

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6468.1

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites68.1%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6460.4

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites60.4%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6437.3

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites37.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right)} + 1 \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right) \cdot x} + 1 \]
                3. lift-fma.f64N/A

                  \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot x + 1\right)} \cdot x + 1 \]
                4. flip-+N/A

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

                  \[\leadsto \color{blue}{\frac{\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x}{\frac{1}{2} \cdot x - 1}} + 1 \]
                6. div-invN/A

                  \[\leadsto \color{blue}{\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x\right) \cdot \frac{1}{\frac{1}{2} \cdot x - 1}} + 1 \]
                7. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x, \frac{1}{\frac{1}{2} \cdot x - 1}, 1\right)} \]
              13. Applied rewrites41.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.25, -1\right) \cdot x, \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)} \]

              if 6.8000000000000002e155 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6486.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites86.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6415.2

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites15.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
                6. flip-+N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
                7. lift-fma.f64N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
                8. lower-/.f6415.2

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              10. Applied rewrites15.2%

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              11. Taylor expanded in z around 0

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

                  \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
                2. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
                3. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
                4. lower-fma.f6486.3

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
              13. Applied rewrites86.3%

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
            3. Recombined 4 regimes into one program.
            4. Final simplification56.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+100}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot \mathsf{fma}\left(z, z \cdot 0.25, -1\right), \frac{-1}{\mathsf{fma}\left(z, -0.5, -1\right)}, 1\right)\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.5, -1\right), z \cdot \left(z \cdot \mathsf{fma}\left(z, 0.5, -1\right)\right), -1\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), -1\right)}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 51.5% accurate, 4.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -1.2e+56)
               (fma z (fma z (fma z -0.16666666666666666 0.5) -1.0) 1.0)
               (if (<= z 6.8e+155)
                 (fma (* x (fma (* x x) 0.25 -1.0)) (/ 1.0 (fma x 0.5 -1.0)) 1.0)
                 (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -1.2e+56) {
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	} else if (z <= 6.8e+155) {
            		tmp = fma((x * fma((x * x), 0.25, -1.0)), (1.0 / fma(x, 0.5, -1.0)), 1.0);
            	} else {
            		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -1.2e+56)
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	elseif (z <= 6.8e+155)
            		tmp = fma(Float64(x * fma(Float64(x * x), 0.25, -1.0)), Float64(1.0 / fma(x, 0.5, -1.0)), 1.0);
            	else
            		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -1.2e+56], N[(z * N[(z * N[(z * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 6.8e+155], N[(N[(x * N[(N[(x * x), $MachinePrecision] * 0.25 + -1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x * 0.5 + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\
            \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
            
            \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
            \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.20000000000000007e56

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6492.1

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites92.1%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \color{blue}{-1}, 1\right) \]
                5. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{6} \cdot z, -1\right)}, 1\right) \]
                6. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{6} \cdot z + \frac{1}{2}}, -1\right), 1\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{-1}{6}} + \frac{1}{2}, -1\right), 1\right) \]
                8. lower-fma.f6475.5

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, -0.16666666666666666, 0.5\right)}, -1\right), 1\right) \]
              8. Applied rewrites75.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)} \]

              if -1.20000000000000007e56 < z < 6.8000000000000002e155

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6468.1

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites68.1%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6460.4

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites60.4%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6437.3

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites37.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right)} + 1 \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{2}, x, 1\right) \cdot x} + 1 \]
                3. lift-fma.f64N/A

                  \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot x + 1\right)} \cdot x + 1 \]
                4. flip-+N/A

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

                  \[\leadsto \color{blue}{\frac{\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x}{\frac{1}{2} \cdot x - 1}} + 1 \]
                6. div-invN/A

                  \[\leadsto \color{blue}{\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x\right) \cdot \frac{1}{\frac{1}{2} \cdot x - 1}} + 1 \]
                7. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\left(\frac{1}{2} \cdot x\right) \cdot \left(\frac{1}{2} \cdot x\right) - 1 \cdot 1\right) \cdot x, \frac{1}{\frac{1}{2} \cdot x - 1}, 1\right)} \]
              13. Applied rewrites41.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.25, -1\right) \cdot x, \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)} \]

              if 6.8000000000000002e155 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6486.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites86.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6415.2

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites15.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
                6. flip-+N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
                7. lift-fma.f64N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
                8. lower-/.f6415.2

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              10. Applied rewrites15.2%

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              11. Taylor expanded in z around 0

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

                  \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
                2. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
                3. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
                4. lower-fma.f6486.3

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
              13. Applied rewrites86.3%

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification54.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, 0.25, -1\right), \frac{1}{\mathsf{fma}\left(x, 0.5, -1\right)}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 13: 52.3% accurate, 4.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+81}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -1.2e+56)
               (fma z (fma z (fma z -0.16666666666666666 0.5) -1.0) 1.0)
               (if (<= z 2.55e+81)
                 (fma x (fma x (fma 0.16666666666666666 x 0.5) 1.0) 1.0)
                 (/ 1.0 (fma z (fma z (fma (* z z) -0.25 0.5) 1.0) 1.0)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -1.2e+56) {
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	} else if (z <= 2.55e+81) {
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	} else {
            		tmp = 1.0 / fma(z, fma(z, fma((z * z), -0.25, 0.5), 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -1.2e+56)
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	elseif (z <= 2.55e+81)
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	else
            		tmp = Float64(1.0 / fma(z, fma(z, fma(Float64(z * z), -0.25, 0.5), 1.0), 1.0));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -1.2e+56], N[(z * N[(z * N[(z * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 2.55e+81], N[(x * N[(x * N[(0.16666666666666666 * x + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 / N[(z * N[(z * N[(N[(z * z), $MachinePrecision] * -0.25 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\
            \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
            
            \mathbf{elif}\;z \leq 2.55 \cdot 10^{+81}:\\
            \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.20000000000000007e56

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6492.1

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites92.1%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \color{blue}{-1}, 1\right) \]
                5. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{6} \cdot z, -1\right)}, 1\right) \]
                6. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{6} \cdot z + \frac{1}{2}}, -1\right), 1\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{-1}{6}} + \frac{1}{2}, -1\right), 1\right) \]
                8. lower-fma.f6475.5

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, -0.16666666666666666, 0.5\right)}, -1\right), 1\right) \]
              8. Applied rewrites75.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)} \]

              if -1.20000000000000007e56 < z < 2.5500000000000001e81

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6468.1

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites68.1%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6463.1

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites63.1%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

                \[\leadsto \color{blue}{1 + x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)} \]
              10. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right), 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right) + 1}, 1\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{2} + \frac{1}{6} \cdot x, 1\right)}, 1\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot x + \frac{1}{2}}, 1\right), 1\right) \]
                6. lower-fma.f6438.7

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.16666666666666666, x, 0.5\right)}, 1\right), 1\right) \]
              11. Applied rewrites38.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)} \]

              if 2.5500000000000001e81 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6469.5

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites69.5%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6413.2

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites13.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
                6. flip-+N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
                7. lift-fma.f64N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
                8. lower-/.f6413.2

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              10. Applied rewrites13.2%

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              11. Taylor expanded in z around 0

                \[\leadsto \frac{1}{\color{blue}{1 + z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right)}} \]
              12. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right)\right) + 1}} \]
                2. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right), 1\right)}} \]
                3. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}\right) + 1}, 1\right)} \]
                4. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{4} \cdot {z}^{2}, 1\right)}, 1\right)} \]
                5. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{4} \cdot {z}^{2} + \frac{1}{2}}, 1\right), 1\right)} \]
                6. *-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{{z}^{2} \cdot \frac{-1}{4}} + \frac{1}{2}, 1\right), 1\right)} \]
                7. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left({z}^{2}, \frac{-1}{4}, \frac{1}{2}\right)}, 1\right), 1\right)} \]
                8. unpow2N/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, \frac{-1}{4}, \frac{1}{2}\right), 1\right), 1\right)} \]
                9. lower-*.f6469.5

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(\color{blue}{z \cdot z}, -0.25, 0.5\right), 1\right), 1\right)} \]
              13. Applied rewrites69.5%

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z \cdot z, -0.25, 0.5\right), 1\right), 1\right)}} \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 14: 49.7% accurate, 5.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -1.2e+56)
               (fma z (fma z (fma z -0.16666666666666666 0.5) -1.0) 1.0)
               (if (<= z 6.8e+155)
                 (fma x (fma x (fma 0.16666666666666666 x 0.5) 1.0) 1.0)
                 (/ 1.0 (fma z (fma 0.5 z 1.0) 1.0)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -1.2e+56) {
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	} else if (z <= 6.8e+155) {
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	} else {
            		tmp = 1.0 / fma(z, fma(0.5, z, 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -1.2e+56)
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	elseif (z <= 6.8e+155)
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	else
            		tmp = Float64(1.0 / fma(z, fma(0.5, z, 1.0), 1.0));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -1.2e+56], N[(z * N[(z * N[(z * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 6.8e+155], N[(x * N[(x * N[(0.16666666666666666 * x + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 / N[(z * N[(0.5 * z + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.2 \cdot 10^{+56}:\\
            \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
            
            \mathbf{elif}\;z \leq 6.8 \cdot 10^{+155}:\\
            \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.20000000000000007e56

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6492.1

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites92.1%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \color{blue}{-1}, 1\right) \]
                5. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{6} \cdot z, -1\right)}, 1\right) \]
                6. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{6} \cdot z + \frac{1}{2}}, -1\right), 1\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{-1}{6}} + \frac{1}{2}, -1\right), 1\right) \]
                8. lower-fma.f6475.5

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, -0.16666666666666666, 0.5\right)}, -1\right), 1\right) \]
              8. Applied rewrites75.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)} \]

              if -1.20000000000000007e56 < z < 6.8000000000000002e155

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6468.1

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites68.1%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6460.4

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites60.4%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

                \[\leadsto \color{blue}{1 + x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)} \]
              10. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right), 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right) + 1}, 1\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{2} + \frac{1}{6} \cdot x, 1\right)}, 1\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot x + \frac{1}{2}}, 1\right), 1\right) \]
                6. lower-fma.f6437.4

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.16666666666666666, x, 0.5\right)}, 1\right), 1\right) \]
              11. Applied rewrites37.4%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)} \]

              if 6.8000000000000002e155 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6486.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites86.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6415.2

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites15.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

                  \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(z, \frac{1}{2}, -1\right)} + 1 \]
                2. flip-+N/A

                  \[\leadsto \color{blue}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}} \]
                3. clear-numN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}}} \]
                5. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\frac{\left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) \cdot \left(z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)\right) - 1 \cdot 1}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) - 1}}}} \]
                6. flip-+N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right) + 1}}} \]
                7. lift-fma.f64N/A

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{1}{2}, -1\right), 1\right)}}} \]
                8. lower-/.f6415.2

                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              10. Applied rewrites15.2%

                \[\leadsto \color{blue}{\frac{1}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)}}} \]
              11. Taylor expanded in z around 0

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

                  \[\leadsto \frac{1}{\color{blue}{z \cdot \left(1 + \frac{1}{2} \cdot z\right) + 1}} \]
                2. lower-fma.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, 1 + \frac{1}{2} \cdot z, 1\right)}} \]
                3. +-commutativeN/A

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + 1}, 1\right)} \]
                4. lower-fma.f6486.3

                  \[\leadsto \frac{1}{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(0.5, z, 1\right)}, 1\right)} \]
              13. Applied rewrites86.3%

                \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(0.5, z, 1\right), 1\right)}} \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 15: 44.6% accurate, 6.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -2.3e+19)
               (* (* z z) 0.5)
               (if (<= x 8.5e+40)
                 (fma z (fma z (fma z -0.16666666666666666 0.5) -1.0) 1.0)
                 (fma x (fma x (fma 0.16666666666666666 x 0.5) 1.0) 1.0))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -2.3e+19) {
            		tmp = (z * z) * 0.5;
            	} else if (x <= 8.5e+40) {
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	} else {
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -2.3e+19)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (x <= 8.5e+40)
            		tmp = fma(z, fma(z, fma(z, -0.16666666666666666, 0.5), -1.0), 1.0);
            	else
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -2.3e+19], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[x, 8.5e+40], N[(z * N[(z * N[(z * -0.16666666666666666 + 0.5), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], N[(x * N[(x * N[(0.16666666666666666 * x + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -2.3 \cdot 10^{+19}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;x \leq 8.5 \cdot 10^{+40}:\\
            \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -2.3e19

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6436.8

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites36.8%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6411.5

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites11.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6428.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites28.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -2.3e19 < x < 8.49999999999999996e40

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6466.5

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites66.5%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot z\right) + \color{blue}{-1}, 1\right) \]
                5. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} + \frac{-1}{6} \cdot z, -1\right)}, 1\right) \]
                6. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{-1}{6} \cdot z + \frac{1}{2}}, -1\right), 1\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{-1}{6}} + \frac{1}{2}, -1\right), 1\right) \]
                8. lower-fma.f6441.8

                  \[\leadsto \mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, -0.16666666666666666, 0.5\right)}, -1\right), 1\right) \]
              8. Applied rewrites41.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)} \]

              if 8.49999999999999996e40 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6496.5

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites96.5%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6486.2

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites86.2%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

                \[\leadsto \color{blue}{1 + x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)} \]
              10. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right), 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right) + 1}, 1\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{2} + \frac{1}{6} \cdot x, 1\right)}, 1\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot x + \frac{1}{2}}, 1\right), 1\right) \]
                6. lower-fma.f6468.1

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.16666666666666666, x, 0.5\right)}, 1\right), 1\right) \]
              11. Applied rewrites68.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification44.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 16: 43.9% accurate, 6.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+96}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -3.15e+19)
               (* (* z z) 0.5)
               (if (<= x 4.5e+96)
                 (- (fma z (* z 0.5) 1.0) z)
                 (fma x (fma x (fma 0.16666666666666666 x 0.5) 1.0) 1.0))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.15e+19) {
            		tmp = (z * z) * 0.5;
            	} else if (x <= 4.5e+96) {
            		tmp = fma(z, (z * 0.5), 1.0) - z;
            	} else {
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -3.15e+19)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (x <= 4.5e+96)
            		tmp = Float64(fma(z, Float64(z * 0.5), 1.0) - z);
            	else
            		tmp = fma(x, fma(x, fma(0.16666666666666666, x, 0.5), 1.0), 1.0);
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -3.15e+19], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[x, 4.5e+96], N[(N[(z * N[(z * 0.5), $MachinePrecision] + 1.0), $MachinePrecision] - z), $MachinePrecision], N[(x * N[(x * N[(0.16666666666666666 * x + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;x \leq 4.5 \cdot 10^{+96}:\\
            \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.15e19

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6436.8

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites36.8%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6411.5

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites11.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6428.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites28.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -3.15e19 < x < 4.49999999999999957e96

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6463.1

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites63.1%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6434.9

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites34.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

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

                  \[\leadsto \color{blue}{1 + z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)} \]
                3. lift-fma.f64N/A

                  \[\leadsto 1 + z \cdot \color{blue}{\left(z \cdot \frac{1}{2} + -1\right)} \]
                4. distribute-lft-inN/A

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

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) + z \cdot -1} \]
                6. *-commutativeN/A

                  \[\leadsto \left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) + \color{blue}{-1 \cdot z} \]
                7. mul-1-negN/A

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

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) - z} \]
                9. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) - z} \]
                10. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(z \cdot \left(z \cdot \frac{1}{2}\right) + 1\right)} - z \]
                11. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \frac{1}{2}, 1\right)} - z \]
                12. lower-*.f6434.9

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot 0.5}, 1\right) - z \]
              10. Applied rewrites34.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z} \]

              if 4.49999999999999957e96 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6497.9

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites97.9%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6485.0

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites85.0%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

                \[\leadsto \color{blue}{1 + x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)} \]
              10. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right), 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right) + 1}, 1\right) \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{2} + \frac{1}{6} \cdot x, 1\right)}, 1\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot x + \frac{1}{2}}, 1\right), 1\right) \]
                6. lower-fma.f6483.1

                  \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.16666666666666666, x, 0.5\right)}, 1\right), 1\right) \]
              11. Applied rewrites83.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification42.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+96}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(0.16666666666666666, x, 0.5\right), 1\right), 1\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 17: 32.5% accurate, 7.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(z \cdot z\right) \cdot 0.5\\ \mathbf{if}\;x \leq -7.2 \cdot 10^{-147}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-139}:\\ \;\;\;\;1 - z\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (* (* z z) 0.5)))
               (if (<= x -7.2e-147)
                 t_0
                 (if (<= x 1.1e-139)
                   (- 1.0 z)
                   (if (<= x 1.85e+152) t_0 (* 0.5 (* x x)))))))
            double code(double x, double y, double z) {
            	double t_0 = (z * z) * 0.5;
            	double tmp;
            	if (x <= -7.2e-147) {
            		tmp = t_0;
            	} else if (x <= 1.1e-139) {
            		tmp = 1.0 - z;
            	} else if (x <= 1.85e+152) {
            		tmp = t_0;
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: t_0
                real(8) :: tmp
                t_0 = (z * z) * 0.5d0
                if (x <= (-7.2d-147)) then
                    tmp = t_0
                else if (x <= 1.1d-139) then
                    tmp = 1.0d0 - z
                else if (x <= 1.85d+152) then
                    tmp = t_0
                else
                    tmp = 0.5d0 * (x * x)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double t_0 = (z * z) * 0.5;
            	double tmp;
            	if (x <= -7.2e-147) {
            		tmp = t_0;
            	} else if (x <= 1.1e-139) {
            		tmp = 1.0 - z;
            	} else if (x <= 1.85e+152) {
            		tmp = t_0;
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = (z * z) * 0.5
            	tmp = 0
            	if x <= -7.2e-147:
            		tmp = t_0
            	elif x <= 1.1e-139:
            		tmp = 1.0 - z
            	elif x <= 1.85e+152:
            		tmp = t_0
            	else:
            		tmp = 0.5 * (x * x)
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(Float64(z * z) * 0.5)
            	tmp = 0.0
            	if (x <= -7.2e-147)
            		tmp = t_0;
            	elseif (x <= 1.1e-139)
            		tmp = Float64(1.0 - z);
            	elseif (x <= 1.85e+152)
            		tmp = t_0;
            	else
            		tmp = Float64(0.5 * Float64(x * x));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = (z * z) * 0.5;
            	tmp = 0.0;
            	if (x <= -7.2e-147)
            		tmp = t_0;
            	elseif (x <= 1.1e-139)
            		tmp = 1.0 - z;
            	elseif (x <= 1.85e+152)
            		tmp = t_0;
            	else
            		tmp = 0.5 * (x * x);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[x, -7.2e-147], t$95$0, If[LessEqual[x, 1.1e-139], N[(1.0 - z), $MachinePrecision], If[LessEqual[x, 1.85e+152], t$95$0, N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left(z \cdot z\right) \cdot 0.5\\
            \mathbf{if}\;x \leq -7.2 \cdot 10^{-147}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;x \leq 1.1 \cdot 10^{-139}:\\
            \;\;\;\;1 - z\\
            
            \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{else}:\\
            \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -7.20000000000000023e-147 or 1.10000000000000005e-139 < x < 1.84999999999999998e152

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6449.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites49.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6421.3

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites21.3%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6423.5

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites23.5%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -7.20000000000000023e-147 < x < 1.10000000000000005e-139

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6469.2

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites69.2%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{1 + -1 \cdot z} \]
              7. Step-by-step derivation
                1. neg-mul-1N/A

                  \[\leadsto 1 + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \]
                2. unsub-negN/A

                  \[\leadsto \color{blue}{1 - z} \]
                3. lower--.f6433.2

                  \[\leadsto \color{blue}{1 - z} \]
              8. Applied rewrites33.2%

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

              if 1.84999999999999998e152 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f64100.0

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites100.0%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6489.9

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites89.9%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6487.7

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites87.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
              13. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
                3. lower-*.f6487.7

                  \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
              14. Applied rewrites87.7%

                \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification35.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.2 \cdot 10^{-147}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-139}:\\ \;\;\;\;1 - z\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 18: 41.1% accurate, 7.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -3.15e+19)
               (* (* z z) 0.5)
               (if (<= x 1.85e+152) (- (fma z (* z 0.5) 1.0) z) (* 0.5 (* x x)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.15e+19) {
            		tmp = (z * z) * 0.5;
            	} else if (x <= 1.85e+152) {
            		tmp = fma(z, (z * 0.5), 1.0) - z;
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -3.15e+19)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (x <= 1.85e+152)
            		tmp = Float64(fma(z, Float64(z * 0.5), 1.0) - z);
            	else
            		tmp = Float64(0.5 * Float64(x * x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -3.15e+19], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[x, 1.85e+152], N[(N[(z * N[(z * 0.5), $MachinePrecision] + 1.0), $MachinePrecision] - z), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\
            \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\
            
            \mathbf{else}:\\
            \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.15e19

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6436.8

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites36.8%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6411.5

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites11.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6428.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites28.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -3.15e19 < x < 1.84999999999999998e152

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6462.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites62.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6434.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites34.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Step-by-step derivation
                1. lift-fma.f64N/A

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

                  \[\leadsto \color{blue}{1 + z \cdot \mathsf{fma}\left(z, \frac{1}{2}, -1\right)} \]
                3. lift-fma.f64N/A

                  \[\leadsto 1 + z \cdot \color{blue}{\left(z \cdot \frac{1}{2} + -1\right)} \]
                4. distribute-lft-inN/A

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

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) + z \cdot -1} \]
                6. *-commutativeN/A

                  \[\leadsto \left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) + \color{blue}{-1 \cdot z} \]
                7. mul-1-negN/A

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

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) - z} \]
                9. lower--.f64N/A

                  \[\leadsto \color{blue}{\left(1 + z \cdot \left(z \cdot \frac{1}{2}\right)\right) - z} \]
                10. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(z \cdot \left(z \cdot \frac{1}{2}\right) + 1\right)} - z \]
                11. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \frac{1}{2}, 1\right)} - z \]
                12. lower-*.f6434.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot 0.5}, 1\right) - z \]
              10. Applied rewrites34.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z} \]

              if 1.84999999999999998e152 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f64100.0

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites100.0%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6489.9

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites89.9%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6487.7

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites87.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
              13. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
                3. lower-*.f6487.7

                  \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
              14. Applied rewrites87.7%

                \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification41.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right) - z\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 19: 41.1% accurate, 8.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -3.15e+19)
               (* (* z z) 0.5)
               (if (<= x 1.85e+152) (fma z (fma z 0.5 -1.0) 1.0) (* 0.5 (* x x)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.15e+19) {
            		tmp = (z * z) * 0.5;
            	} else if (x <= 1.85e+152) {
            		tmp = fma(z, fma(z, 0.5, -1.0), 1.0);
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -3.15e+19)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (x <= 1.85e+152)
            		tmp = fma(z, fma(z, 0.5, -1.0), 1.0);
            	else
            		tmp = Float64(0.5 * Float64(x * x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -3.15e+19], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[x, 1.85e+152], N[(z * N[(z * 0.5 + -1.0), $MachinePrecision] + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\
            \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.15e19

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6436.8

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites36.8%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6411.5

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites11.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6428.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites28.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -3.15e19 < x < 1.84999999999999998e152

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6462.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites62.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6434.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites34.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]

              if 1.84999999999999998e152 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f64100.0

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites100.0%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6489.9

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites89.9%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6487.7

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites87.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
              13. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
                3. lower-*.f6487.7

                  \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
              14. Applied rewrites87.7%

                \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification41.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 20: 41.0% accurate, 8.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -3.15e+19)
               (* (* z z) 0.5)
               (if (<= x 1.85e+152) (fma z (* z 0.5) 1.0) (* 0.5 (* x x)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -3.15e+19) {
            		tmp = (z * z) * 0.5;
            	} else if (x <= 1.85e+152) {
            		tmp = fma(z, (z * 0.5), 1.0);
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -3.15e+19)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (x <= 1.85e+152)
            		tmp = fma(z, Float64(z * 0.5), 1.0);
            	else
            		tmp = Float64(0.5 * Float64(x * x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -3.15e+19], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[x, 1.85e+152], N[(z * N[(z * 0.5), $MachinePrecision] + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\
            \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -3.15e19

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6436.8

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites36.8%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6411.5

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites11.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6428.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites28.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -3.15e19 < x < 1.84999999999999998e152

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6462.3

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites62.3%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6434.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites34.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z}, 1\right) \]
              10. Step-by-step derivation
                1. lower-*.f6433.9

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{0.5 \cdot z}, 1\right) \]
              11. Applied rewrites33.9%

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{0.5 \cdot z}, 1\right) \]

              if 1.84999999999999998e152 < x

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f64100.0

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites100.0%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6489.9

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites89.9%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6487.7

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites87.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
              13. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
                3. lower-*.f6487.7

                  \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
              14. Applied rewrites87.7%

                \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification41.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+19}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot 0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 21: 40.8% accurate, 8.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+152}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot 0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -1.7e+152)
               (* (* z z) 0.5)
               (if (<= z 1.25e+15) (fma x (* x 0.5) 1.0) (* 0.5 (* x x)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -1.7e+152) {
            		tmp = (z * z) * 0.5;
            	} else if (z <= 1.25e+15) {
            		tmp = fma(x, (x * 0.5), 1.0);
            	} else {
            		tmp = 0.5 * (x * x);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -1.7e+152)
            		tmp = Float64(Float64(z * z) * 0.5);
            	elseif (z <= 1.25e+15)
            		tmp = fma(x, Float64(x * 0.5), 1.0);
            	else
            		tmp = Float64(0.5 * Float64(x * x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -1.7e+152], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[z, 1.25e+15], N[(x * N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.7 \cdot 10^{+152}:\\
            \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
            
            \mathbf{elif}\;z \leq 1.25 \cdot 10^{+15}:\\
            \;\;\;\;\mathsf{fma}\left(x, x \cdot 0.5, 1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.7000000000000001e152

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
                2. lower-neg.f6496.7

                  \[\leadsto e^{\color{blue}{-z}} \]
              5. Applied rewrites96.7%

                \[\leadsto e^{\color{blue}{-z}} \]
              6. Taylor expanded in z around 0

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

                  \[\leadsto \color{blue}{z \cdot \left(\frac{1}{2} \cdot z - 1\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{1}{2} \cdot z - 1, 1\right)} \]
                3. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{1}{2} \cdot z + \left(\mathsf{neg}\left(1\right)\right)}, 1\right) \]
                4. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{z \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(1\right)\right), 1\right) \]
                5. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(z, z \cdot \frac{1}{2} + \color{blue}{-1}, 1\right) \]
                6. lower-fma.f6491.1

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.5, -1\right)}, 1\right) \]
              8. Applied rewrites91.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.5, -1\right), 1\right)} \]
              9. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {z}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(z \cdot z\right)} \]
                3. lower-*.f6493.8

                  \[\leadsto 0.5 \cdot \color{blue}{\left(z \cdot z\right)} \]
              11. Applied rewrites93.8%

                \[\leadsto \color{blue}{0.5 \cdot \left(z \cdot z\right)} \]

              if -1.7000000000000001e152 < z < 1.25e15

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6472.6

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites72.6%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6460.5

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites60.5%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6434.8

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites34.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x}, 1\right) \]
              13. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{2}}, 1\right) \]
                2. lower-*.f6433.9

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot 0.5}, 1\right) \]
              14. Applied rewrites33.9%

                \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot 0.5}, 1\right) \]

              if 1.25e15 < z

              1. Initial program 100.0%

                \[e^{\left(x + y \cdot \log y\right) - z} \]
              2. Add Preprocessing
              3. Taylor expanded in y around 0

                \[\leadsto \color{blue}{e^{x - z}} \]
              4. Step-by-step derivation
                1. lower-exp.f64N/A

                  \[\leadsto \color{blue}{e^{x - z}} \]
                2. lower--.f6479.7

                  \[\leadsto e^{\color{blue}{x - z}} \]
              5. Applied rewrites79.7%

                \[\leadsto \color{blue}{e^{x - z}} \]
              6. Taylor expanded in z around 0

                \[\leadsto \color{blue}{e^{x}} \]
              7. Step-by-step derivation
                1. lower-exp.f6441.2

                  \[\leadsto \color{blue}{e^{x}} \]
              8. Applied rewrites41.2%

                \[\leadsto \color{blue}{e^{x}} \]
              9. Taylor expanded in x around 0

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + \frac{1}{2} \cdot x\right) + 1} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, 1 + \frac{1}{2} \cdot x, 1\right)} \]
                3. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{2} \cdot x + 1}, 1\right) \]
                4. lower-fma.f6418.9

                  \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(0.5, x, 1\right)}, 1\right) \]
              11. Applied rewrites18.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(0.5, x, 1\right), 1\right)} \]
              12. Taylor expanded in x around inf

                \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
              13. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{2} \cdot {x}^{2}} \]
                2. unpow2N/A

                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot x\right)} \]
                3. lower-*.f6429.9

                  \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
              14. Applied rewrites29.9%

                \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification39.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+152}:\\ \;\;\;\;\left(z \cdot z\right) \cdot 0.5\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot 0.5, 1\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 22: 14.6% accurate, 53.0× speedup?

            \[\begin{array}{l} \\ x + 1 \end{array} \]
            (FPCore (x y z) :precision binary64 (+ x 1.0))
            double code(double x, double y, double z) {
            	return x + 1.0;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                code = x + 1.0d0
            end function
            
            public static double code(double x, double y, double z) {
            	return x + 1.0;
            }
            
            def code(x, y, z):
            	return x + 1.0
            
            function code(x, y, z)
            	return Float64(x + 1.0)
            end
            
            function tmp = code(x, y, z)
            	tmp = x + 1.0;
            end
            
            code[x_, y_, z_] := N[(x + 1.0), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            x + 1
            \end{array}
            
            Derivation
            1. Initial program 100.0%

              \[e^{\left(x + y \cdot \log y\right) - z} \]
            2. Add Preprocessing
            3. Taylor expanded in y around 0

              \[\leadsto \color{blue}{e^{x - z}} \]
            4. Step-by-step derivation
              1. lower-exp.f64N/A

                \[\leadsto \color{blue}{e^{x - z}} \]
              2. lower--.f6477.7

                \[\leadsto e^{\color{blue}{x - z}} \]
            5. Applied rewrites77.7%

              \[\leadsto \color{blue}{e^{x - z}} \]
            6. Taylor expanded in z around 0

              \[\leadsto \color{blue}{e^{x}} \]
            7. Step-by-step derivation
              1. lower-exp.f6450.5

                \[\leadsto \color{blue}{e^{x}} \]
            8. Applied rewrites50.5%

              \[\leadsto \color{blue}{e^{x}} \]
            9. Taylor expanded in x around 0

              \[\leadsto \color{blue}{1 + x} \]
            10. Step-by-step derivation
              1. lower-+.f6414.4

                \[\leadsto \color{blue}{1 + x} \]
            11. Applied rewrites14.4%

              \[\leadsto \color{blue}{1 + x} \]
            12. Final simplification14.4%

              \[\leadsto x + 1 \]
            13. Add Preprocessing

            Alternative 23: 14.4% accurate, 212.0× speedup?

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

              \[e^{\left(x + y \cdot \log y\right) - z} \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto e^{\color{blue}{-1 \cdot z}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto e^{\color{blue}{\mathsf{neg}\left(z\right)}} \]
              2. lower-neg.f6451.0

                \[\leadsto e^{\color{blue}{-z}} \]
            5. Applied rewrites51.0%

              \[\leadsto e^{\color{blue}{-z}} \]
            6. Taylor expanded in z around 0

              \[\leadsto \color{blue}{1} \]
            7. Step-by-step derivation
              1. Applied rewrites13.8%

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

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

              \[\begin{array}{l} \\ e^{\left(x - z\right) + \log y \cdot y} \end{array} \]
              (FPCore (x y z) :precision binary64 (exp (+ (- x z) (* (log y) y))))
              double code(double x, double y, double z) {
              	return exp(((x - z) + (log(y) * y)));
              }
              
              real(8) function code(x, y, z)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  code = exp(((x - z) + (log(y) * y)))
              end function
              
              public static double code(double x, double y, double z) {
              	return Math.exp(((x - z) + (Math.log(y) * y)));
              }
              
              def code(x, y, z):
              	return math.exp(((x - z) + (math.log(y) * y)))
              
              function code(x, y, z)
              	return exp(Float64(Float64(x - z) + Float64(log(y) * y)))
              end
              
              function tmp = code(x, y, z)
              	tmp = exp(((x - z) + (log(y) * y)));
              end
              
              code[x_, y_, z_] := N[Exp[N[(N[(x - z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              e^{\left(x - z\right) + \log y \cdot y}
              \end{array}
              

              Reproduce

              ?
              herbie shell --seed 2024219 
              (FPCore (x y z)
                :name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"
                :precision binary64
              
                :alt
                (! :herbie-platform default (exp (+ (- x z) (* (log y) y))))
              
                (exp (- (+ x (* y (log y))) z)))