
(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 12 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 8.5e+55)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x))
(+ (* x (+ (log x) -1.0)) (* (* z (/ z x)) (+ y 0.0007936500793651)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.5e+55) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.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) :: tmp
if (x <= 8.5d+55) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((z * (z / x)) * (y + 0.0007936500793651d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8.5e+55) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8.5e+55: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8.5e+55) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(z / x)) * Float64(y + 0.0007936500793651))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8.5e+55) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = (x * (log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8.5e+55], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+55}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \frac{z}{x}\right) \cdot \left(y + 0.0007936500793651\right)\\
\end{array}
\end{array}
if x < 8.50000000000000002e55Initial program 99.7%
if 8.50000000000000002e55 < x Initial program 83.6%
Taylor expanded in x around inf 83.7%
sub-neg83.7%
mul-1-neg83.7%
log-rec83.7%
remove-double-neg83.7%
metadata-eval83.7%
Simplified83.7%
Taylor expanded in z around inf 83.7%
associate-/l*90.1%
+-commutative90.1%
associate-/r/90.0%
+-commutative90.0%
Simplified90.0%
unpow290.0%
*-un-lft-identity90.0%
times-frac99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 0.00385)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00385) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.00385d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.00385) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00385: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x) else: tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00385) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00385) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); else tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00385], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00385:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 0.0038500000000000001Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.7%
neg-mul-198.7%
unsub-neg98.7%
Simplified98.7%
if 0.0038500000000000001 < x Initial program 86.2%
Taylor expanded in x around inf 85.1%
sub-neg85.1%
mul-1-neg85.1%
log-rec85.1%
remove-double-neg85.1%
metadata-eval85.1%
Simplified85.1%
Taylor expanded in z around inf 85.1%
associate-/l*90.5%
+-commutative90.5%
associate-/r/90.5%
+-commutative90.5%
Simplified90.5%
unpow290.5%
add-sqr-sqrt90.4%
times-frac98.5%
Applied egg-rr98.5%
unpow298.5%
Simplified98.5%
unpow298.5%
frac-times90.4%
add-sqr-sqrt90.5%
associate-/l*98.5%
Applied egg-rr98.5%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (<= x 0.00385)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x))
(+ (* x (+ (log x) -1.0)) (* (* z (/ z x)) (+ y 0.0007936500793651)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00385) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (log(x) + -1.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) :: tmp
if (x <= 0.00385d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((z * (z / x)) * (y + 0.0007936500793651d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.00385) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00385: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x) else: tmp = (x * (math.log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00385) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(z / x)) * Float64(y + 0.0007936500793651))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00385) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); else tmp = (x * (log(x) + -1.0)) + ((z * (z / x)) * (y + 0.0007936500793651)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00385], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00385:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \frac{z}{x}\right) \cdot \left(y + 0.0007936500793651\right)\\
\end{array}
\end{array}
if x < 0.0038500000000000001Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.7%
neg-mul-198.7%
unsub-neg98.7%
Simplified98.7%
if 0.0038500000000000001 < x Initial program 86.2%
Taylor expanded in x around inf 85.1%
sub-neg85.1%
mul-1-neg85.1%
log-rec85.1%
remove-double-neg85.1%
metadata-eval85.1%
Simplified85.1%
Taylor expanded in z around inf 85.1%
associate-/l*90.5%
+-commutative90.5%
associate-/r/90.5%
+-commutative90.5%
Simplified90.5%
unpow290.5%
*-un-lft-identity90.5%
times-frac98.5%
Applied egg-rr98.5%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.26e+98)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.26e+98) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = 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 (x <= 1.26d+98) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.26e+98) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.26e+98: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.26e+98) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.26e+98) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.26e+98], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.25999999999999999e98Initial program 98.1%
add-cube-cbrt97.9%
pow397.9%
sub-neg97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Taylor expanded in x around inf 86.3%
neg-mul-186.3%
unsub-neg86.3%
Simplified86.3%
if 1.25999999999999999e98 < x Initial program 82.1%
Taylor expanded in x around inf 82.2%
sub-neg82.2%
mul-1-neg82.2%
log-rec82.2%
remove-double-neg82.2%
metadata-eval82.2%
Simplified82.2%
Taylor expanded in z around inf 82.2%
associate-/l*89.3%
+-commutative89.3%
associate-/r/89.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in z around 0 78.8%
Final simplification84.0%
(FPCore (x y z)
:precision binary64
(if (or (<= y -16000000000000.0) (not (<= y 4.3e+19)))
(- (/ y (/ x (* z z))) x)
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -16000000000000.0) || !(y <= 4.3e+19)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-16000000000000.0d0)) .or. (.not. (y <= 4.3d+19))) then
tmp = (y / (x / (z * z))) - x
else
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -16000000000000.0) || !(y <= 4.3e+19)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -16000000000000.0) or not (y <= 4.3e+19): tmp = (y / (x / (z * z))) - x else: tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -16000000000000.0) || !(y <= 4.3e+19)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); else tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -16000000000000.0) || ~((y <= 4.3e+19))) tmp = (y / (x / (z * z))) - x; else tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -16000000000000.0], N[Not[LessEqual[y, 4.3e+19]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -16000000000000 \lor \neg \left(y \leq 4.3 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\end{array}
\end{array}
if y < -1.6e13 or 4.3e19 < y Initial program 94.0%
add-cube-cbrt93.6%
pow393.6%
sub-neg93.6%
metadata-eval93.6%
Applied egg-rr93.6%
Taylor expanded in x around inf 64.0%
neg-mul-164.0%
Simplified64.0%
Taylor expanded in y around inf 48.4%
associate-/l*50.2%
Simplified50.2%
unpow250.2%
Applied egg-rr50.2%
if -1.6e13 < y < 4.3e19Initial program 92.3%
add-cube-cbrt91.9%
pow391.9%
sub-neg91.9%
metadata-eval91.9%
Applied egg-rr91.9%
Taylor expanded in x around inf 64.2%
neg-mul-164.2%
Simplified64.2%
Taylor expanded in y around 0 64.2%
*-commutative64.2%
Simplified64.2%
Final simplification57.8%
(FPCore (x y z)
:precision binary64
(if (or (<= y -30000000000.0) (not (<= y 4.5e-29)))
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -30000000000.0) || !(y <= 4.5e-29)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-30000000000.0d0)) .or. (.not. (y <= 4.5d-29))) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -30000000000.0) || !(y <= 4.5e-29)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -30000000000.0) or not (y <= 4.5e-29): tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x else: tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -30000000000.0) || !(y <= 4.5e-29)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -30000000000.0) || ~((y <= 4.5e-29))) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; else tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -30000000000.0], N[Not[LessEqual[y, 4.5e-29]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -30000000000 \lor \neg \left(y \leq 4.5 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\end{array}
\end{array}
if y < -3e10 or 4.4999999999999998e-29 < y Initial program 92.8%
add-cube-cbrt92.4%
pow392.4%
sub-neg92.4%
metadata-eval92.4%
Applied egg-rr92.4%
Taylor expanded in x around inf 63.5%
neg-mul-163.5%
Simplified63.5%
Taylor expanded in y around inf 63.5%
*-commutative63.5%
Simplified63.5%
if -3e10 < y < 4.4999999999999998e-29Initial program 93.4%
add-cube-cbrt92.9%
pow392.9%
sub-neg92.9%
metadata-eval92.9%
Applied egg-rr92.9%
Taylor expanded in x around inf 64.7%
neg-mul-164.7%
Simplified64.7%
Taylor expanded in y around 0 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification64.1%
(FPCore (x y z)
:precision binary64
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(- 0.91893853320467 x)))
double code(double x, double y, double z) {
return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 - x)
end function
public static double code(double x, double y, double z) {
return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x);
}
def code(x, y, z): return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x)
function code(x, y, z) return Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 - x)) end
function tmp = code(x, y, z) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 - x); end
code[x_, y_, z_] := N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)
\end{array}
Initial program 93.1%
add-cube-cbrt92.7%
pow392.7%
sub-neg92.7%
metadata-eval92.7%
Applied egg-rr92.7%
Taylor expanded in x around inf 64.1%
neg-mul-164.1%
unsub-neg64.1%
Simplified64.1%
Final simplification64.1%
(FPCore (x y z)
:precision binary64
(-
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
x))
double code(double x, double y, double z) {
return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) - x
end function
public static double code(double x, double y, double z) {
return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
}
def code(x, y, z): return (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) - x
function code(x, y, z) return Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) - x) end
function tmp = code(x, y, z) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} - x
\end{array}
Initial program 93.1%
add-cube-cbrt92.7%
pow392.7%
sub-neg92.7%
metadata-eval92.7%
Applied egg-rr92.7%
Taylor expanded in x around inf 64.1%
neg-mul-164.1%
Simplified64.1%
Final simplification64.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.2e-77) (not (<= z 2e-13))) (- (* z (* z (/ y x))) x) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.2e-77) || !(z <= 2e-13)) {
tmp = (z * (z * (y / 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 <= (-4.2d-77)) .or. (.not. (z <= 2d-13))) then
tmp = (z * (z * (y / 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 <= -4.2e-77) || !(z <= 2e-13)) {
tmp = (z * (z * (y / x))) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.2e-77) or not (z <= 2e-13): tmp = (z * (z * (y / x))) - x else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.2e-77) || !(z <= 2e-13)) tmp = Float64(Float64(z * Float64(z * Float64(y / 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 <= -4.2e-77) || ~((z <= 2e-13))) tmp = (z * (z * (y / x))) - x; else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.2e-77], N[Not[LessEqual[z, 2e-13]], $MachinePrecision]], N[(N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-77} \lor \neg \left(z \leq 2 \cdot 10^{-13}\right):\\
\;\;\;\;z \cdot \left(z \cdot \frac{y}{x}\right) - x\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.20000000000000031e-77 or 2.0000000000000001e-13 < z Initial program 88.5%
add-cube-cbrt88.1%
pow388.2%
sub-neg88.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in y around inf 45.7%
associate-/l*49.6%
Simplified49.6%
associate-/r/43.8%
unpow243.8%
associate-*r*43.0%
Applied egg-rr43.0%
if -4.20000000000000031e-77 < z < 2.0000000000000001e-13Initial program 99.5%
Taylor expanded in z around 0 96.6%
Taylor expanded in x around inf 93.2%
mul-1-neg93.2%
distribute-rgt-neg-in93.2%
log-rec94.1%
remove-double-neg94.1%
Simplified94.1%
Taylor expanded in x around 0 51.8%
associate-*r/52.7%
metadata-eval52.7%
+-commutative52.7%
Simplified52.7%
Final simplification47.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.8e-77) (not (<= z 1.5e-13))) (- (/ y (/ x (* z z))) x) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.8e-77) || !(z <= 1.5e-13)) {
tmp = (y / (x / (z * z))) - 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 <= (-3.8d-77)) .or. (.not. (z <= 1.5d-13))) then
tmp = (y / (x / (z * z))) - 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 <= -3.8e-77) || !(z <= 1.5e-13)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.8e-77) or not (z <= 1.5e-13): tmp = (y / (x / (z * z))) - x else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.8e-77) || !(z <= 1.5e-13)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - 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 <= -3.8e-77) || ~((z <= 1.5e-13))) tmp = (y / (x / (z * z))) - x; else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.8e-77], N[Not[LessEqual[z, 1.5e-13]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-77} \lor \neg \left(z \leq 1.5 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.7999999999999999e-77 or 1.49999999999999992e-13 < z Initial program 88.5%
add-cube-cbrt88.1%
pow388.2%
sub-neg88.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in y around inf 45.7%
associate-/l*49.6%
Simplified49.6%
unpow249.6%
Applied egg-rr49.6%
if -3.7999999999999999e-77 < z < 1.49999999999999992e-13Initial program 99.5%
Taylor expanded in z around 0 96.6%
Taylor expanded in x around inf 93.2%
mul-1-neg93.2%
distribute-rgt-neg-in93.2%
log-rec94.1%
remove-double-neg94.1%
Simplified94.1%
Taylor expanded in x around 0 51.8%
associate-*r/52.7%
metadata-eval52.7%
+-commutative52.7%
Simplified52.7%
Final simplification50.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.1%
Taylor expanded in z around 0 56.2%
Taylor expanded in x around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-in54.8%
log-rec55.2%
remove-double-neg55.2%
Simplified55.2%
Taylor expanded in x around 0 25.3%
associate-*r/25.6%
metadata-eval25.6%
+-commutative25.6%
Simplified25.6%
Final simplification25.6%
(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.1%
Taylor expanded in z around 0 56.2%
Taylor expanded in x around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-in54.8%
log-rec55.2%
remove-double-neg55.2%
Simplified55.2%
Taylor expanded in x around 0 25.0%
Final simplification25.0%
(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 2023336
(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)))