
(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 16 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.32e+117)
(+
(fma (+ x -0.5) (log x) (- 0.91893853320467 x))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(* z (* z (/ (+ y 0.0007936500793651) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.32e+117) {
tmp = fma((x + -0.5), log(x), (0.91893853320467 - x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (z * (z * ((y + 0.0007936500793651) / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.32e+117) tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(0.91893853320467 - x)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.32e+117], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.32 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\end{array}
\end{array}
if x < 1.3199999999999999e117Initial program 99.6%
remove-double-neg99.6%
sub-neg99.6%
associate-+l+99.6%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
remove-double-neg99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 1.3199999999999999e117 < x Initial program 81.5%
remove-double-neg81.5%
remove-double-neg81.5%
sub-neg81.5%
metadata-eval81.5%
*-commutative81.5%
fma-def81.5%
fma-neg81.5%
metadata-eval81.5%
Simplified81.5%
clear-num81.5%
metadata-eval81.5%
fma-neg81.5%
fma-udef81.5%
*-commutative81.5%
inv-pow81.5%
*-commutative81.5%
fma-udef81.5%
fma-neg81.5%
metadata-eval81.5%
fma-udef81.5%
*-commutative81.5%
fma-def81.5%
Applied egg-rr81.5%
Taylor expanded in z around inf 81.5%
unpow281.5%
associate-/l*88.4%
*-rgt-identity88.4%
+-commutative88.4%
associate-*r/88.4%
associate-*l*99.5%
associate-/r/99.5%
*-commutative99.5%
associate-*r/99.6%
*-rgt-identity99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (<= x 2.15e+99)
(+
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x)
t_0)
(+ t_0 (* z (* z (/ (+ y 0.0007936500793651) x)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if (x <= 2.15e+99) {
tmp = (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x)));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if (x <= 2.15e+99) tmp = Float64(Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) + t_0); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x)))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.15e+99], N[(N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;x \leq 2.15 \cdot 10^{+99}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\end{array}
\end{array}
if x < 2.1500000000000001e99Initial program 99.7%
remove-double-neg99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 2.1500000000000001e99 < x Initial program 82.9%
remove-double-neg82.9%
remove-double-neg82.9%
sub-neg82.9%
metadata-eval82.9%
*-commutative82.9%
fma-def82.9%
fma-neg82.9%
metadata-eval82.9%
Simplified82.9%
clear-num82.9%
metadata-eval82.9%
fma-neg82.9%
fma-udef82.9%
*-commutative82.9%
inv-pow82.9%
*-commutative82.9%
fma-udef82.9%
fma-neg82.9%
metadata-eval82.9%
fma-udef82.9%
*-commutative82.9%
fma-def82.9%
Applied egg-rr82.9%
Taylor expanded in z around inf 82.9%
unpow282.9%
associate-/l*89.2%
*-rgt-identity89.2%
+-commutative89.2%
associate-*r/89.2%
associate-*l*99.5%
associate-/r/99.5%
*-commutative99.5%
associate-*r/99.6%
*-rgt-identity99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(* (+ y 0.0007936500793651) (/ (* z z) x))))
(t_1 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (<= z -1.2e+113)
t_0
(if (<= z -6.8e+41)
(+ t_1 (/ (* z (* z 0.0007936500793651)) x))
(if (or (<= z -4800000000000.0) (not (<= z 5e+24)))
t_0
(+ t_1 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))))))
double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if (z <= -1.2e+113) {
tmp = t_0;
} else if (z <= -6.8e+41) {
tmp = t_1 + ((z * (z * 0.0007936500793651)) / x);
} else if ((z <= -4800000000000.0) || !(z <= 5e+24)) {
tmp = t_0;
} else {
tmp = t_1 + ((0.083333333333333 + (z * -0.0027777777777778)) / 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) :: t_1
real(8) :: tmp
t_0 = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
t_1 = 0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)
if (z <= (-1.2d+113)) then
tmp = t_0
else if (z <= (-6.8d+41)) then
tmp = t_1 + ((z * (z * 0.0007936500793651d0)) / x)
else if ((z <= (-4800000000000.0d0)) .or. (.not. (z <= 5d+24))) then
tmp = t_0
else
tmp = t_1 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * Math.log(x)) - x);
double tmp;
if (z <= -1.2e+113) {
tmp = t_0;
} else if (z <= -6.8e+41) {
tmp = t_1 + ((z * (z * 0.0007936500793651)) / x);
} else if ((z <= -4800000000000.0) || !(z <= 5e+24)) {
tmp = t_0;
} else {
tmp = t_1 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
return tmp;
}
def code(x, y, z): t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)) t_1 = 0.91893853320467 + (((x + -0.5) * math.log(x)) - x) tmp = 0 if z <= -1.2e+113: tmp = t_0 elif z <= -6.8e+41: tmp = t_1 + ((z * (z * 0.0007936500793651)) / x) elif (z <= -4800000000000.0) or not (z <= 5e+24): tmp = t_0 else: tmp = t_1 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) return tmp
function code(x, y, z) t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))) t_1 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if (z <= -1.2e+113) tmp = t_0; elseif (z <= -6.8e+41) tmp = Float64(t_1 + Float64(Float64(z * Float64(z * 0.0007936500793651)) / x)); elseif ((z <= -4800000000000.0) || !(z <= 5e+24)) tmp = t_0; else tmp = Float64(t_1 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)); t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x); tmp = 0.0; if (z <= -1.2e+113) tmp = t_0; elseif (z <= -6.8e+41) tmp = t_1 + ((z * (z * 0.0007936500793651)) / x); elseif ((z <= -4800000000000.0) || ~((z <= 5e+24))) tmp = t_0; else tmp = t_1 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+113], t$95$0, If[LessEqual[z, -6.8e+41], N[(t$95$1 + N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4800000000000.0], N[Not[LessEqual[z, 5e+24]], $MachinePrecision]], t$95$0, N[(t$95$1 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
t_1 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+113}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+41}:\\
\;\;\;\;t_1 + \frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x}\\
\mathbf{elif}\;z \leq -4800000000000 \lor \neg \left(z \leq 5 \cdot 10^{+24}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\end{array}
\end{array}
if z < -1.19999999999999992e113 or -6.79999999999999996e41 < z < -4.8e12 or 5.00000000000000045e24 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 87.2%
associate-/l*91.5%
+-commutative91.5%
associate-/r/91.5%
unpow291.5%
Simplified91.5%
Taylor expanded in x around 0 86.1%
if -1.19999999999999992e113 < z < -6.79999999999999996e41Initial program 92.1%
remove-double-neg92.1%
remove-double-neg92.1%
sub-neg92.1%
metadata-eval92.1%
*-commutative92.1%
fma-def92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 99.7%
unpow299.7%
*-commutative99.7%
associate-*r*99.9%
Simplified99.9%
if -4.8e12 < z < 5.00000000000000045e24Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.4%
Final simplification90.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (or (<= z -2800000000000.0) (not (<= z 10.0)))
(+ t_0 (* z (* z (/ (+ y 0.0007936500793651) x))))
(+ t_0 (+ (/ 0.083333333333333 x) (/ y (/ x (* z z))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if ((z <= -2800000000000.0) || !(z <= 10.0)) {
tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x)));
} else {
tmp = t_0 + ((0.083333333333333 / x) + (y / (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 = 0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)
if ((z <= (-2800000000000.0d0)) .or. (.not. (z <= 10.0d0))) then
tmp = t_0 + (z * (z * ((y + 0.0007936500793651d0) / x)))
else
tmp = t_0 + ((0.083333333333333d0 / x) + (y / (x / (z * z))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (((x + -0.5) * Math.log(x)) - x);
double tmp;
if ((z <= -2800000000000.0) || !(z <= 10.0)) {
tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x)));
} else {
tmp = t_0 + ((0.083333333333333 / x) + (y / (x / (z * z))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (((x + -0.5) * math.log(x)) - x) tmp = 0 if (z <= -2800000000000.0) or not (z <= 10.0): tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x))) else: tmp = t_0 + ((0.083333333333333 / x) + (y / (x / (z * z)))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if ((z <= -2800000000000.0) || !(z <= 10.0)) tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x)))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 / x) + Float64(y / Float64(x / Float64(z * z))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (((x + -0.5) * log(x)) - x); tmp = 0.0; if ((z <= -2800000000000.0) || ~((z <= 10.0))) tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x))); else tmp = t_0 + ((0.083333333333333 / x) + (y / (x / (z * z)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2800000000000.0], N[Not[LessEqual[z, 10.0]], $MachinePrecision]], N[(t$95$0 + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -2800000000000 \lor \neg \left(z \leq 10\right):\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \frac{y}{\frac{x}{z \cdot z}}\right)\\
\end{array}
\end{array}
if z < -2.8e12 or 10 < z Initial program 88.2%
remove-double-neg88.2%
remove-double-neg88.2%
sub-neg88.2%
metadata-eval88.2%
*-commutative88.2%
fma-def88.2%
fma-neg88.2%
metadata-eval88.2%
Simplified88.2%
clear-num88.2%
metadata-eval88.2%
fma-neg88.2%
fma-udef88.2%
*-commutative88.2%
inv-pow88.2%
*-commutative88.2%
fma-udef88.2%
fma-neg88.2%
metadata-eval88.2%
fma-udef88.2%
*-commutative88.2%
fma-def88.2%
Applied egg-rr88.2%
Taylor expanded in z around inf 87.9%
unpow287.9%
associate-/l*92.3%
*-rgt-identity92.3%
+-commutative92.3%
associate-*r/92.3%
associate-*l*99.5%
associate-/r/99.5%
*-commutative99.5%
associate-*r/99.5%
*-rgt-identity99.5%
+-commutative99.5%
Simplified99.5%
if -2.8e12 < z < 10Initial program 99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
*-commutative99.3%
fma-def99.3%
fma-neg99.3%
metadata-eval99.3%
Simplified99.3%
metadata-eval99.3%
fma-neg99.3%
fma-udef99.3%
*-commutative99.3%
add-log-exp91.6%
*-commutative91.6%
fma-udef91.6%
fma-neg91.6%
metadata-eval91.6%
fma-udef91.6%
*-commutative91.6%
fma-def91.6%
Applied egg-rr91.6%
Taylor expanded in z around inf 99.3%
associate-*r/99.3%
metadata-eval99.3%
+-commutative99.3%
unpow299.3%
associate-/l*90.3%
*-rgt-identity90.3%
+-commutative90.3%
associate-*r/89.6%
associate-/r/89.6%
*-commutative89.6%
associate-*r*99.4%
*-commutative99.4%
associate-*r/99.3%
*-rgt-identity99.3%
associate-*r/99.4%
+-commutative99.4%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in y around inf 98.4%
unpow298.4%
associate-/l*98.4%
Simplified98.4%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(if (<= x 1.9e+99)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(* z (* z (/ (+ y 0.0007936500793651) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+99) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (z * (z * ((y + 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 (x <= 1.9d+99) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)) + (z * (z * ((y + 0.0007936500793651d0) / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+99) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + (((x + -0.5) * Math.log(x)) - x)) + (z * (z * ((y + 0.0007936500793651) / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.9e+99: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + (((x + -0.5) * math.log(x)) - x)) + (z * (z * ((y + 0.0007936500793651) / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.9e+99) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.9e+99) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (z * (z * ((y + 0.0007936500793651) / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.9e+99], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $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[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.9 \cdot 10^{+99}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\end{array}
\end{array}
if x < 1.9e99Initial program 99.7%
if 1.9e99 < x Initial program 82.9%
remove-double-neg82.9%
remove-double-neg82.9%
sub-neg82.9%
metadata-eval82.9%
*-commutative82.9%
fma-def82.9%
fma-neg82.9%
metadata-eval82.9%
Simplified82.9%
clear-num82.9%
metadata-eval82.9%
fma-neg82.9%
fma-udef82.9%
*-commutative82.9%
inv-pow82.9%
*-commutative82.9%
fma-udef82.9%
fma-neg82.9%
metadata-eval82.9%
fma-udef82.9%
*-commutative82.9%
fma-def82.9%
Applied egg-rr82.9%
Taylor expanded in z around inf 82.9%
unpow282.9%
associate-/l*89.2%
*-rgt-identity89.2%
+-commutative89.2%
associate-*r/89.2%
associate-*l*99.5%
associate-/r/99.5%
*-commutative99.5%
associate-*r/99.6%
*-rgt-identity99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(* (+ y 0.0007936500793651) (/ (* z z) x)))))
(if (<= z -5e+112)
t_0
(if (<= z -3.4e+41)
(+ (/ (* z (* z 0.0007936500793651)) x) (* x (+ (log x) -1.0)))
(if (or (<= z -7.2e+15) (not (<= z 5e+25)))
t_0
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(/ 0.083333333333333 x)))))))
double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double tmp;
if (z <= -5e+112) {
tmp = t_0;
} else if (z <= -3.4e+41) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0));
} else if ((z <= -7.2e+15) || !(z <= 5e+25)) {
tmp = t_0;
} else {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - 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) :: t_0
real(8) :: tmp
t_0 = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
if (z <= (-5d+112)) then
tmp = t_0
else if (z <= (-3.4d+41)) then
tmp = ((z * (z * 0.0007936500793651d0)) / x) + (x * (log(x) + (-1.0d0)))
else if ((z <= (-7.2d+15)) .or. (.not. (z <= 5d+25))) then
tmp = t_0
else
tmp = (0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double tmp;
if (z <= -5e+112) {
tmp = t_0;
} else if (z <= -3.4e+41) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (Math.log(x) + -1.0));
} else if ((z <= -7.2e+15) || !(z <= 5e+25)) {
tmp = t_0;
} else {
tmp = (0.91893853320467 + (((x + -0.5) * Math.log(x)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)) tmp = 0 if z <= -5e+112: tmp = t_0 elif z <= -3.4e+41: tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (math.log(x) + -1.0)) elif (z <= -7.2e+15) or not (z <= 5e+25): tmp = t_0 else: tmp = (0.91893853320467 + (((x + -0.5) * math.log(x)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))) tmp = 0.0 if (z <= -5e+112) tmp = t_0; elseif (z <= -3.4e+41) tmp = Float64(Float64(Float64(z * Float64(z * 0.0007936500793651)) / x) + Float64(x * Float64(log(x) + -1.0))); elseif ((z <= -7.2e+15) || !(z <= 5e+25)) tmp = t_0; else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)); tmp = 0.0; if (z <= -5e+112) tmp = t_0; elseif (z <= -3.4e+41) tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0)); elseif ((z <= -7.2e+15) || ~((z <= 5e+25))) tmp = t_0; else tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+112], t$95$0, If[LessEqual[z, -3.4e+41], N[(N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.2e+15], N[Not[LessEqual[z, 5e+25]], $MachinePrecision]], t$95$0, N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+15} \lor \neg \left(z \leq 5 \cdot 10^{+25}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -5e112 or -3.39999999999999998e41 < z < -7.2e15 or 5.00000000000000024e25 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 87.2%
associate-/l*91.5%
+-commutative91.5%
associate-/r/91.5%
unpow291.5%
Simplified91.5%
Taylor expanded in x around 0 86.1%
if -5e112 < z < -3.39999999999999998e41Initial program 92.1%
remove-double-neg92.1%
remove-double-neg92.1%
sub-neg92.1%
metadata-eval92.1%
*-commutative92.1%
fma-def92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 99.7%
unpow299.7%
*-commutative99.7%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in x around inf 99.6%
*-commutative45.8%
sub-neg45.8%
mul-1-neg45.8%
log-rec45.8%
remove-double-neg45.8%
metadata-eval45.8%
Simplified99.6%
if -7.2e15 < z < 5.00000000000000024e25Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 92.9%
Final simplification90.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(* (+ y 0.0007936500793651) (/ (* z z) x)))))
(if (<= z -1.1e+113)
t_0
(if (<= z -2.8e+41)
(+ (/ (* z (* z 0.0007936500793651)) x) (* x (+ (log x) -1.0)))
(if (or (<= z -2.55e+14) (not (<= z 1.2e+25)))
t_0
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(/ 1.0 (* x 12.000000000000048))))))))
double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double tmp;
if (z <= -1.1e+113) {
tmp = t_0;
} else if (z <= -2.8e+41) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0));
} else if ((z <= -2.55e+14) || !(z <= 1.2e+25)) {
tmp = t_0;
} else {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (1.0 / (x * 12.000000000000048));
}
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 + ((-0.5d0) * log(x))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
if (z <= (-1.1d+113)) then
tmp = t_0
else if (z <= (-2.8d+41)) then
tmp = ((z * (z * 0.0007936500793651d0)) / x) + (x * (log(x) + (-1.0d0)))
else if ((z <= (-2.55d+14)) .or. (.not. (z <= 1.2d+25))) then
tmp = t_0
else
tmp = (0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)) + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double tmp;
if (z <= -1.1e+113) {
tmp = t_0;
} else if (z <= -2.8e+41) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (Math.log(x) + -1.0));
} else if ((z <= -2.55e+14) || !(z <= 1.2e+25)) {
tmp = t_0;
} else {
tmp = (0.91893853320467 + (((x + -0.5) * Math.log(x)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)) tmp = 0 if z <= -1.1e+113: tmp = t_0 elif z <= -2.8e+41: tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (math.log(x) + -1.0)) elif (z <= -2.55e+14) or not (z <= 1.2e+25): tmp = t_0 else: tmp = (0.91893853320467 + (((x + -0.5) * math.log(x)) - x)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))) tmp = 0.0 if (z <= -1.1e+113) tmp = t_0; elseif (z <= -2.8e+41) tmp = Float64(Float64(Float64(z * Float64(z * 0.0007936500793651)) / x) + Float64(x * Float64(log(x) + -1.0))); elseif ((z <= -2.55e+14) || !(z <= 1.2e+25)) tmp = t_0; else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)); tmp = 0.0; if (z <= -1.1e+113) tmp = t_0; elseif (z <= -2.8e+41) tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0)); elseif ((z <= -2.55e+14) || ~((z <= 1.2e+25))) tmp = t_0; else tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+113], t$95$0, If[LessEqual[z, -2.8e+41], N[(N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.55e+14], N[Not[LessEqual[z, 1.2e+25]], $MachinePrecision]], t$95$0, N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+113}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{+14} \lor \neg \left(z \leq 1.2 \cdot 10^{+25}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -1.10000000000000005e113 or -2.7999999999999999e41 < z < -2.55e14 or 1.19999999999999998e25 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 87.2%
associate-/l*91.5%
+-commutative91.5%
associate-/r/91.5%
unpow291.5%
Simplified91.5%
Taylor expanded in x around 0 86.1%
if -1.10000000000000005e113 < z < -2.7999999999999999e41Initial program 92.1%
remove-double-neg92.1%
remove-double-neg92.1%
sub-neg92.1%
metadata-eval92.1%
*-commutative92.1%
fma-def92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 99.7%
unpow299.7%
*-commutative99.7%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in x around inf 99.6%
*-commutative45.8%
sub-neg45.8%
mul-1-neg45.8%
log-rec45.8%
remove-double-neg45.8%
metadata-eval45.8%
Simplified99.6%
if -2.55e14 < z < 1.19999999999999998e25Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 92.9%
clear-num93.0%
inv-pow93.0%
div-inv93.0%
metadata-eval93.0%
Applied egg-rr93.0%
unpow-193.0%
Simplified93.0%
Final simplification90.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(* (+ y 0.0007936500793651) (/ (* z z) x))))
(t_1 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (<= z -5.4e+112)
t_0
(if (<= z -2.4e+41)
(+ t_1 (* z (* z (/ 0.0007936500793651 x))))
(if (or (<= z -8.2e+14) (not (<= z 9e+24)))
t_0
(+ t_1 (/ 1.0 (* x 12.000000000000048))))))))
double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if (z <= -5.4e+112) {
tmp = t_0;
} else if (z <= -2.4e+41) {
tmp = t_1 + (z * (z * (0.0007936500793651 / x)));
} else if ((z <= -8.2e+14) || !(z <= 9e+24)) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
t_1 = 0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)
if (z <= (-5.4d+112)) then
tmp = t_0
else if (z <= (-2.4d+41)) then
tmp = t_1 + (z * (z * (0.0007936500793651d0 / x)))
else if ((z <= (-8.2d+14)) .or. (.not. (z <= 9d+24))) then
tmp = t_0
else
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * Math.log(x)) - x);
double tmp;
if (z <= -5.4e+112) {
tmp = t_0;
} else if (z <= -2.4e+41) {
tmp = t_1 + (z * (z * (0.0007936500793651 / x)));
} else if ((z <= -8.2e+14) || !(z <= 9e+24)) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)) t_1 = 0.91893853320467 + (((x + -0.5) * math.log(x)) - x) tmp = 0 if z <= -5.4e+112: tmp = t_0 elif z <= -2.4e+41: tmp = t_1 + (z * (z * (0.0007936500793651 / x))) elif (z <= -8.2e+14) or not (z <= 9e+24): tmp = t_0 else: tmp = t_1 + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))) t_1 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if (z <= -5.4e+112) tmp = t_0; elseif (z <= -2.4e+41) tmp = Float64(t_1 + Float64(z * Float64(z * Float64(0.0007936500793651 / x)))); elseif ((z <= -8.2e+14) || !(z <= 9e+24)) tmp = t_0; else tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)); t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x); tmp = 0.0; if (z <= -5.4e+112) tmp = t_0; elseif (z <= -2.4e+41) tmp = t_1 + (z * (z * (0.0007936500793651 / x))); elseif ((z <= -8.2e+14) || ~((z <= 9e+24))) tmp = t_0; else tmp = t_1 + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+112], t$95$0, If[LessEqual[z, -2.4e+41], N[(t$95$1 + N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8.2e+14], N[Not[LessEqual[z, 9e+24]], $MachinePrecision]], t$95$0, N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
t_1 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+41}:\\
\;\;\;\;t_1 + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+14} \lor \neg \left(z \leq 9 \cdot 10^{+24}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -5.4000000000000002e112 or -2.4000000000000002e41 < z < -8.2e14 or 9.00000000000000039e24 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 87.2%
associate-/l*91.5%
+-commutative91.5%
associate-/r/91.5%
unpow291.5%
Simplified91.5%
Taylor expanded in x around 0 86.1%
if -5.4000000000000002e112 < z < -2.4000000000000002e41Initial program 92.1%
remove-double-neg92.1%
remove-double-neg92.1%
sub-neg92.1%
metadata-eval92.1%
*-commutative92.1%
fma-def92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 99.7%
unpow299.7%
*-commutative99.7%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in z around 0 99.6%
*-commutative99.6%
unpow299.6%
associate-*l/99.7%
associate-*r*99.9%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
if -8.2e14 < z < 9.00000000000000039e24Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 92.9%
clear-num93.0%
inv-pow93.0%
div-inv93.0%
metadata-eval93.0%
Applied egg-rr93.0%
unpow-193.0%
Simplified93.0%
Final simplification90.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(+ 0.91893853320467 (* -0.5 (log x)))
(* (+ y 0.0007936500793651) (/ (* z z) x))))
(t_1 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (<= z -5.2e+112)
t_0
(if (<= z -3.1e+41)
(+ t_1 (/ (* z (* z 0.0007936500793651)) x))
(if (or (<= z -85000000000000.0) (not (<= z 1.85e+25)))
t_0
(+ t_1 (/ 1.0 (* x 12.000000000000048))))))))
double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if (z <= -5.2e+112) {
tmp = t_0;
} else if (z <= -3.1e+41) {
tmp = t_1 + ((z * (z * 0.0007936500793651)) / x);
} else if ((z <= -85000000000000.0) || !(z <= 1.85e+25)) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((y + 0.0007936500793651d0) * ((z * z) / x))
t_1 = 0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)
if (z <= (-5.2d+112)) then
tmp = t_0
else if (z <= (-3.1d+41)) then
tmp = t_1 + ((z * (z * 0.0007936500793651d0)) / x)
else if ((z <= (-85000000000000.0d0)) .or. (.not. (z <= 1.85d+25))) then
tmp = t_0
else
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x));
double t_1 = 0.91893853320467 + (((x + -0.5) * Math.log(x)) - x);
double tmp;
if (z <= -5.2e+112) {
tmp = t_0;
} else if (z <= -3.1e+41) {
tmp = t_1 + ((z * (z * 0.0007936500793651)) / x);
} else if ((z <= -85000000000000.0) || !(z <= 1.85e+25)) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)) t_1 = 0.91893853320467 + (((x + -0.5) * math.log(x)) - x) tmp = 0 if z <= -5.2e+112: tmp = t_0 elif z <= -3.1e+41: tmp = t_1 + ((z * (z * 0.0007936500793651)) / x) elif (z <= -85000000000000.0) or not (z <= 1.85e+25): tmp = t_0 else: tmp = t_1 + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))) t_1 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if (z <= -5.2e+112) tmp = t_0; elseif (z <= -3.1e+41) tmp = Float64(t_1 + Float64(Float64(z * Float64(z * 0.0007936500793651)) / x)); elseif ((z <= -85000000000000.0) || !(z <= 1.85e+25)) tmp = t_0; else tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((y + 0.0007936500793651) * ((z * z) / x)); t_1 = 0.91893853320467 + (((x + -0.5) * log(x)) - x); tmp = 0.0; if (z <= -5.2e+112) tmp = t_0; elseif (z <= -3.1e+41) tmp = t_1 + ((z * (z * 0.0007936500793651)) / x); elseif ((z <= -85000000000000.0) || ~((z <= 1.85e+25))) tmp = t_0; else tmp = t_1 + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+112], t$95$0, If[LessEqual[z, -3.1e+41], N[(t$95$1 + N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -85000000000000.0], N[Not[LessEqual[z, 1.85e+25]], $MachinePrecision]], t$95$0, N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
t_1 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+41}:\\
\;\;\;\;t_1 + \frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x}\\
\mathbf{elif}\;z \leq -85000000000000 \lor \neg \left(z \leq 1.85 \cdot 10^{+25}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -5.2000000000000001e112 or -3.1e41 < z < -8.5e13 or 1.8499999999999999e25 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 87.2%
associate-/l*91.5%
+-commutative91.5%
associate-/r/91.5%
unpow291.5%
Simplified91.5%
Taylor expanded in x around 0 86.1%
if -5.2000000000000001e112 < z < -3.1e41Initial program 92.1%
remove-double-neg92.1%
remove-double-neg92.1%
sub-neg92.1%
metadata-eval92.1%
*-commutative92.1%
fma-def92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 99.7%
unpow299.7%
*-commutative99.7%
associate-*r*99.9%
Simplified99.9%
if -8.5e13 < z < 1.8499999999999999e25Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 92.9%
clear-num93.0%
inv-pow93.0%
div-inv93.0%
metadata-eval93.0%
Applied egg-rr93.0%
unpow-193.0%
Simplified93.0%
Final simplification90.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))))
(if (or (<= z -2800000000000.0) (not (<= z 0.0055)))
(+ t_0 (* z (* z (/ (+ y 0.0007936500793651) x))))
(+ t_0 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (((x + -0.5) * log(x)) - x);
double tmp;
if ((z <= -2800000000000.0) || !(z <= 0.0055)) {
tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x)));
} else {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / 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 = 0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)
if ((z <= (-2800000000000.0d0)) .or. (.not. (z <= 0.0055d0))) then
tmp = t_0 + (z * (z * ((y + 0.0007936500793651d0) / x)))
else
tmp = t_0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (((x + -0.5) * Math.log(x)) - x);
double tmp;
if ((z <= -2800000000000.0) || !(z <= 0.0055)) {
tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x)));
} else {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (((x + -0.5) * math.log(x)) - x) tmp = 0 if (z <= -2800000000000.0) or not (z <= 0.0055): tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x))) else: tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) tmp = 0.0 if ((z <= -2800000000000.0) || !(z <= 0.0055)) tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x)))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (((x + -0.5) * log(x)) - x); tmp = 0.0; if ((z <= -2800000000000.0) || ~((z <= 0.0055))) tmp = t_0 + (z * (z * ((y + 0.0007936500793651) / x))); else tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2800000000000.0], N[Not[LessEqual[z, 0.0055]], $MachinePrecision]], N[(t$95$0 + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -2800000000000 \lor \neg \left(z \leq 0.0055\right):\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\end{array}
\end{array}
if z < -2.8e12 or 0.0054999999999999997 < z Initial program 88.2%
remove-double-neg88.2%
remove-double-neg88.2%
sub-neg88.2%
metadata-eval88.2%
*-commutative88.2%
fma-def88.2%
fma-neg88.2%
metadata-eval88.2%
Simplified88.2%
clear-num88.2%
metadata-eval88.2%
fma-neg88.2%
fma-udef88.2%
*-commutative88.2%
inv-pow88.2%
*-commutative88.2%
fma-udef88.2%
fma-neg88.2%
metadata-eval88.2%
fma-udef88.2%
*-commutative88.2%
fma-def88.2%
Applied egg-rr88.2%
Taylor expanded in z around inf 87.9%
unpow287.9%
associate-/l*92.3%
*-rgt-identity92.3%
+-commutative92.3%
associate-*r/92.3%
associate-*l*99.5%
associate-/r/99.5%
*-commutative99.5%
associate-*r/99.5%
*-rgt-identity99.5%
+-commutative99.5%
Simplified99.5%
if -2.8e12 < z < 0.0054999999999999997Initial program 99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
*-commutative99.3%
fma-def99.3%
fma-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 94.6%
Final simplification97.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -0.0047) (not (<= z 10.2)))
(+ (/ (* z (* z 0.0007936500793651)) x) t_0)
(+ (/ 0.083333333333333 x) t_0))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -0.0047) || !(z <= 10.2)) {
tmp = ((z * (z * 0.0007936500793651)) / x) + t_0;
} else {
tmp = (0.083333333333333 / 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 = x * (log(x) + (-1.0d0))
if ((z <= (-0.0047d0)) .or. (.not. (z <= 10.2d0))) then
tmp = ((z * (z * 0.0007936500793651d0)) / x) + t_0
else
tmp = (0.083333333333333d0 / x) + 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 ((z <= -0.0047) || !(z <= 10.2)) {
tmp = ((z * (z * 0.0007936500793651)) / x) + t_0;
} else {
tmp = (0.083333333333333 / x) + t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -0.0047) or not (z <= 10.2): tmp = ((z * (z * 0.0007936500793651)) / x) + t_0 else: tmp = (0.083333333333333 / x) + t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -0.0047) || !(z <= 10.2)) tmp = Float64(Float64(Float64(z * Float64(z * 0.0007936500793651)) / x) + t_0); else tmp = Float64(Float64(0.083333333333333 / x) + t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -0.0047) || ~((z <= 10.2))) tmp = ((z * (z * 0.0007936500793651)) / x) + t_0; else tmp = (0.083333333333333 / x) + 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[Or[LessEqual[z, -0.0047], N[Not[LessEqual[z, 10.2]], $MachinePrecision]], N[(N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -0.0047 \lor \neg \left(z \leq 10.2\right):\\
\;\;\;\;\frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + t_0\\
\end{array}
\end{array}
if z < -0.00470000000000000018 or 10.199999999999999 < z Initial program 88.6%
remove-double-neg88.6%
remove-double-neg88.6%
sub-neg88.6%
metadata-eval88.6%
*-commutative88.6%
fma-def88.6%
fma-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in z around inf 88.2%
unpow288.2%
+-commutative88.2%
Simplified88.2%
Taylor expanded in y around 0 64.6%
unpow264.6%
*-commutative64.6%
associate-*r*64.6%
Simplified64.6%
Taylor expanded in x around inf 64.3%
*-commutative20.7%
sub-neg20.7%
mul-1-neg20.7%
log-rec20.7%
remove-double-neg20.7%
metadata-eval20.7%
Simplified64.3%
if -0.00470000000000000018 < z < 10.199999999999999Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Taylor expanded in x around inf 92.2%
*-commutative92.2%
sub-neg92.2%
mul-1-neg92.2%
log-rec92.2%
remove-double-neg92.2%
metadata-eval92.2%
Simplified92.2%
Final simplification77.9%
(FPCore (x y z)
:precision binary64
(if (or (<= z -11.0) (not (<= z 10.2)))
(+ (/ (* z (* z 0.0007936500793651)) x) (* x (+ (log x) -1.0)))
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -11.0) || !(z <= 10.2)) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - 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 <= (-11.0d0)) .or. (.not. (z <= 10.2d0))) then
tmp = ((z * (z * 0.0007936500793651d0)) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + (((x + (-0.5d0)) * log(x)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -11.0) || !(z <= 10.2)) {
tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + (((x + -0.5) * Math.log(x)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -11.0) or not (z <= 10.2): tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + (((x + -0.5) * math.log(x)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -11.0) || !(z <= 10.2)) tmp = Float64(Float64(Float64(z * Float64(z * 0.0007936500793651)) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -11.0) || ~((z <= 10.2))) tmp = ((z * (z * 0.0007936500793651)) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -11.0], N[Not[LessEqual[z, 10.2]], $MachinePrecision]], N[(N[(N[(z * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -11 \lor \neg \left(z \leq 10.2\right):\\
\;\;\;\;\frac{z \cdot \left(z \cdot 0.0007936500793651\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -11 or 10.199999999999999 < z Initial program 88.4%
remove-double-neg88.4%
remove-double-neg88.4%
sub-neg88.4%
metadata-eval88.4%
*-commutative88.4%
fma-def88.4%
fma-neg88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in z around inf 88.0%
unpow288.0%
+-commutative88.0%
Simplified88.0%
Taylor expanded in y around 0 64.1%
unpow264.1%
*-commutative64.1%
associate-*r*64.1%
Simplified64.1%
Taylor expanded in x around inf 64.1%
*-commutative19.8%
sub-neg19.8%
mul-1-neg19.8%
log-rec19.8%
remove-double-neg19.8%
metadata-eval19.8%
Simplified64.1%
if -11 < z < 10.199999999999999Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Final simplification78.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -6.8e+70) (not (<= z 1.8e+36))) (sqrt (/ 0.0069444444444443885 (* x x))) (+ (/ 0.083333333333333 x) (* x (+ (log x) -1.0)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e+70) || !(z <= 1.8e+36)) {
tmp = sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (0.083333333333333 / x) + (x * (log(x) + -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) :: tmp
if ((z <= (-6.8d+70)) .or. (.not. (z <= 1.8d+36))) then
tmp = sqrt((0.0069444444444443885d0 / (x * x)))
else
tmp = (0.083333333333333d0 / x) + (x * (log(x) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e+70) || !(z <= 1.8e+36)) {
tmp = Math.sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (0.083333333333333 / x) + (x * (Math.log(x) + -1.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6.8e+70) or not (z <= 1.8e+36): tmp = math.sqrt((0.0069444444444443885 / (x * x))) else: tmp = (0.083333333333333 / x) + (x * (math.log(x) + -1.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6.8e+70) || !(z <= 1.8e+36)) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * x))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(log(x) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6.8e+70) || ~((z <= 1.8e+36))) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = (0.083333333333333 / x) + (x * (log(x) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.8e+70], N[Not[LessEqual[z, 1.8e+36]], $MachinePrecision]], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+70} \lor \neg \left(z \leq 1.8 \cdot 10^{+36}\right):\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if z < -6.8000000000000002e70 or 1.7999999999999999e36 < z Initial program 87.6%
remove-double-neg87.6%
remove-double-neg87.6%
sub-neg87.6%
metadata-eval87.6%
*-commutative87.6%
fma-def87.6%
fma-neg87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in z around 0 14.5%
Taylor expanded in x around inf 14.5%
*-commutative14.5%
sub-neg14.5%
mul-1-neg14.5%
log-rec14.5%
remove-double-neg14.5%
metadata-eval14.5%
Simplified14.5%
Taylor expanded in x around 0 3.6%
add-sqr-sqrt3.6%
sqrt-unprod30.1%
frac-times30.1%
metadata-eval30.1%
Applied egg-rr30.1%
if -6.8000000000000002e70 < z < 1.7999999999999999e36Initial program 98.7%
remove-double-neg98.7%
remove-double-neg98.7%
sub-neg98.7%
metadata-eval98.7%
*-commutative98.7%
fma-def98.7%
fma-neg98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 89.3%
Taylor expanded in x around inf 87.6%
*-commutative87.6%
sub-neg87.6%
mul-1-neg87.6%
log-rec87.6%
remove-double-neg87.6%
metadata-eval87.6%
Simplified87.6%
Final simplification62.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.8e+67) (not (<= z 5.2e+35))) (sqrt (/ 0.0069444444444443885 (* x x))) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.8e+67) || !(z <= 5.2e+35)) {
tmp = sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = 0.91893853320467 + (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 <= (-2.8d+67)) .or. (.not. (z <= 5.2d+35))) then
tmp = sqrt((0.0069444444444443885d0 / (x * x)))
else
tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.8e+67) || !(z <= 5.2e+35)) {
tmp = Math.sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.8e+67) or not (z <= 5.2e+35): tmp = math.sqrt((0.0069444444444443885 / (x * x))) else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.8e+67) || !(z <= 5.2e+35)) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * x))); else tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.8e+67) || ~((z <= 5.2e+35))) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.8e+67], N[Not[LessEqual[z, 5.2e+35]], $MachinePrecision]], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+67} \lor \neg \left(z \leq 5.2 \cdot 10^{+35}\right):\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -2.7999999999999998e67 or 5.20000000000000013e35 < z Initial program 87.6%
remove-double-neg87.6%
remove-double-neg87.6%
sub-neg87.6%
metadata-eval87.6%
*-commutative87.6%
fma-def87.6%
fma-neg87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in z around 0 14.5%
Taylor expanded in x around inf 14.5%
*-commutative14.5%
sub-neg14.5%
mul-1-neg14.5%
log-rec14.5%
remove-double-neg14.5%
metadata-eval14.5%
Simplified14.5%
Taylor expanded in x around 0 3.6%
add-sqr-sqrt3.6%
sqrt-unprod30.1%
frac-times30.1%
metadata-eval30.1%
Applied egg-rr30.1%
if -2.7999999999999998e67 < z < 5.20000000000000013e35Initial program 98.7%
remove-double-neg98.7%
remove-double-neg98.7%
sub-neg98.7%
metadata-eval98.7%
*-commutative98.7%
fma-def98.7%
fma-neg98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 89.3%
Taylor expanded in x around inf 87.5%
mul-1-neg87.5%
distribute-lft-neg-in87.5%
log-rec87.5%
remove-double-neg87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in x around 0 40.5%
associate-*r/40.5%
metadata-eval40.5%
+-commutative40.5%
Simplified40.5%
Final simplification35.9%
(FPCore (x y z) :precision binary64 (+ 0.91893853320467 (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return 0.91893853320467 + (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.91893853320467d0 + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 / x);
}
def code(x, y, z): return 0.91893853320467 + (0.083333333333333 / x)
function code(x, y, z) return Float64(0.91893853320467 + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = 0.91893853320467 + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Initial program 93.8%
remove-double-neg93.8%
remove-double-neg93.8%
sub-neg93.8%
metadata-eval93.8%
*-commutative93.8%
fma-def93.8%
fma-neg93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in z around 0 56.6%
Taylor expanded in x around inf 55.6%
mul-1-neg55.6%
distribute-lft-neg-in55.6%
log-rec55.6%
remove-double-neg55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in x around 0 24.5%
associate-*r/24.5%
metadata-eval24.5%
+-commutative24.5%
Simplified24.5%
Final simplification24.5%
(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 93.8%
remove-double-neg93.8%
remove-double-neg93.8%
sub-neg93.8%
metadata-eval93.8%
*-commutative93.8%
fma-def93.8%
fma-neg93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in z around 0 56.6%
Taylor expanded in x around inf 55.6%
*-commutative55.6%
sub-neg55.6%
mul-1-neg55.6%
log-rec55.6%
remove-double-neg55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in x around 0 23.9%
Final simplification23.9%
(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 2023192
(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)))