
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 110.0)
(+
(fma (+ x -0.5) (log x) (- x))
(+
0.91893853320467
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x)))
(+
(* x (+ (log x) -1.0))
(+
(* z (/ (+ y 0.0007936500793651) (/ x z)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 110.0) {
tmp = fma((x + -0.5), log(x), -x) + (0.91893853320467 + (fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x));
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 110.0) tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(-x)) + Float64(0.91893853320467 + Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 110.0], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 110:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, -x\right) + \left(0.91893853320467 + \frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 110Initial program 99.7%
associate-+l+99.7%
fma-neg99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.8%
fma-neg99.8%
metadata-eval99.8%
Simplified99.8%
if 110 < x Initial program 82.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 88.3%
+-commutative88.3%
associate-*r/88.3%
metadata-eval88.3%
unpow288.3%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*l/96.5%
associate-/l*99.6%
associate-*l/99.6%
associate-*r/99.6%
distribute-rgt-out99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 96.5%
*-commutative96.5%
associate-*l/99.6%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= x 110.0)
(+
(fma (+ x -0.5) (log x) (- 0.91893853320467 x))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(* x (+ (log x) -1.0))
(+
(* z (/ (+ y 0.0007936500793651) (/ x z)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 110.0) {
tmp = fma((x + -0.5), log(x), (0.91893853320467 - x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 110.0) tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(0.91893853320467 - x)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 110.0], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 110:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 110Initial 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%
if 110 < x Initial program 82.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 88.3%
+-commutative88.3%
associate-*r/88.3%
metadata-eval88.3%
unpow288.3%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*l/96.5%
associate-/l*99.6%
associate-*l/99.6%
associate-*r/99.6%
distribute-rgt-out99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 96.5%
*-commutative96.5%
associate-*l/99.6%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= x 110.0)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(* x (+ (log x) -1.0))
(+
(* z (/ (+ y 0.0007936500793651) (/ x z)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 110.0) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 110.0d0) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((z * ((y + 0.0007936500793651d0) / (x / z))) + (0.083333333333333d0 * (1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 110.0) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 110.0: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 110.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 110.0) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 110.0], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 110:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 110Initial program 99.7%
if 110 < x Initial program 82.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 88.3%
+-commutative88.3%
associate-*r/88.3%
metadata-eval88.3%
unpow288.3%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*l/96.5%
associate-/l*99.6%
associate-*l/99.6%
associate-*r/99.6%
distribute-rgt-out99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 96.5%
*-commutative96.5%
associate-*l/99.6%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= y -0.0008) (not (<= y 1.02e+43)))
(+ t_0 (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x))
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((y <= -0.0008) || !(y <= 1.02e+43)) {
tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((y <= (-0.0008d0)) .or. (.not. (y <= 1.02d+43))) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if ((y <= -0.0008) || !(y <= 1.02e+43)) {
tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (y <= -0.0008) or not (y <= 1.02e+43): tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) else: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((y <= -0.0008) || !(y <= 1.02e+43)) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((y <= -0.0008) || ~((y <= 1.02e+43))) tmp = t_0 + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x); else tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -0.0008], N[Not[LessEqual[y, 1.02e+43]], $MachinePrecision]], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;y \leq -0.0008 \lor \neg \left(y \leq 1.02 \cdot 10^{+43}\right):\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 1.02e43 < y Initial program 91.9%
Taylor expanded in x around inf 91.7%
sub-neg97.1%
mul-1-neg97.1%
log-rec97.1%
remove-double-neg97.1%
metadata-eval97.1%
+-commutative97.1%
Simplified91.7%
Taylor expanded in y around inf 91.0%
*-commutative91.0%
Simplified91.0%
if -8.00000000000000038e-4 < y < 1.02e43Initial program 90.9%
Taylor expanded in x around inf 90.3%
sub-neg97.5%
mul-1-neg97.5%
log-rec97.5%
remove-double-neg97.5%
metadata-eval97.5%
+-commutative97.5%
Simplified90.3%
Taylor expanded in y around 0 91.0%
*-commutative91.0%
Simplified91.0%
Final simplification91.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 1.5e-91)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
t_0
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (* (+ y 0.0007936500793651) (/ z x))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 1.5e-91) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((y + 0.0007936500793651) * (z / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 1.5d-91) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((y + 0.0007936500793651d0) * (z / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 1.5e-91) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((y + 0.0007936500793651) * (z / x))));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 1.5e-91: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((y + 0.0007936500793651) * (z / x)))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 1.5e-91) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(y + 0.0007936500793651) * Float64(z / x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 1.5e-91) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + ((0.083333333333333 * (1.0 / x)) + (z * ((y + 0.0007936500793651) * (z / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.5e-91], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $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[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 1.5 \cdot 10^{-91}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\right)\\
\end{array}
\end{array}
if x < 1.5000000000000001e-91Initial program 99.8%
Taylor expanded in x around inf 99.8%
sub-neg95.1%
mul-1-neg95.1%
log-rec95.1%
remove-double-neg95.1%
metadata-eval95.1%
+-commutative95.1%
Simplified99.8%
if 1.5000000000000001e-91 < x Initial program 85.5%
Taylor expanded in z around 0 97.7%
Taylor expanded in z around inf 88.5%
+-commutative88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-*l*97.6%
distribute-rgt-in96.9%
associate-*l/96.3%
associate-/l*97.5%
associate-*l/97.4%
associate-*r/97.5%
distribute-rgt-out99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in x around inf 98.9%
sub-neg99.0%
mul-1-neg99.0%
log-rec99.0%
remove-double-neg99.0%
metadata-eval99.0%
+-commutative99.0%
Simplified98.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 100.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
t_0
(+
(* z (/ (+ y 0.0007936500793651) (/ x z)))
(* 0.083333333333333 (/ 1.0 x)))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 100.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 100.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((z * ((y + 0.0007936500793651d0) / (x / z))) + (0.083333333333333d0 * (1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 100.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 100.0: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 100.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(y + 0.0007936500793651) / Float64(x / z))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 100.0) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + ((z * ((y + 0.0007936500793651) / (x / z))) + (0.083333333333333 * (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 100.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 100:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \frac{y + 0.0007936500793651}{\frac{x}{z}} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 100Initial program 99.7%
Taylor expanded in x around inf 98.9%
sub-neg95.2%
mul-1-neg95.2%
log-rec95.2%
remove-double-neg95.2%
metadata-eval95.2%
+-commutative95.2%
Simplified98.9%
if 100 < x Initial program 82.0%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 88.3%
+-commutative88.3%
associate-*r/88.3%
metadata-eval88.3%
unpow288.3%
associate-*l*99.6%
distribute-rgt-in99.6%
associate-*l/96.5%
associate-/l*99.6%
associate-*l/99.6%
associate-*r/99.6%
distribute-rgt-out99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 96.5%
*-commutative96.5%
associate-*l/99.6%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 99.8%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 1.32e+241)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 1.32e+241) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 1.32d+241) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 1.32e+241) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 1.32e+241: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 1.32e+241) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 1.32e+241) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.32e+241], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 1.32 \cdot 10^{+241}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.3199999999999999e241Initial program 95.6%
Taylor expanded in x around inf 95.1%
sub-neg97.0%
mul-1-neg97.0%
log-rec97.0%
remove-double-neg97.0%
metadata-eval97.0%
+-commutative97.0%
Simplified95.1%
if 1.3199999999999999e241 < x Initial program 59.4%
Taylor expanded in z around 0 96.5%
Taylor expanded in x around inf 96.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified96.7%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 2.4e+178)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 2.4e+178) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 2.4d+178) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 2.4e+178) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 2.4e+178: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 2.4e+178) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 2.4e+178) tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); else tmp = t_0 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.4e+178], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 2.4 \cdot 10^{+178}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 2.4e178Initial program 98.3%
Taylor expanded in x around inf 97.7%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
+-commutative96.6%
Simplified97.7%
Taylor expanded in y around 0 79.5%
*-commutative79.5%
Simplified79.5%
if 2.4e178 < x Initial program 70.2%
Taylor expanded in z around 0 86.2%
Taylor expanded in x around inf 86.4%
sub-neg99.8%
mul-1-neg99.8%
log-rec99.8%
remove-double-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified86.4%
Final simplification81.2%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -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 * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 91.4%
Taylor expanded in x around inf 91.0%
sub-neg97.4%
mul-1-neg97.4%
log-rec97.4%
remove-double-neg97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified91.0%
Taylor expanded in z around 0 62.8%
*-commutative62.8%
Simplified62.8%
Final simplification62.8%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (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 * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}
\end{array}
Initial program 91.4%
Taylor expanded in z around 0 59.0%
Taylor expanded in x around inf 58.7%
sub-neg97.4%
mul-1-neg97.4%
log-rec97.4%
remove-double-neg97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified58.7%
Final simplification58.7%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 91.4%
Taylor expanded in z around 0 59.0%
add-cbrt-cube37.9%
pow337.9%
sub-neg37.9%
metadata-eval37.9%
*-commutative37.9%
Applied egg-rr37.9%
Taylor expanded in x around 0 25.7%
+-commutative25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x around 0 26.2%
Final simplification26.2%
(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 2024072
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(+ (+ (+ (* (- 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)))