
(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 5.3e+54)
(+
(+ (+ (* -0.5 (log x)) (* x (+ (log x) -1.0))) 0.91893853320467)
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.3e+54) {
tmp = (((-0.5 * log(x)) + (x * (log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.3d+54) then
tmp = ((((-0.5d0) * log(x)) + (x * (log(x) + (-1.0d0)))) + 0.91893853320467d0) + (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.3e+54) {
tmp = (((-0.5 * Math.log(x)) + (x * (Math.log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.3e+54: tmp = (((-0.5 * math.log(x)) + (x * (math.log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.3e+54) tmp = Float64(Float64(Float64(Float64(-0.5 * log(x)) + Float64(x * Float64(log(x) + -1.0))) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.3e+54) tmp = (((-0.5 * log(x)) + (x * (log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.3e+54], N[(N[(N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.3 \cdot 10^{+54}:\\
\;\;\;\;\left(\left(-0.5 \cdot \log x + x \cdot \left(\log x + -1\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\
\end{array}
\end{array}
if x < 5.30000000000000018e54Initial program 99.6%
Taylor expanded in x around 0 99.7%
if 5.30000000000000018e54 < x Initial program 83.0%
Taylor expanded in y around 0 73.5%
+-commutative73.5%
+-commutative73.5%
associate-+l+73.5%
associate-/l*73.6%
associate-/r/73.6%
fma-neg73.6%
metadata-eval73.6%
+-commutative73.6%
associate-/l*78.6%
unpow278.6%
associate-/r*90.5%
associate-*r/90.5%
metadata-eval90.5%
Simplified90.5%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
unpow288.0%
associate-*l*99.7%
associate-*r/99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= x 3e+22)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
t_0)
(+ t_0 (* z (* z (+ (/ y x) (/ 0.0007936500793651 x))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 3e+22) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 3d+22) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + t_0
else
tmp = t_0 + (z * (z * ((y / x) + (0.0007936500793651d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 3e+22) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0;
} else {
tmp = t_0 + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 3e+22: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0 else: tmp = t_0 + (z * (z * ((y / x) + (0.0007936500793651 / x)))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (x <= 3e+22) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (x <= 3e+22) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + t_0; else tmp = t_0 + (z * (z * ((y / x) + (0.0007936500793651 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3e+22], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + t$95$0), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;x \leq 3 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\
\end{array}
\end{array}
if x < 3e22Initial program 99.7%
if 3e22 < x Initial program 84.7%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
+-commutative74.6%
associate-+l+74.6%
associate-/l*74.7%
associate-/r/74.7%
fma-neg74.7%
metadata-eval74.7%
+-commutative74.7%
associate-/l*79.2%
unpow279.2%
associate-/r*89.8%
associate-*r/89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in z around inf 89.2%
*-commutative89.2%
unpow289.2%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+21)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+21) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5d+21) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+21) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+21: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+21) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+21) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+21], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\
\end{array}
\end{array}
if x < 5e21Initial program 99.7%
associate-+l-50.8%
sub-neg50.8%
metadata-eval50.8%
sub-neg50.8%
metadata-eval50.8%
Applied egg-rr99.7%
if 5e21 < x Initial program 84.7%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
+-commutative74.6%
associate-+l+74.6%
associate-/l*74.7%
associate-/r/74.7%
fma-neg74.7%
metadata-eval74.7%
+-commutative74.7%
associate-/l*79.2%
unpow279.2%
associate-/r*89.8%
associate-*r/89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in z around inf 89.2%
*-commutative89.2%
unpow289.2%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= x 33000000.0)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(+ (* -0.5 (log x)) 0.91893853320467))
(if (<= x 3.8e+223)
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+ t_0 (* z (/ y (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 33000000.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
} else if (x <= 3.8e+223) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + (z * (y / (x / 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 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 33000000.0d0) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((-0.5d0) * log(x)) + 0.91893853320467d0)
else if (x <= 3.8d+223) then
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
else
tmp = t_0 + (z * (y / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 33000000.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * Math.log(x)) + 0.91893853320467);
} else if (x <= 3.8e+223) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = t_0 + (z * (y / (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 33000000.0: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * math.log(x)) + 0.91893853320467) elif x <= 3.8e+223: tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) else: tmp = t_0 + (z * (y / (x / z))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (x <= 33000000.0) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(-0.5 * log(x)) + 0.91893853320467)); elseif (x <= 3.8e+223) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(t_0 + Float64(z * Float64(y / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (x <= 33000000.0) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467); elseif (x <= 3.8e+223) tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = t_0 + (z * (y / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 33000000.0], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+223], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;x \leq 33000000:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+223}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \frac{y}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 3.3e7Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.2%
if 3.3e7 < x < 3.8e223Initial program 88.8%
Taylor expanded in z around inf 88.8%
associate-/l*30.6%
unpow230.6%
Simplified92.5%
if 3.8e223 < x Initial program 73.5%
Taylor expanded in y around 0 73.2%
+-commutative73.2%
+-commutative73.2%
associate-+l+73.2%
associate-/l*73.5%
associate-/r/73.5%
fma-neg73.5%
metadata-eval73.5%
+-commutative73.5%
associate-/l*79.9%
unpow279.9%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 73.5%
associate-*l/79.2%
unpow279.2%
associate-*r*98.9%
*-commutative98.9%
associate-*r*98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in z around 0 95.6%
associate-/l*98.9%
Simplified98.9%
Final simplification96.5%
(FPCore (x y z)
:precision binary64
(if (<= x 0.075)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(+ (* -0.5 (log x)) 0.91893853320467))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.075) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.075d0) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((-0.5d0) * log(x)) + 0.91893853320467d0)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.075) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * Math.log(x)) + 0.91893853320467);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.075: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * math.log(x)) + 0.91893853320467) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.075) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(-0.5 * log(x)) + 0.91893853320467)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.075) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.075], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.075:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.0749999999999999972Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.2%
if 0.0749999999999999972 < x Initial program 86.2%
Taylor expanded in y around 0 75.7%
+-commutative75.7%
+-commutative75.7%
associate-+l+75.7%
associate-/l*75.8%
associate-/r/75.8%
fma-neg75.8%
metadata-eval75.8%
+-commutative75.8%
associate-/l*79.8%
unpow279.8%
associate-/r*89.3%
associate-*r/89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around inf 90.2%
*-commutative90.2%
unpow290.2%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* -0.5 (log x)) 0.91893853320467)))
(if (<= x 6.2e-50)
(+ t_0 (/ (+ 0.083333333333333 (* z (* y z))) x))
(if (<= x 33000000.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (-0.5 * log(x)) + 0.91893853320467;
double tmp;
if (x <= 6.2e-50) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (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 = ((-0.5d0) * log(x)) + 0.91893853320467d0
if (x <= 6.2d-50) then
tmp = t_0 + ((0.083333333333333d0 + (z * (y * z))) / x)
else if (x <= 33000000.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-0.5 * Math.log(x)) + 0.91893853320467;
double tmp;
if (x <= 6.2e-50) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (-0.5 * math.log(x)) + 0.91893853320467 tmp = 0 if x <= 6.2e-50: tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x) elif x <= 33000000.0: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(-0.5 * log(x)) + 0.91893853320467) tmp = 0.0 if (x <= 6.2e-50) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(y * z))) / x)); elseif (x <= 33000000.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-0.5 * log(x)) + 0.91893853320467; tmp = 0.0; if (x <= 6.2e-50) tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x); elseif (x <= 33000000.0) tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 6.2e-50], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 33000000.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \log x + 0.91893853320467\\
\mathbf{if}\;x \leq 6.2 \cdot 10^{-50}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 6.2000000000000004e-50Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 90.0%
*-commutative90.0%
unpow290.0%
associate-*l*88.2%
Simplified88.2%
if 6.2000000000000004e-50 < x < 3.3e7Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 97.5%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
Simplified83.1%
if 3.3e7 < x Initial program 85.5%
Taylor expanded in y around 0 76.0%
+-commutative76.0%
+-commutative76.0%
associate-+l+76.0%
associate-/l*76.0%
associate-/r/76.0%
fma-neg76.0%
metadata-eval76.0%
+-commutative76.0%
associate-/l*80.2%
unpow280.2%
associate-/r*90.3%
associate-*r/90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 79.3%
associate-*l/82.5%
unpow282.5%
associate-*r*87.7%
*-commutative87.7%
associate-*r*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in x around inf 87.5%
*-commutative68.5%
sub-neg68.5%
mul-1-neg68.5%
log-rec68.5%
remove-double-neg68.5%
metadata-eval68.5%
Simplified87.5%
Final simplification87.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* -0.5 (log x)) 0.91893853320467)))
(if (<= x 5e-51)
(+ t_0 (/ (+ 0.083333333333333 (* z (* y z))) x))
(if (<= x 33000000.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* z (* z (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (-0.5 * log(x)) + 0.91893853320467;
double tmp;
if (x <= 5e-51) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (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 = ((-0.5d0) * log(x)) + 0.91893853320467d0
if (x <= 5d-51) then
tmp = t_0 + ((0.083333333333333d0 + (z * (y * z))) / x)
else if (x <= 33000000.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-0.5 * Math.log(x)) + 0.91893853320467;
double tmp;
if (x <= 5e-51) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (-0.5 * math.log(x)) + 0.91893853320467 tmp = 0 if x <= 5e-51: tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x) elif x <= 33000000.0: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(-0.5 * log(x)) + 0.91893853320467) tmp = 0.0 if (x <= 5e-51) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(y * z))) / x)); elseif (x <= 33000000.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-0.5 * log(x)) + 0.91893853320467; tmp = 0.0; if (x <= 5e-51) tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x); elseif (x <= 33000000.0) tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 5e-51], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 33000000.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \log x + 0.91893853320467\\
\mathbf{if}\;x \leq 5 \cdot 10^{-51}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 5.00000000000000004e-51Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 90.0%
*-commutative90.0%
unpow290.0%
associate-*l*88.2%
Simplified88.2%
if 5.00000000000000004e-51 < x < 3.3e7Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 97.5%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
Simplified83.1%
if 3.3e7 < x Initial program 85.5%
Taylor expanded in y around 0 76.0%
+-commutative76.0%
+-commutative76.0%
associate-+l+76.0%
associate-/l*76.0%
associate-/r/76.0%
fma-neg76.0%
metadata-eval76.0%
+-commutative76.0%
associate-/l*80.2%
unpow280.2%
associate-/r*90.3%
associate-*r/90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 79.3%
associate-*l/82.5%
unpow282.5%
associate-*r*87.7%
*-commutative87.7%
associate-*r*87.7%
*-commutative87.7%
Simplified87.7%
Final simplification87.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* -0.5 (log x)) 0.91893853320467)))
(if (<= x 3e-51)
(+ t_0 (/ (+ 0.083333333333333 (* z (* y z))) x))
(if (<= x 33000000.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ y (/ (/ x z) z)))))))
double code(double x, double y, double z) {
double t_0 = (-0.5 * log(x)) + 0.91893853320467;
double tmp;
if (x <= 3e-51) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (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 = ((-0.5d0) * log(x)) + 0.91893853320467d0
if (x <= 3d-51) then
tmp = t_0 + ((0.083333333333333d0 + (z * (y * z))) / x)
else if (x <= 33000000.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (y / ((x / z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-0.5 * Math.log(x)) + 0.91893853320467;
double tmp;
if (x <= 3e-51) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 33000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (y / ((x / z) / z));
}
return tmp;
}
def code(x, y, z): t_0 = (-0.5 * math.log(x)) + 0.91893853320467 tmp = 0 if x <= 3e-51: tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x) elif x <= 33000000.0: tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (y / ((x / z) / z)) return tmp
function code(x, y, z) t_0 = Float64(Float64(-0.5 * log(x)) + 0.91893853320467) tmp = 0.0 if (x <= 3e-51) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(y * z))) / x)); elseif (x <= 33000000.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(y / Float64(Float64(x / z) / z))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-0.5 * log(x)) + 0.91893853320467; tmp = 0.0; if (x <= 3e-51) tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x); elseif (x <= 33000000.0) tmp = t_0 + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y / ((x / z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 3e-51], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 33000000.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \log x + 0.91893853320467\\
\mathbf{if}\;x \leq 3 \cdot 10^{-51}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\end{array}
\end{array}
if x < 3.00000000000000002e-51Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 90.0%
*-commutative90.0%
unpow290.0%
associate-*l*88.2%
Simplified88.2%
if 3.00000000000000002e-51 < x < 3.3e7Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 97.5%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
Simplified83.1%
if 3.3e7 < x Initial program 85.5%
Taylor expanded in y around inf 79.3%
associate-/l*83.5%
unpow283.5%
associate-/r*88.4%
Simplified88.4%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(if (<= x 3.3e+223)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(* x (+ (log x) -1.0)))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* z (/ y (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.3e+223) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (y / (x / 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 <= 3.3d+223) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (z * (y / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.3e+223) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (y / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.3e+223: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (y / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.3e+223) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(z * Float64(y / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.3e+223) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (y / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.3e+223], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.3 \cdot 10^{+223}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + z \cdot \frac{y}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 3.3e223Initial program 94.8%
Taylor expanded in x around inf 94.0%
*-commutative56.0%
sub-neg56.0%
mul-1-neg56.0%
log-rec56.0%
remove-double-neg56.0%
metadata-eval56.0%
Simplified94.0%
if 3.3e223 < x Initial program 73.5%
Taylor expanded in y around 0 73.2%
+-commutative73.2%
+-commutative73.2%
associate-+l+73.2%
associate-/l*73.5%
associate-/r/73.5%
fma-neg73.5%
metadata-eval73.5%
+-commutative73.5%
associate-/l*79.9%
unpow279.9%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 73.5%
associate-*l/79.2%
unpow279.2%
associate-*r*98.9%
*-commutative98.9%
associate-*r*98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in z around 0 95.6%
associate-/l*98.9%
Simplified98.9%
Final simplification94.5%
(FPCore (x y z)
:precision binary64
(if (<= x 33000000.0)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(+ (* -0.5 (log x)) 0.91893853320467))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ (+ y 0.0007936500793651) (/ (/ x z) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 33000000.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) / ((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) :: tmp
if (x <= 33000000.0d0) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((-0.5d0) * log(x)) + 0.91893853320467d0)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((y + 0.0007936500793651d0) / ((x / z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 33000000.0) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * Math.log(x)) + 0.91893853320467);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) / ((x / z) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 33000000.0: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * math.log(x)) + 0.91893853320467) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) / ((x / z) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 33000000.0) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(-0.5 * log(x)) + 0.91893853320467)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(y + 0.0007936500793651) / Float64(Float64(x / z) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 33000000.0) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) / ((x / z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 33000000.0], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 33000000:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{y + 0.0007936500793651}{\frac{\frac{x}{z}}{z}}\\
\end{array}
\end{array}
if x < 3.3e7Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.2%
if 3.3e7 < x Initial program 85.5%
*-un-lft-identity85.5%
add-cube-cbrt85.4%
times-frac85.5%
pow285.5%
*-commutative85.5%
fma-udef85.5%
fma-neg85.5%
metadata-eval85.5%
Applied egg-rr85.5%
associate-*l/85.5%
*-lft-identity85.5%
fma-def85.5%
*-commutative85.5%
fma-def85.5%
+-commutative85.5%
Simplified85.5%
Taylor expanded in z around inf 85.5%
*-commutative85.5%
associate-/l*89.7%
+-commutative89.7%
unpow289.7%
associate-/r*99.6%
Simplified99.6%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -4.4e+14) (not (<= z 3.2e+21)))
(+
(+ (* -0.5 (log x)) 0.91893853320467)
(* (+ y 0.0007936500793651) (/ (* z 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 <= -4.4e+14) || !(z <= 3.2e+21)) {
tmp = ((-0.5 * log(x)) + 0.91893853320467) + ((y + 0.0007936500793651) * ((z * 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 <= (-4.4d+14)) .or. (.not. (z <= 3.2d+21))) then
tmp = (((-0.5d0) * log(x)) + 0.91893853320467d0) + ((y + 0.0007936500793651d0) * ((z * 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 <= -4.4e+14) || !(z <= 3.2e+21)) {
tmp = ((-0.5 * Math.log(x)) + 0.91893853320467) + ((y + 0.0007936500793651) * ((z * 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 <= -4.4e+14) or not (z <= 3.2e+21): tmp = ((-0.5 * math.log(x)) + 0.91893853320467) + ((y + 0.0007936500793651) * ((z * 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 <= -4.4e+14) || !(z <= 3.2e+21)) tmp = Float64(Float64(Float64(-0.5 * log(x)) + 0.91893853320467) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * 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 <= -4.4e+14) || ~((z <= 3.2e+21))) tmp = ((-0.5 * log(x)) + 0.91893853320467) + ((y + 0.0007936500793651) * ((z * 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[Or[LessEqual[z, -4.4e+14], N[Not[LessEqual[z, 3.2e+21]], $MachinePrecision]], N[(N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / 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 -4.4 \cdot 10^{+14} \lor \neg \left(z \leq 3.2 \cdot 10^{+21}\right):\\
\;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot 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 < -4.4e14 or 3.2e21 < z Initial program 83.6%
Taylor expanded in x around 0 83.6%
Taylor expanded in x around 0 71.6%
Taylor expanded in z around inf 71.5%
associate-/l*74.7%
+-commutative74.7%
associate-/r/73.9%
unpow273.9%
+-commutative73.9%
Simplified73.9%
if -4.4e14 < z < 3.2e21Initial program 99.5%
Taylor expanded in z around 0 90.3%
associate-+l-90.3%
sub-neg90.3%
metadata-eval90.3%
sub-neg90.3%
metadata-eval90.3%
Applied egg-rr90.3%
Final simplification83.1%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.1e+14) (not (<= z 1.05e+23)))
(+
(+ (* -0.5 (log x)) 0.91893853320467)
(/ (* z z) (/ x (+ y 0.0007936500793651))))
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.1e+14) || !(z <= 1.05e+23)) {
tmp = ((-0.5 * log(x)) + 0.91893853320467) + ((z * z) / (x / (y + 0.0007936500793651)));
} 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 <= (-5.1d+14)) .or. (.not. (z <= 1.05d+23))) then
tmp = (((-0.5d0) * log(x)) + 0.91893853320467d0) + ((z * z) / (x / (y + 0.0007936500793651d0)))
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 <= -5.1e+14) || !(z <= 1.05e+23)) {
tmp = ((-0.5 * Math.log(x)) + 0.91893853320467) + ((z * z) / (x / (y + 0.0007936500793651)));
} 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 <= -5.1e+14) or not (z <= 1.05e+23): tmp = ((-0.5 * math.log(x)) + 0.91893853320467) + ((z * z) / (x / (y + 0.0007936500793651))) 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 <= -5.1e+14) || !(z <= 1.05e+23)) tmp = Float64(Float64(Float64(-0.5 * log(x)) + 0.91893853320467) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); 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 <= -5.1e+14) || ~((z <= 1.05e+23))) tmp = ((-0.5 * log(x)) + 0.91893853320467) + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.1e+14], N[Not[LessEqual[z, 1.05e+23]], $MachinePrecision]], N[(N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $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 -5.1 \cdot 10^{+14} \lor \neg \left(z \leq 1.05 \cdot 10^{+23}\right):\\
\;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\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 < -5.1e14 or 1.0500000000000001e23 < z Initial program 83.6%
Taylor expanded in x around 0 83.6%
Taylor expanded in x around 0 71.6%
Taylor expanded in z around inf 71.5%
associate-/l*74.7%
unpow274.7%
Simplified74.7%
if -5.1e14 < z < 1.0500000000000001e23Initial program 99.5%
Taylor expanded in z around 0 90.3%
associate-+l-90.3%
sub-neg90.3%
metadata-eval90.3%
sub-neg90.3%
metadata-eval90.3%
Applied egg-rr90.3%
Final simplification83.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* -0.5 (log x)) 0.91893853320467)))
(if (<= x 3.8e-8)
(+ t_0 (/ (+ 0.083333333333333 (* z (* y z))) x))
(if (<= x 52000000.0)
(+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (-0.5 * log(x)) + 0.91893853320467;
double tmp;
if (x <= 3.8e-8) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 52000000.0) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = (x * (log(x) + -1.0)) + (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 = ((-0.5d0) * log(x)) + 0.91893853320467d0
if (x <= 3.8d-8) then
tmp = t_0 + ((0.083333333333333d0 + (z * (y * z))) / x)
else if (x <= 52000000.0d0) then
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
else
tmp = (x * (log(x) + (-1.0d0))) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-0.5 * Math.log(x)) + 0.91893853320467;
double tmp;
if (x <= 3.8e-8) {
tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x);
} else if (x <= 52000000.0) {
tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (-0.5 * math.log(x)) + 0.91893853320467 tmp = 0 if x <= 3.8e-8: tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x) elif x <= 52000000.0: tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))) else: tmp = (x * (math.log(x) + -1.0)) + (z * (z * (y / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(-0.5 * log(x)) + 0.91893853320467) tmp = 0.0 if (x <= 3.8e-8) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(y * z))) / x)); elseif (x <= 52000000.0) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-0.5 * log(x)) + 0.91893853320467; tmp = 0.0; if (x <= 3.8e-8) tmp = t_0 + ((0.083333333333333 + (z * (y * z))) / x); elseif (x <= 52000000.0) tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651))); else tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 3.8e-8], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 52000000.0], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \log x + 0.91893853320467\\
\mathbf{if}\;x \leq 3.8 \cdot 10^{-8}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(y \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 52000000:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 3.80000000000000028e-8Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 86.6%
*-commutative86.6%
unpow286.6%
associate-*l*85.0%
Simplified85.0%
if 3.80000000000000028e-8 < x < 5.2e7Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in x around 0 93.5%
Taylor expanded in z around inf 90.0%
associate-/l*89.9%
unpow289.9%
Simplified89.9%
if 5.2e7 < x Initial program 85.5%
Taylor expanded in y around 0 76.0%
+-commutative76.0%
+-commutative76.0%
associate-+l+76.0%
associate-/l*76.0%
associate-/r/76.0%
fma-neg76.0%
metadata-eval76.0%
+-commutative76.0%
associate-/l*80.2%
unpow280.2%
associate-/r*90.3%
associate-*r/90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 79.3%
associate-*l/82.5%
unpow282.5%
associate-*r*87.7%
*-commutative87.7%
associate-*r*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in x around inf 87.5%
*-commutative68.5%
sub-neg68.5%
mul-1-neg68.5%
log-rec68.5%
remove-double-neg68.5%
metadata-eval68.5%
Simplified87.5%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -8e-17) (not (<= z 1.95e-21)))
(+ t_0 (* z (* z (/ y 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 <= -8e-17) || !(z <= 1.95e-21)) {
tmp = t_0 + (z * (z * (y / 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 <= (-8d-17)) .or. (.not. (z <= 1.95d-21))) then
tmp = t_0 + (z * (z * (y / 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 <= -8e-17) || !(z <= 1.95e-21)) {
tmp = t_0 + (z * (z * (y / 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 <= -8e-17) or not (z <= 1.95e-21): tmp = t_0 + (z * (z * (y / 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 <= -8e-17) || !(z <= 1.95e-21)) tmp = Float64(t_0 + Float64(z * Float64(z * Float64(y / 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 <= -8e-17) || ~((z <= 1.95e-21))) tmp = t_0 + (z * (z * (y / 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, -8e-17], N[Not[LessEqual[z, 1.95e-21]], $MachinePrecision]], N[(t$95$0 + N[(z * N[(z * N[(y / x), $MachinePrecision]), $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 -8 \cdot 10^{-17} \lor \neg \left(z \leq 1.95 \cdot 10^{-21}\right):\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.00000000000000057e-17 or 1.95e-21 < z Initial program 85.6%
Taylor expanded in y around 0 61.3%
+-commutative61.3%
+-commutative61.3%
associate-+l+61.3%
associate-/l*61.3%
associate-/r/61.3%
fma-neg61.3%
metadata-eval61.3%
+-commutative61.3%
associate-/l*62.4%
unpow262.4%
associate-/r*72.6%
associate-*r/72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in y around inf 62.9%
associate-*l/66.2%
unpow266.2%
associate-*r*70.0%
*-commutative70.0%
associate-*r*70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 69.9%
*-commutative27.1%
sub-neg27.1%
mul-1-neg27.1%
log-rec27.1%
remove-double-neg27.1%
metadata-eval27.1%
Simplified69.9%
if -8.00000000000000057e-17 < z < 1.95e-21Initial program 99.4%
Taylor expanded in z around 0 92.8%
Taylor expanded in x around inf 91.2%
*-commutative91.2%
sub-neg91.2%
mul-1-neg91.2%
log-rec91.2%
remove-double-neg91.2%
metadata-eval91.2%
Simplified91.2%
Final simplification80.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5e-59) (not (<= z 4.6e-22)))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5e-59) || !(z <= 4.6e-22)) {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
} 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 <= (-5.5d-59)) .or. (.not. (z <= 4.6d-22))) then
tmp = (x * (log(x) + (-1.0d0))) + (z * (z * (y / x)))
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 <= -5.5e-59) || !(z <= 4.6e-22)) {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z * (y / x)));
} 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 <= -5.5e-59) or not (z <= 4.6e-22): tmp = (x * (math.log(x) + -1.0)) + (z * (z * (y / x))) 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 <= -5.5e-59) || !(z <= 4.6e-22)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); 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 <= -5.5e-59) || ~((z <= 4.6e-22))) tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x))); 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, -5.5e-59], N[Not[LessEqual[z, 4.6e-22]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $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 -5.5 \cdot 10^{-59} \lor \neg \left(z \leq 4.6 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\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 < -5.50000000000000014e-59 or 4.5999999999999996e-22 < z Initial program 86.2%
Taylor expanded in y around 0 62.9%
+-commutative62.9%
+-commutative62.9%
associate-+l+62.9%
associate-/l*63.0%
associate-/r/63.0%
fma-neg63.0%
metadata-eval63.0%
+-commutative63.0%
associate-/l*64.1%
unpow264.1%
associate-/r*73.8%
associate-*r/73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around inf 63.1%
associate-*l/66.2%
unpow266.2%
associate-*r*69.9%
*-commutative69.9%
associate-*r*69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in x around inf 69.8%
*-commutative28.9%
sub-neg28.9%
mul-1-neg28.9%
log-rec28.9%
remove-double-neg28.9%
metadata-eval28.9%
Simplified69.8%
if -5.50000000000000014e-59 < z < 4.5999999999999996e-22Initial program 99.4%
Taylor expanded in z around 0 94.0%
Final simplification81.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7.8e-57) (not (<= z 3.6e-21)))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.8e-57) || !(z <= 3.6e-21)) {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / 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 <= (-7.8d-57)) .or. (.not. (z <= 3.6d-21))) then
tmp = (x * (log(x) + (-1.0d0))) + (z * (z * (y / 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 <= -7.8e-57) || !(z <= 3.6e-21)) {
tmp = (x * (Math.log(x) + -1.0)) + (z * (z * (y / 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 <= -7.8e-57) or not (z <= 3.6e-21): tmp = (x * (math.log(x) + -1.0)) + (z * (z * (y / 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 <= -7.8e-57) || !(z <= 3.6e-21)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / 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 <= -7.8e-57) || ~((z <= 3.6e-21))) tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x))); else tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.8e-57], N[Not[LessEqual[z, 3.6e-21]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $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 -7.8 \cdot 10^{-57} \lor \neg \left(z \leq 3.6 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\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 < -7.80000000000000013e-57 or 3.59999999999999989e-21 < z Initial program 86.2%
Taylor expanded in y around 0 62.9%
+-commutative62.9%
+-commutative62.9%
associate-+l+62.9%
associate-/l*63.0%
associate-/r/63.0%
fma-neg63.0%
metadata-eval63.0%
+-commutative63.0%
associate-/l*64.1%
unpow264.1%
associate-/r*73.8%
associate-*r/73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in y around inf 63.1%
associate-*l/66.2%
unpow266.2%
associate-*r*69.9%
*-commutative69.9%
associate-*r*69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in x around inf 69.8%
*-commutative28.9%
sub-neg28.9%
mul-1-neg28.9%
log-rec28.9%
remove-double-neg28.9%
metadata-eval28.9%
Simplified69.8%
if -7.80000000000000013e-57 < z < 3.59999999999999989e-21Initial program 99.4%
Taylor expanded in z around 0 94.0%
associate-+l-94.0%
sub-neg94.0%
metadata-eval94.0%
sub-neg94.0%
metadata-eval94.0%
Applied egg-rr94.0%
Final simplification81.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -124000000.0)
(+ t_0 (* z (/ -0.0027777777777778 x)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -124000000.0) {
tmp = t_0 + (z * (-0.0027777777777778 / x));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (z <= (-124000000.0d0)) then
tmp = t_0 + (z * ((-0.0027777777777778d0) / x))
else
tmp = t_0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (z <= -124000000.0) {
tmp = t_0 + (z * (-0.0027777777777778 / x));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -124000000.0: tmp = t_0 + (z * (-0.0027777777777778 / x)) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -124000000.0) tmp = Float64(t_0 + Float64(z * Float64(-0.0027777777777778 / x))); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -124000000.0) tmp = t_0 + (z * (-0.0027777777777778 / x)); else tmp = t_0 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -124000000.0], N[(t$95$0 + N[(z * N[(-0.0027777777777778 / 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 -124000000:\\
\;\;\;\;t_0 + z \cdot \frac{-0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.24e8Initial program 87.6%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
associate-/l*82.1%
unpow282.1%
Simplified82.1%
Taylor expanded in z around 0 33.2%
metadata-eval33.2%
times-frac33.2%
*-commutative33.2%
times-frac33.2%
/-rgt-identity33.2%
Simplified33.2%
Taylor expanded in x around inf 33.2%
*-commutative24.9%
sub-neg24.9%
mul-1-neg24.9%
log-rec24.9%
remove-double-neg24.9%
metadata-eval24.9%
Simplified33.2%
if -1.24e8 < z Initial program 94.0%
Taylor expanded in z around 0 70.3%
Taylor expanded in x around inf 69.3%
*-commutative69.3%
sub-neg69.3%
mul-1-neg69.3%
log-rec69.3%
remove-double-neg69.3%
metadata-eval69.3%
Simplified69.3%
Final simplification60.9%
(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 92.5%
Taylor expanded in z around 0 59.7%
Taylor expanded in x around inf 58.9%
*-commutative58.9%
sub-neg58.9%
mul-1-neg58.9%
log-rec58.9%
remove-double-neg58.9%
metadata-eval58.9%
Simplified58.9%
Final simplification58.9%
(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 92.5%
Taylor expanded in z around 0 59.7%
Taylor expanded in x around inf 58.9%
*-commutative58.9%
sub-neg58.9%
mul-1-neg58.9%
log-rec58.9%
remove-double-neg58.9%
metadata-eval58.9%
Simplified58.9%
Taylor expanded in x around 0 25.7%
Final simplification25.7%
(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 2023238
(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)))