
(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 17 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 500000000000.0)
(+
(+ (fma (+ x -0.5) (log x) (- x)) 0.91893853320467)
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 500000000000.0) {
tmp = (fma((x + -0.5), log(x), -x) + 0.91893853320467) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 500000000000.0) tmp = Float64(Float64(fma(Float64(x + -0.5), log(x), Float64(-x)) + 0.91893853320467) + Float64(fma(z, fma(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(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 500000000000.0], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $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[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(x + -0.5, \log x, -x\right) + 0.91893853320467\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 5e11Initial program 99.7%
fma-neg99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 5e11 < x Initial program 86.0%
Taylor expanded in z around inf 86.0%
associate-/l*90.3%
unpow290.3%
Simplified90.3%
Taylor expanded in z around 0 86.0%
*-commutative86.0%
associate-*r/90.3%
unpow290.3%
associate-/l*99.5%
associate-/r/99.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 0.0017)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ t_0 (* (+ y 0.0007936500793651) (* z (/ z x)))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (x <= 0.0017) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (x <= 0.0017d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + ((y + 0.0007936500793651d0) * (z * (z / 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 <= 0.0017) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if x <= 0.0017: tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / 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 <= 0.0017) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / 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 <= 0.0017) tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / 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, 0.0017], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $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 0.0017:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 0.00169999999999999991Initial program 99.7%
if 0.00169999999999999991 < x Initial program 86.9%
Taylor expanded in z around inf 86.9%
associate-/l*91.0%
unpow291.0%
Simplified91.0%
Taylor expanded in z around 0 86.9%
*-commutative86.9%
associate-*r/90.9%
unpow290.9%
associate-/l*99.5%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1000000000000.0)
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1000000000000.0) {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1000000000000.0d0) then
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1000000000000.0) {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1000000000000.0: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1000000000000.0) tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1000000000000.0) tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1000000000000.0], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1000000000000:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 1e12Initial program 99.7%
associate-+l-41.4%
sub-neg41.4%
metadata-eval41.4%
*-commutative41.4%
sub-neg41.4%
metadata-eval41.4%
Applied egg-rr99.7%
if 1e12 < x Initial program 86.0%
Taylor expanded in z around inf 86.0%
associate-/l*90.3%
unpow290.3%
Simplified90.3%
Taylor expanded in z around 0 86.0%
*-commutative86.0%
associate-*r/90.3%
unpow290.3%
associate-/l*99.5%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x)))))
(t_1 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= z -2.95e+32)
t_0
(if (<= z 1e-83)
(+ t_1 (/ 1.0 (* x 12.000000000000048)))
(if (<= z 7.2e+165) (+ t_1 (* z (* z (/ y x)))) t_0)))))
double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
double t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -2.95e+32) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 7.2e+165) {
tmp = t_1 + (z * (z * (y / x)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
t_1 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (z <= (-2.95d+32)) then
tmp = t_0
else if (z <= 1d-83) then
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
else if (z <= 7.2d+165) then
tmp = t_1 + (z * (z * (y / x)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
double t_1 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -2.95e+32) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 7.2e+165) {
tmp = t_1 + (z * (z * (y / x)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) t_1 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if z <= -2.95e+32: tmp = t_0 elif z <= 1e-83: tmp = t_1 + (1.0 / (x * 12.000000000000048)) elif z <= 7.2e+165: tmp = t_1 + (z * (z * (y / x))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))) t_1 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (z <= -2.95e+32) tmp = t_0; elseif (z <= 1e-83) tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); elseif (z <= 7.2e+165) tmp = Float64(t_1 + Float64(z * Float64(z * Float64(y / x)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (z <= -2.95e+32) tmp = t_0; elseif (z <= 1e-83) tmp = t_1 + (1.0 / (x * 12.000000000000048)); elseif (z <= 7.2e+165) tmp = t_1 + (z * (z * (y / x))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.95e+32], t$95$0, If[LessEqual[z, 1e-83], N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+165], N[(t$95$1 + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;z \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 10^{-83}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+165}:\\
\;\;\;\;t_1 + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -2.94999999999999983e32 or 7.1999999999999996e165 < z Initial program 88.5%
Taylor expanded in z around inf 88.6%
associate-/l*89.6%
unpow289.6%
Simplified89.6%
Taylor expanded in z around 0 88.6%
*-commutative88.6%
associate-*r/89.6%
unpow289.6%
associate-/l*99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 94.6%
if -2.94999999999999983e32 < z < 1e-83Initial program 99.5%
Taylor expanded in z around 0 92.4%
clear-num92.3%
inv-pow92.3%
Applied egg-rr92.3%
unpow-192.3%
div-inv92.4%
metadata-eval92.4%
Applied egg-rr92.4%
if 1e-83 < z < 7.1999999999999996e165Initial program 90.8%
Taylor expanded in z around inf 82.9%
associate-/l*89.9%
unpow289.9%
Simplified89.9%
Taylor expanded in y around inf 68.0%
associate-*l/75.0%
unpow275.0%
associate-*r*76.8%
*-commutative76.8%
*-commutative76.8%
Simplified76.8%
Final simplification89.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x)))))
(t_1 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= z -3.1e+31)
t_0
(if (<= z 1e-83)
(+ t_1 (/ 1.0 (* x 12.000000000000048)))
(if (<= z 3.6e+120) (+ t_1 (* (/ y x) (* z z))) t_0)))))
double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
double t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -3.1e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 3.6e+120) {
tmp = t_1 + ((y / x) * (z * z));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
t_1 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (z <= (-3.1d+31)) then
tmp = t_0
else if (z <= 1d-83) then
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
else if (z <= 3.6d+120) then
tmp = t_1 + ((y / x) * (z * z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
double t_1 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -3.1e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 3.6e+120) {
tmp = t_1 + ((y / x) * (z * z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) t_1 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if z <= -3.1e+31: tmp = t_0 elif z <= 1e-83: tmp = t_1 + (1.0 / (x * 12.000000000000048)) elif z <= 3.6e+120: tmp = t_1 + ((y / x) * (z * z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))) t_1 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (z <= -3.1e+31) tmp = t_0; elseif (z <= 1e-83) tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); elseif (z <= 3.6e+120) tmp = Float64(t_1 + Float64(Float64(y / x) * Float64(z * z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (z <= -3.1e+31) tmp = t_0; elseif (z <= 1e-83) tmp = t_1 + (1.0 / (x * 12.000000000000048)); elseif (z <= 3.6e+120) tmp = t_1 + ((y / x) * (z * z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+31], t$95$0, If[LessEqual[z, 1e-83], N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+120], N[(t$95$1 + N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 10^{-83}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+120}:\\
\;\;\;\;t_1 + \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.1000000000000002e31 or 3.60000000000000016e120 < z Initial program 87.2%
Taylor expanded in z around inf 87.2%
associate-/l*89.9%
unpow289.9%
Simplified89.9%
Taylor expanded in z around 0 87.2%
*-commutative87.2%
associate-*r/89.9%
unpow289.9%
associate-/l*99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
if -3.1000000000000002e31 < z < 1e-83Initial program 99.5%
Taylor expanded in z around 0 92.4%
clear-num92.3%
inv-pow92.3%
Applied egg-rr92.3%
unpow-192.3%
div-inv92.4%
metadata-eval92.4%
Applied egg-rr92.4%
if 1e-83 < z < 3.60000000000000016e120Initial program 94.7%
Taylor expanded in y around inf 70.0%
*-commutative70.0%
associate-*r/74.7%
unpow274.7%
Simplified74.7%
Final simplification89.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x)))))
(t_1 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= z -1.95e+31)
t_0
(if (<= z 1e-83)
(+ t_1 (/ 1.0 (* x 12.000000000000048)))
(if (<= z 1.45e+122) (+ t_1 (/ y (/ x (* z z)))) t_0)))))
double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
double t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -1.95e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 1.45e+122) {
tmp = t_1 + (y / (x / (z * z)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
t_1 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (z <= (-1.95d+31)) then
tmp = t_0
else if (z <= 1d-83) then
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
else if (z <= 1.45d+122) then
tmp = t_1 + (y / (x / (z * z)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
double t_1 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -1.95e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 1.45e+122) {
tmp = t_1 + (y / (x / (z * z)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) t_1 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if z <= -1.95e+31: tmp = t_0 elif z <= 1e-83: tmp = t_1 + (1.0 / (x * 12.000000000000048)) elif z <= 1.45e+122: tmp = t_1 + (y / (x / (z * z))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))) t_1 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (z <= -1.95e+31) tmp = t_0; elseif (z <= 1e-83) tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); elseif (z <= 1.45e+122) tmp = Float64(t_1 + Float64(y / Float64(x / Float64(z * z)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (z <= -1.95e+31) tmp = t_0; elseif (z <= 1e-83) tmp = t_1 + (1.0 / (x * 12.000000000000048)); elseif (z <= 1.45e+122) tmp = t_1 + (y / (x / (z * z))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+31], t$95$0, If[LessEqual[z, 1e-83], N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+122], N[(t$95$1 + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 10^{-83}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+122}:\\
\;\;\;\;t_1 + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.95e31 or 1.45e122 < z Initial program 87.2%
Taylor expanded in z around inf 87.2%
associate-/l*89.9%
unpow289.9%
Simplified89.9%
Taylor expanded in z around 0 87.2%
*-commutative87.2%
associate-*r/89.9%
unpow289.9%
associate-/l*99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
if -1.95e31 < z < 1e-83Initial program 99.5%
Taylor expanded in z around 0 92.4%
clear-num92.3%
inv-pow92.3%
Applied egg-rr92.3%
unpow-192.3%
div-inv92.4%
metadata-eval92.4%
Applied egg-rr92.4%
if 1e-83 < z < 1.45e122Initial program 94.7%
Taylor expanded in y around inf 70.0%
associate-/l*77.0%
unpow277.0%
Simplified77.0%
Final simplification90.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x)))))
(t_1 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
(if (<= z -1.62e+31)
t_0
(if (<= z 1e-83)
(+ t_1 (/ 1.0 (* x 12.000000000000048)))
(if (<= z 7.2e+165) (+ t_1 (/ y (/ (/ x z) z))) t_0)))))
double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
double t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -1.62e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 7.2e+165) {
tmp = t_1 + (y / ((x / z) / z));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
t_1 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
if (z <= (-1.62d+31)) then
tmp = t_0
else if (z <= 1d-83) then
tmp = t_1 + (1.0d0 / (x * 12.000000000000048d0))
else if (z <= 7.2d+165) then
tmp = t_1 + (y / ((x / z) / z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
double t_1 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
double tmp;
if (z <= -1.62e+31) {
tmp = t_0;
} else if (z <= 1e-83) {
tmp = t_1 + (1.0 / (x * 12.000000000000048));
} else if (z <= 7.2e+165) {
tmp = t_1 + (y / ((x / z) / z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) t_1 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x) tmp = 0 if z <= -1.62e+31: tmp = t_0 elif z <= 1e-83: tmp = t_1 + (1.0 / (x * 12.000000000000048)) elif z <= 7.2e+165: tmp = t_1 + (y / ((x / z) / z)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))) t_1 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) tmp = 0.0 if (z <= -1.62e+31) tmp = t_0; elseif (z <= 1e-83) tmp = Float64(t_1 + Float64(1.0 / Float64(x * 12.000000000000048))); elseif (z <= 7.2e+165) tmp = Float64(t_1 + Float64(y / Float64(Float64(x / z) / z))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x); tmp = 0.0; if (z <= -1.62e+31) tmp = t_0; elseif (z <= 1e-83) tmp = t_1 + (1.0 / (x * 12.000000000000048)); elseif (z <= 7.2e+165) tmp = t_1 + (y / ((x / z) / z)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.62e+31], t$95$0, If[LessEqual[z, 1e-83], N[(t$95$1 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+165], N[(t$95$1 + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 10^{-83}:\\
\;\;\;\;t_1 + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+165}:\\
\;\;\;\;t_1 + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.6199999999999999e31 or 7.1999999999999996e165 < z Initial program 88.5%
Taylor expanded in z around inf 88.6%
associate-/l*89.6%
unpow289.6%
Simplified89.6%
Taylor expanded in z around 0 88.6%
*-commutative88.6%
associate-*r/89.6%
unpow289.6%
associate-/l*99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around 0 94.6%
if -1.6199999999999999e31 < z < 1e-83Initial program 99.5%
Taylor expanded in z around 0 92.4%
clear-num92.3%
inv-pow92.3%
Applied egg-rr92.3%
unpow-192.3%
div-inv92.4%
metadata-eval92.4%
Applied egg-rr92.4%
if 1e-83 < z < 7.1999999999999996e165Initial program 90.8%
Taylor expanded in z around inf 82.9%
associate-/l*89.9%
unpow289.9%
Simplified89.9%
Taylor expanded in z around 0 82.9%
*-commutative82.9%
associate-*r/89.9%
unpow289.9%
associate-/l*91.7%
associate-/r/91.7%
Simplified91.7%
Taylor expanded in y around inf 68.0%
unpow268.0%
associate-/l*76.8%
associate-/r*78.6%
Simplified78.6%
Final simplification90.3%
(FPCore (x y z)
:precision binary64
(if (<= x 2.1e+201)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.1e+201) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} 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) :: tmp
if (x <= 2.1d+201) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
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 tmp;
if (x <= 2.1e+201) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.1e+201: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (z * (z * (y / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.1e+201) 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(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) tmp = 0.0; if (x <= 2.1e+201) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.1e+201], 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[(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}
\mathbf{if}\;x \leq 2.1 \cdot 10^{+201}:\\
\;\;\;\;\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(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 < 2.0999999999999999e201Initial program 96.3%
Taylor expanded in x around inf 95.9%
sub-neg46.7%
mul-1-neg46.7%
log-rec46.7%
remove-double-neg46.7%
metadata-eval46.7%
Simplified95.9%
if 2.0999999999999999e201 < x Initial program 76.0%
Taylor expanded in z around inf 76.0%
associate-/l*87.9%
unpow287.9%
Simplified87.9%
Taylor expanded in y around inf 72.3%
associate-*l/83.9%
unpow283.9%
associate-*r*96.5%
*-commutative96.5%
*-commutative96.5%
Simplified96.5%
Final simplification96.0%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0017)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0017) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.0017d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0017) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0017: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0017) 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(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0017) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0017], 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[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0017:\\
\;\;\;\;\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(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 0.00169999999999999991Initial program 99.7%
Taylor expanded in x around inf 99.2%
sub-neg41.9%
mul-1-neg41.9%
log-rec41.9%
remove-double-neg41.9%
metadata-eval41.9%
Simplified99.2%
if 0.00169999999999999991 < x Initial program 86.9%
Taylor expanded in z around inf 86.9%
associate-/l*91.0%
unpow291.0%
Simplified91.0%
Taylor expanded in z around 0 86.9%
*-commutative86.9%
associate-*r/90.9%
unpow290.9%
associate-/l*99.5%
associate-/r/99.6%
Simplified99.6%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.6e+36) (not (<= z 3.6e+25)))
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x))))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.6e+36) || !(z <= 3.6e+25)) {
tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.6d+36)) .or. (.not. (z <= 3.6d+25))) then
tmp = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.6e+36) || !(z <= 3.6e+25)) {
tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.6e+36) or not (z <= 3.6e+25): tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.6e+36) || !(z <= 3.6e+25)) tmp = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); 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 <= -1.6e+36) || ~((z <= 3.6e+25))) tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); 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, -1.6e+36], N[Not[LessEqual[z, 3.6e+25]], $MachinePrecision]], N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $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 -1.6 \cdot 10^{+36} \lor \neg \left(z \leq 3.6 \cdot 10^{+25}\right):\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\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 < -1.5999999999999999e36 or 3.60000000000000015e25 < z Initial program 88.2%
Taylor expanded in z around inf 88.3%
associate-/l*92.0%
unpow292.0%
Simplified92.0%
Taylor expanded in z around 0 88.3%
*-commutative88.3%
associate-*r/92.0%
unpow292.0%
associate-/l*99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around 0 87.3%
if -1.5999999999999999e36 < z < 3.60000000000000015e25Initial program 99.5%
Taylor expanded in z around 0 89.2%
associate-+l-89.2%
sub-neg89.2%
metadata-eval89.2%
*-commutative89.2%
sub-neg89.2%
metadata-eval89.2%
Applied egg-rr89.2%
Final simplification88.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -3.8e+35) (not (<= z 2.9e+25)))
(+
(* (+ y 0.0007936500793651) (* z (/ z x)))
(+ 0.91893853320467 (* -0.5 (log x))))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.8e+35) || !(z <= 2.9e+25)) {
tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x)));
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-3.8d+35)) .or. (.not. (z <= 2.9d+25))) then
tmp = ((y + 0.0007936500793651d0) * (z * (z / x))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
else
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.8e+35) || !(z <= 2.9e+25)) {
tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * Math.log(x)));
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.8e+35) or not (z <= 2.9e+25): tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * math.log(x))) else: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.8e+35) || !(z <= 2.9e+25)) tmp = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.8e+35) || ~((z <= 2.9e+25))) tmp = ((y + 0.0007936500793651) * (z * (z / x))) + (0.91893853320467 + (-0.5 * log(x))); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.8e+35], N[Not[LessEqual[z, 2.9e+25]], $MachinePrecision]], N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[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[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+35} \lor \neg \left(z \leq 2.9 \cdot 10^{+25}\right):\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right) + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -3.8e35 or 2.8999999999999999e25 < z Initial program 88.2%
Taylor expanded in z around inf 88.3%
associate-/l*92.0%
unpow292.0%
Simplified92.0%
Taylor expanded in z around 0 88.3%
*-commutative88.3%
associate-*r/92.0%
unpow292.0%
associate-/l*99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around 0 87.3%
if -3.8e35 < z < 2.8999999999999999e25Initial program 99.5%
Taylor expanded in z around 0 89.2%
clear-num89.1%
inv-pow89.1%
Applied egg-rr89.1%
unpow-189.1%
div-inv89.2%
metadata-eval89.2%
Applied egg-rr89.2%
Final simplification88.2%
(FPCore (x y z)
:precision binary64
(if (<= z -3.2e+70)
(sqrt (/ 0.0069444444444443885 (* x x)))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+70) {
tmp = sqrt((0.0069444444444443885 / (x * 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 <= (-3.2d+70)) then
tmp = sqrt((0.0069444444444443885d0 / (x * 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 <= -3.2e+70) {
tmp = Math.sqrt((0.0069444444444443885 / (x * 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 <= -3.2e+70: tmp = math.sqrt((0.0069444444444443885 / (x * 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 <= -3.2e+70) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * 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 <= -3.2e+70) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.2e+70], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $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 -3.2 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\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 < -3.2000000000000002e70Initial program 88.3%
Taylor expanded in z around 0 8.2%
Taylor expanded in x around inf 8.3%
sub-neg8.3%
mul-1-neg8.3%
log-rec8.3%
remove-double-neg8.3%
metadata-eval8.3%
Simplified8.3%
Taylor expanded in x around 0 3.8%
add-sqr-sqrt3.8%
sqrt-unprod36.7%
frac-times36.7%
metadata-eval36.7%
Applied egg-rr36.7%
if -3.2000000000000002e70 < z Initial program 95.1%
Taylor expanded in z around 0 62.8%
Final simplification57.9%
(FPCore (x y z)
:precision binary64
(if (<= z -6.6e+70)
(sqrt (/ 0.0069444444444443885 (* x x)))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6.6e+70) {
tmp = sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-6.6d+70)) then
tmp = sqrt((0.0069444444444443885d0 / (x * x)))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -6.6e+70) {
tmp = Math.sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -6.6e+70: tmp = math.sqrt((0.0069444444444443885 / (x * x))) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -6.6e+70) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * x))); 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 <= -6.6e+70) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -6.6e+70], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $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 -6.6 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\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 < -6.60000000000000033e70Initial program 88.3%
Taylor expanded in z around 0 8.2%
Taylor expanded in x around inf 8.3%
sub-neg8.3%
mul-1-neg8.3%
log-rec8.3%
remove-double-neg8.3%
metadata-eval8.3%
Simplified8.3%
Taylor expanded in x around 0 3.8%
add-sqr-sqrt3.8%
sqrt-unprod36.7%
frac-times36.7%
metadata-eval36.7%
Applied egg-rr36.7%
if -6.60000000000000033e70 < z Initial program 95.1%
Taylor expanded in z around 0 62.8%
associate-+l-62.8%
sub-neg62.8%
metadata-eval62.8%
*-commutative62.8%
sub-neg62.8%
metadata-eval62.8%
Applied egg-rr62.8%
Final simplification57.9%
(FPCore (x y z) :precision binary64 (if (<= z -1.75e+70) (sqrt (/ 0.0069444444444443885 (* x x))) (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.75e+70) {
tmp = sqrt((0.0069444444444443885 / (x * x)));
} 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) :: tmp
if (z <= (-1.75d+70)) then
tmp = sqrt((0.0069444444444443885d0 / (x * x)))
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 tmp;
if (z <= -1.75e+70) {
tmp = Math.sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.75e+70: tmp = math.sqrt((0.0069444444444443885 / (x * x))) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.75e+70) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * x))); 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) tmp = 0.0; if (z <= -1.75e+70) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.75e+70], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $MachinePrecision]), $MachinePrecision]], $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}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.75000000000000001e70Initial program 88.3%
Taylor expanded in z around 0 8.2%
Taylor expanded in x around inf 8.3%
sub-neg8.3%
mul-1-neg8.3%
log-rec8.3%
remove-double-neg8.3%
metadata-eval8.3%
Simplified8.3%
Taylor expanded in x around 0 3.8%
add-sqr-sqrt3.8%
sqrt-unprod36.7%
frac-times36.7%
metadata-eval36.7%
Applied egg-rr36.7%
if -1.75000000000000001e70 < z Initial program 95.1%
Taylor expanded in z around 0 62.8%
Taylor expanded in x around inf 62.4%
sub-neg62.4%
mul-1-neg62.4%
log-rec62.4%
remove-double-neg62.4%
metadata-eval62.4%
Simplified62.4%
Final simplification57.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.42e+32) (not (<= z 1e-83))) (sqrt (/ 0.0069444444444443885 (* x x))) (+ (/ 0.083333333333333 x) 2.91893853320467)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.42e+32) || !(z <= 1e-83)) {
tmp = sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (0.083333333333333 / x) + 2.91893853320467;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.42d+32)) .or. (.not. (z <= 1d-83))) then
tmp = sqrt((0.0069444444444443885d0 / (x * x)))
else
tmp = (0.083333333333333d0 / x) + 2.91893853320467d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.42e+32) || !(z <= 1e-83)) {
tmp = Math.sqrt((0.0069444444444443885 / (x * x)));
} else {
tmp = (0.083333333333333 / x) + 2.91893853320467;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.42e+32) or not (z <= 1e-83): tmp = math.sqrt((0.0069444444444443885 / (x * x))) else: tmp = (0.083333333333333 / x) + 2.91893853320467 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.42e+32) || !(z <= 1e-83)) tmp = sqrt(Float64(0.0069444444444443885 / Float64(x * x))); else tmp = Float64(Float64(0.083333333333333 / x) + 2.91893853320467); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.42e+32) || ~((z <= 1e-83))) tmp = sqrt((0.0069444444444443885 / (x * x))); else tmp = (0.083333333333333 / x) + 2.91893853320467; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.42e+32], N[Not[LessEqual[z, 1e-83]], $MachinePrecision]], N[Sqrt[N[(0.0069444444444443885 / N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + 2.91893853320467), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+32} \lor \neg \left(z \leq 10^{-83}\right):\\
\;\;\;\;\sqrt{\frac{0.0069444444444443885}{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + 2.91893853320467\\
\end{array}
\end{array}
if z < -1.41999999999999992e32 or 1e-83 < z Initial program 89.4%
Taylor expanded in z around 0 21.6%
Taylor expanded in x around inf 21.6%
sub-neg21.6%
mul-1-neg21.6%
log-rec21.6%
remove-double-neg21.6%
metadata-eval21.6%
Simplified21.6%
Taylor expanded in x around 0 5.1%
add-sqr-sqrt5.1%
sqrt-unprod21.4%
frac-times21.4%
metadata-eval21.4%
Applied egg-rr21.4%
if -1.41999999999999992e32 < z < 1e-83Initial program 99.5%
Taylor expanded in z around 0 92.4%
sub-neg92.4%
metadata-eval92.4%
*-commutative92.4%
*-un-lft-identity92.4%
prod-diff92.5%
add-sqr-sqrt0.0%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod60.7%
add-sqr-sqrt60.7%
Applied egg-rr60.7%
fma-udef60.7%
*-rgt-identity60.7%
sub-neg60.7%
fma-udef60.7%
*-rgt-identity60.7%
*-rgt-identity60.7%
Simplified60.7%
flip3--50.7%
flip-+0.0%
frac-add0.0%
Applied egg-rr0.0%
Simplified48.9%
Final simplification33.4%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) 2.91893853320467))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + 2.91893853320467;
}
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) + 2.91893853320467d0
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + 2.91893853320467;
}
def code(x, y, z): return (0.083333333333333 / x) + 2.91893853320467
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + 2.91893853320467) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + 2.91893853320467; end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + 2.91893853320467), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + 2.91893853320467
\end{array}
Initial program 93.8%
Taylor expanded in z around 0 52.6%
sub-neg52.6%
metadata-eval52.6%
*-commutative52.6%
*-un-lft-identity52.6%
prod-diff52.6%
add-sqr-sqrt0.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod32.2%
add-sqr-sqrt32.2%
Applied egg-rr32.2%
fma-udef32.2%
*-rgt-identity32.2%
sub-neg32.2%
fma-udef32.2%
*-rgt-identity32.2%
*-rgt-identity32.2%
Simplified32.2%
flip3--25.2%
flip-+0.0%
frac-add0.0%
Applied egg-rr0.0%
Simplified24.5%
Final simplification24.5%
(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 93.8%
Taylor expanded in z around 0 52.6%
Taylor expanded in x around inf 52.2%
sub-neg52.2%
mul-1-neg52.2%
log-rec52.2%
remove-double-neg52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in x around 0 24.0%
Final simplification24.0%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2023290
(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)))