
(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 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (* z (- (* (/ z x) (+ 0.0007936500793651 y)) (/ 0.0027777777777778 x))) (* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * (((z / x) * (0.0007936500793651 + y)) - (0.0027777777777778 / x))) + (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 = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((z * (((z / x) * (0.0007936500793651d0 + y)) - (0.0027777777777778d0 / x))) + (0.083333333333333d0 * (1.0d0 / x)))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((z * (((z / x) * (0.0007936500793651 + y)) - (0.0027777777777778 / x))) + (0.083333333333333 * (1.0 / x)));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((z * (((z / x) * (0.0007936500793651 + y)) - (0.0027777777777778 / x))) + (0.083333333333333 * (1.0 / x)))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(z * Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) - Float64(0.0027777777777778 / x))) + Float64(0.083333333333333 * Float64(1.0 / x)))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((z * (((z / x) * (0.0007936500793651 + y)) - (0.0027777777777778 / x))) + (0.083333333333333 * (1.0 / 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[(z * N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) - \frac{0.0027777777777778}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)
\end{array}
Initial program 93.1%
Taylor expanded in z around 0 94.0%
Taylor expanded in y around 0 95.1%
associate-/l*94.3%
distribute-rgt-out98.2%
Simplified98.2%
Taylor expanded in x around 0 98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467))
(t_1 (* 0.083333333333333 (/ 1.0 x))))
(if (<= y -2.4e-27)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(if (<= y 2.2e-31)
(+
t_0
(+
t_1
(* z (- (* (/ z x) 0.0007936500793651) (/ 0.0027777777777778 x)))))
(+
(+ 0.91893853320467 (- (* x (log x)) x))
(+ t_1 (* z (+ (/ (* z y) x) (* 0.0027777777777778 (/ -1.0 x))))))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double t_1 = 0.083333333333333 * (1.0 / x);
double tmp;
if (y <= -2.4e-27) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else if (y <= 2.2e-31) {
tmp = t_0 + (t_1 + (z * (((z / x) * 0.0007936500793651) - (0.0027777777777778 / x))));
} else {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (t_1 + (z * (((z * y) / x) + (0.0027777777777778 * (-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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
t_1 = 0.083333333333333d0 * (1.0d0 / x)
if (y <= (-2.4d-27)) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else if (y <= 2.2d-31) then
tmp = t_0 + (t_1 + (z * (((z / x) * 0.0007936500793651d0) - (0.0027777777777778d0 / x))))
else
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + (t_1 + (z * (((z * y) / x) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double t_1 = 0.083333333333333 * (1.0 / x);
double tmp;
if (y <= -2.4e-27) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else if (y <= 2.2e-31) {
tmp = t_0 + (t_1 + (z * (((z / x) * 0.0007936500793651) - (0.0027777777777778 / x))));
} else {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (t_1 + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x)))));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 t_1 = 0.083333333333333 * (1.0 / x) tmp = 0 if y <= -2.4e-27: tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) elif y <= 2.2e-31: tmp = t_0 + (t_1 + (z * (((z / x) * 0.0007936500793651) - (0.0027777777777778 / x)))) else: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (t_1 + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x))))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) t_1 = Float64(0.083333333333333 * Float64(1.0 / x)) tmp = 0.0 if (y <= -2.4e-27) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); elseif (y <= 2.2e-31) tmp = Float64(t_0 + Float64(t_1 + Float64(z * Float64(Float64(Float64(z / x) * 0.0007936500793651) - Float64(0.0027777777777778 / x))))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(t_1 + Float64(z * Float64(Float64(Float64(z * y) / x) + Float64(0.0027777777777778 * Float64(-1.0 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; t_1 = 0.083333333333333 * (1.0 / x); tmp = 0.0; if (y <= -2.4e-27) tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); elseif (y <= 2.2e-31) tmp = t_0 + (t_1 + (z * (((z / x) * 0.0007936500793651) - (0.0027777777777778 / x)))); else tmp = (0.91893853320467 + ((x * log(x)) - x)) + (t_1 + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, Block[{t$95$1 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-27], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-31], N[(t$95$0 + N[(t$95$1 + N[(z * N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(z * N[(N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
t_1 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-27}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-31}:\\
\;\;\;\;t\_0 + \left(t\_1 + z \cdot \left(\frac{z}{x} \cdot 0.0007936500793651 - \frac{0.0027777777777778}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \left(t\_1 + z \cdot \left(\frac{z \cdot y}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
if y < -2.40000000000000002e-27Initial program 95.6%
if -2.40000000000000002e-27 < y < 2.2000000000000001e-31Initial program 90.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around 0 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if 2.2000000000000001e-31 < y Initial program 94.1%
Taylor expanded in y around inf 94.1%
*-commutative94.1%
Simplified94.1%
Taylor expanded in x around inf 94.1%
mul-1-neg94.1%
distribute-rgt-neg-in94.1%
log-rec94.1%
remove-double-neg94.1%
Simplified94.1%
Taylor expanded in z around 0 98.6%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 3e+158)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+
t_0
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (+ (* z (/ y x)) (* 0.0027777777777778 (/ -1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 3e+158) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * (y / x)) + (0.0027777777777778 * (-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) :: t_0
real(8) :: tmp
t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (x <= 3d+158) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * (y / x)) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 3e+158) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * (y / x)) + (0.0027777777777778 * (-1.0 / x)))));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if x <= 3e+158: tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * (y / x)) + (0.0027777777777778 * (-1.0 / x))))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 3e+158) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(z * Float64(y / x)) + Float64(0.0027777777777778 * Float64(-1.0 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; tmp = 0.0; if (x <= 3e+158) tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((z * (y / x)) + (0.0027777777777778 * (-1.0 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 3e+158], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 3 \cdot 10^{+158}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \frac{y}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
if x < 3e158Initial program 96.2%
if 3e158 < x Initial program 84.9%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 98.3%
Final simplification96.7%
(FPCore (x y z)
:precision binary64
(if (<= x 5.8e+158)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+
(+ 0.91893853320467 (- (* x (log x)) x))
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (+ (/ (* z y) x) (* 0.0027777777777778 (/ -1.0 x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.8e+158) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + ((0.083333333333333 * (1.0 / x)) + (z * (((z * y) / x) + (0.0027777777777778 * (-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 (x <= 5.8d+158) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * (((z * y) / x) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.8e+158) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + ((0.083333333333333 * (1.0 / x)) + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.8e+158: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + ((0.083333333333333 * (1.0 / x)) + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.8e+158) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(Float64(z * y) / x) + Float64(0.0027777777777778 * Float64(-1.0 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.8e+158) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((x * log(x)) - x)) + ((0.083333333333333 * (1.0 / x)) + (z * (((z * y) / x) + (0.0027777777777778 * (-1.0 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.8e+158], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(N[(z * y), $MachinePrecision] / x), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.8 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(\frac{z \cdot y}{x} + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
if x < 5.80000000000000048e158Initial program 96.2%
if 5.80000000000000048e158 < x Initial program 84.9%
Taylor expanded in y around inf 86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in x around inf 86.0%
mul-1-neg86.0%
distribute-rgt-neg-in86.0%
log-rec86.0%
remove-double-neg86.0%
Simplified86.0%
Taylor expanded in z around 0 94.3%
Final simplification95.7%
(FPCore (x y z)
:precision binary64
(if (<= x 2e-6)
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e-6) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * y) - 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 (x <= 2d-6) then
tmp = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e-6) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e-6: tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e-6) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e-6) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e-6], N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 1.99999999999999991e-6Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if 1.99999999999999991e-6 < x Initial program 87.4%
Taylor expanded in y around inf 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification91.0%
(FPCore (x y z)
:precision binary64
(if (<= x 0.054)
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
(+
(+ 0.91893853320467 (- (* x (log x)) x))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.054) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + ((0.083333333333333 + (z * ((z * y) - 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 (x <= 0.054d0) then
tmp = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
else
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + ((0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.054) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.054: tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x else: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.054) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.054) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; else tmp = (0.91893853320467 + ((x * log(x)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.054], N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.054:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 0.0539999999999999994Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if 0.0539999999999999994 < x Initial program 87.4%
Taylor expanded in y around inf 83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in x around inf 82.5%
mul-1-neg82.5%
distribute-rgt-neg-in82.5%
log-rec82.5%
remove-double-neg82.5%
Simplified82.5%
Final simplification90.4%
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 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 * (0.0007936500793651d0 + y)) - 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 * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / 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[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.1%
Final simplification93.1%
(FPCore (x y z)
:precision binary64
(if (<= x 26.0)
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 26.0) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 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 (x <= 26.0d0) then
tmp = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 26.0) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 26.0: tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 26.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 26.0) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 26.0], N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 26:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 26Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
if 26 < x Initial program 87.3%
Taylor expanded in z around 0 73.0%
(FPCore (x y z)
:precision binary64
(if (<= x 9.6e+33)
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 9.6e+33) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / 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 <= 9.6d+33) then
tmp = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / 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 <= 9.6e+33) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 9.6e+33: tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 9.6e+33) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / 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 <= 9.6e+33) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 9.6e+33], N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.6 \cdot 10^{+33}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 9.5999999999999999e33Initial program 99.6%
sub-neg99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
unsub-neg99.6%
*-commutative99.6%
fma-define99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 93.9%
distribute-lft-in93.9%
Applied egg-rr93.9%
if 9.5999999999999999e33 < x Initial program 85.9%
sub-neg85.9%
associate-+l+85.9%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
+-commutative86.0%
unsub-neg86.0%
*-commutative86.0%
fma-define86.0%
fma-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in x around inf 74.8%
sub-neg74.8%
mul-1-neg74.8%
log-rec74.8%
remove-double-neg74.8%
metadata-eval74.8%
Simplified74.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -240.0) (not (<= z 6.8e+53))) (* (* z z) (/ (+ 0.0007936500793651 y) x)) (/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -240.0) || !(z <= 6.8e+53)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = (0.083333333333333 + (z * ((z * y) - 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 ((z <= (-240.0d0)) .or. (.not. (z <= 6.8d+53))) then
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
else
tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -240.0) || !(z <= 6.8e+53)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -240.0) or not (z <= 6.8e+53): tmp = (z * z) * ((0.0007936500793651 + y) / x) else: tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -240.0) || !(z <= 6.8e+53)) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -240.0) || ~((z <= 6.8e+53))) tmp = (z * z) * ((0.0007936500793651 + y) / x); else tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -240.0], N[Not[LessEqual[z, 6.8e+53]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -240 \lor \neg \left(z \leq 6.8 \cdot 10^{+53}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if z < -240 or 6.79999999999999995e53 < z Initial program 85.9%
sub-neg85.9%
associate-+l+85.9%
fma-define85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
unsub-neg85.9%
*-commutative85.9%
fma-define85.9%
fma-neg85.9%
metadata-eval85.9%
Simplified85.9%
Taylor expanded in x around 0 66.6%
Taylor expanded in z around inf 66.6%
associate-/l*66.6%
Simplified66.6%
unpow266.6%
Applied egg-rr66.6%
if -240 < z < 6.79999999999999995e53Initial program 99.5%
sub-neg99.5%
associate-+l+99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 52.7%
Taylor expanded in y around inf 52.3%
*-commutative52.3%
Simplified52.3%
Final simplification59.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -2.1e-50) (not (<= z 1.08e-8))) (* (* z z) (/ (+ 0.0007936500793651 y) x)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.1e-50) || !(z <= 1.08e-8)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.1d-50)) .or. (.not. (z <= 1.08d-8))) then
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
else
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.1e-50) || !(z <= 1.08e-8)) {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
} else {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.1e-50) or not (z <= 1.08e-8): tmp = (z * z) * ((0.0007936500793651 + y) / x) else: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.1e-50) || !(z <= 1.08e-8)) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); else tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.1e-50) || ~((z <= 1.08e-8))) tmp = (z * z) * ((0.0007936500793651 + y) / x); else tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.1e-50], N[Not[LessEqual[z, 1.08e-8]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-50} \lor \neg \left(z \leq 1.08 \cdot 10^{-8}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\end{array}
\end{array}
if z < -2.1000000000000001e-50 or 1.0800000000000001e-8 < z Initial program 88.6%
sub-neg88.6%
associate-+l+88.6%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
+-commutative88.6%
unsub-neg88.6%
*-commutative88.6%
fma-define88.6%
fma-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in x around 0 63.6%
Taylor expanded in z around inf 60.9%
associate-/l*59.7%
Simplified59.7%
unpow259.7%
Applied egg-rr59.7%
if -2.1000000000000001e-50 < z < 1.0800000000000001e-8Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 53.0%
Taylor expanded in z around 0 44.0%
Final simplification53.2%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 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.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
*-commutative93.1%
fma-define93.1%
fma-neg93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in x around 0 59.2%
distribute-lft-in59.2%
Applied egg-rr59.2%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 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.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
*-commutative93.1%
fma-define93.1%
fma-neg93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in x around 0 59.2%
(FPCore (x y z) :precision binary64 (if (<= x 1.52e-9) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.52e-9) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = x * 0.083333333333333;
}
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.52d-9) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = x * 0.083333333333333d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.52e-9) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.52e-9: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.52e-9) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(x * 0.083333333333333); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.52e-9) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.52e-9], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.52 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 1.51999999999999992e-9Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around 0 51.3%
if 1.51999999999999992e-9 < x Initial program 87.5%
sub-neg87.5%
associate-+l+87.5%
fma-define87.5%
sub-neg87.5%
metadata-eval87.5%
+-commutative87.5%
unsub-neg87.5%
*-commutative87.5%
fma-define87.5%
fma-neg87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in x around 0 24.9%
Taylor expanded in z around 0 3.0%
div-inv3.0%
Applied egg-rr3.0%
pow13.0%
*-commutative3.0%
add-exp-log3.0%
add-sqr-sqrt0.0%
sqrt-unprod10.5%
log-rec10.5%
log-rec10.5%
sqr-neg10.5%
sqrt-unprod10.5%
add-sqr-sqrt10.5%
add-exp-log10.5%
Applied egg-rr10.5%
unpow110.5%
Simplified10.5%
(FPCore (x y z) :precision binary64 (if (<= x 0.054) (/ 0.083333333333333 x) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.054) {
tmp = 0.083333333333333 / x;
} else {
tmp = x * 0.083333333333333;
}
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.054d0) then
tmp = 0.083333333333333d0 / x
else
tmp = x * 0.083333333333333d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.054) {
tmp = 0.083333333333333 / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.054: tmp = 0.083333333333333 / x else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.054) tmp = Float64(0.083333333333333 / x); else tmp = Float64(x * 0.083333333333333); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.054) tmp = 0.083333333333333 / x; else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.054], N[(0.083333333333333 / x), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.054:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 0.0539999999999999994Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around 0 42.3%
if 0.0539999999999999994 < x Initial program 87.4%
sub-neg87.4%
associate-+l+87.4%
fma-define87.4%
sub-neg87.4%
metadata-eval87.4%
+-commutative87.4%
unsub-neg87.4%
*-commutative87.4%
fma-define87.4%
fma-neg87.4%
metadata-eval87.4%
Simplified87.4%
Taylor expanded in x around 0 24.4%
Taylor expanded in z around 0 3.0%
div-inv3.0%
Applied egg-rr3.0%
pow13.0%
*-commutative3.0%
add-exp-log3.0%
add-sqr-sqrt0.0%
sqrt-unprod10.5%
log-rec10.5%
log-rec10.5%
sqr-neg10.5%
sqrt-unprod10.5%
add-sqr-sqrt10.5%
add-exp-log10.5%
Applied egg-rr10.5%
unpow110.5%
Simplified10.5%
(FPCore (x y z) :precision binary64 (* x 0.083333333333333))
double code(double x, double y, double z) {
return x * 0.083333333333333;
}
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.083333333333333d0
end function
public static double code(double x, double y, double z) {
return x * 0.083333333333333;
}
def code(x, y, z): return x * 0.083333333333333
function code(x, y, z) return Float64(x * 0.083333333333333) end
function tmp = code(x, y, z) tmp = x * 0.083333333333333; end
code[x_, y_, z_] := N[(x * 0.083333333333333), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.083333333333333
\end{array}
Initial program 93.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
*-commutative93.1%
fma-define93.1%
fma-neg93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in x around 0 59.2%
Taylor expanded in z around 0 21.3%
div-inv21.2%
Applied egg-rr21.2%
pow121.2%
*-commutative21.2%
add-exp-log19.9%
add-sqr-sqrt18.1%
sqrt-unprod24.0%
log-rec24.0%
log-rec24.0%
sqr-neg24.0%
sqrt-unprod5.6%
add-sqr-sqrt7.0%
add-exp-log7.0%
Applied egg-rr7.0%
unpow17.0%
Simplified7.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 2024146
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))