
(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 20 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 20000000.0)
(+
(fma (+ x -0.5) (log x) (- 0.91893853320467 x))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ z (/ (/ x (+ y 0.0007936500793651)) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 20000000.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 + -0.5) * log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 20000000.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(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 20000000.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[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 20000000:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\
\end{array}
\end{array}
if x < 2e7Initial program 99.7%
remove-double-neg99.7%
sub-neg99.7%
associate-+l+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
remove-double-neg99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 2e7 < x Initial program 89.3%
associate-+l-89.3%
sub-neg89.3%
metadata-eval89.3%
sub-neg89.3%
metadata-eval89.3%
Applied egg-rr89.3%
*-commutative89.3%
fma-udef89.3%
fma-neg89.3%
metadata-eval89.3%
div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in z around inf 88.6%
associate-/l*90.8%
unpow290.8%
associate-/l*99.5%
+-commutative99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 980000.0)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ z (/ (/ x (+ y 0.0007936500793651)) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 980000.0) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 980000.0d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (z / ((x / (y + 0.0007936500793651d0)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 980000.0) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 980000.0: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 980000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 980000.0) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 980000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 980000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\
\end{array}
\end{array}
if x < 9.8e5Initial program 99.7%
if 9.8e5 < x Initial program 89.5%
associate-+l-89.5%
sub-neg89.5%
metadata-eval89.5%
sub-neg89.5%
metadata-eval89.5%
Applied egg-rr89.5%
*-commutative89.5%
fma-udef89.5%
fma-neg89.5%
metadata-eval89.5%
div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in z around inf 88.7%
associate-/l*90.9%
unpow290.9%
associate-/l*99.5%
+-commutative99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))))
(if (<= x 1000000.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ t_0 (/ z (/ (/ x (+ y 0.0007936500793651)) z))))))
double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467);
double tmp;
if (x <= 1000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))
if (x <= 1000000.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (z / ((x / (y + 0.0007936500793651d0)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * Math.log(x)) - (x + -0.91893853320467);
double tmp;
if (x <= 1000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
def code(x, y, z): t_0 = ((x + -0.5) * math.log(x)) - (x + -0.91893853320467) tmp = 0 if x <= 1000000.0: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + (z / ((x / (y + 0.0007936500793651)) / z)) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) tmp = 0.0 if (x <= 1000000.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(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467); tmp = 0.0; if (x <= 1000000.0) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + (z / ((x / (y + 0.0007936500793651)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1000000.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[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\\
\mathbf{if}\;x \leq 1000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\
\end{array}
\end{array}
if x < 1e6Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
metadata-eval99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1e6 < x Initial program 89.5%
associate-+l-89.5%
sub-neg89.5%
metadata-eval89.5%
sub-neg89.5%
metadata-eval89.5%
Applied egg-rr89.5%
*-commutative89.5%
fma-udef89.5%
fma-neg89.5%
metadata-eval89.5%
div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in z around inf 88.7%
associate-/l*90.9%
unpow290.9%
associate-/l*99.5%
+-commutative99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= y -0.0008) (not (<= y 4.8e+17)))
(+ t_0 (/ (+ 0.083333333333333 (* z (* z y))) x))
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 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 <= 4.8e+17)) {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((y <= (-0.0008d0)) .or. (.not. (y <= 4.8d+17))) then
tmp = t_0 + ((0.083333333333333d0 + (z * (z * y))) / x)
else
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 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 <= 4.8e+17)) {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x);
} else {
tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 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 <= 4.8e+17): tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x) else: tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 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 <= 4.8e+17)) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(z * y))) / x)); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 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 <= 4.8e+17))) tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x); else tmp = t_0 + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 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, 4.8e+17]], $MachinePrecision]], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $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 4.8 \cdot 10^{+17}\right):\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 4.8e17 < y Initial program 96.7%
Taylor expanded in x around inf 96.3%
*-commutative48.0%
sub-neg48.0%
mul-1-neg48.0%
log-rec48.0%
remove-double-neg48.0%
metadata-eval48.0%
Simplified96.3%
Taylor expanded in y around inf 96.3%
*-commutative96.3%
unpow296.3%
associate-*l*96.3%
Simplified96.3%
if -8.00000000000000038e-4 < y < 4.8e17Initial program 92.6%
Taylor expanded in x around inf 91.1%
*-commutative65.0%
sub-neg65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
metadata-eval65.0%
Simplified91.1%
Taylor expanded in y around 0 91.8%
Final simplification94.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 7e+84)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
t_0)
(+ t_0 (/ y (/ (/ x z) z))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 7e+84) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0;
} else {
tmp = t_0 + (y / ((x / z) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 7d+84) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + t_0
else
tmp = t_0 + (y / ((x / z) / z))
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 <= 7e+84) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0;
} else {
tmp = t_0 + (y / ((x / z) / z));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 7e+84: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0 else: tmp = t_0 + (y / ((x / z) / z)) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 7e+84) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0); else tmp = Float64(t_0 + Float64(y / Float64(Float64(x / z) / z))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 7e+84) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + t_0; else tmp = t_0 + (y / ((x / z) / z)); 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, 7e+84], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 7 \cdot 10^{+84}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\end{array}
\end{array}
if x < 6.9999999999999998e84Initial program 98.5%
Taylor expanded in x around inf 96.9%
*-commutative45.8%
sub-neg45.8%
mul-1-neg45.8%
log-rec45.8%
remove-double-neg45.8%
metadata-eval45.8%
Simplified96.9%
if 6.9999999999999998e84 < x Initial program 88.3%
Taylor expanded in x around inf 88.4%
*-commutative74.1%
sub-neg74.1%
mul-1-neg74.1%
log-rec74.1%
remove-double-neg74.1%
metadata-eval74.1%
Simplified88.4%
Taylor expanded in y around inf 86.6%
associate-/l*89.5%
unpow289.5%
associate-/r*95.7%
Simplified95.7%
Final simplification96.5%
(FPCore (x y z)
:precision binary64
(if (<= x 2.8e-14)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ z (/ (/ x (+ y 0.0007936500793651)) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.8e-14) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.8d-14) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (z / ((x / (y + 0.0007936500793651d0)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.8e-14) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.8e-14: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.8e-14) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.8e-14) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (z / ((x / (y + 0.0007936500793651)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.8e-14], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\
\end{array}
\end{array}
if x < 2.8000000000000001e-14Initial program 99.7%
Taylor expanded in x around inf 99.5%
*-commutative47.9%
sub-neg47.9%
mul-1-neg47.9%
log-rec47.9%
remove-double-neg47.9%
metadata-eval47.9%
Simplified99.5%
if 2.8000000000000001e-14 < x Initial program 90.1%
associate-+l-90.1%
sub-neg90.1%
metadata-eval90.1%
sub-neg90.1%
metadata-eval90.1%
Applied egg-rr90.1%
*-commutative90.1%
fma-udef90.1%
fma-neg90.1%
metadata-eval90.1%
div-inv90.1%
Applied egg-rr90.1%
Taylor expanded in z around inf 88.5%
associate-/l*90.5%
unpow290.5%
associate-/l*98.6%
+-commutative98.6%
Simplified98.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= z -4.4e-10) (not (<= z 4.4e-17)))
(+ (* x (+ (log x) -1.0)) (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.4e-10) || !(z <= 4.4e-17)) {
tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / (y + 0.0007936500793651)));
} 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 <= (-4.4d-10)) .or. (.not. (z <= 4.4d-17))) then
tmp = (x * (log(x) + (-1.0d0))) + ((z * z) / (x / (y + 0.0007936500793651d0)))
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 <= -4.4e-10) || !(z <= 4.4e-17)) {
tmp = (x * (Math.log(x) + -1.0)) + ((z * z) / (x / (y + 0.0007936500793651)));
} 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 <= -4.4e-10) or not (z <= 4.4e-17): tmp = (x * (math.log(x) + -1.0)) + ((z * z) / (x / (y + 0.0007936500793651))) 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 <= -4.4e-10) || !(z <= 4.4e-17)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.4e-10) || ~((z <= 4.4e-17))) tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.4e-10], N[Not[LessEqual[z, 4.4e-17]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.3999999999999998e-10 or 4.4e-17 < z Initial program 90.2%
Taylor expanded in z around inf 89.0%
associate-/l*91.1%
unpow291.1%
Simplified91.1%
Taylor expanded in x around inf 91.1%
*-commutative26.2%
sub-neg26.2%
mul-1-neg26.2%
log-rec26.2%
remove-double-neg26.2%
metadata-eval26.2%
Simplified91.1%
if -4.3999999999999998e-10 < z < 4.4e-17Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 92.1%
Final simplification91.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -245000.0) (not (<= z 1.55e-11)))
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+ t_0 (/ (+ 0.083333333333333 (* z (* z y))) x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -245000.0) || !(z <= 1.55e-11)) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / 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 ((z <= (-245000.0d0)) .or. (.not. (z <= 1.55d-11))) then
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
else
tmp = t_0 + ((0.083333333333333d0 + (z * (z * y))) / 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 ((z <= -245000.0) || !(z <= 1.55e-11)) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -245000.0) or not (z <= 1.55e-11): tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) else: tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -245000.0) || !(z <= 1.55e-11)) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(z * y))) / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -245000.0) || ~((z <= 1.55e-11))) tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / 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[z, -245000.0], N[Not[LessEqual[z, 1.55e-11]], $MachinePrecision]], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -245000 \lor \neg \left(z \leq 1.55 \cdot 10^{-11}\right):\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x}\\
\end{array}
\end{array}
if z < -245000 or 1.55000000000000014e-11 < z Initial program 90.1%
Taylor expanded in z around inf 88.9%
associate-/l*91.0%
unpow291.0%
Simplified91.0%
Taylor expanded in x around inf 91.0%
*-commutative26.5%
sub-neg26.5%
mul-1-neg26.5%
log-rec26.5%
remove-double-neg26.5%
metadata-eval26.5%
Simplified91.0%
if -245000 < z < 1.55000000000000014e-11Initial program 99.4%
Taylor expanded in x around inf 97.4%
*-commutative88.7%
sub-neg88.7%
mul-1-neg88.7%
log-rec88.7%
remove-double-neg88.7%
metadata-eval88.7%
Simplified97.4%
Taylor expanded in y around inf 97.1%
*-commutative97.1%
unpow297.1%
associate-*l*97.1%
Simplified97.1%
Final simplification94.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -245000.0)
(+ t_0 (/ (* z z) (* x (/ 1.0 (+ y 0.0007936500793651)))))
(if (<= z 1.55e-11)
(+ t_0 (/ (+ 0.083333333333333 (* z (* z y))) x))
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -245000.0) {
tmp = t_0 + ((z * z) / (x * (1.0 / (y + 0.0007936500793651))));
} else if (z <= 1.55e-11) {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x);
} else {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (z <= (-245000.0d0)) then
tmp = t_0 + ((z * z) / (x * (1.0d0 / (y + 0.0007936500793651d0))))
else if (z <= 1.55d-11) then
tmp = t_0 + ((0.083333333333333d0 + (z * (z * y))) / x)
else
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
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 (z <= -245000.0) {
tmp = t_0 + ((z * z) / (x * (1.0 / (y + 0.0007936500793651))));
} else if (z <= 1.55e-11) {
tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x);
} else {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -245000.0: tmp = t_0 + ((z * z) / (x * (1.0 / (y + 0.0007936500793651)))) elif z <= 1.55e-11: tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x) else: tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -245000.0) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x * Float64(1.0 / Float64(y + 0.0007936500793651))))); elseif (z <= 1.55e-11) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(z * y))) / x)); else tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -245000.0) tmp = t_0 + ((z * z) / (x * (1.0 / (y + 0.0007936500793651)))); elseif (z <= 1.55e-11) tmp = t_0 + ((0.083333333333333 + (z * (z * y))) / x); else tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); 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[z, -245000.0], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x * N[(1.0 / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-11], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -245000:\\
\;\;\;\;t_0 + \frac{z \cdot z}{x \cdot \frac{1}{y + 0.0007936500793651}}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-11}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\end{array}
\end{array}
if z < -245000Initial program 86.7%
Taylor expanded in z around inf 85.6%
associate-/l*88.5%
unpow288.5%
Simplified88.5%
Taylor expanded in x around inf 88.5%
*-commutative26.3%
sub-neg26.3%
mul-1-neg26.3%
log-rec26.3%
remove-double-neg26.3%
metadata-eval26.3%
Simplified88.5%
clear-num88.5%
associate-/r/88.5%
+-commutative88.5%
Applied egg-rr88.5%
if -245000 < z < 1.55000000000000014e-11Initial program 99.4%
Taylor expanded in x around inf 97.4%
*-commutative88.7%
sub-neg88.7%
mul-1-neg88.7%
log-rec88.7%
remove-double-neg88.7%
metadata-eval88.7%
Simplified97.4%
Taylor expanded in y around inf 97.1%
*-commutative97.1%
unpow297.1%
associate-*l*97.1%
Simplified97.1%
if 1.55000000000000014e-11 < z Initial program 93.2%
Taylor expanded in z around inf 91.9%
associate-/l*93.2%
unpow293.2%
Simplified93.2%
Taylor expanded in x around inf 93.2%
*-commutative26.7%
sub-neg26.7%
mul-1-neg26.7%
log-rec26.7%
remove-double-neg26.7%
metadata-eval26.7%
Simplified93.2%
Final simplification94.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -245000.0) (not (<= z 1.3)))
(+ t_0 (* 0.0007936500793651 (/ (* z z) 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 ((z <= -245000.0) || !(z <= 1.3)) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / 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 ((z <= (-245000.0d0)) .or. (.not. (z <= 1.3d0))) then
tmp = t_0 + (0.0007936500793651d0 * ((z * z) / 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 ((z <= -245000.0) || !(z <= 1.3)) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / 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 (z <= -245000.0) or not (z <= 1.3): tmp = t_0 + (0.0007936500793651 * ((z * z) / 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 ((z <= -245000.0) || !(z <= 1.3)) tmp = Float64(t_0 + Float64(0.0007936500793651 * Float64(Float64(z * z) / 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 ((z <= -245000.0) || ~((z <= 1.3))) tmp = t_0 + (0.0007936500793651 * ((z * z) / 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[Or[LessEqual[z, -245000.0], N[Not[LessEqual[z, 1.3]], $MachinePrecision]], N[(t$95$0 + N[(0.0007936500793651 * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $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}\;z \leq -245000 \lor \neg \left(z \leq 1.3\right):\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -245000 or 1.30000000000000004 < z Initial program 89.9%
Taylor expanded in z around inf 88.6%
associate-/l*90.8%
unpow290.8%
Simplified90.8%
Taylor expanded in y around 0 67.9%
unpow267.9%
Simplified67.9%
Taylor expanded in x around inf 67.9%
*-commutative26.3%
sub-neg26.3%
mul-1-neg26.3%
log-rec26.3%
remove-double-neg26.3%
metadata-eval26.3%
Simplified67.9%
if -245000 < z < 1.30000000000000004Initial program 99.4%
Taylor expanded in z around 0 89.4%
Taylor expanded in x around inf 87.4%
*-commutative87.4%
sub-neg87.4%
mul-1-neg87.4%
log-rec87.4%
remove-double-neg87.4%
metadata-eval87.4%
Simplified87.4%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -5.4e-70) (not (<= z 1.35e-55)))
(+ t_0 (* y (/ (* z z) 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 ((z <= -5.4e-70) || !(z <= 1.35e-55)) {
tmp = t_0 + (y * ((z * z) / 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 ((z <= (-5.4d-70)) .or. (.not. (z <= 1.35d-55))) then
tmp = t_0 + (y * ((z * z) / 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 ((z <= -5.4e-70) || !(z <= 1.35e-55)) {
tmp = t_0 + (y * ((z * z) / 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 (z <= -5.4e-70) or not (z <= 1.35e-55): tmp = t_0 + (y * ((z * z) / 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 ((z <= -5.4e-70) || !(z <= 1.35e-55)) tmp = Float64(t_0 + Float64(y * Float64(Float64(z * z) / 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 ((z <= -5.4e-70) || ~((z <= 1.35e-55))) tmp = t_0 + (y * ((z * z) / 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[Or[LessEqual[z, -5.4e-70], N[Not[LessEqual[z, 1.35e-55]], $MachinePrecision]], N[(t$95$0 + N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $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}\;z \leq -5.4 \cdot 10^{-70} \lor \neg \left(z \leq 1.35 \cdot 10^{-55}\right):\\
\;\;\;\;t_0 + y \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -5.4000000000000003e-70 or 1.35000000000000002e-55 < z Initial program 91.7%
Taylor expanded in z around inf 86.6%
associate-/l*86.7%
unpow286.7%
Simplified86.7%
Taylor expanded in x around inf 86.7%
*-commutative32.7%
sub-neg32.7%
mul-1-neg32.7%
log-rec32.7%
remove-double-neg32.7%
metadata-eval32.7%
Simplified86.7%
Taylor expanded in y around inf 73.9%
associate-*r/76.9%
unpow276.9%
Simplified76.9%
if -5.4000000000000003e-70 < z < 1.35000000000000002e-55Initial program 99.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in x around inf 95.8%
*-commutative95.8%
sub-neg95.8%
mul-1-neg95.8%
log-rec95.8%
remove-double-neg95.8%
metadata-eval95.8%
Simplified95.8%
Final simplification84.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -1.65e-71) (not (<= z 1.45e-55)))
(+ t_0 (/ y (/ (/ x z) z)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -1.65e-71) || !(z <= 1.45e-55)) {
tmp = t_0 + (y / ((x / z) / z));
} 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 ((z <= (-1.65d-71)) .or. (.not. (z <= 1.45d-55))) then
tmp = t_0 + (y / ((x / z) / z))
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 ((z <= -1.65e-71) || !(z <= 1.45e-55)) {
tmp = t_0 + (y / ((x / z) / z));
} 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 (z <= -1.65e-71) or not (z <= 1.45e-55): tmp = t_0 + (y / ((x / z) / z)) 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 ((z <= -1.65e-71) || !(z <= 1.45e-55)) tmp = Float64(t_0 + Float64(y / Float64(Float64(x / z) / z))); 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 ((z <= -1.65e-71) || ~((z <= 1.45e-55))) tmp = t_0 + (y / ((x / z) / z)); 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[Or[LessEqual[z, -1.65e-71], N[Not[LessEqual[z, 1.45e-55]], $MachinePrecision]], N[(t$95$0 + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $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}\;z \leq -1.65 \cdot 10^{-71} \lor \neg \left(z \leq 1.45 \cdot 10^{-55}\right):\\
\;\;\;\;t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.6500000000000001e-71 or 1.45e-55 < z Initial program 91.7%
Taylor expanded in x around inf 91.7%
*-commutative32.7%
sub-neg32.7%
mul-1-neg32.7%
log-rec32.7%
remove-double-neg32.7%
metadata-eval32.7%
Simplified91.7%
Taylor expanded in y around inf 73.9%
associate-/l*76.8%
unpow276.8%
associate-/r*80.7%
Simplified80.7%
if -1.6500000000000001e-71 < z < 1.45e-55Initial program 99.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in x around inf 95.8%
*-commutative95.8%
sub-neg95.8%
mul-1-neg95.8%
log-rec95.8%
remove-double-neg95.8%
metadata-eval95.8%
Simplified95.8%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -1.65e-10) (not (<= z 9.2e-56)))
(+ t_0 (/ y (/ (/ x z) z)))
(+ t_0 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -1.65e-10) || !(z <= 9.2e-56)) {
tmp = t_0 + (y / ((x / z) / z));
} else {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((z <= (-1.65d-10)) .or. (.not. (z <= 9.2d-56))) then
tmp = t_0 + (y / ((x / z) / z))
else
tmp = t_0 + ((0.083333333333333d0 + (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 ((z <= -1.65e-10) || !(z <= 9.2e-56)) {
tmp = t_0 + (y / ((x / z) / z));
} else {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -1.65e-10) or not (z <= 9.2e-56): tmp = t_0 + (y / ((x / z) / z)) else: tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -1.65e-10) || !(z <= 9.2e-56)) tmp = Float64(t_0 + Float64(y / Float64(Float64(x / z) / z))); else tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(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 ((z <= -1.65e-10) || ~((z <= 9.2e-56))) tmp = t_0 + (y / ((x / z) / z)); else tmp = t_0 + ((0.083333333333333 + (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[z, -1.65e-10], N[Not[LessEqual[z, 9.2e-56]], $MachinePrecision]], N[(t$95$0 + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-10} \lor \neg \left(z \leq 9.2 \cdot 10^{-56}\right):\\
\;\;\;\;t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\end{array}
\end{array}
if z < -1.65e-10 or 9.20000000000000009e-56 < z Initial program 90.9%
Taylor expanded in x around inf 90.9%
*-commutative28.6%
sub-neg28.6%
mul-1-neg28.6%
log-rec28.6%
remove-double-neg28.6%
metadata-eval28.6%
Simplified90.9%
Taylor expanded in y around inf 74.0%
associate-/l*77.2%
unpow277.2%
associate-/r*81.5%
Simplified81.5%
if -1.65e-10 < z < 9.20000000000000009e-56Initial program 99.4%
Taylor expanded in x around inf 97.2%
*-commutative92.6%
sub-neg92.6%
mul-1-neg92.6%
log-rec92.6%
remove-double-neg92.6%
metadata-eval92.6%
Simplified97.2%
Taylor expanded in z around 0 92.9%
*-commutative92.9%
Simplified92.9%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -4.5e-70) (not (<= z 1e-55)))
(+ (* x (+ (log x) -1.0)) (/ y (/ (/ x z) z)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.5e-70) || !(z <= 1e-55)) {
tmp = (x * (log(x) + -1.0)) + (y / ((x / z) / z));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4.5d-70)) .or. (.not. (z <= 1d-55))) then
tmp = (x * (log(x) + (-1.0d0))) + (y / ((x / z) / z))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4.5e-70) || !(z <= 1e-55)) {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((x / z) / z));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.5e-70) or not (z <= 1e-55): tmp = (x * (math.log(x) + -1.0)) + (y / ((x / z) / z)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.5e-70) || !(z <= 1e-55)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(x / z) / z))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.5e-70) || ~((z <= 1e-55))) tmp = (x * (log(x) + -1.0)) + (y / ((x / z) / z)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.5e-70], N[Not[LessEqual[z, 1e-55]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-70} \lor \neg \left(z \leq 10^{-55}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.50000000000000022e-70 or 9.99999999999999995e-56 < z Initial program 91.7%
Taylor expanded in x around inf 91.7%
*-commutative32.7%
sub-neg32.7%
mul-1-neg32.7%
log-rec32.7%
remove-double-neg32.7%
metadata-eval32.7%
Simplified91.7%
Taylor expanded in y around inf 73.9%
associate-/l*76.8%
unpow276.8%
associate-/r*80.7%
Simplified80.7%
if -4.50000000000000022e-70 < z < 9.99999999999999995e-56Initial program 99.4%
Taylor expanded in z around 0 98.4%
Final simplification87.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.1e-70) (not (<= z 5.8e-56)))
(+ (* x (+ (log x) -1.0)) (/ y (/ (/ x z) z)))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.1e-70) || !(z <= 5.8e-56)) {
tmp = (x * (log(x) + -1.0)) + (y / ((x / z) / z));
} 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 <= (-5.1d-70)) .or. (.not. (z <= 5.8d-56))) then
tmp = (x * (log(x) + (-1.0d0))) + (y / ((x / z) / z))
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 <= -5.1e-70) || !(z <= 5.8e-56)) {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((x / z) / z));
} 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 <= -5.1e-70) or not (z <= 5.8e-56): tmp = (x * (math.log(x) + -1.0)) + (y / ((x / z) / z)) 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 <= -5.1e-70) || !(z <= 5.8e-56)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(x / z) / z))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.1e-70) || ~((z <= 5.8e-56))) tmp = (x * (log(x) + -1.0)) + (y / ((x / z) / z)); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.1e-70], N[Not[LessEqual[z, 5.8e-56]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-70} \lor \neg \left(z \leq 5.8 \cdot 10^{-56}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -5.10000000000000025e-70 or 5.79999999999999982e-56 < z Initial program 91.7%
Taylor expanded in x around inf 91.7%
*-commutative32.7%
sub-neg32.7%
mul-1-neg32.7%
log-rec32.7%
remove-double-neg32.7%
metadata-eval32.7%
Simplified91.7%
Taylor expanded in y around inf 73.9%
associate-/l*76.8%
unpow276.8%
associate-/r*80.7%
Simplified80.7%
if -5.10000000000000025e-70 < z < 5.79999999999999982e-56Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 98.4%
Final simplification87.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ 0.083333333333333 x))))
(if (or (<= z -1.2e+179) (not (<= z 1.26e+169)))
(/ (pow t_0 2.0) t_0)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x + (0.083333333333333 / x);
double tmp;
if ((z <= -1.2e+179) || !(z <= 1.26e+169)) {
tmp = pow(t_0, 2.0) / 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 = x + (0.083333333333333d0 / x)
if ((z <= (-1.2d+179)) .or. (.not. (z <= 1.26d+169))) then
tmp = (t_0 ** 2.0d0) / 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 = x + (0.083333333333333 / x);
double tmp;
if ((z <= -1.2e+179) || !(z <= 1.26e+169)) {
tmp = Math.pow(t_0, 2.0) / t_0;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x + (0.083333333333333 / x) tmp = 0 if (z <= -1.2e+179) or not (z <= 1.26e+169): tmp = math.pow(t_0, 2.0) / t_0 else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x + Float64(0.083333333333333 / x)) tmp = 0.0 if ((z <= -1.2e+179) || !(z <= 1.26e+169)) tmp = Float64((t_0 ^ 2.0) / 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 = x + (0.083333333333333 / x); tmp = 0.0; if ((z <= -1.2e+179) || ~((z <= 1.26e+169))) tmp = (t_0 ^ 2.0) / 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[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.2e+179], N[Not[LessEqual[z, 1.26e+169]], $MachinePrecision]], N[(N[Power[t$95$0, 2.0], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{0.083333333333333}{x}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+179} \lor \neg \left(z \leq 1.26 \cdot 10^{+169}\right):\\
\;\;\;\;\frac{{t_0}^{2}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.20000000000000006e179 or 1.2599999999999999e169 < z Initial program 87.8%
Taylor expanded in z around 0 9.5%
add-sqr-sqrt9.5%
pow29.5%
sub-neg9.5%
metadata-eval9.5%
Applied egg-rr9.5%
Taylor expanded in x around inf 2.6%
neg-mul-12.6%
Simplified2.6%
frac-2neg2.6%
div-inv2.6%
add-sqr-sqrt0.0%
sqrt-unprod6.1%
sqr-neg6.1%
sqrt-unprod1.5%
add-sqr-sqrt1.5%
cancel-sign-sub-inv1.5%
div-inv1.5%
flip--13.9%
Applied egg-rr29.2%
if -1.20000000000000006e179 < z < 1.2599999999999999e169Initial program 96.7%
Taylor expanded in z around 0 72.3%
Taylor expanded in x around inf 71.1%
*-commutative71.1%
sub-neg71.1%
mul-1-neg71.1%
log-rec71.1%
remove-double-neg71.1%
metadata-eval71.1%
Simplified71.1%
Final simplification61.2%
(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 94.6%
Taylor expanded in z around 0 57.6%
Taylor expanded in x around inf 56.6%
*-commutative56.6%
sub-neg56.6%
mul-1-neg56.6%
log-rec56.6%
remove-double-neg56.6%
metadata-eval56.6%
Simplified56.6%
Final simplification56.6%
(FPCore (x y z) :precision binary64 (+ x (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return x + (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.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return x + (0.083333333333333 / x);
}
def code(x, y, z): return x + (0.083333333333333 / x)
function code(x, y, z) return Float64(x + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = x + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.083333333333333}{x}
\end{array}
Initial program 94.6%
Taylor expanded in z around 0 57.6%
add-sqr-sqrt57.5%
pow257.5%
sub-neg57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in x around inf 23.2%
neg-mul-123.2%
Simplified23.2%
expm1-log1p-u20.9%
expm1-udef20.9%
add-sqr-sqrt0.0%
sqrt-unprod27.7%
sqr-neg27.7%
sqrt-unprod26.4%
add-sqr-sqrt26.4%
Applied egg-rr26.4%
expm1-def26.4%
expm1-log1p28.2%
Simplified28.2%
Final simplification28.2%
(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.6%
Taylor expanded in z around 0 57.6%
add-sqr-sqrt57.5%
pow257.5%
sub-neg57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in x around inf 23.2%
neg-mul-123.2%
Simplified23.2%
Taylor expanded in x around 0 24.2%
Final simplification24.2%
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
return -x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -x
end function
public static double code(double x, double y, double z) {
return -x;
}
def code(x, y, z): return -x
function code(x, y, z) return Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 94.6%
Taylor expanded in z around 0 57.6%
add-sqr-sqrt57.5%
pow257.5%
sub-neg57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in x around inf 23.2%
neg-mul-123.2%
Simplified23.2%
Taylor expanded in x around inf 1.2%
mul-1-neg1.2%
Simplified1.2%
Final simplification1.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 2023208
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))