
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(+
(fma (+ x -0.5) (log x) (fma x -1.0 0.91893853320467))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return fma((x + -0.5), log(x), fma(x, -1.0, 0.91893853320467)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
}
function code(x, y, z) return Float64(fma(Float64(x + -0.5), log(x), fma(x, -1.0, 0.91893853320467)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)) end
code[x_, y_, z_] := N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(x * -1.0 + 0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x + -0.5, \log x, \mathsf{fma}\left(x, -1, 0.91893853320467\right)\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}
\end{array}
Initial program 95.7%
sub-neg95.7%
associate-+l+95.7%
fma-def95.8%
sub-neg95.8%
metadata-eval95.8%
neg-mul-195.8%
*-commutative95.8%
fma-def95.8%
*-commutative95.8%
fma-def95.8%
fma-neg95.8%
metadata-eval95.8%
Simplified95.8%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(-
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(*
(+
0.083333333333333
(* z (fma (+ y 0.0007936500793651) z -0.0027777777777778)))
(/ -1.0 x))))
double code(double x, double y, double z) {
return (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) - ((0.083333333333333 + (z * fma((y + 0.0007936500793651), z, -0.0027777777777778))) * (-1.0 / x));
}
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) - Float64(Float64(0.083333333333333 + Float64(z * fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778))) * Float64(-1.0 / x))) end
code[x_, y_, z_] := 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[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) - \left(0.083333333333333 + z \cdot \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)\right) \cdot \frac{-1}{x}
\end{array}
Initial program 95.7%
frac-2neg95.7%
div-inv95.8%
*-commutative95.8%
fma-udef95.8%
fma-neg95.8%
metadata-eval95.8%
add-sqr-sqrt0.0%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod32.5%
add-sqr-sqrt32.5%
frac-2neg32.5%
metadata-eval32.5%
add-sqr-sqrt0.0%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod95.6%
add-sqr-sqrt95.8%
Applied egg-rr95.8%
fma-udef95.8%
Applied egg-rr95.8%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(-
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(*
(/ -1.0 x)
(+
0.083333333333333
(+ (* z (* z (+ y 0.0007936500793651))) (* z -0.0027777777777778))))))
double code(double x, double y, double z) {
return (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) - ((-1.0 / x) * (0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -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 = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) - (((-1.0d0) / x) * (0.083333333333333d0 + ((z * (z * (y + 0.0007936500793651d0))) + (z * (-0.0027777777777778d0)))))
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) - ((-1.0 / x) * (0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))));
}
def code(x, y, z): return (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) - ((-1.0 / x) * (0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778))))
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) - Float64(Float64(-1.0 / x) * Float64(0.083333333333333 + Float64(Float64(z * Float64(z * Float64(y + 0.0007936500793651))) + Float64(z * -0.0027777777777778))))) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) - ((-1.0 / x) * (0.083333333333333 + ((z * (z * (y + 0.0007936500793651))) + (z * -0.0027777777777778)))); end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) - \frac{-1}{x} \cdot \left(0.083333333333333 + \left(z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right) + z \cdot -0.0027777777777778\right)\right)
\end{array}
Initial program 95.7%
frac-2neg95.7%
div-inv95.8%
*-commutative95.8%
fma-udef95.8%
fma-neg95.8%
metadata-eval95.8%
add-sqr-sqrt0.0%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod32.5%
add-sqr-sqrt32.5%
frac-2neg32.5%
metadata-eval32.5%
add-sqr-sqrt0.0%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod95.6%
add-sqr-sqrt95.8%
Applied egg-rr95.8%
fma-udef95.8%
Applied egg-rr95.8%
fma-udef95.8%
distribute-rgt-in95.8%
*-commutative95.8%
Applied egg-rr95.8%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
function code(x, y, z) return 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)) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); end
code[x_, y_, z_] := 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]
\begin{array}{l}
\\
\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}
\end{array}
Initial program 95.7%
Final simplification95.7%
(FPCore (x y z)
:precision binary64
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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))) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)) end
function tmp = code(x, y, z) tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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]
\begin{array}{l}
\\
\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 95.7%
associate-+l-95.7%
sub-neg95.7%
metadata-eval95.7%
*-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
Applied egg-rr95.7%
Final simplification95.7%
(FPCore (x y z)
:precision binary64
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0))
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(x * Float64(log(x) + -1.0))) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); end
code[x_, y_, z_] := 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]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Initial program 95.7%
Taylor expanded in x around inf 95.1%
sub-neg58.8%
mul-1-neg58.8%
log-rec58.8%
remove-double-neg58.8%
metadata-eval58.8%
Simplified95.1%
Final simplification95.1%
(FPCore (x y z)
:precision binary64
(if (<= x 4.8e+28)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(- 0.91893853320467 x))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.8e+28) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.8d+28) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 - x)
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.8e+28) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.8e+28: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.8e+28) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.8e+28) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.8e+28], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 4.79999999999999962e28Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
add-cube-cbrt99.6%
pow399.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 96.8%
neg-mul-196.8%
unsub-neg96.8%
Simplified96.8%
if 4.79999999999999962e28 < x Initial program 90.6%
Taylor expanded in z around 0 77.1%
Taylor expanded in x around inf 77.2%
sub-neg77.2%
mul-1-neg77.2%
log-rec77.2%
remove-double-neg77.2%
metadata-eval77.2%
Simplified77.2%
Final simplification88.3%
(FPCore (x y z)
:precision binary64
(if (or (<= y -0.002) (not (<= y 1.45e+16)))
(- (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x) x)
(+
(/ 0.083333333333333 x)
(- (* (/ z x) (- (* z 0.0007936500793651) 0.0027777777777778)) x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.002) || !(y <= 1.45e+16)) {
tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x;
} else {
tmp = (0.083333333333333 / x) + (((z / x) * ((z * 0.0007936500793651) - 0.0027777777777778)) - x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-0.002d0)) .or. (.not. (y <= 1.45d+16))) then
tmp = ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x) - x
else
tmp = (0.083333333333333d0 / x) + (((z / x) * ((z * 0.0007936500793651d0) - 0.0027777777777778d0)) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.002) || !(y <= 1.45e+16)) {
tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x;
} else {
tmp = (0.083333333333333 / x) + (((z / x) * ((z * 0.0007936500793651) - 0.0027777777777778)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.002) or not (y <= 1.45e+16): tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x else: tmp = (0.083333333333333 / x) + (((z / x) * ((z * 0.0007936500793651) - 0.0027777777777778)) - x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.002) || !(y <= 1.45e+16)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(Float64(Float64(z / x) * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.002) || ~((y <= 1.45e+16))) tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x; else tmp = (0.083333333333333 / x) + (((z / x) * ((z * 0.0007936500793651) - 0.0027777777777778)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.002], N[Not[LessEqual[y, 1.45e+16]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[(z / x), $MachinePrecision] * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.002 \lor \neg \left(y \leq 1.45 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right) - x\right)\\
\end{array}
\end{array}
if y < -2e-3 or 1.45e16 < y Initial program 97.6%
sub-neg97.6%
metadata-eval97.6%
add-cube-cbrt97.2%
pow397.2%
*-commutative97.2%
Applied egg-rr97.2%
Taylor expanded in x around inf 71.6%
neg-mul-171.6%
Simplified71.6%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
Simplified71.0%
if -2e-3 < y < 1.45e16Initial program 93.7%
sub-neg93.7%
metadata-eval93.7%
add-cube-cbrt93.1%
pow393.0%
*-commutative93.0%
Applied egg-rr93.0%
Taylor expanded in x around inf 54.3%
neg-mul-154.3%
Simplified54.3%
Taylor expanded in y around 0 54.3%
associate--l+54.3%
associate-*r/54.2%
metadata-eval54.2%
associate-/l*55.4%
associate-/r/55.4%
*-commutative55.4%
fma-neg55.4%
metadata-eval55.4%
Simplified55.4%
Taylor expanded in z around 0 55.4%
Final simplification63.4%
(FPCore (x y z) :precision binary64 (if (or (<= y -0.002) (not (<= y 2e+16))) (- (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x) x) (+ (/ 0.083333333333333 x) (- (* (/ z x) (* z 0.0007936500793651)) x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.002) || !(y <= 2e+16)) {
tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x;
} else {
tmp = (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-0.002d0)) .or. (.not. (y <= 2d+16))) then
tmp = ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x) - x
else
tmp = (0.083333333333333d0 / x) + (((z / x) * (z * 0.0007936500793651d0)) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.002) || !(y <= 2e+16)) {
tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x;
} else {
tmp = (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.002) or not (y <= 2e+16): tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x else: tmp = (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.002) || !(y <= 2e+16)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(Float64(Float64(z / x) * Float64(z * 0.0007936500793651)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.002) || ~((y <= 2e+16))) tmp = ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) - x; else tmp = (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.002], N[Not[LessEqual[y, 2e+16]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[(z / x), $MachinePrecision] * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.002 \lor \neg \left(y \leq 2 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right) - x\right)\\
\end{array}
\end{array}
if y < -2e-3 or 2e16 < y Initial program 97.6%
sub-neg97.6%
metadata-eval97.6%
add-cube-cbrt97.2%
pow397.2%
*-commutative97.2%
Applied egg-rr97.2%
Taylor expanded in x around inf 71.6%
neg-mul-171.6%
Simplified71.6%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
Simplified71.0%
if -2e-3 < y < 2e16Initial program 93.7%
sub-neg93.7%
metadata-eval93.7%
add-cube-cbrt93.1%
pow393.0%
*-commutative93.0%
Applied egg-rr93.0%
Taylor expanded in x around inf 54.3%
neg-mul-154.3%
Simplified54.3%
Taylor expanded in y around 0 54.3%
associate--l+54.3%
associate-*r/54.2%
metadata-eval54.2%
associate-/l*55.4%
associate-/r/55.4%
*-commutative55.4%
fma-neg55.4%
metadata-eval55.4%
Simplified55.4%
Taylor expanded in z around inf 54.9%
*-commutative54.9%
Simplified54.9%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(- 0.91893853320467 x)))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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 = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 - x)
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x);
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x)
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 - x)) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 - x); end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 - x\right)
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
unsub-neg63.2%
Simplified63.2%
Final simplification63.2%
(FPCore (x y z)
:precision binary64
(-
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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 = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Final simplification63.2%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (- (* (/ z x) (* z 0.0007936500793651)) x)))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - 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) + (((z / x) * (z * 0.0007936500793651d0)) - x)
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x);
}
def code(x, y, z): return (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x)
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(Float64(Float64(z / x) * Float64(z * 0.0007936500793651)) - x)) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (((z / x) * (z * 0.0007936500793651)) - x); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[(z / x), $MachinePrecision] * N[(z * 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + \left(\frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right) - x\right)
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Taylor expanded in y around 0 45.3%
associate--l+45.3%
associate-*r/45.2%
metadata-eval45.2%
associate-/l*44.5%
associate-/r/44.5%
*-commutative44.5%
fma-neg44.5%
metadata-eval44.5%
Simplified44.5%
Taylor expanded in z around inf 44.2%
*-commutative44.2%
Simplified44.2%
Final simplification44.2%
(FPCore (x y z) :precision binary64 (- (/ (+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778))) x) x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / 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 = ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x} - x
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Taylor expanded in y around 0 45.2%
*-commutative45.2%
Simplified45.2%
Final simplification45.2%
(FPCore (x y z) :precision binary64 (- (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * -0.0027777777777778)) / 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 = ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Taylor expanded in z around 0 28.0%
*-commutative28.0%
Simplified28.0%
Final simplification28.0%
(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 95.7%
Taylor expanded in z around 0 59.4%
add-cube-cbrt58.9%
pow359.0%
*-commutative59.0%
sub-neg59.0%
metadata-eval59.0%
metadata-eval59.0%
sub-neg59.0%
*-commutative59.0%
sub-neg59.0%
metadata-eval59.0%
Applied egg-rr59.0%
Taylor expanded in x around inf 26.1%
Final simplification26.1%
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
return -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
end function
public static double code(double x, double y, double z) {
return -x;
}
def code(x, y, z): return -x
function code(x, y, z) return Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
add-cube-cbrt95.2%
pow395.2%
*-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Taylor expanded in x around inf 1.4%
mul-1-neg1.4%
Simplified1.4%
Final simplification1.4%
(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 2023298
(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)))