Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B

Percentage Accurate: 93.7% → 99.6%
Time: 16.4s
Alternatives: 25
Speedup: 1.0×

Specification

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

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\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 25 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: 93.7% accurate, 1.0× speedup?

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

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}

Alternative 1: 99.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+16}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4e16

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \left(\frac{1}{\color{blue}{\frac{x}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}}}\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \left(\frac{1}{x} \cdot \color{blue}{\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\left(\frac{1}{x}\right), \color{blue}{\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(\color{blue}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z} + \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z\right), \color{blue}{\frac{83333333333333}{1000000000000000}}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\left(z \cdot \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(y + \frac{7936500793651}{10000000000000000}\right), z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
      12. metadata-eval99.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{-13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right) \]
    4. Applied egg-rr99.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{x} \cdot \left(z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z + -0.0027777777777778\right) + 0.083333333333333\right)} \]

    if 4e16 < x

    1. Initial program 86.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(\left(z \cdot z\right) \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right)\right)\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right)\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f6499.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right)\right)\right) \]
    10. Simplified99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4 \cdot 10^{+16}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 10^{+16}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1e+16)
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x))
   (+
    (* x (+ (log x) -1.0))
    (+ (/ 0.083333333333333 x) (* z (* (/ z x) (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1e+16) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	} else {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	}
	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 (x <= 1d+16) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
    else
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 / x) + (z * ((z / x) * (y + 0.0007936500793651d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 1e+16) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 1e+16:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
	else:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 1e+16)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x));
	else
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 / x) + Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 1e+16)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	else
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 1e+16], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+16}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1e16

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing

    if 1e16 < x

    1. Initial program 86.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(\left(z \cdot z\right) \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right)\right)\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right)\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f6499.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right)\right)\right) \]
    10. Simplified99.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+16}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -400:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+92}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -400.0)
   (*
    z
    (*
     z
     (+
      (/ y x)
      (* (/ 1.0 x) (- 0.0007936500793651 (/ 0.0027777777777778 z))))))
   (if (<= z 1.1e+92)
     (+
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (/ 1.0 (* x 12.000000000000048)))
     (* z (/ (+ y 0.0007936500793651) (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -400.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 1.1e+92) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	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 (z <= (-400.0d0)) then
        tmp = z * (z * ((y / x) + ((1.0d0 / x) * (0.0007936500793651d0 - (0.0027777777777778d0 / z)))))
    else if (z <= 1.1d+92) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (1.0d0 / (x * 12.000000000000048d0))
    else
        tmp = z * ((y + 0.0007936500793651d0) / (x / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -400.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 1.1e+92) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -400.0:
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))))
	elif z <= 1.1e+92:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048))
	else:
		tmp = z * ((y + 0.0007936500793651) / (x / z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -400.0)
		tmp = Float64(z * Float64(z * Float64(Float64(y / x) + Float64(Float64(1.0 / x) * Float64(0.0007936500793651 - Float64(0.0027777777777778 / z))))));
	elseif (z <= 1.1e+92)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048)));
	else
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -400.0)
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	elseif (z <= 1.1e+92)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
	else
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -400.0], N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] * N[(0.0007936500793651 - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+92], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -400:\\
\;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+92}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\


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

    1. Initial program 87.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000} \cdot 1}{\color{blue}{x \cdot z}}\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000}}{\color{blue}{x} \cdot z}\right)\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{y}{x} + \frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right)\right) \]
      12. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000}}{x}}{\color{blue}{z}}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000} \cdot 1}{x}}{z}\right)\right)\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z}\right)\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{1}{x} \cdot \frac{13888888888889}{5000000000000000}}{z}\right)\right)\right)\right) \]
      16. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{1}{x} \cdot \color{blue}{\frac{\frac{13888888888889}{5000000000000000}}{z}}\right)\right)\right)\right) \]
      17. distribute-lft-out--N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{*.f64}\left(\left(\frac{1}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
    5. Simplified84.2%

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

    if -400 < z < 1.09999999999999996e92

    1. Initial program 98.9%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \left(\frac{1}{\color{blue}{\frac{x}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{x}{\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}}\right)}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \color{blue}{\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z + \frac{83333333333333}{1000000000000000}\right)}\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right) \cdot z\right), \color{blue}{\frac{83333333333333}{1000000000000000}}\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(z \cdot \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z - \frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\left(y + \frac{7936500793651}{10000000000000000}\right) \cdot z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(y + \frac{7936500793651}{10000000000000000}\right), z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
      11. metadata-eval98.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{-13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)\right)\right)\right) \]
    4. Applied egg-rr98.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z + -0.0027777777777778\right) + 0.083333333333333}}} \]
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{1000000000000000}{83333333333333} \cdot x\right)}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \left(x \cdot \color{blue}{\frac{1000000000000000}{83333333333333}}\right)\right)\right) \]
      2. *-lowering-*.f6486.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(x, \color{blue}{\frac{1000000000000000}{83333333333333}}\right)\right)\right) \]
    7. Simplified86.2%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{\color{blue}{x \cdot 12.000000000000048}} \]

    if 1.09999999999999996e92 < z

    1. Initial program 86.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6480.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified80.3%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6486.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr86.9%

      \[\leadsto \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -400:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+92}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.07:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 0.07)
   (+
    (/
     (+
      0.083333333333333
      (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
     x)
    (+ 0.91893853320467 (* (log x) -0.5)))
   (+
    (* x (+ (log x) -1.0))
    (+ (/ 0.083333333333333 x) (* z (* (/ z x) (+ y 0.0007936500793651)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.07) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	}
	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 (x <= 0.07d0) then
        tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 / x) + (z * ((z / x) * (y + 0.0007936500793651d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.07) {
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 0.07:
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 0.07)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 / x) + Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 0.07)
		tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z / x) * (y + 0.0007936500793651))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 0.07], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.07:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.070000000000000007

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \log x\right)}, \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), z\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
    4. Step-by-step derivation
      1. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), \color{blue}{z}\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      2. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), z\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), \color{blue}{z}\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), z\right)}, \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), \color{blue}{z}\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), z\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \log x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), \color{blue}{z}\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
      8. log-lowering-log.f6498.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{log.f64}\left(x\right)\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{7936500793651}{10000000000000000}\right), z\right), \frac{13888888888889}{5000000000000000}\right), \color{blue}{z}\right), \frac{83333333333333}{1000000000000000}\right), x\right)\right) \]
    5. Simplified98.6%

      \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 0.070000000000000007 < x

    1. Initial program 87.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.3%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(\left(z \cdot z\right) \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right)\right)\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right)\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f6499.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right)\right)\right) \]
    10. Simplified99.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.07:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -980000:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -980000.0)
   (*
    z
    (*
     z
     (+
      (/ y x)
      (* (/ 1.0 x) (- 0.0007936500793651 (/ 0.0027777777777778 z))))))
   (if (<= z 1.55e+90)
     (+
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (/ 0.083333333333333 x))
     (* z (/ (+ y 0.0007936500793651) (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -980000.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 1.55e+90) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	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 (z <= (-980000.0d0)) then
        tmp = z * (z * ((y / x) + ((1.0d0 / x) * (0.0007936500793651d0 - (0.0027777777777778d0 / z)))))
    else if (z <= 1.55d+90) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    else
        tmp = z * ((y + 0.0007936500793651d0) / (x / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -980000.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 1.55e+90) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -980000.0:
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))))
	elif z <= 1.55e+90:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	else:
		tmp = z * ((y + 0.0007936500793651) / (x / z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -980000.0)
		tmp = Float64(z * Float64(z * Float64(Float64(y / x) + Float64(Float64(1.0 / x) * Float64(0.0007936500793651 - Float64(0.0027777777777778 / z))))));
	elseif (z <= 1.55e+90)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	else
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -980000.0)
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	elseif (z <= 1.55e+90)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	else
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -980000.0], N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] * N[(0.0007936500793651 - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+90], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -980000:\\
\;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\


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

    1. Initial program 87.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000} \cdot 1}{\color{blue}{x \cdot z}}\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000}}{\color{blue}{x} \cdot z}\right)\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{y}{x} + \frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right)\right) \]
      12. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000}}{x}}{\color{blue}{z}}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000} \cdot 1}{x}}{z}\right)\right)\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z}\right)\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{1}{x} \cdot \frac{13888888888889}{5000000000000000}}{z}\right)\right)\right)\right) \]
      16. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{1}{x} \cdot \color{blue}{\frac{\frac{13888888888889}{5000000000000000}}{z}}\right)\right)\right)\right) \]
      17. distribute-lft-out--N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{*.f64}\left(\left(\frac{1}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
    5. Simplified84.2%

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

    if -9.8e5 < z < 1.54999999999999994e90

    1. Initial program 98.9%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6486.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified86.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]

    if 1.54999999999999994e90 < z

    1. Initial program 86.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6480.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified80.3%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6486.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr86.9%

      \[\leadsto \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -980000:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 92.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 10200000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \frac{z \cdot y}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 10200000000.0)
   (/
    (+
     (+ 0.083333333333333 (* z (* z (+ y 0.0007936500793651))))
     (* z -0.0027777777777778))
    x)
   (+ (* x (+ (log x) -1.0)) (+ (/ 0.083333333333333 x) (* z (/ (* z y) x))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 10200000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else {
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z * y) / 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) :: tmp
    if (x <= 10200000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * (z * (y + 0.0007936500793651d0)))) + (z * (-0.0027777777777778d0))) / x
    else
        tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 / x) + (z * ((z * y) / x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 10200000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z * y) / x)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 10200000000.0:
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x
	else:
		tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z * y) / x)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 10200000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(z * Float64(y + 0.0007936500793651)))) + Float64(z * -0.0027777777777778)) / x);
	else
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 / x) + Float64(z * Float64(Float64(z * y) / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 10200000000.0)
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	else
		tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 / x) + (z * ((z * y) / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 10200000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(z * N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 10200000000:\\
\;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.02e10

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6497.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified97.6%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      2. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right), x\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + \frac{-13888888888889}{5000000000000000} \cdot z\right), x\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      10. *-lowering-*.f6497.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    7. Applied egg-rr97.6%

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

    if 1.02e10 < x

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.3%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(\left(z \cdot z\right) \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right)\right)\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right)\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right)\right)\right) \]
      14. +-lowering-+.f6499.3%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right)\right)\right) \]
    10. Simplified99.3%

      \[\leadsto x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \color{blue}{z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)}\right) \]
    11. Taylor expanded in y around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{y \cdot z}{x}\right)}\right)\right)\right) \]
    12. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(\left(z \cdot y\right), x\right)\right)\right)\right) \]
      3. *-lowering-*.f6483.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), x\right)\right)\right)\right) \]
    13. Simplified83.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10200000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \frac{z \cdot y}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 82.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -23:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+90}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -23.0)
   (*
    z
    (*
     z
     (+
      (/ y x)
      (* (/ 1.0 x) (- 0.0007936500793651 (/ 0.0027777777777778 z))))))
   (if (<= z 2.55e+90)
     (+ (/ 0.083333333333333 x) (+ 0.91893853320467 (- (* x (log x)) x)))
     (* z (/ (+ y 0.0007936500793651) (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -23.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 2.55e+90) {
		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((x * log(x)) - x));
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	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 (z <= (-23.0d0)) then
        tmp = z * (z * ((y / x) + ((1.0d0 / x) * (0.0007936500793651d0 - (0.0027777777777778d0 / z)))))
    else if (z <= 2.55d+90) then
        tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((x * log(x)) - x))
    else
        tmp = z * ((y + 0.0007936500793651d0) / (x / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -23.0) {
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	} else if (z <= 2.55e+90) {
		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((x * Math.log(x)) - x));
	} else {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -23.0:
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))))
	elif z <= 2.55e+90:
		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((x * math.log(x)) - x))
	else:
		tmp = z * ((y + 0.0007936500793651) / (x / z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -23.0)
		tmp = Float64(z * Float64(z * Float64(Float64(y / x) + Float64(Float64(1.0 / x) * Float64(0.0007936500793651 - Float64(0.0027777777777778 / z))))));
	elseif (z <= 2.55e+90)
		tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)));
	else
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -23.0)
		tmp = z * (z * ((y / x) + ((1.0 / x) * (0.0007936500793651 - (0.0027777777777778 / z)))));
	elseif (z <= 2.55e+90)
		tmp = (0.083333333333333 / x) + (0.91893853320467 + ((x * log(x)) - x));
	else
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -23.0], N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] * N[(0.0007936500793651 - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e+90], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -23:\\
\;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+90}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\


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

    1. Initial program 87.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x \cdot z}\right)}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000} \cdot 1}{\color{blue}{x \cdot z}}\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{\frac{13888888888889}{5000000000000000}}{\color{blue}{x} \cdot z}\right)\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\left(\frac{y}{x} + \frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right) \]
      8. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{y}{x} + \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{y}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} - \frac{\frac{13888888888889}{5000000000000000}}{x \cdot z}\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\color{blue}{\frac{13888888888889}{5000000000000000}}}{x \cdot z}\right)\right)\right)\right) \]
      12. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000}}{x}}{\color{blue}{z}}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{\frac{13888888888889}{5000000000000000} \cdot 1}{x}}{z}\right)\right)\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}}{z}\right)\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{\frac{1}{x} \cdot \frac{13888888888889}{5000000000000000}}{z}\right)\right)\right)\right) \]
      16. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \frac{7936500793651}{10000000000000000} - \frac{1}{x} \cdot \color{blue}{\frac{\frac{13888888888889}{5000000000000000}}{z}}\right)\right)\right)\right) \]
      17. distribute-lft-out--N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \left(\frac{1}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, x\right), \mathsf{*.f64}\left(\left(\frac{1}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} - \frac{\frac{13888888888889}{5000000000000000}}{z}\right)}\right)\right)\right)\right) \]
    5. Simplified84.2%

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

    if -23 < z < 2.5499999999999998e90

    1. Initial program 98.9%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6486.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified86.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(-1 \cdot \left(x \cdot \log \left(\frac{1}{x}\right)\right)\right)}, x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(x \cdot \log \left(\frac{1}{x}\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \log x\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
      8. log-lowering-log.f6483.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)\right) \]
    8. Simplified83.9%

      \[\leadsto \left(\left(\color{blue}{x \cdot \log x} - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]

    if 2.5499999999999998e90 < z

    1. Initial program 86.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6480.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified80.3%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6486.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr86.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -23:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{1}{x} \cdot \left(0.0007936500793651 - \frac{0.0027777777777778}{z}\right)\right)\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+90}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 82.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log x + -1\\ \mathbf{if}\;x \leq 280000000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(x \cdot \left(t\_0 \cdot \frac{1}{y}\right)\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+99}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (log x) -1.0)))
   (if (<= x 280000000000.0)
     (/
      (+
       (+ 0.083333333333333 (* z (* z (+ y 0.0007936500793651))))
       (* z -0.0027777777777778))
      x)
     (if (<= x 2.95e+25)
       (* y (* x (* t_0 (/ 1.0 y))))
       (if (<= x 3.7e+99)
         (* z (/ (+ y 0.0007936500793651) (/ x z)))
         (* x t_0))))))
double code(double x, double y, double z) {
	double t_0 = log(x) + -1.0;
	double tmp;
	if (x <= 280000000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else if (x <= 2.95e+25) {
		tmp = y * (x * (t_0 * (1.0 / y)));
	} else if (x <= 3.7e+99) {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	} else {
		tmp = x * t_0;
	}
	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 = log(x) + (-1.0d0)
    if (x <= 280000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * (z * (y + 0.0007936500793651d0)))) + (z * (-0.0027777777777778d0))) / x
    else if (x <= 2.95d+25) then
        tmp = y * (x * (t_0 * (1.0d0 / y)))
    else if (x <= 3.7d+99) then
        tmp = z * ((y + 0.0007936500793651d0) / (x / z))
    else
        tmp = x * t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = Math.log(x) + -1.0;
	double tmp;
	if (x <= 280000000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else if (x <= 2.95e+25) {
		tmp = y * (x * (t_0 * (1.0 / y)));
	} else if (x <= 3.7e+99) {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	} else {
		tmp = x * t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = math.log(x) + -1.0
	tmp = 0
	if x <= 280000000000.0:
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x
	elif x <= 2.95e+25:
		tmp = y * (x * (t_0 * (1.0 / y)))
	elif x <= 3.7e+99:
		tmp = z * ((y + 0.0007936500793651) / (x / z))
	else:
		tmp = x * t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(log(x) + -1.0)
	tmp = 0.0
	if (x <= 280000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(z * Float64(y + 0.0007936500793651)))) + Float64(z * -0.0027777777777778)) / x);
	elseif (x <= 2.95e+25)
		tmp = Float64(y * Float64(x * Float64(t_0 * Float64(1.0 / y))));
	elseif (x <= 3.7e+99)
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z)));
	else
		tmp = Float64(x * t_0);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = log(x) + -1.0;
	tmp = 0.0;
	if (x <= 280000000000.0)
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	elseif (x <= 2.95e+25)
		tmp = y * (x * (t_0 * (1.0 / y)));
	elseif (x <= 3.7e+99)
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	else
		tmp = x * t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]}, If[LessEqual[x, 280000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 2.95e+25], N[(y * N[(x * N[(t$95$0 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+99], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log x + -1\\
\mathbf{if}\;x \leq 280000000000:\\
\;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;x \leq 2.95 \cdot 10^{+25}:\\
\;\;\;\;y \cdot \left(x \cdot \left(t\_0 \cdot \frac{1}{y}\right)\right)\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{+99}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 2.8e11

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6497.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified97.6%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      2. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right), x\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + \frac{-13888888888889}{5000000000000000} \cdot z\right), x\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      10. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    7. Applied egg-rr97.7%

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

    if 2.8e11 < x < 2.95e25

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right) - x}{y} + -1 \cdot \frac{{z}^{2}}{x}\right)\right)} \]
    4. Simplified99.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{z \cdot z}{x} + \frac{0.91893853320467 + \left(\frac{z \cdot \left(z \cdot 0.0007936500793651 + -0.0027777777777778\right)}{x} + \left(\log x \cdot \left(x + -0.5\right) + \left(\frac{0.083333333333333}{x} - x\right)\right)\right)}{y}\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot y\right), \color{blue}{\left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} - \frac{1}{y}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot x\right), \left(\color{blue}{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y}} - \frac{1}{y}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \left(\color{blue}{-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y}} - \frac{1}{y}\right)\right) \]
      5. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{y}\right)\right)}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(-1 \cdot \frac{\log \left(\frac{1}{x}\right)}{y}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{y}\right)\right)}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\left(\frac{-1 \cdot \log \left(\frac{1}{x}\right)}{y}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{y}}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), y\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{y}}\right)\right)\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), y\right), \left(\mathsf{neg}\left(\frac{\color{blue}{1}}{y}\right)\right)\right)\right) \]
      10. log-recN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), y\right), \left(\mathsf{neg}\left(\frac{1}{y}\right)\right)\right)\right) \]
      11. remove-double-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\log x, y\right), \left(\mathsf{neg}\left(\frac{\color{blue}{1}}{y}\right)\right)\right)\right) \]
      12. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(x\right), y\right), \left(\mathsf{neg}\left(\frac{\color{blue}{1}}{y}\right)\right)\right)\right) \]
      13. distribute-neg-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(x\right), y\right), \left(\frac{\mathsf{neg}\left(1\right)}{\color{blue}{y}}\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(x\right), y\right), \left(\frac{-1}{y}\right)\right)\right) \]
      15. /-lowering-/.f6492.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, x\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(x\right), y\right), \mathsf{/.f64}\left(-1, \color{blue}{y}\right)\right)\right) \]
    7. Simplified92.1%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\right), \color{blue}{y}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{\log x}{y} + \frac{-1}{y}\right)\right), y\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\log x \cdot \frac{1}{y} + \frac{-1}{y}\right)\right), y\right) \]
      6. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(\log x \cdot \frac{1}{y} + -1 \cdot \frac{1}{y}\right)\right), y\right) \]
      7. distribute-rgt-outN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{1}{y}\right), \left(\log x + -1\right)\right)\right), y\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(-1\right)}{y}\right), \left(\log x + -1\right)\right)\right), y\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(-1\right)\right), y\right), \left(\log x + -1\right)\right)\right), y\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \left(\log x + -1\right)\right)\right), y\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \mathsf{+.f64}\left(\log x, -1\right)\right)\right), y\right) \]
      13. log-lowering-log.f6492.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, y\right), \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right)\right), y\right) \]
    9. Applied egg-rr92.6%

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

    if 2.95e25 < x < 3.7000000000000001e99

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6462.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified62.4%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6469.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr69.1%

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

    if 3.7000000000000001e99 < x

    1. Initial program 85.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 + \color{blue}{-1 \cdot \log \left(\frac{1}{x}\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right)\right)}\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right)\right) \]
      7. log-recN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)\right)\right) \]
      8. remove-double-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \log x\right)\right) \]
      9. log-lowering-log.f6473.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \mathsf{log.f64}\left(x\right)\right)\right) \]
    5. Simplified73.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 280000000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(x \cdot \left(\left(\log x + -1\right) \cdot \frac{1}{y}\right)\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+99}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 82.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 280000000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{+21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+99}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (+ (log x) -1.0))))
   (if (<= x 280000000000.0)
     (/
      (+
       (+ 0.083333333333333 (* z (* z (+ y 0.0007936500793651))))
       (* z -0.0027777777777778))
      x)
     (if (<= x 5.1e+21)
       t_0
       (if (<= x 1.5e+99) (* z (/ (+ y 0.0007936500793651) (/ x z))) t_0)))))
double code(double x, double y, double z) {
	double t_0 = x * (log(x) + -1.0);
	double tmp;
	if (x <= 280000000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else if (x <= 5.1e+21) {
		tmp = t_0;
	} else if (x <= 1.5e+99) {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	} else {
		tmp = t_0;
	}
	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 * (log(x) + (-1.0d0))
    if (x <= 280000000000.0d0) then
        tmp = ((0.083333333333333d0 + (z * (z * (y + 0.0007936500793651d0)))) + (z * (-0.0027777777777778d0))) / x
    else if (x <= 5.1d+21) then
        tmp = t_0
    else if (x <= 1.5d+99) then
        tmp = z * ((y + 0.0007936500793651d0) / (x / z))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (Math.log(x) + -1.0);
	double tmp;
	if (x <= 280000000000.0) {
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	} else if (x <= 5.1e+21) {
		tmp = t_0;
	} else if (x <= 1.5e+99) {
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (math.log(x) + -1.0)
	tmp = 0
	if x <= 280000000000.0:
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x
	elif x <= 5.1e+21:
		tmp = t_0
	elif x <= 1.5e+99:
		tmp = z * ((y + 0.0007936500793651) / (x / z))
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(log(x) + -1.0))
	tmp = 0.0
	if (x <= 280000000000.0)
		tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(z * Float64(y + 0.0007936500793651)))) + Float64(z * -0.0027777777777778)) / x);
	elseif (x <= 5.1e+21)
		tmp = t_0;
	elseif (x <= 1.5e+99)
		tmp = Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (log(x) + -1.0);
	tmp = 0.0;
	if (x <= 280000000000.0)
		tmp = ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) + (z * -0.0027777777777778)) / x;
	elseif (x <= 5.1e+21)
		tmp = t_0;
	elseif (x <= 1.5e+99)
		tmp = z * ((y + 0.0007936500793651) / (x / z));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 280000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 5.1e+21], t$95$0, If[LessEqual[x, 1.5e+99], N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 280000000000:\\
\;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;x \leq 5.1 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{+99}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 2.8e11

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6497.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified97.6%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      2. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right), x\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + \frac{-13888888888889}{5000000000000000} \cdot z\right), x\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      10. *-lowering-*.f6497.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    7. Applied egg-rr97.7%

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

    if 2.8e11 < x < 5.1e21 or 1.50000000000000007e99 < x

    1. Initial program 86.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)}\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(-1 + \color{blue}{-1 \cdot \log \left(\frac{1}{x}\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right)\right)}\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)\right)\right) \]
      7. log-recN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)\right)\right) \]
      8. remove-double-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \log x\right)\right) \]
      9. log-lowering-log.f6474.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(-1, \mathsf{log.f64}\left(x\right)\right)\right) \]
    5. Simplified74.2%

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

    if 5.1e21 < x < 1.50000000000000007e99

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6462.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified62.4%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6469.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr69.1%

      \[\leadsto \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 280000000000:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{+21}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{+99}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 96.9% accurate, 1.0× speedup?

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

\\
x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right)
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
  4. Simplified96.7%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
  5. Taylor expanded in x around inf

    \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    2. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    5. mul-1-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. log-recN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. remove-double-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    8. log-lowering-log.f6495.6%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
  7. Simplified95.6%

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

    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right) \]
  9. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(\left(z \cdot z\right) \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}} + \frac{y}{x}\right)\right)\right)\right) \]
    2. associate-*l*N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \left(z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right)\right)\right) \]
    4. distribute-rgt-inN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right)\right)\right) \]
    5. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right)\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right)\right)\right) \]
    7. associate-*l/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
    8. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right)\right)\right) \]
    9. associate-*l/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right)\right)\right) \]
    10. associate-/l*N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right)\right)\right) \]
    11. distribute-rgt-outN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right)\right)\right) \]
    13. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right)\right)\right) \]
    14. +-lowering-+.f6497.0%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right)\right)\right) \]
  10. Simplified97.0%

    \[\leadsto x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + \color{blue}{z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)}\right) \]
  11. Final simplification97.0%

    \[\leadsto x \cdot \left(\log x + -1\right) + \left(\frac{0.083333333333333}{x} + z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\right) \]
  12. Add Preprocessing

Alternative 11: 46.5% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+32}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+205}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (/ x (* z z)))))
   (if (<= z -3.1e+32)
     t_0
     (if (<= z 2.8e-110)
       (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
       (if (<= z 8e+205) t_0 (/ (* 0.0007936500793651 (* z z)) x))))))
double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -3.1e+32) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	} else if (z <= 8e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 * (z * z)) / 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 = y / (x / (z * z))
    if (z <= (-3.1d+32)) then
        tmp = t_0
    else if (z <= 2.8d-110) then
        tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
    else if (z <= 8d+205) then
        tmp = t_0
    else
        tmp = (0.0007936500793651d0 * (z * z)) / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -3.1e+32) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	} else if (z <= 8e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 * (z * z)) / x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / (x / (z * z))
	tmp = 0
	if z <= -3.1e+32:
		tmp = t_0
	elif z <= 2.8e-110:
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x
	elif z <= 8e+205:
		tmp = t_0
	else:
		tmp = (0.0007936500793651 * (z * z)) / x
	return tmp
function code(x, y, z)
	t_0 = Float64(y / Float64(x / Float64(z * z)))
	tmp = 0.0
	if (z <= -3.1e+32)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x);
	elseif (z <= 8e+205)
		tmp = t_0;
	else
		tmp = Float64(Float64(0.0007936500793651 * Float64(z * z)) / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / (x / (z * z));
	tmp = 0.0;
	if (z <= -3.1e+32)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
	elseif (z <= 8e+205)
		tmp = t_0;
	else
		tmp = (0.0007936500793651 * (z * z)) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+32], t$95$0, If[LessEqual[z, 2.8e-110], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 8e+205], t$95$0, N[(N[(0.0007936500793651 * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+205}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.09999999999999993e32 or 2.8e-110 < z < 8.00000000000000013e205

    1. Initial program 88.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified44.5%

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

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

        \[\leadsto \frac{z \cdot z}{x} \cdot \color{blue}{y} \]
      3. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\frac{z \cdot z}{x}} \]
      4. clear-numN/A

        \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{x}{z \cdot z}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{y}{\color{blue}{\frac{x}{z \cdot z}}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{x}{z \cdot z}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \color{blue}{\left(z \cdot z\right)}\right)\right) \]
      8. *-lowering-*.f6449.9%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right) \]
    7. Applied egg-rr49.9%

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

    if -3.09999999999999993e32 < z < 2.8e-110

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6449.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified49.2%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z\right)}, x\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      3. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    8. Simplified44.5%

      \[\leadsto \frac{\color{blue}{0.083333333333333 + z \cdot -0.0027777777777778}}{x} \]

    if 8.00000000000000013e205 < z

    1. Initial program 95.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified95.0%

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

      \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{\color{blue}{x}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot {z}^{2}\right), \color{blue}{x}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right), x\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({z}^{2}\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(z \cdot z\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
      6. *-lowering-*.f6483.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
    10. Simplified83.8%

      \[\leadsto \color{blue}{\frac{\left(z \cdot z\right) \cdot 0.0007936500793651}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+32}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+205}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 46.4% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+205}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (/ x (* z z)))))
   (if (<= z -1.45e+29)
     t_0
     (if (<= z 2.8e-110)
       (/ 0.083333333333333 x)
       (if (<= z 2.15e+205) t_0 (/ (* 0.0007936500793651 (* z z)) x))))))
double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -1.45e+29) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = 0.083333333333333 / x;
	} else if (z <= 2.15e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 * (z * z)) / 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 = y / (x / (z * z))
    if (z <= (-1.45d+29)) then
        tmp = t_0
    else if (z <= 2.8d-110) then
        tmp = 0.083333333333333d0 / x
    else if (z <= 2.15d+205) then
        tmp = t_0
    else
        tmp = (0.0007936500793651d0 * (z * z)) / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -1.45e+29) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = 0.083333333333333 / x;
	} else if (z <= 2.15e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 * (z * z)) / x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / (x / (z * z))
	tmp = 0
	if z <= -1.45e+29:
		tmp = t_0
	elif z <= 2.8e-110:
		tmp = 0.083333333333333 / x
	elif z <= 2.15e+205:
		tmp = t_0
	else:
		tmp = (0.0007936500793651 * (z * z)) / x
	return tmp
function code(x, y, z)
	t_0 = Float64(y / Float64(x / Float64(z * z)))
	tmp = 0.0
	if (z <= -1.45e+29)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = Float64(0.083333333333333 / x);
	elseif (z <= 2.15e+205)
		tmp = t_0;
	else
		tmp = Float64(Float64(0.0007936500793651 * Float64(z * z)) / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / (x / (z * z));
	tmp = 0.0;
	if (z <= -1.45e+29)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = 0.083333333333333 / x;
	elseif (z <= 2.15e+205)
		tmp = t_0;
	else
		tmp = (0.0007936500793651 * (z * z)) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+29], t$95$0, If[LessEqual[z, 2.8e-110], N[(0.083333333333333 / x), $MachinePrecision], If[LessEqual[z, 2.15e+205], t$95$0, N[(N[(0.0007936500793651 * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+205}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.45e29 or 2.8e-110 < z < 2.1499999999999999e205

    1. Initial program 88.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified44.5%

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

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

        \[\leadsto \frac{z \cdot z}{x} \cdot \color{blue}{y} \]
      3. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\frac{z \cdot z}{x}} \]
      4. clear-numN/A

        \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{x}{z \cdot z}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{y}{\color{blue}{\frac{x}{z \cdot z}}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{x}{z \cdot z}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \color{blue}{\left(z \cdot z\right)}\right)\right) \]
      8. *-lowering-*.f6449.9%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right) \]
    7. Applied egg-rr49.9%

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

    if -1.45e29 < z < 2.8e-110

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6494.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified94.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified44.5%

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

    if 2.1499999999999999e205 < z

    1. Initial program 95.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified95.0%

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

      \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{\color{blue}{x}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot {z}^{2}\right), \color{blue}{x}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot \frac{7936500793651}{10000000000000000}\right), x\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({z}^{2}\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(z \cdot z\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
      6. *-lowering-*.f6483.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \frac{7936500793651}{10000000000000000}\right), x\right) \]
    10. Simplified83.8%

      \[\leadsto \color{blue}{\frac{\left(z \cdot z\right) \cdot 0.0007936500793651}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{+205}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 \cdot \left(z \cdot z\right)}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 46.4% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+205}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (/ x (* z z)))))
   (if (<= z -1.45e+29)
     t_0
     (if (<= z 2.8e-110)
       (/ 0.083333333333333 x)
       (if (<= z 4e+205) t_0 (* (/ 0.0007936500793651 x) (* z z)))))))
double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -1.45e+29) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = 0.083333333333333 / x;
	} else if (z <= 4e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 / x) * (z * z);
	}
	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 = y / (x / (z * z))
    if (z <= (-1.45d+29)) then
        tmp = t_0
    else if (z <= 2.8d-110) then
        tmp = 0.083333333333333d0 / x
    else if (z <= 4d+205) then
        tmp = t_0
    else
        tmp = (0.0007936500793651d0 / x) * (z * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / (x / (z * z));
	double tmp;
	if (z <= -1.45e+29) {
		tmp = t_0;
	} else if (z <= 2.8e-110) {
		tmp = 0.083333333333333 / x;
	} else if (z <= 4e+205) {
		tmp = t_0;
	} else {
		tmp = (0.0007936500793651 / x) * (z * z);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / (x / (z * z))
	tmp = 0
	if z <= -1.45e+29:
		tmp = t_0
	elif z <= 2.8e-110:
		tmp = 0.083333333333333 / x
	elif z <= 4e+205:
		tmp = t_0
	else:
		tmp = (0.0007936500793651 / x) * (z * z)
	return tmp
function code(x, y, z)
	t_0 = Float64(y / Float64(x / Float64(z * z)))
	tmp = 0.0
	if (z <= -1.45e+29)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = Float64(0.083333333333333 / x);
	elseif (z <= 4e+205)
		tmp = t_0;
	else
		tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / (x / (z * z));
	tmp = 0.0;
	if (z <= -1.45e+29)
		tmp = t_0;
	elseif (z <= 2.8e-110)
		tmp = 0.083333333333333 / x;
	elseif (z <= 4e+205)
		tmp = t_0;
	else
		tmp = (0.0007936500793651 / x) * (z * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+29], t$95$0, If[LessEqual[z, 2.8e-110], N[(0.083333333333333 / x), $MachinePrecision], If[LessEqual[z, 4e+205], t$95$0, N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+205}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.45e29 or 2.8e-110 < z < 4.00000000000000007e205

    1. Initial program 88.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified44.5%

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

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

        \[\leadsto \frac{z \cdot z}{x} \cdot \color{blue}{y} \]
      3. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\frac{z \cdot z}{x}} \]
      4. clear-numN/A

        \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{x}{z \cdot z}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{y}{\color{blue}{\frac{x}{z \cdot z}}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{x}{z \cdot z}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \color{blue}{\left(z \cdot z\right)}\right)\right) \]
      8. *-lowering-*.f6449.9%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right) \]
    7. Applied egg-rr49.9%

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

    if -1.45e29 < z < 2.8e-110

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6494.1%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified94.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified44.5%

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

    if 4.00000000000000007e205 < z

    1. Initial program 95.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified95.0%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{\frac{7936500793651}{10000000000000000}}{x}\right)}, \mathsf{*.f64}\left(z, z\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6483.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{*.f64}\left(\color{blue}{z}, z\right)\right) \]
    10. Simplified83.8%

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

Alternative 14: 47.4% accurate, 5.6× speedup?

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

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

\mathbf{elif}\;z \leq 10^{-33}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+205}:\\
\;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\


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

    1. Initial program 86.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6450.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified50.0%

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

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

        \[\leadsto \frac{z \cdot z}{x} \cdot \color{blue}{y} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(z \cdot z\right), x\right), y\right) \]
      5. *-lowering-*.f6457.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(z, z\right), x\right), y\right) \]
    7. Applied egg-rr57.8%

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

    if -1.45e29 < z < 1.0000000000000001e-33

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6492.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified92.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified42.5%

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

    if 1.0000000000000001e-33 < z < 1.80000000000000001e205

    1. Initial program 88.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6441.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified41.5%

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

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

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

        \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot y \]
      4. associate-*l*N/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{z}{x} \cdot y\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{y}\right)\right) \]
      7. /-lowering-/.f6444.9%

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

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

    if 1.80000000000000001e205 < z

    1. Initial program 95.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified95.0%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{\frac{7936500793651}{10000000000000000}}{x}\right)}, \mathsf{*.f64}\left(z, z\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6483.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{*.f64}\left(\color{blue}{z}, z\right)\right) \]
    10. Simplified83.8%

      \[\leadsto \color{blue}{\frac{0.0007936500793651}{x}} \cdot \left(z \cdot z\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification50.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq 10^{-33}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+205}:\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 46.6% accurate, 5.6× speedup?

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

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 3.25 \cdot 10^{+205}:\\
\;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\


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

    1. Initial program 86.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6450.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified50.0%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(\frac{\color{blue}{y}}{x}\right)\right) \]
      5. /-lowering-/.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    7. Applied egg-rr54.9%

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

    if -1.45e29 < z < 5.1999999999999999e-34

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6492.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified92.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified42.5%

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

    if 5.1999999999999999e-34 < z < 3.24999999999999986e205

    1. Initial program 88.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6441.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified41.5%

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

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

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

        \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot y \]
      4. associate-*l*N/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{z}{x} \cdot y\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{y}\right)\right) \]
      7. /-lowering-/.f6444.9%

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

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

    if 3.24999999999999986e205 < z

    1. Initial program 95.0%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6495.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified95.0%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{\frac{7936500793651}{10000000000000000}}{x}\right)}, \mathsf{*.f64}\left(z, z\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6483.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{*.f64}\left(\color{blue}{z}, z\right)\right) \]
    10. Simplified83.8%

      \[\leadsto \color{blue}{\frac{0.0007936500793651}{x}} \cdot \left(z \cdot z\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-34}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{+205}:\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.2% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000195:\\
\;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-34}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

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


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

    1. Initial program 87.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.8%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6483.7%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified83.7%

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

    if -1.94999999999999996e-4 < z < 5.59999999999999994e-34

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6448.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified48.9%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z\right)}, x\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      3. *-lowering-*.f6444.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    8. Simplified44.2%

      \[\leadsto \frac{\color{blue}{0.083333333333333 + z \cdot -0.0027777777777778}}{x} \]

    if 5.59999999999999994e-34 < z

    1. Initial program 89.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \color{blue}{\left(\frac{y}{x}\right)}\right)\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{\color{blue}{y}}{x}\right)\right)\right)\right) \]
      7. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{\color{blue}{y}}{x}\right)\right)\right)\right) \]
      9. /-lowering-/.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right)\right)\right) \]
    5. Simplified72.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.000195:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-34}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 64.9% accurate, 6.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.18 \cdot 10^{+29}:\\
\;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.18e29

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6493.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified93.1%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      2. associate-+r+N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + z \cdot \frac{-13888888888889}{5000000000000000}\right), x\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) + \frac{-13888888888889}{5000000000000000} \cdot z\right), x\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      10. *-lowering-*.f6493.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    7. Applied egg-rr93.1%

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

    if 1.18e29 < x

    1. Initial program 85.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified36.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.18 \cdot 10^{+29}:\\ \;\;\;\;\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\right) + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 61.1% accurate, 6.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00085:\\
\;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-34}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\


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

    1. Initial program 87.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.8%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6483.7%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified83.7%

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

    if -8.49999999999999953e-4 < z < 9.00000000000000085e-34

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6448.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified48.9%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z\right)}, x\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      3. *-lowering-*.f6444.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    8. Simplified44.2%

      \[\leadsto \frac{\color{blue}{0.083333333333333 + z \cdot -0.0027777777777778}}{x} \]

    if 9.00000000000000085e-34 < z

    1. Initial program 89.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in z around inf

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

        \[\leadsto \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \cdot \color{blue}{{z}^{2}} \]
      2. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right), \left(\frac{y}{x}\right)\right), \left({\color{blue}{z}}^{2}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      5. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \left(\frac{y}{x}\right)\right), \left({z}^{2}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left({z}^{2}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \left(z \cdot \color{blue}{z}\right)\right) \]
      9. *-lowering-*.f6468.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right), \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    7. Simplified68.2%

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

        \[\leadsto \left(\left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right) \cdot z\right) \cdot \color{blue}{z} \]
      2. *-commutativeN/A

        \[\leadsto \left(z \cdot \left(\frac{\frac{7936500793651}{10000000000000000}}{x} + \frac{y}{x}\right)\right) \cdot z \]
      3. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right) \cdot z \]
      4. div-invN/A

        \[\leadsto \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + y \cdot \frac{1}{x}\right)\right) \cdot z \]
      5. distribute-rgt-outN/A

        \[\leadsto \left(z \cdot \left(\frac{1}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right) \cdot z \]
      6. associate-*l*N/A

        \[\leadsto \left(\left(z \cdot \frac{1}{x}\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      7. div-invN/A

        \[\leadsto \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \cdot z \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \color{blue}{z}\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{z}{x}\right), z\right) \]
      10. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(\frac{7936500793651}{10000000000000000} + y\right) \cdot \frac{1}{\frac{x}{z}}\right), z\right) \]
      11. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{7936500793651}{10000000000000000} + y}{\frac{x}{z}}\right), z\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{7936500793651}{10000000000000000} + y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \left(\frac{x}{z}\right)\right), z\right) \]
      14. /-lowering-/.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right), \mathsf{/.f64}\left(x, z\right)\right), z\right) \]
    9. Applied egg-rr72.4%

      \[\leadsto \color{blue}{\frac{0.0007936500793651 + y}{\frac{x}{z}} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00085:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-34}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 61.2% accurate, 6.5× speedup?

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

\\
\begin{array}{l}
t_0 := z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\
\mathbf{if}\;z \leq -0.00026:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-33}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.59999999999999977e-4 or 1.11999999999999999e-33 < z

    1. Initial program 88.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6478.1%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified78.1%

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

    if -2.59999999999999977e-4 < z < 1.11999999999999999e-33

    1. Initial program 99.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6448.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified48.9%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{83333333333333}{1000000000000000} + \frac{-13888888888889}{5000000000000000} \cdot z\right)}, x\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(\frac{-13888888888889}{5000000000000000} \cdot z\right)\right), x\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
      3. *-lowering-*.f6444.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \frac{-13888888888889}{5000000000000000}\right)\right), x\right) \]
    8. Simplified44.2%

      \[\leadsto \frac{\color{blue}{0.083333333333333 + z \cdot -0.0027777777777778}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00026:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-33}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 64.9% accurate, 6.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.75 \cdot 10^{+28}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.7499999999999999e28

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6493.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified93.1%

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

    if 3.7499999999999999e28 < x

    1. Initial program 85.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified36.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.75 \cdot 10^{+28}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 46.5% accurate, 7.2× speedup?

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

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

\mathbf{elif}\;z \leq 3.25 \cdot 10^{-34}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

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


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

    1. Initial program 86.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6450.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified50.0%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(\frac{\color{blue}{y}}{x}\right)\right) \]
      5. /-lowering-/.f6454.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    7. Applied egg-rr54.9%

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

    if -1.45e29 < z < 3.24999999999999993e-34

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6492.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified92.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified42.5%

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

    if 3.24999999999999993e-34 < z

    1. Initial program 89.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \left(z \cdot y\right)\right), x\right) \]
      8. *-lowering-*.f6444.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified44.9%

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

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

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

        \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot y \]
      4. associate-*l*N/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{z}{x} \cdot y\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{y}\right)\right) \]
      7. /-lowering-/.f6447.5%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), y\right)\right) \]
    7. Applied egg-rr47.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right)\\ \mathbf{elif}\;z \leq 3.25 \cdot 10^{-34}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 46.3% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
t_0 := z \cdot \left(y \cdot \frac{z}{x}\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45e29 or 7.5000000000000004e-34 < z

    1. Initial program 88.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({z}^{2} \cdot y\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot z\right) \cdot y\right), x\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(z \cdot y\right)\right), x\right) \]
      5. *-commutativeN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, y\right)\right), x\right) \]
    5. Simplified47.4%

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

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

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

        \[\leadsto \left(z \cdot \frac{z}{x}\right) \cdot y \]
      4. associate-*l*N/A

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{z}{x} \cdot y\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{y}\right)\right) \]
      7. /-lowering-/.f6450.6%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), y\right)\right) \]
    7. Applied egg-rr50.6%

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

    if -1.45e29 < z < 7.5000000000000004e-34

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6492.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
    5. Simplified92.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
    8. Simplified42.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+29}:\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 64.3% accurate, 7.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.1 \cdot 10^{+28}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.1000000000000001e28

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right), \color{blue}{x}\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)\right)\right)\right), x\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
      8. +-lowering-+.f6493.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right), \frac{-13888888888889}{5000000000000000}\right)\right)\right), x\right) \]
    5. Simplified93.1%

      \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) + -0.0027777777777778\right)}{x}} \]
    6. Taylor expanded in z around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{\left({z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)}\right), x\right) \]
    7. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(\left(z \cdot z\right) \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right), x\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), x\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} + y\right)\right)\right)\right), x\right) \]
      5. +-lowering-+.f6491.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, y\right)\right)\right)\right), x\right) \]
    8. Simplified91.7%

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

    if 3.1000000000000001e28 < x

    1. Initial program 85.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)}\right) \]
    4. Simplified99.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{0.083333333333333}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + \frac{-0.0027777777777778}{x}\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{+.f64}\left(\color{blue}{\left(x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right)}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right)}, \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      2. sub-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \left(-1 \cdot \log \left(\frac{1}{x}\right) + -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(-1 \cdot \log \left(\frac{1}{x}\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      6. log-recN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\log x, -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
      8. log-lowering-log.f6499.6%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{log.f64}\left(x\right), -1\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, x\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{7936500793651}{10000000000000000}, x\right), \mathsf{/.f64}\left(y, x\right)\right)\right), \mathsf{/.f64}\left(\frac{-13888888888889}{5000000000000000}, x\right)\right)\right)\right)\right) \]
    7. Simplified99.6%

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
    9. Step-by-step derivation
      1. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)}\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \color{blue}{\frac{y}{x} \cdot z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x} \cdot z + \frac{\color{blue}{y}}{x} \cdot z\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000}}{x} \cdot z + \frac{y}{x} \cdot z\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y}{x}} \cdot z\right)\right) \]
      9. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \frac{y \cdot z}{\color{blue}{x}}\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + y \cdot \color{blue}{\frac{z}{x}}\right)\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \mathsf{*.f64}\left(z, \left(\frac{z}{x} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\left(\frac{z}{x}\right), \color{blue}{\left(\frac{7936500793651}{10000000000000000} + y\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \left(\color{blue}{\frac{7936500793651}{10000000000000000}} + y\right)\right)\right) \]
      14. +-lowering-+.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, x\right), \mathsf{+.f64}\left(\frac{7936500793651}{10000000000000000}, \color{blue}{y}\right)\right)\right) \]
    10. Simplified36.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.1 \cdot 10^{+28}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 22.3% accurate, 17.6× speedup?

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

\\
y \cdot \frac{0.083333333333333}{x \cdot y}
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in y around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \frac{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right) - x}{y} + -1 \cdot \frac{{z}^{2}}{x}\right)\right)} \]
  4. Simplified63.3%

    \[\leadsto \color{blue}{y \cdot \left(\frac{z \cdot z}{x} + \frac{0.91893853320467 + \left(\frac{z \cdot \left(z \cdot 0.0007936500793651 + -0.0027777777777778\right)}{x} + \left(\log x \cdot \left(x + -0.5\right) + \left(\frac{0.083333333333333}{x} - x\right)\right)\right)}{y}\right)} \]
  5. Taylor expanded in z around 0

    \[\leadsto \color{blue}{y \cdot \left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right)\right) - \frac{x}{y}\right)} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right)\right) - \frac{x}{y}\right)}\right) \]
    2. associate--l+N/A

      \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x \cdot y} + \color{blue}{\left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)}\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x \cdot y} + \left(\color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right)} - \frac{x}{y}\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\left(\color{blue}{\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y}\right), \color{blue}{\left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)}\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \left(x \cdot y\right)\right), \left(\color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right)} - \frac{x}{y}\right)\right)\right) \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \left(y \cdot x\right)\right), \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \color{blue}{\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}}\right) - \frac{x}{y}\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(y, x\right)\right), \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \color{blue}{\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}}\right) - \frac{x}{y}\right)\right)\right) \]
    9. +-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(y, x\right)\right), \left(\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) - \frac{\color{blue}{x}}{y}\right)\right)\right) \]
    10. associate--l+N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(y, x\right)\right), \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} - \frac{x}{y}\right)}\right)\right)\right) \]
    11. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(y, x\right)\right), \mathsf{+.f64}\left(\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right), \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} - \frac{x}{y}\right)}\right)\right)\right) \]
  7. Simplified45.9%

    \[\leadsto \color{blue}{y \cdot \left(\frac{0.083333333333333}{y \cdot x} + \left(\frac{\log x \cdot \left(x + -0.5\right)}{y} + \left(\frac{0.91893853320467}{y} - \frac{x}{y}\right)\right)\right)} \]
  8. Taylor expanded in x around 0

    \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y}\right)}\right) \]
  9. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{\left(x \cdot y\right)}\right)\right) \]
    2. *-lowering-*.f6422.9%

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
  10. Simplified22.9%

    \[\leadsto y \cdot \color{blue}{\frac{0.083333333333333}{x \cdot y}} \]
  11. Add Preprocessing

Alternative 25: 22.6% accurate, 41.0× speedup?

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

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.1%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \color{blue}{\left(\frac{\frac{83333333333333}{1000000000000000}}{x}\right)}\right) \]
  4. Step-by-step derivation
    1. /-lowering-/.f6452.9%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(x, \frac{1}{2}\right), \mathsf{log.f64}\left(x\right)\right), x\right), \frac{91893853320467}{100000000000000}\right), \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right)\right) \]
  5. Simplified52.9%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  6. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
  7. Step-by-step derivation
    1. /-lowering-/.f6420.8%

      \[\leadsto \mathsf{/.f64}\left(\frac{83333333333333}{1000000000000000}, \color{blue}{x}\right) \]
  8. Simplified20.8%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  9. Add Preprocessing

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

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

\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}

Reproduce

?
herbie shell --seed 2024161 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :alt
  (! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))