
(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 2.9e+118)
(+
(+ (fma (+ x -0.5) (log x) (- x)) 0.91893853320467)
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(- (* x (log x)) x)
(+
(/ 0.083333333333333 x)
(+
(* z (* z (/ y x)))
(* (/ z x) (fma z 0.0007936500793651 -0.0027777777777778)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.9e+118) {
tmp = (fma((x + -0.5), log(x), -x) + 0.91893853320467) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = ((x * log(x)) - x) + ((0.083333333333333 / x) + ((z * (z * (y / x))) + ((z / x) * fma(z, 0.0007936500793651, -0.0027777777777778))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2.9e+118) tmp = Float64(Float64(fma(Float64(x + -0.5), log(x), Float64(-x)) + 0.91893853320467) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(z * Float64(y / x))) + Float64(Float64(z / x) * fma(z, 0.0007936500793651, -0.0027777777777778))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2.9e+118], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;\left(\mathsf{fma}\left(x + -0.5, \log x, -x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(z \cdot \frac{y}{x}\right) + \frac{z}{x} \cdot \mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right)\right)\right)\\
\end{array}
\end{array}
if x < 2.90000000000000016e118Initial program 99.6%
fma-neg99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 2.90000000000000016e118 < x Initial program 85.6%
Taylor expanded in x around inf 85.7%
sub-neg85.7%
mul-1-neg85.7%
log-rec85.7%
remove-double-neg85.7%
metadata-eval85.7%
distribute-rgt-in85.6%
neg-mul-185.6%
sub-neg85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 80.7%
associate-*r/80.7%
metadata-eval80.7%
*-commutative80.7%
associate-*r/85.9%
unpow285.9%
associate-*l*88.6%
associate-/l*99.4%
associate-/r/99.4%
*-commutative99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 2e+81)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(- (* x (log x)) x)
(+
(/ 0.083333333333333 x)
(+
(* z (* z (/ y x)))
(* (/ z x) (fma z 0.0007936500793651 -0.0027777777777778)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e+81) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = ((x * log(x)) - x) + ((0.083333333333333 / x) + ((z * (z * (y / x))) + ((z / x) * fma(z, 0.0007936500793651, -0.0027777777777778))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2e+81) 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(Float64(x * log(x)) - x) + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(z * Float64(y / x))) + Float64(Float64(z / x) * fma(z, 0.0007936500793651, -0.0027777777777778))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2e+81], 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[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+81}:\\
\;\;\;\;\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(x \cdot \log x - x\right) + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(z \cdot \frac{y}{x}\right) + \frac{z}{x} \cdot \mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.99999999999999984e81Initial program 99.6%
if 1.99999999999999984e81 < x Initial program 87.4%
Taylor expanded in x around inf 87.5%
sub-neg87.5%
mul-1-neg87.5%
log-rec87.5%
remove-double-neg87.5%
metadata-eval87.5%
distribute-rgt-in87.4%
neg-mul-187.4%
sub-neg87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 83.2%
associate-*r/83.2%
metadata-eval83.2%
*-commutative83.2%
associate-*r/87.7%
unpow287.7%
associate-*l*90.0%
associate-/l*99.4%
associate-/r/99.4%
*-commutative99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= x 5.8e+121)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ (- (* x (log x)) x) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.8e+121) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = ((x * log(x)) - x) + (z * (z * (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.8d+121) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = ((x * log(x)) - x) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.8e+121) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = ((x * Math.log(x)) - x) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.8e+121: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = ((x * math.log(x)) - x) + (z * (z * (y / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.8e+121) 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(Float64(x * log(x)) - x) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.8e+121) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = ((x * log(x)) - x) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.8e+121], 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[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.8 \cdot 10^{+121}:\\
\;\;\;\;\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(x \cdot \log x - x\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 5.7999999999999998e121Initial program 99.6%
if 5.7999999999999998e121 < x Initial program 85.3%
Taylor expanded in x around inf 85.4%
sub-neg85.4%
mul-1-neg85.4%
log-rec85.4%
remove-double-neg85.4%
metadata-eval85.4%
distribute-rgt-in85.3%
neg-mul-185.3%
sub-neg85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y around inf 82.7%
*-commutative82.7%
associate-*r/88.0%
unpow288.0%
associate-*l*93.2%
Simplified93.2%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+122)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(+ (- (* x (log x)) x) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+122) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} else {
tmp = ((x * log(x)) - x) + (z * (z * (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1d+122) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = ((x * log(x)) - x) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+122) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = ((x * Math.log(x)) - x) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+122: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = ((x * math.log(x)) - x) + (z * (z * (y / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+122) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+122) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = ((x * log(x)) - x) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+122], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+122}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 1.00000000000000001e122Initial program 99.6%
Taylor expanded in x around inf 99.1%
sub-neg47.6%
mul-1-neg47.6%
log-rec47.6%
remove-double-neg47.6%
metadata-eval47.6%
Simplified99.1%
if 1.00000000000000001e122 < x Initial program 85.3%
Taylor expanded in x around inf 85.4%
sub-neg85.4%
mul-1-neg85.4%
log-rec85.4%
remove-double-neg85.4%
metadata-eval85.4%
distribute-rgt-in85.3%
neg-mul-185.3%
sub-neg85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y around inf 82.7%
*-commutative82.7%
associate-*r/88.0%
unpow288.0%
associate-*l*93.2%
Simplified93.2%
Final simplification97.1%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.58e-65) (not (<= z 2e-11)))
(+ (- (* x (log x)) x) (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.58e-65) || !(z <= 2e-11)) {
tmp = ((x * log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / 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.58d-65)) .or. (.not. (z <= 2d-11))) then
tmp = ((x * log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.58e-65) || !(z <= 2e-11)) {
tmp = ((x * Math.log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.58e-65) or not (z <= 2e-11): tmp = ((x * math.log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651))) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.58e-65) || !(z <= 2e-11)) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.58e-65) || ~((z <= 2e-11))) tmp = ((x * log(x)) - x) + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.58e-65], N[Not[LessEqual[z, 2e-11]], $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], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.58 \cdot 10^{-65} \lor \neg \left(z \leq 2 \cdot 10^{-11}\right):\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.58000000000000005e-65 or 1.99999999999999988e-11 < z Initial program 91.8%
Taylor expanded in x around inf 91.9%
sub-neg91.9%
mul-1-neg91.9%
log-rec91.9%
remove-double-neg91.9%
metadata-eval91.9%
distribute-rgt-in91.9%
neg-mul-191.9%
sub-neg91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around inf 90.2%
associate-/l*93.3%
unpow293.3%
Simplified93.3%
if -1.58000000000000005e-65 < z < 1.99999999999999988e-11Initial program 99.3%
Taylor expanded in z around 0 98.2%
div-inv51.3%
Applied egg-rr98.3%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x)))
(if (<= z -6e-64)
(+ t_0 (/ y (/ x (* z z))))
(if (<= z 2.8e-10)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* 0.083333333333333 (/ 1.0 x)))
(+ t_0 (* z (* z (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double tmp;
if (z <= -6e-64) {
tmp = t_0 + (y / (x / (z * z)));
} else if (z <= 2.8e-10) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x));
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * log(x)) - x
if (z <= (-6d-64)) then
tmp = t_0 + (y / (x / (z * z)))
else if (z <= 2.8d-10) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 * (1.0d0 / x))
else
tmp = t_0 + (z * (z * (y / x)))
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 (z <= -6e-64) {
tmp = t_0 + (y / (x / (z * z)));
} else if (z <= 2.8e-10) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x));
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x tmp = 0 if z <= -6e-64: tmp = t_0 + (y / (x / (z * z))) elif z <= 2.8e-10: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)) else: tmp = t_0 + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) tmp = 0.0 if (z <= -6e-64) tmp = Float64(t_0 + Float64(y / Float64(x / Float64(z * z)))); elseif (z <= 2.8e-10) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 * Float64(1.0 / x))); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * log(x)) - x; tmp = 0.0; if (z <= -6e-64) tmp = t_0 + (y / (x / (z * z))); elseif (z <= 2.8e-10) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)); else tmp = t_0 + (z * (z * (y / x))); 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[z, -6e-64], N[(t$95$0 + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-10], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \log x - x\\
\mathbf{if}\;z \leq -6 \cdot 10^{-64}:\\
\;\;\;\;t_0 + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-10}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64Initial program 96.5%
Taylor expanded in x around inf 96.6%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
distribute-rgt-in96.5%
neg-mul-196.5%
sub-neg96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 70.5%
associate-/l*72.7%
unpow272.7%
Simplified72.7%
if -6.0000000000000001e-64 < z < 2.80000000000000015e-10Initial program 99.3%
Taylor expanded in z around 0 98.2%
div-inv51.3%
Applied egg-rr98.3%
if 2.80000000000000015e-10 < z Initial program 85.9%
Taylor expanded in x around inf 86.0%
sub-neg86.0%
mul-1-neg86.0%
log-rec86.0%
remove-double-neg86.0%
metadata-eval86.0%
distribute-rgt-in85.9%
neg-mul-185.9%
sub-neg85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 70.4%
*-commutative70.4%
associate-*r/75.9%
unpow275.9%
associate-*l*80.3%
Simplified80.3%
Final simplification85.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x)))
(if (<= z -6e-64)
(+ t_0 (/ 1.0 (/ (/ x (* z z)) (+ y 0.0007936500793651))))
(if (<= z 1.8e-10)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* 0.083333333333333 (/ 1.0 x)))
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double tmp;
if (z <= -6e-64) {
tmp = t_0 + (1.0 / ((x / (z * z)) / (y + 0.0007936500793651)));
} else if (z <= 1.8e-10) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x));
} else {
tmp = t_0 + ((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)) - x
if (z <= (-6d-64)) then
tmp = t_0 + (1.0d0 / ((x / (z * z)) / (y + 0.0007936500793651d0)))
else if (z <= 1.8d-10) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 * (1.0d0 / x))
else
tmp = t_0 + ((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)) - x;
double tmp;
if (z <= -6e-64) {
tmp = t_0 + (1.0 / ((x / (z * z)) / (y + 0.0007936500793651)));
} else if (z <= 1.8e-10) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x));
} else {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x tmp = 0 if z <= -6e-64: tmp = t_0 + (1.0 / ((x / (z * z)) / (y + 0.0007936500793651))) elif z <= 1.8e-10: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)) else: tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) tmp = 0.0 if (z <= -6e-64) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(x / Float64(z * z)) / Float64(y + 0.0007936500793651)))); elseif (z <= 1.8e-10) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 * Float64(1.0 / x))); else tmp = Float64(t_0 + 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)) - x; tmp = 0.0; if (z <= -6e-64) tmp = t_0 + (1.0 / ((x / (z * z)) / (y + 0.0007936500793651))); elseif (z <= 1.8e-10) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 * (1.0 / x)); else tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); 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[z, -6e-64], N[(t$95$0 + N[(1.0 / N[(N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-10], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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 \log x - x\\
\mathbf{if}\;z \leq -6 \cdot 10^{-64}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\frac{x}{z \cdot z}}{y + 0.0007936500793651}}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-10}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64Initial program 96.5%
clear-num96.5%
inv-pow96.5%
*-commutative96.5%
fma-udef96.5%
fma-neg96.5%
metadata-eval96.5%
Applied egg-rr96.5%
Taylor expanded in z around inf 93.7%
associate-/r*94.8%
unpow294.8%
Simplified94.8%
unpow-194.8%
Applied egg-rr94.8%
Taylor expanded in x around inf 94.9%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
distribute-rgt-in96.5%
neg-mul-196.5%
sub-neg96.5%
*-commutative96.5%
Simplified94.8%
if -6.0000000000000001e-64 < z < 1.8e-10Initial program 99.3%
Taylor expanded in z around 0 98.2%
div-inv51.3%
Applied egg-rr98.3%
if 1.8e-10 < z Initial program 85.9%
Taylor expanded in x around inf 86.0%
sub-neg86.0%
mul-1-neg86.0%
log-rec86.0%
remove-double-neg86.0%
metadata-eval86.0%
distribute-rgt-in85.9%
neg-mul-185.9%
sub-neg85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 85.8%
associate-/l*91.5%
unpow291.5%
Simplified91.5%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x)))
(if (<= x 4.8e+123)
(+ t_0 (/ (+ 0.083333333333333 (* (+ y 0.0007936500793651) (* z z))) x))
(+ t_0 (* z (* z (/ y x)))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double tmp;
if (x <= 4.8e+123) {
tmp = t_0 + ((0.083333333333333 + ((y + 0.0007936500793651) * (z * z))) / x);
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * log(x)) - x
if (x <= 4.8d+123) then
tmp = t_0 + ((0.083333333333333d0 + ((y + 0.0007936500793651d0) * (z * z))) / x)
else
tmp = t_0 + (z * (z * (y / x)))
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 <= 4.8e+123) {
tmp = t_0 + ((0.083333333333333 + ((y + 0.0007936500793651) * (z * z))) / x);
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x tmp = 0 if x <= 4.8e+123: tmp = t_0 + ((0.083333333333333 + ((y + 0.0007936500793651) * (z * z))) / x) else: tmp = t_0 + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) tmp = 0.0 if (x <= 4.8e+123) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(Float64(y + 0.0007936500793651) * Float64(z * z))) / x)); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * log(x)) - x; tmp = 0.0; if (x <= 4.8e+123) tmp = t_0 + ((0.083333333333333 + ((y + 0.0007936500793651) * (z * z))) / x); else tmp = t_0 + (z * (z * (y / x))); 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, 4.8e+123], N[(t$95$0 + N[(N[(0.083333333333333 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \log x - x\\
\mathbf{if}\;x \leq 4.8 \cdot 10^{+123}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot z\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 4.79999999999999978e123Initial program 99.6%
Taylor expanded in x around inf 99.1%
sub-neg99.1%
mul-1-neg99.1%
log-rec99.1%
remove-double-neg99.1%
metadata-eval99.1%
distribute-rgt-in99.1%
neg-mul-199.1%
sub-neg99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around inf 98.0%
*-commutative98.0%
unpow298.0%
Simplified98.0%
if 4.79999999999999978e123 < x Initial program 85.3%
Taylor expanded in x around inf 85.4%
sub-neg85.4%
mul-1-neg85.4%
log-rec85.4%
remove-double-neg85.4%
metadata-eval85.4%
distribute-rgt-in85.3%
neg-mul-185.3%
sub-neg85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y around inf 82.7%
*-commutative82.7%
associate-*r/88.0%
unpow288.0%
associate-*l*93.2%
Simplified93.2%
Final simplification96.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1e-64) (not (<= z 2.55e-11)))
(+ (- (* x (log x)) x) (* z (* z (/ y x))))
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1e-64) || !(z <= 2.55e-11)) {
tmp = ((x * log(x)) - x) + (z * (z * (y / x)));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - 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 <= (-1d-64)) .or. (.not. (z <= 2.55d-11))) then
tmp = ((x * log(x)) - x) + (z * (z * (y / x)))
else
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1e-64) || !(z <= 2.55e-11)) {
tmp = ((x * Math.log(x)) - x) + (z * (z * (y / x)));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1e-64) or not (z <= 2.55e-11): tmp = ((x * math.log(x)) - x) + (z * (z * (y / x))) else: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1e-64) || !(z <= 2.55e-11)) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(z * Float64(z * Float64(y / x)))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1e-64) || ~((z <= 2.55e-11))) tmp = ((x * log(x)) - x) + (z * (z * (y / x))); else tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1e-64], N[Not[LessEqual[z, 2.55e-11]], $MachinePrecision]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-64} \lor \neg \left(z \leq 2.55 \cdot 10^{-11}\right):\\
\;\;\;\;\left(x \cdot \log x - x\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\end{array}
\end{array}
if z < -9.99999999999999965e-65 or 2.54999999999999992e-11 < z Initial program 91.8%
Taylor expanded in x around inf 91.9%
sub-neg91.9%
mul-1-neg91.9%
log-rec91.9%
remove-double-neg91.9%
metadata-eval91.9%
distribute-rgt-in91.9%
neg-mul-191.9%
sub-neg91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y around inf 70.5%
*-commutative70.5%
associate-*r/73.4%
unpow273.4%
associate-*l*75.1%
Simplified75.1%
if -9.99999999999999965e-65 < z < 2.54999999999999992e-11Initial program 99.3%
Taylor expanded in z around 0 98.2%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* x (log x)) x)))
(if (<= z -6e-64)
(+ t_0 (/ y (/ x (* z z))))
(if (<= z 1.12e-10)
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(+ t_0 (* z (* z (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (x * log(x)) - x;
double tmp;
if (z <= -6e-64) {
tmp = t_0 + (y / (x / (z * z)));
} else if (z <= 1.12e-10) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * log(x)) - x
if (z <= (-6d-64)) then
tmp = t_0 + (y / (x / (z * z)))
else if (z <= 1.12d-10) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = t_0 + (z * (z * (y / x)))
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 (z <= -6e-64) {
tmp = t_0 + (y / (x / (z * z)));
} else if (z <= 1.12e-10) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = t_0 + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * math.log(x)) - x tmp = 0 if z <= -6e-64: tmp = t_0 + (y / (x / (z * z))) elif z <= 1.12e-10: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = t_0 + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * log(x)) - x) tmp = 0.0 if (z <= -6e-64) tmp = Float64(t_0 + Float64(y / Float64(x / Float64(z * z)))); elseif (z <= 1.12e-10) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * log(x)) - x; tmp = 0.0; if (z <= -6e-64) tmp = t_0 + (y / (x / (z * z))); elseif (z <= 1.12e-10) tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = t_0 + (z * (z * (y / x))); 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[z, -6e-64], N[(t$95$0 + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e-10], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \log x - x\\
\mathbf{if}\;z \leq -6 \cdot 10^{-64}:\\
\;\;\;\;t_0 + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64Initial program 96.5%
Taylor expanded in x around inf 96.6%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
distribute-rgt-in96.5%
neg-mul-196.5%
sub-neg96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 70.5%
associate-/l*72.7%
unpow272.7%
Simplified72.7%
if -6.0000000000000001e-64 < z < 1.12e-10Initial program 99.3%
Taylor expanded in z around 0 98.2%
if 1.12e-10 < z Initial program 85.9%
Taylor expanded in x around inf 86.0%
sub-neg86.0%
mul-1-neg86.0%
log-rec86.0%
remove-double-neg86.0%
metadata-eval86.0%
distribute-rgt-in85.9%
neg-mul-185.9%
sub-neg85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 70.4%
*-commutative70.4%
associate-*r/75.9%
unpow275.9%
associate-*l*80.3%
Simplified80.3%
Final simplification84.9%
(FPCore (x y z)
:precision binary64
(if (<= z -2.55e-43)
(+ (- (* x (log x)) x) (* -0.0027777777777778 (/ z x)))
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.55e-43) {
tmp = ((x * log(x)) - x) + (-0.0027777777777778 * (z / x));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - 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.55d-43)) then
tmp = ((x * log(x)) - x) + ((-0.0027777777777778d0) * (z / x))
else
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.55e-43) {
tmp = ((x * Math.log(x)) - x) + (-0.0027777777777778 * (z / x));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.55e-43: tmp = ((x * math.log(x)) - x) + (-0.0027777777777778 * (z / x)) else: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.55e-43) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(-0.0027777777777778 * Float64(z / x))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.55e-43) tmp = ((x * log(x)) - x) + (-0.0027777777777778 * (z / x)); else tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.55e-43], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{-43}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\end{array}
\end{array}
if z < -2.5499999999999998e-43Initial program 96.2%
Taylor expanded in x around inf 96.3%
sub-neg96.3%
mul-1-neg96.3%
log-rec96.3%
remove-double-neg96.3%
metadata-eval96.3%
distribute-rgt-in96.2%
neg-mul-196.2%
sub-neg96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in z around 0 51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in z around inf 52.2%
if -2.5499999999999998e-43 < z Initial program 94.2%
Taylor expanded in z around 0 69.6%
Final simplification64.2%
(FPCore (x y z)
:precision binary64
(if (<= z -3.1e+125)
(cbrt
(*
(/ 0.083333333333333 x)
(* (/ 0.083333333333333 x) (/ 0.083333333333333 x))))
(+ (/ 0.083333333333333 x) (* x (+ (log x) -1.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.1e+125) {
tmp = cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (0.083333333333333 / x) + (x * (log(x) + -1.0));
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.1e+125) {
tmp = Math.cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (0.083333333333333 / x) + (x * (Math.log(x) + -1.0));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -3.1e+125) tmp = cbrt(Float64(Float64(0.083333333333333 / x) * Float64(Float64(0.083333333333333 / x) * Float64(0.083333333333333 / x)))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(log(x) + -1.0))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -3.1e+125], N[Power[N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $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 -3.1 \cdot 10^{+125}:\\
\;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if z < -3.1e125Initial program 95.1%
Taylor expanded in z around 0 5.4%
Taylor expanded in x around inf 5.4%
sub-neg5.4%
mul-1-neg5.4%
log-rec5.4%
remove-double-neg5.4%
metadata-eval5.4%
Simplified5.4%
Taylor expanded in x around 0 3.7%
add-cbrt-cube40.6%
Applied egg-rr40.6%
associate-*l*40.6%
Simplified40.6%
if -3.1e125 < z Initial program 94.8%
Taylor expanded in z around 0 67.0%
Taylor expanded in x around inf 66.7%
sub-neg66.7%
mul-1-neg66.7%
log-rec66.7%
remove-double-neg66.7%
metadata-eval66.7%
Simplified66.7%
Final simplification62.8%
(FPCore (x y z)
:precision binary64
(if (<= z -1.12e+126)
(cbrt
(*
(/ 0.083333333333333 x)
(* (/ 0.083333333333333 x) (/ 0.083333333333333 x))))
(+ (* x (+ (log x) -1.0)) (* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.12e+126) {
tmp = cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.12e+126) {
tmp = Math.cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -1.12e+126) tmp = cbrt(Float64(Float64(0.083333333333333 / x) * Float64(Float64(0.083333333333333 / x) * Float64(0.083333333333333 / x)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -1.12e+126], N[Power[N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+126}:\\
\;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.12e126Initial program 95.1%
Taylor expanded in z around 0 5.4%
Taylor expanded in x around inf 5.4%
sub-neg5.4%
mul-1-neg5.4%
log-rec5.4%
remove-double-neg5.4%
metadata-eval5.4%
Simplified5.4%
Taylor expanded in x around 0 3.7%
add-cbrt-cube40.6%
Applied egg-rr40.6%
associate-*l*40.6%
Simplified40.6%
if -1.12e126 < z Initial program 94.8%
Taylor expanded in z around 0 67.0%
Taylor expanded in x around inf 66.7%
sub-neg66.7%
mul-1-neg66.7%
log-rec66.7%
remove-double-neg66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in x around 0 66.7%
Final simplification62.8%
(FPCore (x y z) :precision binary64 (if (<= z -38.0) (+ (- (* x (log x)) x) (* -0.0027777777777778 (/ z x))) (+ (* x (+ (log x) -1.0)) (* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -38.0) {
tmp = ((x * log(x)) - x) + (-0.0027777777777778 * (z / x));
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 * (1.0 / 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 <= (-38.0d0)) then
tmp = ((x * log(x)) - x) + ((-0.0027777777777778d0) * (z / x))
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -38.0) {
tmp = ((x * Math.log(x)) - x) + (-0.0027777777777778 * (z / x));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -38.0: tmp = ((x * math.log(x)) - x) + (-0.0027777777777778 * (z / x)) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -38.0) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(-0.0027777777777778 * Float64(z / x))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -38.0) tmp = ((x * log(x)) - x) + (-0.0027777777777778 * (z / x)); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -38.0], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38:\\
\;\;\;\;\left(x \cdot \log x - x\right) + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -38Initial program 95.7%
Taylor expanded in x around inf 95.8%
sub-neg95.8%
mul-1-neg95.8%
log-rec95.8%
remove-double-neg95.8%
metadata-eval95.8%
distribute-rgt-in95.7%
neg-mul-195.7%
sub-neg95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in z around 0 47.6%
*-commutative47.6%
Simplified47.6%
Taylor expanded in z around inf 48.8%
if -38 < z Initial program 94.5%
Taylor expanded in z around 0 69.8%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
mul-1-neg69.4%
log-rec69.4%
remove-double-neg69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x around 0 69.4%
Final simplification63.9%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (log(x) + -1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 / x) + (x * (log(x) + (-1.0d0)))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (Math.log(x) + -1.0));
}
def code(x, y, z): return (0.083333333333333 / x) + (x * (math.log(x) + -1.0))
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(log(x) + -1.0))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (x * (log(x) + -1.0)); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Initial program 94.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in x around inf 57.6%
sub-neg57.6%
mul-1-neg57.6%
log-rec57.6%
remove-double-neg57.6%
metadata-eval57.6%
Simplified57.6%
Final simplification57.6%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / 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 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 94.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in x around inf 57.6%
sub-neg57.6%
mul-1-neg57.6%
log-rec57.6%
remove-double-neg57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in x around 0 23.1%
div-inv23.2%
Applied egg-rr23.2%
Final simplification23.2%
(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 94.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in x around inf 57.6%
sub-neg57.6%
mul-1-neg57.6%
log-rec57.6%
remove-double-neg57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in x around 0 23.1%
Final simplification23.1%
(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 2023275
(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)))