
(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 19 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 1e+33)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(pow
(/
x
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333))
-1.0))
(+
(* x (+ (log x) -1.0))
(+
(* z (* (+ y 0.0007936500793651) (/ z x)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+33) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + pow((x / fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333)), -1.0);
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1e+33) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + (Float64(x / fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333)) ^ -1.0)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * Float64(Float64(y + 0.0007936500793651) * Float64(z / x))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1e+33], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[Power[N[(x / N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+33}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 9.9999999999999995e32Initial program 99.6%
clear-num99.6%
inv-pow99.6%
*-commutative99.6%
fma-undefine99.6%
fma-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 9.9999999999999995e32 < x Initial program 86.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 89.8%
unpow289.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.6%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around inf 99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+88)
(+
(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) (/ z x)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+88) {
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) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1e+88) 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(z / x))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1e+88], 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[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+88}:\\
\;\;\;\;\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 \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 9.99999999999999959e87Initial program 99.6%
sub-neg99.6%
associate-+l+99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 9.99999999999999959e87 < x Initial program 83.3%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 87.8%
unpow287.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.4%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around inf 99.5%
sub-neg99.5%
mul-1-neg99.5%
log-rec99.5%
remove-double-neg99.5%
metadata-eval99.5%
+-commutative99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+33)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(* x (+ (log x) -1.0))
(+
(* z (* (+ y 0.0007936500793651) (/ z x)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+33) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1d+33) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((z * ((y + 0.0007936500793651d0) * (z / x))) + (0.083333333333333d0 * (1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+33) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+33: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+33) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + 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(z / x))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+33) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+33], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+33}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\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 \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 9.9999999999999995e32Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 9.9999999999999995e32 < x Initial program 86.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 89.8%
unpow289.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.6%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around inf 99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 7.5e+32)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(* x (+ (log x) -1.0))
(+
(* z (* (+ y 0.0007936500793651) (/ z x)))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 7.5e+32) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 7.5d+32) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((z * ((y + 0.0007936500793651d0) * (z / x))) + (0.083333333333333d0 * (1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 7.5e+32) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 7.5e+32: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 7.5e+32) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + 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(z / x))) + Float64(0.083333333333333 * Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 7.5e+32) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 7.5e+32], 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[(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[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.5 \cdot 10^{+32}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\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 \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 7.49999999999999959e32Initial program 99.6%
if 7.49999999999999959e32 < x Initial program 86.2%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 89.8%
unpow289.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.6%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around inf 99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.91893853320467
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))))
(if (<= x 3.2e-252)
t_0
(if (<= x 8.5e-210)
(* x (/ 0.083333333333333 (pow x 2.0)))
(if (<= x 1.0)
t_0
(+ (* x (+ (log x) -1.0)) (* 0.083333333333333 (/ 1.0 x))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 3.2e-252) {
tmp = t_0;
} else if (x <= 8.5e-210) {
tmp = x * (0.083333333333333 / pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
if (x <= 3.2d-252) then
tmp = t_0
else if (x <= 8.5d-210) then
tmp = x * (0.083333333333333d0 / (x ** 2.0d0))
else if (x <= 1.0d0) then
tmp = t_0
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 3.2e-252) {
tmp = t_0;
} else if (x <= 8.5e-210) {
tmp = x * (0.083333333333333 / Math.pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) tmp = 0 if x <= 3.2e-252: tmp = t_0 elif x <= 8.5e-210: tmp = x * (0.083333333333333 / math.pow(x, 2.0)) elif x <= 1.0: tmp = t_0 else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) tmp = 0.0 if (x <= 3.2e-252) tmp = t_0; elseif (x <= 8.5e-210) tmp = Float64(x * Float64(0.083333333333333 / (x ^ 2.0))); elseif (x <= 1.0) tmp = t_0; else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); tmp = 0.0; if (x <= 3.2e-252) tmp = t_0; elseif (x <= 8.5e-210) tmp = x * (0.083333333333333 / (x ^ 2.0)); elseif (x <= 1.0) tmp = t_0; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.2e-252], t$95$0, If[LessEqual[x, 8.5e-210], N[(x * N[(0.083333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0], t$95$0, N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{if}\;x \leq 3.2 \cdot 10^{-252}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-210}:\\
\;\;\;\;x \cdot \frac{0.083333333333333}{{x}^{2}}\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if x < 3.2000000000000002e-252 or 8.4999999999999997e-210 < x < 1Initial program 99.6%
Taylor expanded in x around inf 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
log-rec98.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around 0 56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in x around 0 56.2%
if 3.2000000000000002e-252 < x < 8.4999999999999997e-210Initial program 99.9%
Taylor expanded in z around 0 15.7%
Taylor expanded in x around inf 15.7%
sub-neg89.7%
mul-1-neg89.7%
log-rec89.7%
remove-double-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified15.7%
Taylor expanded in x around inf 57.9%
associate--l+57.9%
mul-1-neg57.9%
log-rec57.9%
remove-double-neg57.9%
sub-neg57.9%
associate-*r/57.9%
metadata-eval57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in x around 0 57.9%
if 1 < x Initial program 87.6%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 75.2%
sub-neg98.6%
mul-1-neg98.6%
log-rec98.6%
remove-double-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified75.2%
div-inv75.2%
*-commutative75.2%
Applied egg-rr75.2%
Final simplification65.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 1e+88)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
t_0
(+
(* z (* (+ y 0.0007936500793651) (/ z x)))
(* 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 <= 1e+88) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 1d+88) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((z * ((y + 0.0007936500793651d0) * (z / x))) + (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 <= 1e+88) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((z * ((y + 0.0007936500793651) * (z / x))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 1e+88: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + ((z * ((y + 0.0007936500793651) * (z / x))) + (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 <= 1e+88) 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(z / x))) + 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 <= 1e+88) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + ((z * ((y + 0.0007936500793651) * (z / x))) + (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, 1e+88], 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[(z / x), $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 10^{+88}:\\
\;\;\;\;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 \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 9.99999999999999959e87Initial program 99.6%
Taylor expanded in x around inf 98.5%
sub-neg95.3%
mul-1-neg95.3%
log-rec95.3%
remove-double-neg95.3%
metadata-eval95.3%
+-commutative95.3%
Simplified98.5%
if 9.99999999999999959e87 < x Initial program 83.3%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 87.8%
unpow287.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.4%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around inf 99.5%
sub-neg99.5%
mul-1-neg99.5%
log-rec99.5%
remove-double-neg99.5%
metadata-eval99.5%
+-commutative99.5%
Simplified99.5%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.91893853320467
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))))
(if (<= x 8.8e-251)
t_0
(if (<= x 1.35e-209)
(* x (/ 0.083333333333333 (pow x 2.0)))
(if (<= x 1.0)
t_0
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 8.8e-251) {
tmp = t_0;
} else if (x <= 1.35e-209) {
tmp = x * (0.083333333333333 / pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
if (x <= 8.8d-251) then
tmp = t_0
else if (x <= 1.35d-209) then
tmp = x * (0.083333333333333d0 / (x ** 2.0d0))
else if (x <= 1.0d0) then
tmp = t_0
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 8.8e-251) {
tmp = t_0;
} else if (x <= 1.35e-209) {
tmp = x * (0.083333333333333 / Math.pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) tmp = 0 if x <= 8.8e-251: tmp = t_0 elif x <= 1.35e-209: tmp = x * (0.083333333333333 / math.pow(x, 2.0)) elif x <= 1.0: tmp = t_0 else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) tmp = 0.0 if (x <= 8.8e-251) tmp = t_0; elseif (x <= 1.35e-209) tmp = Float64(x * Float64(0.083333333333333 / (x ^ 2.0))); elseif (x <= 1.0) tmp = t_0; else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); tmp = 0.0; if (x <= 8.8e-251) tmp = t_0; elseif (x <= 1.35e-209) tmp = x * (0.083333333333333 / (x ^ 2.0)); elseif (x <= 1.0) tmp = t_0; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 8.8e-251], t$95$0, If[LessEqual[x, 1.35e-209], N[(x * N[(0.083333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0], t$95$0, N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{if}\;x \leq 8.8 \cdot 10^{-251}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{0.083333333333333}{{x}^{2}}\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 8.8e-251 or 1.34999999999999999e-209 < x < 1Initial program 99.6%
Taylor expanded in x around inf 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
log-rec98.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around 0 56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in x around 0 56.2%
if 8.8e-251 < x < 1.34999999999999999e-209Initial program 99.9%
Taylor expanded in z around 0 15.7%
Taylor expanded in x around inf 15.7%
sub-neg89.7%
mul-1-neg89.7%
log-rec89.7%
remove-double-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified15.7%
Taylor expanded in x around inf 57.9%
associate--l+57.9%
mul-1-neg57.9%
log-rec57.9%
remove-double-neg57.9%
sub-neg57.9%
associate-*r/57.9%
metadata-eval57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in x around 0 57.9%
if 1 < x Initial program 87.6%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 75.2%
sub-neg98.6%
mul-1-neg98.6%
log-rec98.6%
remove-double-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified75.2%
Final simplification65.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.91893853320467
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))))
(if (<= x 6.8e-251)
t_0
(if (<= x 8.5e-210)
(* x (/ 0.083333333333333 (pow x 2.0)))
(if (<= x 1.0) t_0 (* x (- -1.0 (log (/ 1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 6.8e-251) {
tmp = t_0;
} else if (x <= 8.5e-210) {
tmp = x * (0.083333333333333 / pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = x * (-1.0 - log((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 = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
if (x <= 6.8d-251) then
tmp = t_0
else if (x <= 8.5d-210) then
tmp = x * (0.083333333333333d0 / (x ** 2.0d0))
else if (x <= 1.0d0) then
tmp = t_0
else
tmp = x * ((-1.0d0) - log((1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 6.8e-251) {
tmp = t_0;
} else if (x <= 8.5e-210) {
tmp = x * (0.083333333333333 / Math.pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = x * (-1.0 - Math.log((1.0 / x)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) tmp = 0 if x <= 6.8e-251: tmp = t_0 elif x <= 8.5e-210: tmp = x * (0.083333333333333 / math.pow(x, 2.0)) elif x <= 1.0: tmp = t_0 else: tmp = x * (-1.0 - math.log((1.0 / x))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) tmp = 0.0 if (x <= 6.8e-251) tmp = t_0; elseif (x <= 8.5e-210) tmp = Float64(x * Float64(0.083333333333333 / (x ^ 2.0))); elseif (x <= 1.0) tmp = t_0; else tmp = Float64(x * Float64(-1.0 - log(Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); tmp = 0.0; if (x <= 6.8e-251) tmp = t_0; elseif (x <= 8.5e-210) tmp = x * (0.083333333333333 / (x ^ 2.0)); elseif (x <= 1.0) tmp = t_0; else tmp = x * (-1.0 - log((1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 6.8e-251], t$95$0, If[LessEqual[x, 8.5e-210], N[(x * N[(0.083333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0], t$95$0, N[(x * N[(-1.0 - N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{if}\;x \leq 6.8 \cdot 10^{-251}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-210}:\\
\;\;\;\;x \cdot \frac{0.083333333333333}{{x}^{2}}\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\
\end{array}
\end{array}
if x < 6.80000000000000034e-251 or 8.4999999999999997e-210 < x < 1Initial program 99.6%
Taylor expanded in x around inf 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
log-rec98.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around 0 56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in x around 0 56.2%
if 6.80000000000000034e-251 < x < 8.4999999999999997e-210Initial program 99.9%
Taylor expanded in z around 0 15.7%
Taylor expanded in x around inf 15.7%
sub-neg89.7%
mul-1-neg89.7%
log-rec89.7%
remove-double-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified15.7%
Taylor expanded in x around inf 57.9%
associate--l+57.9%
mul-1-neg57.9%
log-rec57.9%
remove-double-neg57.9%
sub-neg57.9%
associate-*r/57.9%
metadata-eval57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in x around 0 57.9%
if 1 < x Initial program 87.6%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 75.2%
sub-neg98.6%
mul-1-neg98.6%
log-rec98.6%
remove-double-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified75.2%
Taylor expanded in x around inf 75.2%
associate--l+75.2%
mul-1-neg75.2%
log-rec75.2%
remove-double-neg75.2%
sub-neg75.2%
associate-*r/75.2%
metadata-eval75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in x around inf 75.2%
Final simplification65.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.91893853320467
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))))
(if (<= x 8.8e-251)
t_0
(if (<= x 2.1e-209)
(* x (/ 0.083333333333333 (pow x 2.0)))
(if (<= x 1.0) t_0 (* x (+ (log x) -1.0)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 8.8e-251) {
tmp = t_0;
} else if (x <= 2.1e-209) {
tmp = x * (0.083333333333333 / pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
if (x <= 8.8d-251) then
tmp = t_0
else if (x <= 2.1d-209) then
tmp = x * (0.083333333333333d0 / (x ** 2.0d0))
else if (x <= 1.0d0) then
tmp = t_0
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
double tmp;
if (x <= 8.8e-251) {
tmp = t_0;
} else if (x <= 2.1e-209) {
tmp = x * (0.083333333333333 / Math.pow(x, 2.0));
} else if (x <= 1.0) {
tmp = t_0;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) tmp = 0 if x <= 8.8e-251: tmp = t_0 elif x <= 2.1e-209: tmp = x * (0.083333333333333 / math.pow(x, 2.0)) elif x <= 1.0: tmp = t_0 else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) tmp = 0.0 if (x <= 8.8e-251) tmp = t_0; elseif (x <= 2.1e-209) tmp = Float64(x * Float64(0.083333333333333 / (x ^ 2.0))); elseif (x <= 1.0) tmp = t_0; else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); tmp = 0.0; if (x <= 8.8e-251) tmp = t_0; elseif (x <= 2.1e-209) tmp = x * (0.083333333333333 / (x ^ 2.0)); elseif (x <= 1.0) tmp = t_0; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 8.8e-251], t$95$0, If[LessEqual[x, 2.1e-209], N[(x * N[(0.083333333333333 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.0], t$95$0, N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{if}\;x \leq 8.8 \cdot 10^{-251}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{0.083333333333333}{{x}^{2}}\\
\mathbf{elif}\;x \leq 1:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 8.8e-251 or 2.09999999999999996e-209 < x < 1Initial program 99.6%
Taylor expanded in x around inf 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
log-rec98.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around 0 56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in x around 0 56.2%
if 8.8e-251 < x < 2.09999999999999996e-209Initial program 99.9%
Taylor expanded in z around 0 15.7%
Taylor expanded in x around inf 15.7%
sub-neg89.7%
mul-1-neg89.7%
log-rec89.7%
remove-double-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified15.7%
Taylor expanded in x around inf 57.9%
associate--l+57.9%
mul-1-neg57.9%
log-rec57.9%
remove-double-neg57.9%
sub-neg57.9%
associate-*r/57.9%
metadata-eval57.9%
metadata-eval57.9%
Simplified57.9%
Taylor expanded in x around 0 57.9%
if 1 < x Initial program 87.6%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 75.2%
sub-neg98.6%
mul-1-neg98.6%
log-rec98.6%
remove-double-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified75.2%
Taylor expanded in x around inf 75.2%
associate--l+75.2%
mul-1-neg75.2%
log-rec75.2%
remove-double-neg75.2%
sub-neg75.2%
associate-*r/75.2%
metadata-eval75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in x around inf 75.2%
sub-neg75.2%
mul-1-neg75.2%
log-rec75.2%
remove-double-neg75.2%
metadata-eval75.2%
+-commutative75.2%
Simplified75.2%
Final simplification65.0%
(FPCore (x y z)
:precision binary64
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 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 * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 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 * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 94.1%
Taylor expanded in x around inf 93.4%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified93.4%
Final simplification93.4%
(FPCore (x y z)
:precision binary64
(if (<= z -13.0)
(+ (+ 0.91893853320467 (- (* x (log x)) x)) (* -0.0027777777777778 (/ z x)))
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -13.0) {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / x));
} else {
tmp = ((log(x) * (x + -0.5)) - (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 (z <= (-13.0d0)) then
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + ((-0.0027777777777778d0) * (z / x))
else
tmp = ((log(x) * (x + (-0.5d0))) - (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 (z <= -13.0) {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (-0.0027777777777778 * (z / x));
} else {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -13.0: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (-0.0027777777777778 * (z / x)) else: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -13.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(-0.0027777777777778 * Float64(z / x))); else tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -13.0) tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / x)); else tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -13.0], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -13Initial program 87.3%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
distribute-rgt-neg-in87.3%
log-rec87.3%
remove-double-neg87.3%
Simplified87.3%
Taylor expanded in z around 0 40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in z around inf 41.6%
if -13 < z Initial program 96.9%
Taylor expanded in z around 0 72.3%
associate-+l-97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
metadata-eval97.0%
Applied egg-rr72.3%
Final simplification63.4%
(FPCore (x y z)
:precision binary64
(if (<= z -13.0)
(+ (+ 0.91893853320467 (- (* x (log x)) x)) (* -0.0027777777777778 (/ z x)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -13.0) {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / 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 (z <= (-13.0d0)) then
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + ((-0.0027777777777778d0) * (z / 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 (z <= -13.0) {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (-0.0027777777777778 * (z / 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 z <= -13.0: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (-0.0027777777777778 * (z / 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 (z <= -13.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(-0.0027777777777778 * Float64(z / 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 (z <= -13.0) tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / 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[z, -13.0], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $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}\;z \leq -13:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + -0.0027777777777778 \cdot \frac{z}{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 z < -13Initial program 87.3%
Taylor expanded in x around inf 87.3%
mul-1-neg87.3%
distribute-rgt-neg-in87.3%
log-rec87.3%
remove-double-neg87.3%
Simplified87.3%
Taylor expanded in z around 0 40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in z around inf 41.6%
if -13 < z Initial program 96.9%
Taylor expanded in z around 0 72.3%
Final simplification63.4%
(FPCore (x y z) :precision binary64 (if (<= z -3.6e+96) (+ (+ 0.91893853320467 (- (* x (log x)) x)) (* -0.0027777777777778 (/ z x))) (+ (/ 0.083333333333333 x) (* x (- -1.0 (log (/ 1.0 x)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.6e+96) {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / x));
} else {
tmp = (0.083333333333333 / x) + (x * (-1.0 - log((1.0 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-3.6d+96)) then
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + ((-0.0027777777777778d0) * (z / x))
else
tmp = (0.083333333333333d0 / x) + (x * ((-1.0d0) - log((1.0d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.6e+96) {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (-0.0027777777777778 * (z / x));
} else {
tmp = (0.083333333333333 / x) + (x * (-1.0 - Math.log((1.0 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.6e+96: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (-0.0027777777777778 * (z / x)) else: tmp = (0.083333333333333 / x) + (x * (-1.0 - math.log((1.0 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.6e+96) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(-0.0027777777777778 * Float64(z / x))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(-1.0 - log(Float64(1.0 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.6e+96) tmp = (0.91893853320467 + ((x * log(x)) - x)) + (-0.0027777777777778 * (z / x)); else tmp = (0.083333333333333 / x) + (x * (-1.0 - log((1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.6e+96], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(-1.0 - N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+96}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\
\end{array}
\end{array}
if z < -3.60000000000000013e96Initial program 85.9%
Taylor expanded in x around inf 85.9%
mul-1-neg85.9%
distribute-rgt-neg-in85.9%
log-rec85.9%
remove-double-neg85.9%
Simplified85.9%
Taylor expanded in z around 0 39.3%
*-commutative39.3%
Simplified39.3%
Taylor expanded in z around inf 40.8%
if -3.60000000000000013e96 < z Initial program 96.3%
Taylor expanded in z around 0 69.1%
Taylor expanded in x around inf 68.7%
Final simplification63.1%
(FPCore (x y z) :precision binary64 (if (<= z -1.1e+123) (+ 0.91893853320467 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)) (+ (/ 0.083333333333333 x) (* x (- -1.0 (log (/ 1.0 x)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+123) {
tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = (0.083333333333333 / x) + (x * (-1.0 - log((1.0 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.1d+123)) then
tmp = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
else
tmp = (0.083333333333333d0 / x) + (x * ((-1.0d0) - log((1.0d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+123) {
tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = (0.083333333333333 / x) + (x * (-1.0 - Math.log((1.0 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1e+123: tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = (0.083333333333333 / x) + (x * (-1.0 - math.log((1.0 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1e+123) tmp = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(-1.0 - log(Float64(1.0 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1e+123) tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = (0.083333333333333 / x) + (x * (-1.0 - log((1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1e+123], N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(-1.0 - N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+123}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\
\end{array}
\end{array}
if z < -1.09999999999999996e123Initial program 85.8%
Taylor expanded in x around inf 85.8%
mul-1-neg85.8%
distribute-rgt-neg-in85.8%
log-rec85.8%
remove-double-neg85.8%
Simplified85.8%
Taylor expanded in z around 0 40.4%
*-commutative40.4%
Simplified40.4%
Taylor expanded in x around 0 37.7%
if -1.09999999999999996e123 < z Initial program 95.9%
Taylor expanded in z around 0 67.9%
Taylor expanded in x around inf 67.5%
Final simplification62.2%
(FPCore (x y z) :precision binary64 (+ (+ 0.91893853320467 (- (* x (log x)) x)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
return (0.91893853320467 + ((x * log(x)) - x)) + ((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 = (0.91893853320467d0 + ((x * log(x)) - x)) + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((x * Math.log(x)) - x)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
def code(x, y, z): return (0.91893853320467 + ((x * math.log(x)) - x)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((x * log(x)) - x)) + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 94.1%
Taylor expanded in x around inf 93.3%
mul-1-neg93.3%
distribute-rgt-neg-in93.3%
log-rec93.3%
remove-double-neg93.3%
Simplified93.3%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
Final simplification63.2%
(FPCore (x y z) :precision binary64 (if (<= x 1.0) (+ 0.91893853320467 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.0) {
tmp = 0.91893853320467 + ((0.083333333333333 + (z * -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 <= 1.0d0) then
tmp = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-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 <= 1.0) {
tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.0: tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.0) tmp = Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -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 <= 1.0) tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.0], N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1Initial program 99.7%
Taylor expanded in x around inf 99.1%
mul-1-neg99.1%
distribute-rgt-neg-in99.1%
log-rec99.1%
remove-double-neg99.1%
Simplified99.1%
Taylor expanded in z around 0 53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in x around 0 53.3%
if 1 < x Initial program 87.6%
Taylor expanded in z around 0 76.0%
Taylor expanded in x around inf 75.2%
sub-neg98.6%
mul-1-neg98.6%
log-rec98.6%
remove-double-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified75.2%
Taylor expanded in x around inf 75.2%
associate--l+75.2%
mul-1-neg75.2%
log-rec75.2%
remove-double-neg75.2%
sub-neg75.2%
associate-*r/75.2%
metadata-eval75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in x around inf 75.2%
sub-neg75.2%
mul-1-neg75.2%
log-rec75.2%
remove-double-neg75.2%
metadata-eval75.2%
+-commutative75.2%
Simplified75.2%
Final simplification63.3%
(FPCore (x y z) :precision binary64 (+ 0.91893853320467 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
return 0.91893853320467 + ((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 = 0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
end function
public static double code(double x, double y, double z) {
return 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
def code(x, y, z): return 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x)
function code(x, y, z) return Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)) end
function tmp = code(x, y, z) tmp = 0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); end
code[x_, y_, z_] := N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 94.1%
Taylor expanded in x around inf 93.3%
mul-1-neg93.3%
distribute-rgt-neg-in93.3%
log-rec93.3%
remove-double-neg93.3%
Simplified93.3%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in x around 0 30.9%
Final simplification30.9%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 94.1%
Taylor expanded in z around 0 57.0%
Taylor expanded in x around inf 56.7%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified56.3%
Taylor expanded in x around 0 23.4%
div-inv56.3%
*-commutative56.3%
Applied egg-rr23.4%
Final simplification23.4%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 94.1%
Taylor expanded in z around 0 57.0%
Taylor expanded in x around inf 56.7%
sub-neg96.7%
mul-1-neg96.7%
log-rec96.7%
remove-double-neg96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified56.3%
Taylor expanded in x around 0 23.4%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2024103
(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)))