
(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 4e+22)
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(/
(/ 1.0 x)
(/
1.0
(fma
z
(fma z (+ y 0.0007936500793651) -0.0027777777777778)
0.083333333333333))))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4e+22) {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / x) / (1.0 / fma(z, fma(z, (y + 0.0007936500793651), -0.0027777777777778), 0.083333333333333)));
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 4e+22) tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(1.0 / x) / Float64(1.0 / fma(z, fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778), 0.083333333333333)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 4e+22], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] / N[(1.0 / N[(z * N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right), 0.083333333333333\right)}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 4e22Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.5%
metadata-eval99.5%
fma-neg99.5%
fma-udef99.5%
*-commutative99.5%
inv-pow99.5%
*-commutative99.5%
fma-udef99.5%
fma-neg99.5%
metadata-eval99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
div-inv99.7%
associate-/r*99.6%
Applied egg-rr99.6%
if 4e22 < x Initial program 88.1%
remove-double-neg88.1%
remove-double-neg88.1%
sub-neg88.1%
metadata-eval88.1%
*-commutative88.1%
fma-def88.1%
fma-neg88.1%
metadata-eval88.1%
Simplified88.1%
clear-num88.1%
metadata-eval88.1%
fma-neg88.1%
fma-udef88.1%
*-commutative88.1%
inv-pow88.1%
*-commutative88.1%
fma-udef88.1%
fma-neg88.1%
metadata-eval88.1%
fma-udef88.1%
*-commutative88.1%
fma-def88.1%
Applied egg-rr88.1%
unpow-188.1%
div-inv88.1%
associate-/r*88.1%
Applied egg-rr88.1%
Taylor expanded in z around inf 87.4%
*-commutative87.4%
associate-*r/91.5%
unpow291.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.6%
*-commutative99.6%
sub-neg99.6%
mul-1-neg99.6%
log-rec99.6%
remove-double-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+23)
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+23) {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1e+23) tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1e+23], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $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[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+23}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \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}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 9.9999999999999992e22Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
if 9.9999999999999992e22 < x Initial program 88.0%
remove-double-neg88.0%
remove-double-neg88.0%
sub-neg88.0%
metadata-eval88.0%
*-commutative88.0%
fma-def88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
clear-num88.0%
metadata-eval88.0%
fma-neg88.0%
fma-udef88.0%
*-commutative88.0%
inv-pow88.0%
*-commutative88.0%
fma-udef88.0%
fma-neg88.0%
metadata-eval88.0%
fma-udef88.0%
*-commutative88.0%
fma-def88.0%
Applied egg-rr88.0%
unpow-188.0%
div-inv88.0%
associate-/r*88.0%
Applied egg-rr88.0%
Taylor expanded in z around inf 87.2%
*-commutative87.2%
associate-*r/91.4%
unpow291.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.7%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -22500.0) (not (<= z 5.6e+20)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(+ (/ 0.083333333333333 x) (* y (/ 1.0 (/ x (* z z))))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -22500.0) || !(z <= 5.6e+20)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y * (1.0 / (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 ((z <= (-22500.0d0)) .or. (.not. (z <= 5.6d+20))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
else
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 / x) + (y * (1.0d0 / (x / (z * z)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -22500.0) || !(z <= 5.6e+20)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y * (1.0 / (x / (z * z)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -22500.0) or not (z <= 5.6e+20): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) else: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y * (1.0 / (x / (z * z))))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -22500.0) || !(z <= 5.6e+20)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 / x) + Float64(y * Float64(1.0 / Float64(x / Float64(z * z)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -22500.0) || ~((z <= 5.6e+20))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); else tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y * (1.0 / (x / (z * z))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -22500.0], N[Not[LessEqual[z, 5.6e+20]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(y * N[(1.0 / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22500 \lor \neg \left(z \leq 5.6 \cdot 10^{+20}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + y \cdot \frac{1}{\frac{x}{z \cdot z}}\right)\\
\end{array}
\end{array}
if z < -22500 or 5.6e20 < z Initial program 89.4%
remove-double-neg89.4%
remove-double-neg89.4%
sub-neg89.4%
metadata-eval89.4%
*-commutative89.4%
fma-def89.4%
fma-neg89.4%
metadata-eval89.4%
Simplified89.4%
clear-num89.4%
metadata-eval89.4%
fma-neg89.4%
fma-udef89.4%
*-commutative89.4%
inv-pow89.4%
*-commutative89.4%
fma-udef89.4%
fma-neg89.4%
metadata-eval89.4%
fma-udef89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
unpow-189.4%
div-inv89.4%
associate-/r*89.4%
Applied egg-rr89.4%
Taylor expanded in z around inf 88.2%
*-commutative88.2%
associate-*r/92.0%
unpow292.0%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in x around inf 99.3%
*-commutative99.3%
sub-neg99.3%
mul-1-neg99.3%
log-rec99.3%
remove-double-neg99.3%
metadata-eval99.3%
Simplified99.3%
if -22500 < z < 5.6e20Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around 0 99.0%
+-commutative99.0%
associate-*r/99.1%
metadata-eval99.1%
associate-/l*99.1%
unpow299.1%
Simplified99.1%
div-inv99.1%
Applied egg-rr99.1%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -22500.0) (not (<= z 5.6e+20)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(+ (/ 0.083333333333333 x) (/ y (/ x (* z z)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -22500.0) || !(z <= 5.6e+20)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / 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) :: tmp
if ((z <= (-22500.0d0)) .or. (.not. (z <= 5.6d+20))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
else
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 / x) + (y / (x / (z * z))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -22500.0) || !(z <= 5.6e+20)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y / (x / (z * z))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -22500.0) or not (z <= 5.6e+20): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) else: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y / (x / (z * z)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -22500.0) || !(z <= 5.6e+20)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 / x) + Float64(y / Float64(x / Float64(z * z))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -22500.0) || ~((z <= 5.6e+20))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); else tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 / x) + (y / (x / (z * z)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -22500.0], N[Not[LessEqual[z, 5.6e+20]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22500 \lor \neg \left(z \leq 5.6 \cdot 10^{+20}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \frac{y}{\frac{x}{z \cdot z}}\right)\\
\end{array}
\end{array}
if z < -22500 or 5.6e20 < z Initial program 89.4%
remove-double-neg89.4%
remove-double-neg89.4%
sub-neg89.4%
metadata-eval89.4%
*-commutative89.4%
fma-def89.4%
fma-neg89.4%
metadata-eval89.4%
Simplified89.4%
clear-num89.4%
metadata-eval89.4%
fma-neg89.4%
fma-udef89.4%
*-commutative89.4%
inv-pow89.4%
*-commutative89.4%
fma-udef89.4%
fma-neg89.4%
metadata-eval89.4%
fma-udef89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
unpow-189.4%
div-inv89.4%
associate-/r*89.4%
Applied egg-rr89.4%
Taylor expanded in z around inf 88.2%
*-commutative88.2%
associate-*r/92.0%
unpow292.0%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in x around inf 99.3%
*-commutative99.3%
sub-neg99.3%
mul-1-neg99.3%
log-rec99.3%
remove-double-neg99.3%
metadata-eval99.3%
Simplified99.3%
if -22500 < z < 5.6e20Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around 0 99.0%
+-commutative99.0%
associate-*r/99.1%
metadata-eval99.1%
associate-/l*99.1%
unpow299.1%
Simplified99.1%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 5.6e+23)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.6e+23) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (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 <= 5.6d+23) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.6e+23) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.6e+23: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.6e+23) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.6e+23) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.6e+23], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.6 \cdot 10^{+23}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 5.6e23Initial program 99.6%
if 5.6e23 < x Initial program 88.0%
remove-double-neg88.0%
remove-double-neg88.0%
sub-neg88.0%
metadata-eval88.0%
*-commutative88.0%
fma-def88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
clear-num88.0%
metadata-eval88.0%
fma-neg88.0%
fma-udef88.0%
*-commutative88.0%
inv-pow88.0%
*-commutative88.0%
fma-udef88.0%
fma-neg88.0%
metadata-eval88.0%
fma-udef88.0%
*-commutative88.0%
fma-def88.0%
Applied egg-rr88.0%
unpow-188.0%
div-inv88.0%
associate-/r*88.0%
Applied egg-rr88.0%
Taylor expanded in z around inf 87.2%
*-commutative87.2%
associate-*r/91.4%
unpow291.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.7%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6e-21) (not (<= z 5.4e-47)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6e-21) || !(z <= 5.4e-47)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-6d-21)) .or. (.not. (z <= 5.4d-47))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
else
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6e-21) || !(z <= 5.4e-47)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6e-21) or not (z <= 5.4e-47): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) else: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6e-21) || !(z <= 5.4e-47)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6e-21) || ~((z <= 5.4e-47))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); else tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6e-21], N[Not[LessEqual[z, 5.4e-47]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-21} \lor \neg \left(z \leq 5.4 \cdot 10^{-47}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -5.99999999999999982e-21 or 5.3999999999999996e-47 < z Initial program 90.4%
remove-double-neg90.4%
remove-double-neg90.4%
sub-neg90.4%
metadata-eval90.4%
*-commutative90.4%
fma-def90.4%
fma-neg90.4%
metadata-eval90.4%
Simplified90.4%
clear-num90.4%
metadata-eval90.4%
fma-neg90.4%
fma-udef90.4%
*-commutative90.4%
inv-pow90.4%
*-commutative90.4%
fma-udef90.4%
fma-neg90.4%
metadata-eval90.4%
fma-udef90.4%
*-commutative90.4%
fma-def90.4%
Applied egg-rr90.4%
unpow-190.4%
div-inv90.4%
associate-/r*90.4%
Applied egg-rr90.4%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
associate-*r/91.5%
unpow291.5%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around inf 98.1%
*-commutative98.1%
sub-neg98.1%
mul-1-neg98.1%
log-rec98.1%
remove-double-neg98.1%
metadata-eval98.1%
Simplified98.1%
if -5.99999999999999982e-21 < z < 5.3999999999999996e-47Initial program 99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
*-commutative99.3%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -3.2e-21) (not (<= z 4.5e-47)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.2e-21) || !(z <= 4.5e-47)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (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.2d-21)) .or. (.not. (z <= 4.5d-47))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
else
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + (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.2e-21) || !(z <= 4.5e-47)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
} else {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.2e-21) or not (z <= 4.5e-47): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) else: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.2e-21) || !(z <= 4.5e-47)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.2e-21) || ~((z <= 4.5e-47))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); else tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.2e-21], N[Not[LessEqual[z, 4.5e-47]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-21} \lor \neg \left(z \leq 4.5 \cdot 10^{-47}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -3.2000000000000002e-21 or 4.5e-47 < z Initial program 90.4%
remove-double-neg90.4%
remove-double-neg90.4%
sub-neg90.4%
metadata-eval90.4%
*-commutative90.4%
fma-def90.4%
fma-neg90.4%
metadata-eval90.4%
Simplified90.4%
clear-num90.4%
metadata-eval90.4%
fma-neg90.4%
fma-udef90.4%
*-commutative90.4%
inv-pow90.4%
*-commutative90.4%
fma-udef90.4%
fma-neg90.4%
metadata-eval90.4%
fma-udef90.4%
*-commutative90.4%
fma-def90.4%
Applied egg-rr90.4%
unpow-190.4%
div-inv90.4%
associate-/r*90.4%
Applied egg-rr90.4%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
associate-*r/91.5%
unpow291.5%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in x around inf 98.1%
*-commutative98.1%
sub-neg98.1%
mul-1-neg98.1%
log-rec98.1%
remove-double-neg98.1%
metadata-eval98.1%
Simplified98.1%
if -3.2000000000000002e-21 < z < 4.5e-47Initial program 99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
*-commutative99.3%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 93.9%
clear-num91.8%
inv-pow91.8%
div-inv92.0%
metadata-eval92.0%
Applied egg-rr94.0%
unpow-192.0%
Simplified94.0%
Final simplification96.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.1e+76) (not (<= z 1.12e+103))) (+ (/ y (/ x (* z z))) (+ 0.91893853320467 (* -0.5 (log x)))) (+ (* x (+ (log x) -1.0)) (/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e+76) || !(z <= 1.12e+103)) {
tmp = (y / (x / (z * z))) + (0.91893853320467 + (-0.5 * log(x)));
} else {
tmp = (x * (log(x) + -1.0)) + (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 <= (-1.1d+76)) .or. (.not. (z <= 1.12d+103))) then
tmp = (y / (x / (z * z))) + (0.91893853320467d0 + ((-0.5d0) * log(x)))
else
tmp = (x * (log(x) + (-1.0d0))) + (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 <= -1.1e+76) || !(z <= 1.12e+103)) {
tmp = (y / (x / (z * z))) + (0.91893853320467 + (-0.5 * Math.log(x)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.1e+76) or not (z <= 1.12e+103): tmp = (y / (x / (z * z))) + (0.91893853320467 + (-0.5 * math.log(x))) else: tmp = (x * (math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.1e+76) || !(z <= 1.12e+103)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.1e+76) || ~((z <= 1.12e+103))) tmp = (y / (x / (z * z))) + (0.91893853320467 + (-0.5 * log(x))); else tmp = (x * (log(x) + -1.0)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.1e+76], N[Not[LessEqual[z, 1.12e+103]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+76} \lor \neg \left(z \leq 1.12 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if z < -1.1e76 or 1.12000000000000007e103 < z Initial program 86.8%
remove-double-neg86.8%
remove-double-neg86.8%
sub-neg86.8%
metadata-eval86.8%
*-commutative86.8%
fma-def86.8%
fma-neg86.8%
metadata-eval86.8%
Simplified86.8%
Taylor expanded in y around inf 64.5%
associate-/l*72.6%
unpow272.6%
Simplified72.6%
Taylor expanded in x around 0 68.4%
if -1.1e76 < z < 1.12000000000000007e103Initial program 98.8%
remove-double-neg98.8%
remove-double-neg98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
fma-def98.8%
fma-neg98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around 0 80.7%
Taylor expanded in x around inf 79.3%
*-commutative61.1%
sub-neg61.1%
mul-1-neg61.1%
log-rec61.1%
remove-double-neg61.1%
metadata-eval61.1%
Simplified79.3%
clear-num79.2%
inv-pow79.2%
div-inv79.4%
metadata-eval79.4%
Applied egg-rr79.4%
unpow-179.4%
Simplified79.4%
Final simplification75.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -8e+75) (not (<= z 2.5e+103)))
(+ (/ y (/ x (* z z))) (+ 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 <= -8e+75) || !(z <= 2.5e+103)) {
tmp = (y / (x / (z * z))) + (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 <= (-8d+75)) .or. (.not. (z <= 2.5d+103))) then
tmp = (y / (x / (z * z))) + (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 <= -8e+75) || !(z <= 2.5e+103)) {
tmp = (y / (x / (z * z))) + (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 <= -8e+75) or not (z <= 2.5e+103): tmp = (y / (x / (z * z))) + (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 <= -8e+75) || !(z <= 2.5e+103)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) + Float64(0.91893853320467 + Float64(-0.5 * log(x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8e+75) || ~((z <= 2.5e+103))) tmp = (y / (x / (z * z))) + (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, -8e+75], N[Not[LessEqual[z, 2.5e+103]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+75} \lor \neg \left(z \leq 2.5 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -7.99999999999999941e75 or 2.5e103 < z Initial program 86.8%
remove-double-neg86.8%
remove-double-neg86.8%
sub-neg86.8%
metadata-eval86.8%
*-commutative86.8%
fma-def86.8%
fma-neg86.8%
metadata-eval86.8%
Simplified86.8%
Taylor expanded in y around inf 64.5%
associate-/l*72.6%
unpow272.6%
Simplified72.6%
Taylor expanded in x around 0 68.4%
if -7.99999999999999941e75 < z < 2.5e103Initial program 98.8%
remove-double-neg98.8%
remove-double-neg98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
fma-def98.8%
fma-neg98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around 0 80.7%
Final simplification76.2%
(FPCore (x y z) :precision binary64 (if (<= x 1.9e-11) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (+ (* x (+ (log x) -1.0)) (/ 1.0 (* x 12.000000000000048)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e-11) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (x * (log(x) + -1.0)) + (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 (x <= 1.9d-11) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = (x * (log(x) + (-1.0d0))) + (1.0d0 / (x * 12.000000000000048d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e-11) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.9e-11: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = (x * (math.log(x) + -1.0)) + (1.0 / (x * 12.000000000000048)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.9e-11) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(1.0 / Float64(x * 12.000000000000048))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.9e-11) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = (x * (log(x) + -1.0)) + (1.0 / (x * 12.000000000000048)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.9e-11], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.9 \cdot 10^{-11}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{1}{x \cdot 12.000000000000048}\\
\end{array}
\end{array}
if x < 1.8999999999999999e-11Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 60.8%
associate-*r/60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in x around 0 60.9%
Taylor expanded in x around 0 60.9%
if 1.8999999999999999e-11 < x Initial program 89.7%
remove-double-neg89.7%
remove-double-neg89.7%
sub-neg89.7%
metadata-eval89.7%
*-commutative89.7%
fma-def89.7%
fma-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in z around 0 62.2%
Taylor expanded in x around inf 60.5%
*-commutative96.8%
sub-neg96.8%
mul-1-neg96.8%
log-rec96.8%
remove-double-neg96.8%
metadata-eval96.8%
Simplified60.5%
clear-num60.5%
inv-pow60.5%
div-inv60.5%
metadata-eval60.5%
Applied egg-rr60.5%
unpow-160.5%
Simplified60.5%
Final simplification60.7%
(FPCore (x y z) :precision binary64 (if (<= x 9.2e-10) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 9.2e-10) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / 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 (x <= 9.2d-10) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / 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 (x <= 9.2e-10) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 9.2e-10: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 9.2e-10) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / 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 (x <= 9.2e-10) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 9.2e-10], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $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}\;x \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 9.20000000000000028e-10Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 60.8%
associate-*r/60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in x around 0 60.9%
Taylor expanded in x around 0 60.9%
if 9.20000000000000028e-10 < x Initial program 89.7%
remove-double-neg89.7%
remove-double-neg89.7%
sub-neg89.7%
metadata-eval89.7%
*-commutative89.7%
fma-def89.7%
fma-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in z around 0 62.2%
Taylor expanded in x around inf 60.5%
*-commutative96.8%
sub-neg96.8%
mul-1-neg96.8%
log-rec96.8%
remove-double-neg96.8%
metadata-eval96.8%
Simplified60.5%
Final simplification60.7%
(FPCore (x y z)
:precision binary64
(if (<= x 1.85e-10)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
(/
(- (* x x) (/ 0.0069444444444443885 (* x x)))
(- x (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-10) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = ((x * x) - (0.0069444444444443885 / (x * x))) / (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 (x <= 1.85d-10) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = ((x * x) - (0.0069444444444443885d0 / (x * x))) / (x - (0.083333333333333d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-10) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = ((x * x) - (0.0069444444444443885 / (x * x))) / (x - (0.083333333333333 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.85e-10: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = ((x * x) - (0.0069444444444443885 / (x * x))) / (x - (0.083333333333333 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.85e-10) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(Float64(x * x) - Float64(0.0069444444444443885 / Float64(x * x))) / Float64(x - Float64(0.083333333333333 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.85e-10) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = ((x * x) - (0.0069444444444443885 / (x * x))) / (x - (0.083333333333333 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.85e-10], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(x * x), $MachinePrecision] - N[(0.0069444444444443885 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x - N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot x - \frac{0.0069444444444443885}{x \cdot x}}{x - \frac{0.083333333333333}{x}}\\
\end{array}
\end{array}
if x < 1.85000000000000007e-10Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 60.8%
associate-*r/60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in x around 0 60.9%
Taylor expanded in x around 0 60.9%
if 1.85000000000000007e-10 < x Initial program 89.7%
remove-double-neg89.7%
remove-double-neg89.7%
sub-neg89.7%
metadata-eval89.7%
*-commutative89.7%
fma-def89.7%
fma-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in z around 0 62.2%
add-sqr-sqrt61.9%
pow261.9%
Applied egg-rr61.9%
Taylor expanded in x around inf 2.0%
mul-1-neg2.0%
Simplified2.0%
flip-+4.1%
div-sub4.1%
sqr-neg4.1%
add-sqr-sqrt0.0%
sqrt-unprod5.2%
sqr-neg5.2%
sqrt-unprod13.0%
add-sqr-sqrt13.0%
frac-times13.0%
metadata-eval13.0%
add-sqr-sqrt0.0%
sqrt-unprod13.0%
sqr-neg13.0%
sqrt-unprod13.0%
add-sqr-sqrt13.0%
Applied egg-rr13.0%
div-sub13.0%
Simplified13.0%
Final simplification35.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -30.0) (not (<= z 1.15e+50))) (* -0.0027777777777778 (/ z x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -30.0) || !(z <= 1.15e+50)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 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 <= (-30.0d0)) .or. (.not. (z <= 1.15d+50))) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -30.0) || !(z <= 1.15e+50)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -30.0) or not (z <= 1.15e+50): tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -30.0) || !(z <= 1.15e+50)) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -30.0) || ~((z <= 1.15e+50))) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -30.0], N[Not[LessEqual[z, 1.15e+50]], $MachinePrecision]], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -30 \lor \neg \left(z \leq 1.15 \cdot 10^{+50}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -30 or 1.14999999999999998e50 < z Initial program 89.3%
remove-double-neg89.3%
remove-double-neg89.3%
sub-neg89.3%
metadata-eval89.3%
*-commutative89.3%
fma-def89.3%
fma-neg89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around 0 33.1%
associate-*r/33.1%
metadata-eval33.1%
Simplified33.1%
Taylor expanded in x around 0 13.8%
Taylor expanded in z around inf 14.1%
if -30 < z < 1.14999999999999998e50Initial program 99.4%
remove-double-neg99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
fma-def99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 89.0%
add-sqr-sqrt88.8%
pow288.8%
Applied egg-rr88.8%
Taylor expanded in x around inf 45.8%
mul-1-neg45.8%
Simplified45.8%
Taylor expanded in x around 0 47.0%
Final simplification30.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -4e+99) (not (<= z 1e+150))) (* -0.0027777777777778 (/ z x)) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4e+99) || !(z <= 1e+150)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 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 <= (-4d+99)) .or. (.not. (z <= 1d+150))) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4e+99) || !(z <= 1e+150)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4e+99) or not (z <= 1e+150): tmp = -0.0027777777777778 * (z / x) else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4e+99) || !(z <= 1e+150)) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4e+99) || ~((z <= 1e+150))) tmp = -0.0027777777777778 * (z / x); else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4e+99], N[Not[LessEqual[z, 1e+150]], $MachinePrecision]], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+99} \lor \neg \left(z \leq 10^{+150}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.9999999999999999e99 or 9.99999999999999981e149 < z Initial program 87.2%
remove-double-neg87.2%
remove-double-neg87.2%
sub-neg87.2%
metadata-eval87.2%
*-commutative87.2%
fma-def87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around 0 29.6%
associate-*r/29.6%
metadata-eval29.6%
Simplified29.6%
Taylor expanded in x around 0 20.7%
Taylor expanded in z around inf 20.8%
if -3.9999999999999999e99 < z < 9.99999999999999981e149Initial program 97.3%
remove-double-neg97.3%
remove-double-neg97.3%
sub-neg97.3%
metadata-eval97.3%
*-commutative97.3%
fma-def97.3%
fma-neg97.3%
metadata-eval97.3%
Simplified97.3%
Taylor expanded in z around 0 73.8%
add-sqr-sqrt73.6%
pow273.6%
Applied egg-rr73.6%
Taylor expanded in x around inf 33.3%
mul-1-neg33.3%
Simplified33.3%
expm1-log1p-u30.4%
expm1-udef30.4%
add-sqr-sqrt0.0%
sqrt-unprod35.8%
sqr-neg35.8%
sqrt-unprod36.3%
add-sqr-sqrt36.3%
Applied egg-rr36.3%
expm1-def36.3%
expm1-log1p38.8%
Simplified38.8%
Final simplification33.7%
(FPCore (x y z) :precision binary64 (if (<= x 1.35e-9) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.35e-9) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = 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 (x <= 1.35d-9) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.35e-9) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.35e-9: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.35e-9) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.35e-9) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.35e-9], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.3500000000000001e-9Initial program 99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 60.8%
associate-*r/60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in x around 0 60.9%
Taylor expanded in x around 0 60.9%
if 1.3500000000000001e-9 < x Initial program 89.7%
remove-double-neg89.7%
remove-double-neg89.7%
sub-neg89.7%
metadata-eval89.7%
*-commutative89.7%
fma-def89.7%
fma-neg89.7%
metadata-eval89.7%
Simplified89.7%
Taylor expanded in z around 0 62.2%
add-sqr-sqrt61.9%
pow261.9%
Applied egg-rr61.9%
Taylor expanded in x around inf 2.0%
mul-1-neg2.0%
Simplified2.0%
expm1-log1p-u1.0%
expm1-udef1.0%
add-sqr-sqrt0.0%
sqrt-unprod13.0%
sqr-neg13.0%
sqrt-unprod10.6%
add-sqr-sqrt10.6%
Applied egg-rr10.6%
expm1-def10.6%
expm1-log1p10.6%
Simplified10.6%
Final simplification34.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 94.4%
remove-double-neg94.4%
remove-double-neg94.4%
sub-neg94.4%
metadata-eval94.4%
*-commutative94.4%
fma-def94.4%
fma-neg94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in z around 0 56.0%
add-sqr-sqrt55.8%
pow255.8%
Applied egg-rr55.8%
Taylor expanded in x around inf 24.5%
mul-1-neg24.5%
Simplified24.5%
Taylor expanded in x around 0 25.4%
Final simplification25.4%
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
return -x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -x
end function
public static double code(double x, double y, double z) {
return -x;
}
def code(x, y, z): return -x
function code(x, y, z) return Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 94.4%
remove-double-neg94.4%
remove-double-neg94.4%
sub-neg94.4%
metadata-eval94.4%
*-commutative94.4%
fma-def94.4%
fma-neg94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in z around 0 56.0%
add-sqr-sqrt55.8%
pow255.8%
Applied egg-rr55.8%
Taylor expanded in x around inf 24.5%
mul-1-neg24.5%
Simplified24.5%
Taylor expanded in x around inf 1.4%
mul-1-neg1.4%
Simplified1.4%
Final simplification1.4%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2023195
(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)))