
(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:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x y z)
:precision binary64
(if (<= x 1.6e+82)
(+
(+ (- (* (/ (log x) (+ x 0.5)) (fma x x -0.25)) x) 0.91893853320467)
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(pow (/ (/ (/ x z) z) (+ y 0.0007936500793651)) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.6e+82) {
tmp = ((((log(x) / (x + 0.5)) * fma(x, x, -0.25)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + pow((((x / z) / z) / (y + 0.0007936500793651)), -1.0);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.6e+82) tmp = Float64(Float64(Float64(Float64(Float64(log(x) / Float64(x + 0.5)) * fma(x, x, -0.25)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + (Float64(Float64(Float64(x / z) / z) / Float64(y + 0.0007936500793651)) ^ -1.0)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.6e+82], N[(N[(N[(N[(N[(N[Log[x], $MachinePrecision] / N[(x + 0.5), $MachinePrecision]), $MachinePrecision] * N[(x * x + -0.25), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision] / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.6 \cdot 10^{+82}:\\
\;\;\;\;\left(\left(\frac{\log x}{x + 0.5} \cdot \mathsf{fma}\left(x, x, -0.25\right) - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + {\left(\frac{\frac{\frac{x}{z}}{z}}{y + 0.0007936500793651}\right)}^{-1}\\
\end{array}
\end{array}
if x < 1.59999999999999987e82Initial program 99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
flip-+99.8%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
fma-neg99.7%
metadata-eval99.7%
metadata-eval99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
associate-/l*99.7%
associate-/r/99.8%
Simplified99.8%
if 1.59999999999999987e82 < x Initial program 78.1%
clear-num78.1%
inv-pow78.1%
*-commutative78.1%
fma-udef78.1%
fma-neg78.1%
metadata-eval78.1%
Applied egg-rr78.1%
Taylor expanded in z around inf 78.1%
associate-/r*88.5%
unpow288.5%
associate-/r*99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= x 3e+82)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
t_0)
(+ t_0 (pow (/ (/ (/ x z) z) (+ y 0.0007936500793651)) -1.0)))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 3e+82) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + pow((((x / z) / z) / (y + 0.0007936500793651)), -1.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 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 3d+82) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + t_0
else
tmp = t_0 + ((((x / z) / z) / (y + 0.0007936500793651d0)) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 3e+82) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + Math.pow((((x / z) / z) / (y + 0.0007936500793651)), -1.0);
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 3e+82: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0 else: tmp = t_0 + math.pow((((x / z) / z) / (y + 0.0007936500793651)), -1.0) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (x <= 3e+82) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0); else tmp = Float64(t_0 + (Float64(Float64(Float64(x / z) / z) / Float64(y + 0.0007936500793651)) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (x <= 3e+82) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0; else tmp = t_0 + ((((x / z) / z) / (y + 0.0007936500793651)) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3e+82], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[Power[N[(N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision] / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;x \leq 3 \cdot 10^{+82}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + {\left(\frac{\frac{\frac{x}{z}}{z}}{y + 0.0007936500793651}\right)}^{-1}\\
\end{array}
\end{array}
if x < 2.99999999999999989e82Initial program 99.8%
if 2.99999999999999989e82 < x Initial program 78.1%
clear-num78.1%
inv-pow78.1%
*-commutative78.1%
fma-udef78.1%
fma-neg78.1%
metadata-eval78.1%
Applied egg-rr78.1%
Taylor expanded in z around inf 78.1%
associate-/r*88.5%
unpow288.5%
associate-/r*99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= x 1.6e+82)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
t_0)
(+ t_0 (* (+ y 0.0007936500793651) (/ z (/ x z)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 1.6e+82) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (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) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 1.6d+82) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + t_0
else
tmp = t_0 + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 1.6e+82) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 1.6e+82: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0 else: tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (x <= 1.6e+82) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0); else tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (x <= 1.6e+82) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0; else tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.6e+82], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;x \leq 1.6 \cdot 10^{+82}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 1.59999999999999987e82Initial program 99.8%
if 1.59999999999999987e82 < x Initial program 78.1%
clear-num78.1%
inv-pow78.1%
*-commutative78.1%
fma-udef78.1%
fma-neg78.1%
metadata-eval78.1%
Applied egg-rr78.1%
Taylor expanded in z around inf 78.1%
*-commutative78.1%
associate-*r/88.5%
unpow288.5%
associate-/l*99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x))
(t_1 (+ t_0 (/ y (/ x (* z z)))))
(t_2 (+ t_0 (* 0.0007936500793651 (/ z (/ x z))))))
(if (<= z -1.1e+204)
t_2
(if (<= z -4.8e-70)
t_1
(if (<= z 1.3e-37)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))
(if (<= z 2.25e+131) t_1 t_2))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double t_1 = t_0 + (y / (x / (z * z)));
double t_2 = t_0 + (0.0007936500793651 * (z / (x / z)));
double tmp;
if (z <= -1.1e+204) {
tmp = t_2;
} else if (z <= -4.8e-70) {
tmp = t_1;
} else if (z <= 1.3e-37) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
} else if (z <= 2.25e+131) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x * log(x)) - x
t_1 = t_0 + (y / (x / (z * z)))
t_2 = t_0 + (0.0007936500793651d0 * (z / (x / z)))
if (z <= (-1.1d+204)) then
tmp = t_2
else if (z <= (-4.8d-70)) then
tmp = t_1
else if (z <= 1.3d-37) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
else if (z <= 2.25d+131) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * Math.log(x)) - x;
double t_1 = t_0 + (y / (x / (z * z)));
double t_2 = t_0 + (0.0007936500793651 * (z / (x / z)));
double tmp;
if (z <= -1.1e+204) {
tmp = t_2;
} else if (z <= -4.8e-70) {
tmp = t_1;
} else if (z <= 1.3e-37) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
} else if (z <= 2.25e+131) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x t_1 = t_0 + (y / (x / (z * z))) t_2 = t_0 + (0.0007936500793651 * (z / (x / z))) tmp = 0 if z <= -1.1e+204: tmp = t_2 elif z <= -4.8e-70: tmp = t_1 elif z <= 1.3e-37: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) elif z <= 2.25e+131: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) t_1 = Float64(t_0 + Float64(y / Float64(x / Float64(z * z)))) t_2 = Float64(t_0 + Float64(0.0007936500793651 * Float64(z / Float64(x / z)))) tmp = 0.0 if (z <= -1.1e+204) tmp = t_2; elseif (z <= -4.8e-70) tmp = t_1; elseif (z <= 1.3e-37) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); elseif (z <= 2.25e+131) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * log(x)) - x; t_1 = t_0 + (y / (x / (z * z))); t_2 = t_0 + (0.0007936500793651 * (z / (x / z))); tmp = 0.0; if (z <= -1.1e+204) tmp = t_2; elseif (z <= -4.8e-70) tmp = t_1; elseif (z <= 1.3e-37) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); elseif (z <= 2.25e+131) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(0.0007936500793651 * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+204], t$95$2, If[LessEqual[z, -4.8e-70], t$95$1, If[LessEqual[z, 1.3e-37], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+131], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \log x - x\\
t_1 := t_0 + \frac{y}{\frac{x}{z \cdot z}}\\
t_2 := t_0 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+204}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-37}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.10000000000000006e204 or 2.2500000000000001e131 < z Initial program 83.2%
Taylor expanded in z around inf 83.2%
associate-/l*84.7%
unpow284.7%
Simplified84.7%
Taylor expanded in y around 0 64.9%
unpow264.9%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 78.6%
*-commutative78.6%
sub-neg78.6%
mul-1-neg78.6%
log-rec78.6%
remove-double-neg78.6%
metadata-eval78.6%
distribute-rgt-in78.6%
neg-mul-178.6%
sub-neg78.6%
*-commutative78.6%
Simplified78.6%
if -1.10000000000000006e204 < z < -4.8000000000000002e-70 or 1.2999999999999999e-37 < z < 2.2500000000000001e131Initial program 90.3%
Taylor expanded in y around inf 70.1%
associate-/l*81.5%
unpow281.5%
Simplified81.5%
Taylor expanded in x around inf 81.4%
*-commutative62.9%
sub-neg62.9%
mul-1-neg62.9%
log-rec62.9%
remove-double-neg62.9%
metadata-eval62.9%
distribute-rgt-in62.8%
neg-mul-162.8%
sub-neg62.8%
*-commutative62.8%
Simplified81.3%
if -4.8000000000000002e-70 < z < 1.2999999999999999e-37Initial program 99.6%
Taylor expanded in z around 0 98.0%
Final simplification87.2%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+116)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(* x (+ (log x) -1.0)))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+116) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z / (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 (x <= 1.3d+116) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+116) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.3e+116: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+116) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.3e+116) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+116], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+116}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 1.29999999999999993e116Initial program 98.7%
Taylor expanded in x around inf 98.4%
*-commutative45.4%
sub-neg45.4%
mul-1-neg45.4%
log-rec45.4%
remove-double-neg45.4%
metadata-eval45.4%
Simplified98.4%
if 1.29999999999999993e116 < x Initial program 76.8%
clear-num76.8%
inv-pow76.8%
*-commutative76.8%
fma-udef76.8%
fma-neg76.8%
metadata-eval76.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 74.9%
associate-*r/84.8%
unpow284.8%
associate-/l*94.1%
Simplified94.1%
Final simplification97.1%
(FPCore (x y z)
:precision binary64
(if (<= x 3.7e-12)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(* x (+ (log x) -1.0)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.7e-12) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z / (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 (x <= 3.7d-12) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.7e-12) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.7e-12: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.7e-12) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.7e-12) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.7e-12], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.7 \cdot 10^{-12}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 3.69999999999999999e-12Initial program 99.8%
Taylor expanded in x around inf 99.8%
*-commutative45.9%
sub-neg45.9%
mul-1-neg45.9%
log-rec45.9%
remove-double-neg45.9%
metadata-eval45.9%
Simplified99.8%
if 3.69999999999999999e-12 < x Initial program 84.4%
clear-num84.4%
inv-pow84.4%
*-commutative84.4%
fma-udef84.4%
fma-neg84.4%
metadata-eval84.4%
Applied egg-rr84.4%
Taylor expanded in z around inf 84.0%
*-commutative84.0%
associate-*r/91.4%
unpow291.4%
associate-/l*99.2%
Simplified99.2%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* x (log x)) x) (* 0.0007936500793651 (/ z (/ x z))))))
(if (<= z -9.2e+203)
t_0
(if (<= z -8.2e-70)
(+ (* x (+ (log x) -1.0)) (/ (* z z) (/ x y)))
(if (<= z 1.5e-5)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))
t_0)))))
double code(double x, double y, double z) {
double t_0 = ((x * log(x)) - x) + (0.0007936500793651 * (z / (x / z)));
double tmp;
if (z <= -9.2e+203) {
tmp = t_0;
} else if (z <= -8.2e-70) {
tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y));
} else if (z <= 1.5e-5) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (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 = ((x * log(x)) - x) + (0.0007936500793651d0 * (z / (x / z)))
if (z <= (-9.2d+203)) then
tmp = t_0
else if (z <= (-8.2d-70)) then
tmp = (x * (log(x) + (-1.0d0))) + ((z * z) / (x / y))
else if (z <= 1.5d-5) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (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 = ((x * Math.log(x)) - x) + (0.0007936500793651 * (z / (x / z)));
double tmp;
if (z <= -9.2e+203) {
tmp = t_0;
} else if (z <= -8.2e-70) {
tmp = (x * (Math.log(x) + -1.0)) + ((z * z) / (x / y));
} else if (z <= 1.5e-5) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((x * math.log(x)) - x) + (0.0007936500793651 * (z / (x / z))) tmp = 0 if z <= -9.2e+203: tmp = t_0 elif z <= -8.2e-70: tmp = (x * (math.log(x) + -1.0)) + ((z * z) / (x / y)) elif z <= 1.5e-5: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x * log(x)) - x) + Float64(0.0007936500793651 * Float64(z / Float64(x / z)))) tmp = 0.0 if (z <= -9.2e+203) tmp = t_0; elseif (z <= -8.2e-70) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * z) / Float64(x / y))); elseif (z <= 1.5e-5) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x * log(x)) - x) + (0.0007936500793651 * (z / (x / z))); tmp = 0.0; if (z <= -9.2e+203) tmp = t_0; elseif (z <= -8.2e-70) tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y)); elseif (z <= 1.5e-5) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.0007936500793651 * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+203], t$95$0, If[LessEqual[z, -8.2e-70], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-5], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x \cdot \log x - x\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+203}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-5}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -9.1999999999999996e203 or 1.50000000000000004e-5 < z Initial program 84.8%
Taylor expanded in z around inf 84.6%
associate-/l*89.4%
unpow289.4%
Simplified89.4%
Taylor expanded in y around 0 66.4%
unpow266.4%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in x around inf 75.5%
*-commutative75.5%
sub-neg75.5%
mul-1-neg75.5%
log-rec75.5%
remove-double-neg75.5%
metadata-eval75.5%
distribute-rgt-in75.5%
neg-mul-175.5%
sub-neg75.5%
*-commutative75.5%
Simplified75.5%
if -9.1999999999999996e203 < z < -8.19999999999999955e-70Initial program 91.1%
Taylor expanded in x around inf 91.1%
*-commutative32.7%
sub-neg32.7%
mul-1-neg32.7%
log-rec32.7%
remove-double-neg32.7%
metadata-eval32.7%
Simplified91.1%
Taylor expanded in y around inf 71.1%
*-commutative71.1%
associate-/l*79.7%
unpow279.7%
Simplified79.7%
if -8.19999999999999955e-70 < z < 1.50000000000000004e-5Initial program 99.6%
Taylor expanded in z around 0 97.1%
Final simplification85.1%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.06e-71) (not (<= z 1.2e-42)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ (* z z) x)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.06e-71) || !(z <= 1.2e-42)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * ((z * z) / x));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / 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.06d-71)) .or. (.not. (z <= 1.2d-42))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.06e-71) || !(z <= 1.2e-42)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * ((z * z) / x));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.06e-71) or not (z <= 1.2e-42): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * ((z * z) / x)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.06e-71) || !(z <= 1.2e-42)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.06e-71) || ~((z <= 1.2e-42))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * ((z * z) / x)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.06e-71], N[Not[LessEqual[z, 1.2e-42]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-71} \lor \neg \left(z \leq 1.2 \cdot 10^{-42}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.0599999999999999e-71 or 1.20000000000000001e-42 < z Initial program 87.3%
Taylor expanded in x around inf 87.4%
*-commutative28.5%
sub-neg28.5%
mul-1-neg28.5%
log-rec28.5%
remove-double-neg28.5%
metadata-eval28.5%
Simplified87.4%
Taylor expanded in z around inf 85.4%
associate-/l*91.4%
associate-/r/91.4%
unpow291.4%
Simplified91.4%
if -1.0599999999999999e-71 < z < 1.20000000000000001e-42Initial program 99.6%
Taylor expanded in z around 0 98.0%
Final simplification94.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -1.4e+17) (not (<= z 1.5e-5)))
(+ t_0 (* (+ y 0.0007936500793651) (/ (* z z) x)))
(+ t_0 (/ (+ 0.083333333333333 (* y (* z z))) x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -1.4e+17) || !(z <= 1.5e-5)) {
tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x));
} else {
tmp = t_0 + ((0.083333333333333 + (y * (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 = x * (log(x) + (-1.0d0))
if ((z <= (-1.4d+17)) .or. (.not. (z <= 1.5d-5))) then
tmp = t_0 + ((y + 0.0007936500793651d0) * ((z * z) / x))
else
tmp = t_0 + ((0.083333333333333d0 + (y * (z * z))) / x)
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 ((z <= -1.4e+17) || !(z <= 1.5e-5)) {
tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x));
} else {
tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -1.4e+17) or not (z <= 1.5e-5): tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x)) else: tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -1.4e+17) || !(z <= 1.5e-5)) tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(y * Float64(z * z))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -1.4e+17) || ~((z <= 1.5e-5))) tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x)); else tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x); 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[Or[LessEqual[z, -1.4e+17], N[Not[LessEqual[z, 1.5e-5]], $MachinePrecision]], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+17} \lor \neg \left(z \leq 1.5 \cdot 10^{-5}\right):\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + y \cdot \left(z \cdot z\right)}{x}\\
\end{array}
\end{array}
if z < -1.4e17 or 1.50000000000000004e-5 < z Initial program 85.5%
Taylor expanded in x around inf 85.6%
*-commutative23.1%
sub-neg23.1%
mul-1-neg23.1%
log-rec23.1%
remove-double-neg23.1%
metadata-eval23.1%
Simplified85.6%
Taylor expanded in z around inf 85.4%
associate-/l*92.3%
associate-/r/92.2%
unpow292.2%
Simplified92.2%
if -1.4e17 < z < 1.50000000000000004e-5Initial program 99.6%
Taylor expanded in x around inf 99.1%
*-commutative92.0%
sub-neg92.0%
mul-1-neg92.0%
log-rec92.0%
remove-double-neg92.0%
metadata-eval92.0%
Simplified99.1%
Taylor expanded in y around inf 99.0%
unpow299.0%
Simplified99.0%
Final simplification95.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -1.4e+17)
(+ t_0 (* (+ y 0.0007936500793651) (/ (* z z) x)))
(if (<= z 1.5e-5)
(+ t_0 (/ (+ 0.083333333333333 (* y (* z z))) x))
(+ (- (* x (log x)) x) (/ (* z z) (/ x (+ y 0.0007936500793651))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -1.4e+17) {
tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x));
} else if (z <= 1.5e-5) {
tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x);
} else {
tmp = ((x * log(x)) - 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) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (z <= (-1.4d+17)) then
tmp = t_0 + ((y + 0.0007936500793651d0) * ((z * z) / x))
else if (z <= 1.5d-5) then
tmp = t_0 + ((0.083333333333333d0 + (y * (z * z))) / x)
else
tmp = ((x * log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651d0)))
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 (z <= -1.4e+17) {
tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x));
} else if (z <= 1.5e-5) {
tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x);
} else {
tmp = ((x * Math.log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -1.4e+17: tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x)) elif z <= 1.5e-5: tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x) else: tmp = ((x * math.log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -1.4e+17) tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))); elseif (z <= 1.5e-5) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(y * Float64(z * z))) / x)); else tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -1.4e+17) tmp = t_0 + ((y + 0.0007936500793651) * ((z * z) / x)); elseif (z <= 1.5e-5) tmp = t_0 + ((0.083333333333333 + (y * (z * z))) / x); else tmp = ((x * log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651))); 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[z, -1.4e+17], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-5], N[(t$95$0 + N[(N[(0.083333333333333 + N[(y * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-5}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + y \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if z < -1.4e17Initial program 84.6%
Taylor expanded in x around inf 84.6%
*-commutative19.8%
sub-neg19.8%
mul-1-neg19.8%
log-rec19.8%
remove-double-neg19.8%
metadata-eval19.8%
Simplified84.6%
Taylor expanded in z around inf 84.6%
associate-/l*92.2%
associate-/r/92.2%
unpow292.2%
Simplified92.2%
if -1.4e17 < z < 1.50000000000000004e-5Initial program 99.6%
Taylor expanded in x around inf 99.1%
*-commutative92.0%
sub-neg92.0%
mul-1-neg92.0%
log-rec92.0%
remove-double-neg92.0%
metadata-eval92.0%
Simplified99.1%
Taylor expanded in y around inf 99.0%
unpow299.0%
Simplified99.0%
if 1.50000000000000004e-5 < z Initial program 86.3%
Taylor expanded in z around inf 86.0%
associate-/l*92.3%
unpow292.3%
Simplified92.3%
Taylor expanded in x around inf 92.3%
*-commutative74.8%
sub-neg74.8%
mul-1-neg74.8%
log-rec74.8%
remove-double-neg74.8%
metadata-eval74.8%
distribute-rgt-in74.7%
neg-mul-174.7%
sub-neg74.7%
*-commutative74.7%
Simplified92.3%
Final simplification95.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x)))
(if (<= x 6e+82)
(+
(* x (+ (log x) -1.0))
(/ (+ 0.083333333333333 (* z (* z (+ y 0.0007936500793651)))) x))
(if (<= x 1.95e+220)
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+ t_0 (* 0.0007936500793651 (/ z (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double tmp;
if (x <= 6e+82) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x);
} else if (x <= 1.95e+220) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + (0.0007936500793651 * (z / (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) :: t_0
real(8) :: tmp
t_0 = (x * log(x)) - x
if (x <= 6d+82) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (z * (y + 0.0007936500793651d0)))) / x)
else if (x <= 1.95d+220) then
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
else
tmp = t_0 + (0.0007936500793651d0 * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * Math.log(x)) - x;
double tmp;
if (x <= 6e+82) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x);
} else if (x <= 1.95e+220) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + (0.0007936500793651 * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x tmp = 0 if x <= 6e+82: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x) elif x <= 1.95e+220: tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) else: tmp = t_0 + (0.0007936500793651 * (z / (x / z))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) tmp = 0.0 if (x <= 6e+82) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(z * Float64(y + 0.0007936500793651)))) / x)); elseif (x <= 1.95e+220) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(t_0 + Float64(0.0007936500793651 * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * log(x)) - x; tmp = 0.0; if (x <= 6e+82) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x); elseif (x <= 1.95e+220) tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = t_0 + (0.0007936500793651 * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[x, 6e+82], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95e+220], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.0007936500793651 * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \log x - x\\
\mathbf{if}\;x \leq 6 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{+220}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 5.99999999999999978e82Initial program 99.8%
Taylor expanded in x around inf 99.4%
*-commutative45.0%
sub-neg45.0%
mul-1-neg45.0%
log-rec45.0%
remove-double-neg45.0%
metadata-eval45.0%
Simplified99.4%
Taylor expanded in z around inf 99.1%
unpow299.1%
+-commutative99.1%
associate-*l*99.1%
+-commutative99.1%
Simplified99.1%
if 5.99999999999999978e82 < x < 1.95000000000000008e220Initial program 84.9%
Taylor expanded in z around inf 84.9%
associate-/l*94.2%
unpow294.2%
Simplified94.2%
Taylor expanded in x around inf 94.2%
*-commutative78.0%
sub-neg78.0%
mul-1-neg78.0%
log-rec78.0%
remove-double-neg78.0%
metadata-eval78.0%
distribute-rgt-in78.0%
neg-mul-178.0%
sub-neg78.0%
*-commutative78.0%
Simplified94.2%
if 1.95000000000000008e220 < x Initial program 68.8%
Taylor expanded in z around inf 68.8%
associate-/l*81.1%
unpow281.1%
Simplified81.1%
Taylor expanded in y around 0 81.1%
unpow281.1%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.6%
*-commutative99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
distribute-rgt-in99.6%
neg-mul-199.6%
sub-neg99.6%
*-commutative99.6%
Simplified99.6%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (<= x 2e+115)
(+
(* x (+ (log x) -1.0))
(/ (+ 0.083333333333333 (* z (* z (+ y 0.0007936500793651)))) x))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e+115) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z / (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 (x <= 2d+115) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (z * (y + 0.0007936500793651d0)))) / x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e+115) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e+115: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e+115) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(z * Float64(y + 0.0007936500793651)))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e+115) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * (z * (y + 0.0007936500793651)))) / x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e+115], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 2e115Initial program 98.7%
Taylor expanded in x around inf 98.4%
*-commutative45.4%
sub-neg45.4%
mul-1-neg45.4%
log-rec45.4%
remove-double-neg45.4%
metadata-eval45.4%
Simplified98.4%
Taylor expanded in z around inf 98.1%
unpow298.1%
+-commutative98.1%
associate-*l*98.1%
+-commutative98.1%
Simplified98.1%
if 2e115 < x Initial program 76.8%
clear-num76.8%
inv-pow76.8%
*-commutative76.8%
fma-udef76.8%
fma-neg76.8%
metadata-eval76.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 74.9%
associate-*r/84.8%
unpow284.8%
associate-/l*94.1%
Simplified94.1%
Final simplification96.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -8.2e-70) (not (<= z 2.9e-36)))
(+ t_0 (/ (* z z) (/ x y)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -8.2e-70) || !(z <= 2.9e-36)) {
tmp = t_0 + ((z * z) / (x / y));
} else {
tmp = t_0 + (0.083333333333333 / 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 = x * (log(x) + (-1.0d0))
if ((z <= (-8.2d-70)) .or. (.not. (z <= 2.9d-36))) then
tmp = t_0 + ((z * z) / (x / y))
else
tmp = t_0 + (0.083333333333333d0 / x)
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 ((z <= -8.2e-70) || !(z <= 2.9e-36)) {
tmp = t_0 + ((z * z) / (x / y));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -8.2e-70) or not (z <= 2.9e-36): tmp = t_0 + ((z * z) / (x / y)) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -8.2e-70) || !(z <= 2.9e-36)) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / y))); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -8.2e-70) || ~((z <= 2.9e-36))) tmp = t_0 + ((z * z) / (x / y)); else tmp = t_0 + (0.083333333333333 / x); 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[Or[LessEqual[z, -8.2e-70], N[Not[LessEqual[z, 2.9e-36]], $MachinePrecision]], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{-70} \lor \neg \left(z \leq 2.9 \cdot 10^{-36}\right):\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.19999999999999955e-70 or 2.90000000000000013e-36 < z Initial program 87.3%
Taylor expanded in x around inf 87.4%
*-commutative28.5%
sub-neg28.5%
mul-1-neg28.5%
log-rec28.5%
remove-double-neg28.5%
metadata-eval28.5%
Simplified87.4%
Taylor expanded in y around inf 65.8%
*-commutative65.8%
associate-/l*70.9%
unpow270.9%
Simplified70.9%
if -8.19999999999999955e-70 < z < 2.90000000000000013e-36Initial program 99.6%
Taylor expanded in z around 0 98.0%
Taylor expanded in x around inf 97.4%
*-commutative97.4%
sub-neg97.4%
mul-1-neg97.4%
log-rec97.4%
remove-double-neg97.4%
metadata-eval97.4%
Simplified97.4%
Final simplification81.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -8.2e-70) (not (<= z 8.5e-36)))
(+ (* x (+ (log x) -1.0)) (/ (* z z) (/ x y)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.2e-70) || !(z <= 8.5e-36)) {
tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / 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 <= (-8.2d-70)) .or. (.not. (z <= 8.5d-36))) then
tmp = (x * (log(x) + (-1.0d0))) + ((z * z) / (x / y))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8.2e-70) || !(z <= 8.5e-36)) {
tmp = (x * (Math.log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.2e-70) or not (z <= 8.5e-36): tmp = (x * (math.log(x) + -1.0)) + ((z * z) / (x / y)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.2e-70) || !(z <= 8.5e-36)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * z) / Float64(x / y))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.2e-70) || ~((z <= 8.5e-36))) tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.2e-70], N[Not[LessEqual[z, 8.5e-36]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-70} \lor \neg \left(z \leq 8.5 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.19999999999999955e-70 or 8.5000000000000007e-36 < z Initial program 87.3%
Taylor expanded in x around inf 87.4%
*-commutative28.5%
sub-neg28.5%
mul-1-neg28.5%
log-rec28.5%
remove-double-neg28.5%
metadata-eval28.5%
Simplified87.4%
Taylor expanded in y around inf 65.8%
*-commutative65.8%
associate-/l*70.9%
unpow270.9%
Simplified70.9%
if -8.19999999999999955e-70 < z < 8.5000000000000007e-36Initial program 99.6%
Taylor expanded in z around 0 98.0%
Final simplification81.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -1.35e-11)
(+ t_0 (* -0.0027777777777778 (/ z x)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -1.35e-11) {
tmp = t_0 + (-0.0027777777777778 * (z / x));
} else {
tmp = t_0 + (0.083333333333333 / 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 = x * (log(x) + (-1.0d0))
if (z <= (-1.35d-11)) then
tmp = t_0 + ((-0.0027777777777778d0) * (z / x))
else
tmp = t_0 + (0.083333333333333d0 / x)
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 (z <= -1.35e-11) {
tmp = t_0 + (-0.0027777777777778 * (z / x));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -1.35e-11: tmp = t_0 + (-0.0027777777777778 * (z / x)) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -1.35e-11) tmp = Float64(t_0 + Float64(-0.0027777777777778 * Float64(z / x))); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -1.35e-11) tmp = t_0 + (-0.0027777777777778 * (z / x)); else tmp = t_0 + (0.083333333333333 / x); 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[z, -1.35e-11], N[(t$95$0 + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-11}:\\
\;\;\;\;t_0 + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.35000000000000002e-11Initial program 85.3%
Taylor expanded in x around inf 85.3%
*-commutative18.9%
sub-neg18.9%
mul-1-neg18.9%
log-rec18.9%
remove-double-neg18.9%
metadata-eval18.9%
Simplified85.3%
Taylor expanded in z around 0 39.2%
*-commutative39.2%
Simplified39.2%
Taylor expanded in z around inf 40.6%
if -1.35000000000000002e-11 < z Initial program 94.4%
Taylor expanded in z around 0 67.6%
Taylor expanded in x around inf 67.3%
*-commutative67.3%
sub-neg67.3%
mul-1-neg67.3%
log-rec67.3%
remove-double-neg67.3%
metadata-eval67.3%
Simplified67.3%
Final simplification60.7%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (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 * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}
\end{array}
Initial program 92.1%
Taylor expanded in z around 0 55.6%
Taylor expanded in x around inf 55.4%
*-commutative55.4%
sub-neg55.4%
mul-1-neg55.4%
log-rec55.4%
remove-double-neg55.4%
metadata-eval55.4%
Simplified55.4%
Final simplification55.4%
(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}
Initial program 92.1%
Taylor expanded in z around 0 55.6%
Taylor expanded in x around 0 23.8%
Taylor expanded in x around 0 24.6%
Final simplification24.6%
(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}
herbie shell --seed 2023274
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))