
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 1.05e+149)
(+
(+ (fma (+ 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)) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.05e+149) {
tmp = (fma((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)) + (z * (z * (y / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.05e+149) 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(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.05e+149], 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[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.05 \cdot 10^{+149}:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 1.0500000000000001e149Initial program 98.7%
fma-neg98.7%
sub-neg98.7%
metadata-eval98.7%
*-commutative98.7%
fma-def98.7%
fma-neg98.7%
metadata-eval98.7%
Simplified98.7%
if 1.0500000000000001e149 < x Initial program 83.1%
sub-neg83.1%
metadata-eval83.1%
fma-def83.1%
fma-neg83.1%
metadata-eval83.1%
Simplified83.1%
metadata-eval83.1%
fma-neg83.1%
fma-def83.1%
clear-num83.1%
inv-pow83.1%
*-commutative83.1%
fma-udef83.1%
fma-neg83.1%
metadata-eval83.1%
Applied egg-rr83.1%
Taylor expanded in y around inf 79.9%
associate-*l/85.9%
*-commutative85.9%
unpow285.9%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 95.4%
sub-neg95.4%
mul-1-neg95.4%
log-rec95.4%
remove-double-neg95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification97.9%
(FPCore (x y z)
:precision binary64
(if (<= x 2.25e+148)
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.25e+148) {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + (fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2.25e+148) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2.25e+148], N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.25 \cdot 10^{+148}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 2.24999999999999997e148Initial program 98.7%
sub-neg98.7%
metadata-eval98.7%
fma-def98.7%
fma-neg98.7%
metadata-eval98.7%
Simplified98.7%
if 2.24999999999999997e148 < x Initial program 83.1%
sub-neg83.1%
metadata-eval83.1%
fma-def83.1%
fma-neg83.1%
metadata-eval83.1%
Simplified83.1%
metadata-eval83.1%
fma-neg83.1%
fma-def83.1%
clear-num83.1%
inv-pow83.1%
*-commutative83.1%
fma-udef83.1%
fma-neg83.1%
metadata-eval83.1%
Applied egg-rr83.1%
Taylor expanded in y around inf 79.9%
associate-*l/85.9%
*-commutative85.9%
unpow285.9%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 95.4%
sub-neg95.4%
mul-1-neg95.4%
log-rec95.4%
remove-double-neg95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification97.9%
(FPCore (x y z)
:precision binary64
(if (<= x 8.8e+146)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.8e+146) {
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)) + (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 <= 8.8d+146) 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))) + (z * (z * (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8.8e+146) {
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)) + (z * (z * (y / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8.8e+146: 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)) + (z * (z * (y / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8.8e+146) 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(z * Float64(z * Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8.8e+146) 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)) + (z * (z * (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8.8e+146], 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[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.8 \cdot 10^{+146}:\\
\;\;\;\;\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) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 8.7999999999999992e146Initial program 98.7%
if 8.7999999999999992e146 < x Initial program 83.1%
sub-neg83.1%
metadata-eval83.1%
fma-def83.1%
fma-neg83.1%
metadata-eval83.1%
Simplified83.1%
metadata-eval83.1%
fma-neg83.1%
fma-def83.1%
clear-num83.1%
inv-pow83.1%
*-commutative83.1%
fma-udef83.1%
fma-neg83.1%
metadata-eval83.1%
Applied egg-rr83.1%
Taylor expanded in y around inf 79.9%
associate-*l/85.9%
*-commutative85.9%
unpow285.9%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 95.4%
sub-neg95.4%
mul-1-neg95.4%
log-rec95.4%
remove-double-neg95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification97.9%
(FPCore (x y z)
:precision binary64
(if (<= x 1.15e-21)
(+
(* (/ z x) (fma z (+ y 0.0007936500793651) -0.0027777777777778))
(- (/ 0.083333333333333 x) x))
(if (<= x 8.6e+161)
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(* (+ y 0.0007936500793651) (/ (* z z) x)))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.15e-21) {
tmp = ((z / x) * fma(z, (y + 0.0007936500793651), -0.0027777777777778)) + ((0.083333333333333 / x) - x);
} else if (x <= 8.6e+161) {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + ((y + 0.0007936500793651) * ((z * z) / x));
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.15e-21) tmp = Float64(Float64(Float64(z / x) * fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778)) + Float64(Float64(0.083333333333333 / x) - x)); elseif (x <= 8.6e+161) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.15e-21], N[(N[(N[(z / x), $MachinePrecision] * N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.6e+161], N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;\frac{z}{x} \cdot \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right) + \left(\frac{0.083333333333333}{x} - x\right)\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+161}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 1.15e-21Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-sqr-sqrt99.7%
pow299.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
neg-mul-199.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
mul-1-neg99.7%
+-commutative99.7%
associate-*r/99.7%
metadata-eval99.7%
+-commutative99.7%
associate-+l+99.7%
associate-/l*98.2%
*-commutative98.2%
fma-neg98.2%
metadata-eval98.2%
associate-/r/99.7%
fma-def99.7%
*-commutative99.7%
fma-udef99.7%
sub-neg99.7%
Simplified99.7%
if 1.15e-21 < x < 8.6e161Initial program 95.7%
sub-neg95.7%
metadata-eval95.7%
fma-def95.7%
fma-neg95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in z around inf 93.1%
associate-/l*94.4%
associate-/r/94.5%
unpow294.5%
Simplified94.5%
if 8.6e161 < x Initial program 82.7%
sub-neg82.7%
metadata-eval82.7%
fma-def82.7%
fma-neg82.7%
metadata-eval82.7%
Simplified82.7%
metadata-eval82.7%
fma-neg82.7%
fma-def82.7%
clear-num82.7%
inv-pow82.7%
*-commutative82.7%
fma-udef82.7%
fma-neg82.7%
metadata-eval82.7%
Applied egg-rr82.7%
Taylor expanded in y around inf 79.0%
associate-*l/84.2%
*-commutative84.2%
unpow284.2%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 96.4%
sub-neg96.4%
mul-1-neg96.4%
log-rec96.4%
remove-double-neg96.4%
metadata-eval96.4%
Simplified96.4%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (<= x 2.2e-28)
(+
(* (/ z x) (fma z (+ y 0.0007936500793651) -0.0027777777777778))
(- (/ 0.083333333333333 x) x))
(if (<= x 3.85e+161)
(+
(+ 0.91893853320467 (- (* (+ x -0.5) (log x)) x))
(/ (+ y 0.0007936500793651) (/ x (* z z))))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.2e-28) {
tmp = ((z / x) * fma(z, (y + 0.0007936500793651), -0.0027777777777778)) + ((0.083333333333333 / x) - x);
} else if (x <= 3.85e+161) {
tmp = (0.91893853320467 + (((x + -0.5) * log(x)) - x)) + ((y + 0.0007936500793651) / (x / (z * z)));
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2.2e-28) tmp = Float64(Float64(Float64(z / x) * fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778)) + Float64(Float64(0.083333333333333 / x) - x)); elseif (x <= 3.85e+161) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(x + -0.5) * log(x)) - x)) + Float64(Float64(y + 0.0007936500793651) / Float64(x / Float64(z * z)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2.2e-28], N[(N[(N[(z / x), $MachinePrecision] * N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.85e+161], N[(N[(0.91893853320467 + N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{z}{x} \cdot \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right) + \left(\frac{0.083333333333333}{x} - x\right)\\
\mathbf{elif}\;x \leq 3.85 \cdot 10^{+161}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(x + -0.5\right) \cdot \log x - x\right)\right) + \frac{y + 0.0007936500793651}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 2.19999999999999996e-28Initial program 99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-sqr-sqrt99.7%
pow299.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
neg-mul-199.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
mul-1-neg99.7%
+-commutative99.7%
associate-*r/99.7%
metadata-eval99.7%
+-commutative99.7%
associate-+l+99.7%
associate-/l*98.2%
*-commutative98.2%
fma-neg98.2%
metadata-eval98.2%
associate-/r/99.7%
fma-def99.7%
*-commutative99.7%
fma-udef99.7%
sub-neg99.7%
Simplified99.7%
if 2.19999999999999996e-28 < x < 3.85000000000000022e161Initial program 95.8%
sub-neg95.8%
metadata-eval95.8%
fma-def95.8%
fma-neg95.8%
metadata-eval95.8%
Simplified95.8%
metadata-eval95.8%
fma-neg95.8%
fma-def95.8%
clear-num95.8%
inv-pow95.8%
*-commutative95.8%
fma-udef95.8%
fma-neg95.8%
metadata-eval95.8%
Applied egg-rr95.8%
Taylor expanded in z around inf 93.2%
*-commutative93.2%
associate-/l*94.6%
unpow294.6%
Simplified94.6%
if 3.85000000000000022e161 < x Initial program 82.7%
sub-neg82.7%
metadata-eval82.7%
fma-def82.7%
fma-neg82.7%
metadata-eval82.7%
Simplified82.7%
metadata-eval82.7%
fma-neg82.7%
fma-def82.7%
clear-num82.7%
inv-pow82.7%
*-commutative82.7%
fma-udef82.7%
fma-neg82.7%
metadata-eval82.7%
Applied egg-rr82.7%
Taylor expanded in y around inf 79.0%
associate-*l/84.2%
*-commutative84.2%
unpow284.2%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 96.4%
sub-neg96.4%
mul-1-neg96.4%
log-rec96.4%
remove-double-neg96.4%
metadata-eval96.4%
Simplified96.4%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+36)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
x)
(if (or (<= x 1.55e+128) (not (<= x 4.8e+145)))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))
(fma (* z z) (/ 1.0 (/ x (+ y 0.0007936500793651))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+36) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.55e+128) || !(x <= 4.8e+145)) {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
} else {
tmp = fma((z * z), (1.0 / (x / (y + 0.0007936500793651))), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+36) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x); elseif ((x <= 1.55e+128) || !(x <= 4.8e+145)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); else tmp = fma(Float64(z * z), Float64(1.0 / Float64(x / Float64(y + 0.0007936500793651))), x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+36], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 1.55e+128], N[Not[LessEqual[x, 4.8e+145]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(1.0 / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+36}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+128} \lor \neg \left(x \leq 4.8 \cdot 10^{+145}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot z, \frac{1}{\frac{x}{y + 0.0007936500793651}}, x\right)\\
\end{array}
\end{array}
if x < 1.3000000000000001e36Initial program 99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
metadata-eval99.1%
sub-neg99.1%
add-sqr-sqrt99.1%
pow299.1%
*-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in x around inf 96.5%
neg-mul-196.5%
Simplified96.5%
Taylor expanded in x around 0 96.5%
if 1.3000000000000001e36 < x < 1.55000000000000002e128 or 4.79999999999999984e145 < x Initial program 89.4%
sub-neg89.4%
metadata-eval89.4%
fma-def89.4%
fma-neg89.4%
metadata-eval89.4%
Simplified89.4%
metadata-eval89.4%
fma-neg89.4%
fma-def89.4%
clear-num89.4%
inv-pow89.4%
*-commutative89.4%
fma-udef89.4%
fma-neg89.4%
metadata-eval89.4%
Applied egg-rr89.4%
Taylor expanded in y around inf 83.5%
associate-*l/87.3%
*-commutative87.3%
unpow287.3%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 92.3%
sub-neg92.3%
mul-1-neg92.3%
log-rec92.3%
remove-double-neg92.3%
metadata-eval92.3%
Simplified92.3%
if 1.55000000000000002e128 < x < 4.79999999999999984e145Initial program 86.3%
sub-neg86.3%
metadata-eval86.3%
fma-def86.3%
fma-neg86.3%
metadata-eval86.3%
Simplified86.3%
metadata-eval86.3%
sub-neg86.3%
add-sqr-sqrt86.3%
pow286.3%
*-commutative86.3%
sub-neg86.3%
metadata-eval86.3%
Applied egg-rr86.3%
Taylor expanded in x around inf 81.9%
neg-mul-181.9%
Simplified81.9%
Taylor expanded in z around inf 81.9%
associate-/l*81.9%
unpow281.9%
Simplified81.9%
+-commutative81.9%
div-inv81.9%
fma-def81.9%
add-sqr-sqrt0.0%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-unprod81.9%
add-sqr-sqrt81.9%
Applied egg-rr81.9%
Final simplification94.4%
(FPCore (x y z)
:precision binary64
(if (<= x 1.15e+36)
(+
(* (/ z x) (fma z (+ y 0.0007936500793651) -0.0027777777777778))
(- (/ 0.083333333333333 x) x))
(+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.15e+36) {
tmp = ((z / x) * fma(z, (y + 0.0007936500793651), -0.0027777777777778)) + ((0.083333333333333 / x) - x);
} else {
tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.15e+36) tmp = Float64(Float64(Float64(z / x) * fma(z, Float64(y + 0.0007936500793651), -0.0027777777777778)) + Float64(Float64(0.083333333333333 / x) - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.15e+36], N[(N[(N[(z / x), $MachinePrecision] * N[(z * N[(y + 0.0007936500793651), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+36}:\\
\;\;\;\;\frac{z}{x} \cdot \mathsf{fma}\left(z, y + 0.0007936500793651, -0.0027777777777778\right) + \left(\frac{0.083333333333333}{x} - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\
\end{array}
\end{array}
if x < 1.14999999999999998e36Initial program 99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
metadata-eval99.1%
sub-neg99.1%
add-sqr-sqrt99.1%
pow299.1%
*-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in x around inf 96.5%
neg-mul-196.5%
Simplified96.5%
Taylor expanded in x around 0 96.4%
mul-1-neg96.4%
+-commutative96.4%
associate-*r/96.5%
metadata-eval96.5%
+-commutative96.5%
associate-+l+96.5%
associate-/l*95.8%
*-commutative95.8%
fma-neg95.8%
metadata-eval95.8%
associate-/r/97.1%
fma-def97.1%
*-commutative97.1%
fma-udef97.1%
sub-neg97.1%
Simplified97.1%
if 1.14999999999999998e36 < x Initial program 89.2%
sub-neg89.2%
metadata-eval89.2%
fma-def89.2%
fma-neg89.2%
metadata-eval89.2%
Simplified89.2%
metadata-eval89.2%
fma-neg89.2%
fma-def89.2%
clear-num89.2%
inv-pow89.2%
*-commutative89.2%
fma-udef89.2%
fma-neg89.2%
metadata-eval89.2%
Applied egg-rr89.2%
Taylor expanded in y around inf 81.2%
associate-*l/83.7%
*-commutative83.7%
unpow283.7%
associate-*l*87.7%
Simplified87.7%
Taylor expanded in x around inf 87.8%
sub-neg87.8%
mul-1-neg87.8%
log-rec87.8%
remove-double-neg87.8%
metadata-eval87.8%
Simplified87.8%
Final simplification93.1%
(FPCore (x y z)
:precision binary64
(if (<= x 7.5e+72)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
x)
(if (or (<= x 1.55e+128) (not (<= x 1.5e+165)))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(* (* z z) (+ (/ y x) (/ 0.0007936500793651 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 7.5e+72) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.55e+128) || !(x <= 1.5e+165)) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = (z * z) * ((y / x) + (0.0007936500793651 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 7.5d+72) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) - x
else if ((x <= 1.55d+128) .or. (.not. (x <= 1.5d+165))) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = (z * z) * ((y / x) + (0.0007936500793651d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 7.5e+72) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.55e+128) || !(x <= 1.5e+165)) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = (z * z) * ((y / x) + (0.0007936500793651 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 7.5e+72: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x elif (x <= 1.55e+128) or not (x <= 1.5e+165): tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = (z * z) * ((y / x) + (0.0007936500793651 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 7.5e+72) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x); elseif ((x <= 1.55e+128) || !(x <= 1.5e+165)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(z * z) * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 7.5e+72) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x; elseif ((x <= 1.55e+128) || ~((x <= 1.5e+165))) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = (z * z) * ((y / x) + (0.0007936500793651 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 7.5e+72], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 1.55e+128], N[Not[LessEqual[x, 1.5e+165]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.5 \cdot 10^{+72}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+128} \lor \neg \left(x \leq 1.5 \cdot 10^{+165}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\\
\end{array}
\end{array}
if x < 7.50000000000000027e72Initial program 99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
metadata-eval99.1%
sub-neg99.1%
add-sqr-sqrt99.1%
pow299.1%
*-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in x around inf 93.7%
neg-mul-193.7%
Simplified93.7%
Taylor expanded in x around 0 93.7%
if 7.50000000000000027e72 < x < 1.55000000000000002e128 or 1.49999999999999995e165 < x Initial program 87.1%
sub-neg87.1%
metadata-eval87.1%
fma-def87.1%
fma-neg87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in z around 0 83.1%
Taylor expanded in x around inf 83.1%
sub-neg94.7%
mul-1-neg94.7%
log-rec94.7%
remove-double-neg94.7%
metadata-eval94.7%
Simplified83.1%
if 1.55000000000000002e128 < x < 1.49999999999999995e165Initial program 89.5%
sub-neg89.5%
metadata-eval89.5%
fma-def89.5%
fma-neg89.5%
metadata-eval89.5%
Simplified89.5%
metadata-eval89.5%
sub-neg89.5%
add-sqr-sqrt89.3%
pow289.3%
*-commutative89.3%
sub-neg89.3%
metadata-eval89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 60.2%
neg-mul-160.2%
Simplified60.2%
Taylor expanded in z around inf 66.3%
unpow266.3%
associate-*r/66.3%
metadata-eval66.3%
Simplified66.3%
Final simplification88.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.9e+73)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
x)
(if (or (<= x 1.55e+128) (not (<= x 9.6e+164)))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(fma (/ (* z z) x) (+ y 0.0007936500793651) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+73) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.55e+128) || !(x <= 9.6e+164)) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = fma(((z * z) / x), (y + 0.0007936500793651), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.9e+73) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x); elseif ((x <= 1.55e+128) || !(x <= 9.6e+164)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = fma(Float64(Float64(z * z) / x), Float64(y + 0.0007936500793651), x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.9e+73], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 1.55e+128], N[Not[LessEqual[x, 9.6e+164]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.9 \cdot 10^{+73}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+128} \lor \neg \left(x \leq 9.6 \cdot 10^{+164}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z \cdot z}{x}, y + 0.0007936500793651, x\right)\\
\end{array}
\end{array}
if x < 1.90000000000000011e73Initial program 99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
metadata-eval99.1%
sub-neg99.1%
add-sqr-sqrt99.1%
pow299.1%
*-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in x around inf 93.7%
neg-mul-193.7%
Simplified93.7%
Taylor expanded in x around 0 93.7%
if 1.90000000000000011e73 < x < 1.55000000000000002e128 or 9.60000000000000043e164 < x Initial program 87.1%
sub-neg87.1%
metadata-eval87.1%
fma-def87.1%
fma-neg87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in z around 0 83.1%
Taylor expanded in x around inf 83.1%
sub-neg94.7%
mul-1-neg94.7%
log-rec94.7%
remove-double-neg94.7%
metadata-eval94.7%
Simplified83.1%
if 1.55000000000000002e128 < x < 9.60000000000000043e164Initial program 89.5%
sub-neg89.5%
metadata-eval89.5%
fma-def89.5%
fma-neg89.5%
metadata-eval89.5%
Simplified89.5%
metadata-eval89.5%
sub-neg89.5%
add-sqr-sqrt89.3%
pow289.3%
*-commutative89.3%
sub-neg89.3%
metadata-eval89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 60.2%
neg-mul-160.2%
Simplified60.2%
Taylor expanded in z around inf 60.2%
associate-/l*65.3%
unpow265.3%
Simplified65.3%
+-commutative65.3%
associate-/r/65.4%
fma-def65.4%
add-sqr-sqrt0.0%
sqrt-unprod56.4%
sqr-neg56.4%
sqrt-unprod69.1%
add-sqr-sqrt69.1%
Applied egg-rr69.1%
Final simplification88.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (/ y x) (* z z)) x))
(t_1 (- (/ (* z z) (* x 1260.0011340009878)) x)))
(if (<= z -1.22e+138)
t_1
(if (<= z -1.18e-23)
t_0
(if (<= z 1.45e-20)
(- (/ 0.083333333333333 x) x)
(if (<= z 8.2e+114)
(- (/ y (/ x (* z z))) x)
(if (or (<= z 1.7e+226) (not (<= z 7.5e+251))) t_1 t_0)))))))
double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = ((z * z) / (x * 1260.0011340009878)) - x;
double tmp;
if (z <= -1.22e+138) {
tmp = t_1;
} else if (z <= -1.18e-23) {
tmp = t_0;
} else if (z <= 1.45e-20) {
tmp = (0.083333333333333 / x) - x;
} else if (z <= 8.2e+114) {
tmp = (y / (x / (z * z))) - x;
} else if ((z <= 1.7e+226) || !(z <= 7.5e+251)) {
tmp = t_1;
} 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 / x) * (z * z)) - x
t_1 = ((z * z) / (x * 1260.0011340009878d0)) - x
if (z <= (-1.22d+138)) then
tmp = t_1
else if (z <= (-1.18d-23)) then
tmp = t_0
else if (z <= 1.45d-20) then
tmp = (0.083333333333333d0 / x) - x
else if (z <= 8.2d+114) then
tmp = (y / (x / (z * z))) - x
else if ((z <= 1.7d+226) .or. (.not. (z <= 7.5d+251))) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = ((z * z) / (x * 1260.0011340009878)) - x;
double tmp;
if (z <= -1.22e+138) {
tmp = t_1;
} else if (z <= -1.18e-23) {
tmp = t_0;
} else if (z <= 1.45e-20) {
tmp = (0.083333333333333 / x) - x;
} else if (z <= 8.2e+114) {
tmp = (y / (x / (z * z))) - x;
} else if ((z <= 1.7e+226) || !(z <= 7.5e+251)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / x) * (z * z)) - x t_1 = ((z * z) / (x * 1260.0011340009878)) - x tmp = 0 if z <= -1.22e+138: tmp = t_1 elif z <= -1.18e-23: tmp = t_0 elif z <= 1.45e-20: tmp = (0.083333333333333 / x) - x elif z <= 8.2e+114: tmp = (y / (x / (z * z))) - x elif (z <= 1.7e+226) or not (z <= 7.5e+251): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / x) * Float64(z * z)) - x) t_1 = Float64(Float64(Float64(z * z) / Float64(x * 1260.0011340009878)) - x) tmp = 0.0 if (z <= -1.22e+138) tmp = t_1; elseif (z <= -1.18e-23) tmp = t_0; elseif (z <= 1.45e-20) tmp = Float64(Float64(0.083333333333333 / x) - x); elseif (z <= 8.2e+114) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); elseif ((z <= 1.7e+226) || !(z <= 7.5e+251)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / x) * (z * z)) - x; t_1 = ((z * z) / (x * 1260.0011340009878)) - x; tmp = 0.0; if (z <= -1.22e+138) tmp = t_1; elseif (z <= -1.18e-23) tmp = t_0; elseif (z <= 1.45e-20) tmp = (0.083333333333333 / x) - x; elseif (z <= 8.2e+114) tmp = (y / (x / (z * z))) - x; elseif ((z <= 1.7e+226) || ~((z <= 7.5e+251))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z * z), $MachinePrecision] / N[(x * 1260.0011340009878), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -1.22e+138], t$95$1, If[LessEqual[z, -1.18e-23], t$95$0, If[LessEqual[z, 1.45e-20], N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 8.2e+114], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[z, 1.7e+226], N[Not[LessEqual[z, 7.5e+251]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right) - x\\
t_1 := \frac{z \cdot z}{x \cdot 1260.0011340009878} - x\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-20}:\\
\;\;\;\;\frac{0.083333333333333}{x} - x\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+114}:\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+226} \lor \neg \left(z \leq 7.5 \cdot 10^{+251}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.22000000000000001e138 or 8.2000000000000001e114 < z < 1.69999999999999989e226 or 7.49999999999999973e251 < z Initial program 88.0%
sub-neg88.0%
metadata-eval88.0%
fma-def88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
metadata-eval88.0%
sub-neg88.0%
add-sqr-sqrt88.0%
pow288.0%
*-commutative88.0%
sub-neg88.0%
metadata-eval88.0%
Applied egg-rr88.0%
Taylor expanded in x around inf 83.9%
neg-mul-183.9%
Simplified83.9%
Taylor expanded in z around inf 83.9%
associate-/l*82.6%
unpow282.6%
Simplified82.6%
Taylor expanded in y around 0 69.3%
*-commutative69.3%
Simplified69.3%
if -1.22000000000000001e138 < z < -1.18e-23 or 1.69999999999999989e226 < z < 7.49999999999999973e251Initial program 97.0%
sub-neg97.0%
metadata-eval97.0%
fma-def97.0%
fma-neg97.0%
metadata-eval97.0%
Simplified97.0%
metadata-eval97.0%
sub-neg97.0%
add-sqr-sqrt96.8%
pow296.8%
*-commutative96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in x around inf 70.7%
neg-mul-170.7%
Simplified70.7%
Taylor expanded in y around inf 59.2%
*-commutative59.2%
associate-*r/62.0%
unpow262.0%
Simplified62.0%
if -1.18e-23 < z < 1.45e-20Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 58.4%
neg-mul-158.4%
Simplified58.4%
Taylor expanded in z around 0 53.5%
associate-*r/53.6%
metadata-eval53.6%
Simplified53.6%
if 1.45e-20 < z < 8.2000000000000001e114Initial program 94.0%
sub-neg94.0%
metadata-eval94.0%
fma-def94.0%
fma-neg94.0%
metadata-eval94.0%
Simplified94.0%
metadata-eval94.0%
sub-neg94.0%
add-sqr-sqrt93.8%
pow293.8%
*-commutative93.8%
sub-neg93.8%
metadata-eval93.8%
Applied egg-rr93.8%
Taylor expanded in x around inf 56.2%
neg-mul-156.2%
Simplified56.2%
Taylor expanded in y around inf 40.0%
associate-/l*42.7%
unpow242.7%
Simplified42.7%
Final simplification58.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (/ y x) (* z z)) x))
(t_1 (- (/ (* z z) (* x 1260.0011340009878)) x)))
(if (<= z -6e+138)
t_1
(if (<= z -8.5e-19)
t_0
(if (<= z 1.95e-20)
(- (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) x)
(if (<= z 2e+113)
(- (/ y (/ x (* z z))) x)
(if (or (<= z 2.4e+226) (not (<= z 1.15e+251))) t_1 t_0)))))))
double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = ((z * z) / (x * 1260.0011340009878)) - x;
double tmp;
if (z <= -6e+138) {
tmp = t_1;
} else if (z <= -8.5e-19) {
tmp = t_0;
} else if (z <= 1.95e-20) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else if (z <= 2e+113) {
tmp = (y / (x / (z * z))) - x;
} else if ((z <= 2.4e+226) || !(z <= 1.15e+251)) {
tmp = t_1;
} 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 / x) * (z * z)) - x
t_1 = ((z * z) / (x * 1260.0011340009878d0)) - x
if (z <= (-6d+138)) then
tmp = t_1
else if (z <= (-8.5d-19)) then
tmp = t_0
else if (z <= 1.95d-20) then
tmp = ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x) - x
else if (z <= 2d+113) then
tmp = (y / (x / (z * z))) - x
else if ((z <= 2.4d+226) .or. (.not. (z <= 1.15d+251))) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = ((z * z) / (x * 1260.0011340009878)) - x;
double tmp;
if (z <= -6e+138) {
tmp = t_1;
} else if (z <= -8.5e-19) {
tmp = t_0;
} else if (z <= 1.95e-20) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else if (z <= 2e+113) {
tmp = (y / (x / (z * z))) - x;
} else if ((z <= 2.4e+226) || !(z <= 1.15e+251)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / x) * (z * z)) - x t_1 = ((z * z) / (x * 1260.0011340009878)) - x tmp = 0 if z <= -6e+138: tmp = t_1 elif z <= -8.5e-19: tmp = t_0 elif z <= 1.95e-20: tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x elif z <= 2e+113: tmp = (y / (x / (z * z))) - x elif (z <= 2.4e+226) or not (z <= 1.15e+251): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / x) * Float64(z * z)) - x) t_1 = Float64(Float64(Float64(z * z) / Float64(x * 1260.0011340009878)) - x) tmp = 0.0 if (z <= -6e+138) tmp = t_1; elseif (z <= -8.5e-19) tmp = t_0; elseif (z <= 1.95e-20) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) - x); elseif (z <= 2e+113) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); elseif ((z <= 2.4e+226) || !(z <= 1.15e+251)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / x) * (z * z)) - x; t_1 = ((z * z) / (x * 1260.0011340009878)) - x; tmp = 0.0; if (z <= -6e+138) tmp = t_1; elseif (z <= -8.5e-19) tmp = t_0; elseif (z <= 1.95e-20) tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x; elseif (z <= 2e+113) tmp = (y / (x / (z * z))) - x; elseif ((z <= 2.4e+226) || ~((z <= 1.15e+251))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(z * z), $MachinePrecision] / N[(x * 1260.0011340009878), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -6e+138], t$95$1, If[LessEqual[z, -8.5e-19], t$95$0, If[LessEqual[z, 1.95e-20], N[(N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 2e+113], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[z, 2.4e+226], N[Not[LessEqual[z, 1.15e+251]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right) - x\\
t_1 := \frac{z \cdot z}{x \cdot 1260.0011340009878} - x\\
\mathbf{if}\;z \leq -6 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-20}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+113}:\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+226} \lor \neg \left(z \leq 1.15 \cdot 10^{+251}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -6.0000000000000002e138 or 2e113 < z < 2.4e226 or 1.14999999999999994e251 < z Initial program 88.0%
sub-neg88.0%
metadata-eval88.0%
fma-def88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
metadata-eval88.0%
sub-neg88.0%
add-sqr-sqrt88.0%
pow288.0%
*-commutative88.0%
sub-neg88.0%
metadata-eval88.0%
Applied egg-rr88.0%
Taylor expanded in x around inf 83.9%
neg-mul-183.9%
Simplified83.9%
Taylor expanded in z around inf 83.9%
associate-/l*82.6%
unpow282.6%
Simplified82.6%
Taylor expanded in y around 0 69.3%
*-commutative69.3%
Simplified69.3%
if -6.0000000000000002e138 < z < -8.50000000000000003e-19 or 2.4e226 < z < 1.14999999999999994e251Initial program 97.0%
sub-neg97.0%
metadata-eval97.0%
fma-def97.0%
fma-neg97.0%
metadata-eval97.0%
Simplified97.0%
metadata-eval97.0%
sub-neg97.0%
add-sqr-sqrt96.8%
pow296.8%
*-commutative96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in x around inf 70.7%
neg-mul-170.7%
Simplified70.7%
Taylor expanded in y around inf 59.2%
*-commutative59.2%
associate-*r/62.0%
unpow262.0%
Simplified62.0%
if -8.50000000000000003e-19 < z < 1.95000000000000004e-20Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 58.4%
neg-mul-158.4%
Simplified58.4%
Taylor expanded in z around 0 53.6%
if 1.95000000000000004e-20 < z < 2e113Initial program 94.0%
sub-neg94.0%
metadata-eval94.0%
fma-def94.0%
fma-neg94.0%
metadata-eval94.0%
Simplified94.0%
metadata-eval94.0%
sub-neg94.0%
add-sqr-sqrt93.8%
pow293.8%
*-commutative93.8%
sub-neg93.8%
metadata-eval93.8%
Applied egg-rr93.8%
Taylor expanded in x around inf 56.2%
neg-mul-156.2%
Simplified56.2%
Taylor expanded in y around inf 40.0%
associate-/l*42.7%
unpow242.7%
Simplified42.7%
Final simplification58.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (/ y x) (* z z)) x))
(t_1 (- (* z (* z (/ 0.0007936500793651 x))) x)))
(if (<= z -9e+137)
t_1
(if (<= z -7.8e-16)
t_0
(if (<= z 3.2e-20)
(- (/ 0.083333333333333 x) x)
(if (<= z 8.6e+114)
t_0
(if (<= z 1.1e+226)
t_1
(if (<= z 1.5e+251)
t_0
(- (* 0.0007936500793651 (/ z (/ x z))) x)))))))))
double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = (z * (z * (0.0007936500793651 / x))) - x;
double tmp;
if (z <= -9e+137) {
tmp = t_1;
} else if (z <= -7.8e-16) {
tmp = t_0;
} else if (z <= 3.2e-20) {
tmp = (0.083333333333333 / x) - x;
} else if (z <= 8.6e+114) {
tmp = t_0;
} else if (z <= 1.1e+226) {
tmp = t_1;
} else if (z <= 1.5e+251) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 * (z / (x / 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) :: t_1
real(8) :: tmp
t_0 = ((y / x) * (z * z)) - x
t_1 = (z * (z * (0.0007936500793651d0 / x))) - x
if (z <= (-9d+137)) then
tmp = t_1
else if (z <= (-7.8d-16)) then
tmp = t_0
else if (z <= 3.2d-20) then
tmp = (0.083333333333333d0 / x) - x
else if (z <= 8.6d+114) then
tmp = t_0
else if (z <= 1.1d+226) then
tmp = t_1
else if (z <= 1.5d+251) then
tmp = t_0
else
tmp = (0.0007936500793651d0 * (z / (x / z))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / x) * (z * z)) - x;
double t_1 = (z * (z * (0.0007936500793651 / x))) - x;
double tmp;
if (z <= -9e+137) {
tmp = t_1;
} else if (z <= -7.8e-16) {
tmp = t_0;
} else if (z <= 3.2e-20) {
tmp = (0.083333333333333 / x) - x;
} else if (z <= 8.6e+114) {
tmp = t_0;
} else if (z <= 1.1e+226) {
tmp = t_1;
} else if (z <= 1.5e+251) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 * (z / (x / z))) - x;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / x) * (z * z)) - x t_1 = (z * (z * (0.0007936500793651 / x))) - x tmp = 0 if z <= -9e+137: tmp = t_1 elif z <= -7.8e-16: tmp = t_0 elif z <= 3.2e-20: tmp = (0.083333333333333 / x) - x elif z <= 8.6e+114: tmp = t_0 elif z <= 1.1e+226: tmp = t_1 elif z <= 1.5e+251: tmp = t_0 else: tmp = (0.0007936500793651 * (z / (x / z))) - x return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / x) * Float64(z * z)) - x) t_1 = Float64(Float64(z * Float64(z * Float64(0.0007936500793651 / x))) - x) tmp = 0.0 if (z <= -9e+137) tmp = t_1; elseif (z <= -7.8e-16) tmp = t_0; elseif (z <= 3.2e-20) tmp = Float64(Float64(0.083333333333333 / x) - x); elseif (z <= 8.6e+114) tmp = t_0; elseif (z <= 1.1e+226) tmp = t_1; elseif (z <= 1.5e+251) tmp = t_0; else tmp = Float64(Float64(0.0007936500793651 * Float64(z / Float64(x / z))) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / x) * (z * z)) - x; t_1 = (z * (z * (0.0007936500793651 / x))) - x; tmp = 0.0; if (z <= -9e+137) tmp = t_1; elseif (z <= -7.8e-16) tmp = t_0; elseif (z <= 3.2e-20) tmp = (0.083333333333333 / x) - x; elseif (z <= 8.6e+114) tmp = t_0; elseif (z <= 1.1e+226) tmp = t_1; elseif (z <= 1.5e+251) tmp = t_0; else tmp = (0.0007936500793651 * (z / (x / z))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -9e+137], t$95$1, If[LessEqual[z, -7.8e-16], t$95$0, If[LessEqual[z, 3.2e-20], N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 8.6e+114], t$95$0, If[LessEqual[z, 1.1e+226], t$95$1, If[LessEqual[z, 1.5e+251], t$95$0, N[(N[(0.0007936500793651 * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right) - x\\
t_1 := z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right) - x\\
\mathbf{if}\;z \leq -9 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{0.083333333333333}{x} - x\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+114}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+251}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;0.0007936500793651 \cdot \frac{z}{\frac{x}{z}} - x\\
\end{array}
\end{array}
if z < -9.0000000000000003e137 or 8.6000000000000001e114 < z < 1.09999999999999997e226Initial program 87.1%
sub-neg87.1%
metadata-eval87.1%
fma-def87.1%
fma-neg87.1%
metadata-eval87.1%
Simplified87.1%
metadata-eval87.1%
sub-neg87.1%
add-sqr-sqrt87.1%
pow287.1%
*-commutative87.1%
sub-neg87.1%
metadata-eval87.1%
Applied egg-rr87.1%
Taylor expanded in x around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in z around inf 81.7%
associate-/l*80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in y around 0 67.2%
associate-*r/67.2%
*-commutative67.2%
associate-*r/67.2%
metadata-eval67.2%
associate-*r/67.2%
unpow267.2%
associate-*l*63.1%
associate-*r/63.2%
metadata-eval63.2%
Simplified63.2%
if -9.0000000000000003e137 < z < -7.79999999999999954e-16 or 3.1999999999999997e-20 < z < 8.6000000000000001e114 or 1.09999999999999997e226 < z < 1.4999999999999999e251Initial program 95.5%
sub-neg95.5%
metadata-eval95.5%
fma-def95.5%
fma-neg95.5%
metadata-eval95.5%
Simplified95.5%
metadata-eval95.5%
sub-neg95.5%
add-sqr-sqrt95.3%
pow295.3%
*-commutative95.3%
sub-neg95.3%
metadata-eval95.3%
Applied egg-rr95.3%
Taylor expanded in x around inf 63.5%
neg-mul-163.5%
Simplified63.5%
Taylor expanded in y around inf 49.6%
*-commutative49.6%
associate-*r/51.0%
unpow251.0%
Simplified51.0%
if -7.79999999999999954e-16 < z < 3.1999999999999997e-20Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 58.4%
neg-mul-158.4%
Simplified58.4%
Taylor expanded in z around 0 53.5%
associate-*r/53.6%
metadata-eval53.6%
Simplified53.6%
if 1.4999999999999999e251 < z Initial program 90.4%
sub-neg90.4%
metadata-eval90.4%
fma-def90.4%
fma-neg90.4%
metadata-eval90.4%
Simplified90.4%
metadata-eval90.4%
sub-neg90.4%
add-sqr-sqrt90.4%
pow290.4%
*-commutative90.4%
sub-neg90.4%
metadata-eval90.4%
Applied egg-rr90.4%
Taylor expanded in x around inf 90.4%
neg-mul-190.4%
Simplified90.4%
Taylor expanded in z around inf 90.4%
associate-/l*90.4%
unpow290.4%
Simplified90.4%
Taylor expanded in y around 0 85.4%
unpow285.4%
associate-/l*79.9%
Simplified79.9%
Final simplification57.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* z (* z (/ 0.0007936500793651 x))) x)))
(if (<= z -1.45e+138)
t_0
(if (<= z -1.7e-16)
(- (* (/ y x) (* z z)) x)
(if (<= z 2.95e-22)
(- (/ 0.083333333333333 x) x)
(if (or (<= z 1.25e+115) (not (<= z 9.5e+225)))
(- (/ y (/ x (* z z))) x)
t_0))))))
double code(double x, double y, double z) {
double t_0 = (z * (z * (0.0007936500793651 / x))) - x;
double tmp;
if (z <= -1.45e+138) {
tmp = t_0;
} else if (z <= -1.7e-16) {
tmp = ((y / x) * (z * z)) - x;
} else if (z <= 2.95e-22) {
tmp = (0.083333333333333 / x) - x;
} else if ((z <= 1.25e+115) || !(z <= 9.5e+225)) {
tmp = (y / (x / (z * z))) - 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) :: tmp
t_0 = (z * (z * (0.0007936500793651d0 / x))) - x
if (z <= (-1.45d+138)) then
tmp = t_0
else if (z <= (-1.7d-16)) then
tmp = ((y / x) * (z * z)) - x
else if (z <= 2.95d-22) then
tmp = (0.083333333333333d0 / x) - x
else if ((z <= 1.25d+115) .or. (.not. (z <= 9.5d+225))) then
tmp = (y / (x / (z * z))) - x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z * (0.0007936500793651 / x))) - x;
double tmp;
if (z <= -1.45e+138) {
tmp = t_0;
} else if (z <= -1.7e-16) {
tmp = ((y / x) * (z * z)) - x;
} else if (z <= 2.95e-22) {
tmp = (0.083333333333333 / x) - x;
} else if ((z <= 1.25e+115) || !(z <= 9.5e+225)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z * (0.0007936500793651 / x))) - x tmp = 0 if z <= -1.45e+138: tmp = t_0 elif z <= -1.7e-16: tmp = ((y / x) * (z * z)) - x elif z <= 2.95e-22: tmp = (0.083333333333333 / x) - x elif (z <= 1.25e+115) or not (z <= 9.5e+225): tmp = (y / (x / (z * z))) - x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z * Float64(0.0007936500793651 / x))) - x) tmp = 0.0 if (z <= -1.45e+138) tmp = t_0; elseif (z <= -1.7e-16) tmp = Float64(Float64(Float64(y / x) * Float64(z * z)) - x); elseif (z <= 2.95e-22) tmp = Float64(Float64(0.083333333333333 / x) - x); elseif ((z <= 1.25e+115) || !(z <= 9.5e+225)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z * (0.0007936500793651 / x))) - x; tmp = 0.0; if (z <= -1.45e+138) tmp = t_0; elseif (z <= -1.7e-16) tmp = ((y / x) * (z * z)) - x; elseif (z <= 2.95e-22) tmp = (0.083333333333333 / x) - x; elseif ((z <= 1.25e+115) || ~((z <= 9.5e+225))) tmp = (y / (x / (z * z))) - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[z, -1.45e+138], t$95$0, If[LessEqual[z, -1.7e-16], N[(N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 2.95e-22], N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[z, 1.25e+115], N[Not[LessEqual[z, 9.5e+225]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right) - x\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+138}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;\frac{y}{x} \cdot \left(z \cdot z\right) - x\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-22}:\\
\;\;\;\;\frac{0.083333333333333}{x} - x\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+115} \lor \neg \left(z \leq 9.5 \cdot 10^{+225}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -1.45000000000000005e138 or 1.25000000000000002e115 < z < 9.49999999999999957e225Initial program 87.1%
sub-neg87.1%
metadata-eval87.1%
fma-def87.1%
fma-neg87.1%
metadata-eval87.1%
Simplified87.1%
metadata-eval87.1%
sub-neg87.1%
add-sqr-sqrt87.1%
pow287.1%
*-commutative87.1%
sub-neg87.1%
metadata-eval87.1%
Applied egg-rr87.1%
Taylor expanded in x around inf 81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in z around inf 81.7%
associate-/l*80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in y around 0 67.2%
associate-*r/67.2%
*-commutative67.2%
associate-*r/67.2%
metadata-eval67.2%
associate-*r/67.2%
unpow267.2%
associate-*l*63.1%
associate-*r/63.2%
metadata-eval63.2%
Simplified63.2%
if -1.45000000000000005e138 < z < -1.7e-16Initial program 96.2%
sub-neg96.2%
metadata-eval96.2%
fma-def96.2%
fma-neg96.2%
metadata-eval96.2%
Simplified96.2%
metadata-eval96.2%
sub-neg96.2%
add-sqr-sqrt96.0%
pow296.0%
*-commutative96.0%
sub-neg96.0%
metadata-eval96.0%
Applied egg-rr96.0%
Taylor expanded in x around inf 63.2%
neg-mul-163.2%
Simplified63.2%
Taylor expanded in y around inf 48.7%
*-commutative48.7%
associate-*r/52.1%
unpow252.1%
Simplified52.1%
if -1.7e-16 < z < 2.95000000000000004e-22Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 58.4%
neg-mul-158.4%
Simplified58.4%
Taylor expanded in z around 0 53.5%
associate-*r/53.6%
metadata-eval53.6%
Simplified53.6%
if 2.95000000000000004e-22 < z < 1.25000000000000002e115 or 9.49999999999999957e225 < z Initial program 93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
metadata-eval93.5%
sub-neg93.5%
add-sqr-sqrt93.4%
pow293.4%
*-commutative93.4%
sub-neg93.4%
metadata-eval93.4%
Applied egg-rr93.4%
Taylor expanded in x around inf 72.5%
neg-mul-172.5%
Simplified72.5%
Taylor expanded in y around inf 55.2%
associate-/l*56.7%
unpow256.7%
Simplified56.7%
Final simplification56.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.8e-46) (not (<= z 5.8e-27))) (* (* z z) (+ (/ y x) (/ 0.0007936500793651 x))) (- (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.8e-46) || !(z <= 5.8e-27)) {
tmp = (z * z) * ((y / x) + (0.0007936500793651 / x));
} else {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - 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.8d-46)) .or. (.not. (z <= 5.8d-27))) then
tmp = (z * z) * ((y / x) + (0.0007936500793651d0 / x))
else
tmp = ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.8e-46) || !(z <= 5.8e-27)) {
tmp = (z * z) * ((y / x) + (0.0007936500793651 / x));
} else {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.8e-46) or not (z <= 5.8e-27): tmp = (z * z) * ((y / x) + (0.0007936500793651 / x)) else: tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.8e-46) || !(z <= 5.8e-27)) tmp = Float64(Float64(z * z) * Float64(Float64(y / x) + Float64(0.0007936500793651 / x))); else tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.8e-46) || ~((z <= 5.8e-27))) tmp = (z * z) * ((y / x) + (0.0007936500793651 / x)); else tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.8e-46], N[Not[LessEqual[z, 5.8e-27]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-46} \lor \neg \left(z \leq 5.8 \cdot 10^{-27}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x\\
\end{array}
\end{array}
if z < -1.8e-46 or 5.80000000000000008e-27 < z Initial program 91.6%
sub-neg91.6%
metadata-eval91.6%
fma-def91.6%
fma-neg91.6%
metadata-eval91.6%
Simplified91.6%
metadata-eval91.6%
sub-neg91.6%
add-sqr-sqrt91.6%
pow291.6%
*-commutative91.6%
sub-neg91.6%
metadata-eval91.6%
Applied egg-rr91.6%
Taylor expanded in x around inf 75.2%
neg-mul-175.2%
Simplified75.2%
Taylor expanded in z around inf 74.4%
unpow274.4%
associate-*r/74.4%
metadata-eval74.4%
Simplified74.4%
if -1.8e-46 < z < 5.80000000000000008e-27Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 56.9%
neg-mul-156.9%
Simplified56.9%
Taylor expanded in z around 0 53.6%
Final simplification66.0%
(FPCore (x y z)
:precision binary64
(-
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - 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 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Initial program 94.8%
sub-neg94.8%
metadata-eval94.8%
fma-def94.8%
fma-neg94.8%
metadata-eval94.8%
Simplified94.8%
metadata-eval94.8%
sub-neg94.8%
add-sqr-sqrt94.7%
pow294.7%
*-commutative94.7%
sub-neg94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Taylor expanded in x around inf 67.7%
neg-mul-167.7%
Simplified67.7%
Taylor expanded in x around 0 67.7%
Final simplification67.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5500000.0) (not (<= z 4.8e-20))) (- (* 0.0007936500793651 (/ z (/ x z))) x) (- (/ 0.083333333333333 x) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5500000.0) || !(z <= 4.8e-20)) {
tmp = (0.0007936500793651 * (z / (x / z))) - x;
} else {
tmp = (0.083333333333333 / x) - 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 <= (-5500000.0d0)) .or. (.not. (z <= 4.8d-20))) then
tmp = (0.0007936500793651d0 * (z / (x / z))) - x
else
tmp = (0.083333333333333d0 / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5500000.0) || !(z <= 4.8e-20)) {
tmp = (0.0007936500793651 * (z / (x / z))) - x;
} else {
tmp = (0.083333333333333 / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5500000.0) or not (z <= 4.8e-20): tmp = (0.0007936500793651 * (z / (x / z))) - x else: tmp = (0.083333333333333 / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5500000.0) || !(z <= 4.8e-20)) tmp = Float64(Float64(0.0007936500793651 * Float64(z / Float64(x / z))) - x); else tmp = Float64(Float64(0.083333333333333 / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5500000.0) || ~((z <= 4.8e-20))) tmp = (0.0007936500793651 * (z / (x / z))) - x; else tmp = (0.083333333333333 / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5500000.0], N[Not[LessEqual[z, 4.8e-20]], $MachinePrecision]], N[(N[(0.0007936500793651 * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5500000 \lor \neg \left(z \leq 4.8 \cdot 10^{-20}\right):\\
\;\;\;\;0.0007936500793651 \cdot \frac{z}{\frac{x}{z}} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} - x\\
\end{array}
\end{array}
if z < -5.5e6 or 4.79999999999999986e-20 < z Initial program 91.1%
sub-neg91.1%
metadata-eval91.1%
fma-def91.1%
fma-neg91.1%
metadata-eval91.1%
Simplified91.1%
metadata-eval91.1%
sub-neg91.1%
add-sqr-sqrt91.1%
pow291.1%
*-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
Applied egg-rr91.1%
Taylor expanded in x around inf 75.7%
neg-mul-175.7%
Simplified75.7%
Taylor expanded in z around inf 74.9%
associate-/l*75.3%
unpow275.3%
Simplified75.3%
Taylor expanded in y around 0 48.2%
unpow248.2%
associate-/l*45.8%
Simplified45.8%
if -5.5e6 < z < 4.79999999999999986e-20Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 57.6%
neg-mul-157.6%
Simplified57.6%
Taylor expanded in z around 0 51.2%
associate-*r/51.3%
metadata-eval51.3%
Simplified51.3%
Final simplification48.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5500000.0) (not (<= z 4.8e-20))) (- (* z (* z (/ 0.0007936500793651 x))) x) (- (/ 0.083333333333333 x) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5500000.0) || !(z <= 4.8e-20)) {
tmp = (z * (z * (0.0007936500793651 / x))) - x;
} else {
tmp = (0.083333333333333 / x) - 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 <= (-5500000.0d0)) .or. (.not. (z <= 4.8d-20))) then
tmp = (z * (z * (0.0007936500793651d0 / x))) - x
else
tmp = (0.083333333333333d0 / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5500000.0) || !(z <= 4.8e-20)) {
tmp = (z * (z * (0.0007936500793651 / x))) - x;
} else {
tmp = (0.083333333333333 / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5500000.0) or not (z <= 4.8e-20): tmp = (z * (z * (0.0007936500793651 / x))) - x else: tmp = (0.083333333333333 / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5500000.0) || !(z <= 4.8e-20)) tmp = Float64(Float64(z * Float64(z * Float64(0.0007936500793651 / x))) - x); else tmp = Float64(Float64(0.083333333333333 / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5500000.0) || ~((z <= 4.8e-20))) tmp = (z * (z * (0.0007936500793651 / x))) - x; else tmp = (0.083333333333333 / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5500000.0], N[Not[LessEqual[z, 4.8e-20]], $MachinePrecision]], N[(N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5500000 \lor \neg \left(z \leq 4.8 \cdot 10^{-20}\right):\\
\;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right) - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} - x\\
\end{array}
\end{array}
if z < -5.5e6 or 4.79999999999999986e-20 < z Initial program 91.1%
sub-neg91.1%
metadata-eval91.1%
fma-def91.1%
fma-neg91.1%
metadata-eval91.1%
Simplified91.1%
metadata-eval91.1%
sub-neg91.1%
add-sqr-sqrt91.1%
pow291.1%
*-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
Applied egg-rr91.1%
Taylor expanded in x around inf 75.7%
neg-mul-175.7%
Simplified75.7%
Taylor expanded in z around inf 74.9%
associate-/l*75.3%
unpow275.3%
Simplified75.3%
Taylor expanded in y around 0 48.2%
associate-*r/48.2%
*-commutative48.2%
associate-*r/48.2%
metadata-eval48.2%
associate-*r/48.2%
unpow248.2%
associate-*l*45.8%
associate-*r/45.8%
metadata-eval45.8%
Simplified45.8%
if -5.5e6 < z < 4.79999999999999986e-20Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
add-sqr-sqrt99.3%
pow299.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 57.6%
neg-mul-157.6%
Simplified57.6%
Taylor expanded in z around 0 51.2%
associate-*r/51.3%
metadata-eval51.3%
Simplified51.3%
Final simplification48.2%
(FPCore (x y z) :precision binary64 (- (/ 0.083333333333333 x) x))
double code(double x, double y, double z) {
return (0.083333333333333 / x) - 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) - x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) - x;
}
def code(x, y, z): return (0.083333333333333 / x) - x
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) - x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) - x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} - x
\end{array}
Initial program 94.8%
sub-neg94.8%
metadata-eval94.8%
fma-def94.8%
fma-neg94.8%
metadata-eval94.8%
Simplified94.8%
metadata-eval94.8%
sub-neg94.8%
add-sqr-sqrt94.7%
pow294.7%
*-commutative94.7%
sub-neg94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Taylor expanded in x around inf 67.7%
neg-mul-167.7%
Simplified67.7%
Taylor expanded in z around 0 23.9%
associate-*r/23.9%
metadata-eval23.9%
Simplified23.9%
Final simplification23.9%
(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.8%
sub-neg94.8%
metadata-eval94.8%
fma-def94.8%
fma-neg94.8%
metadata-eval94.8%
Simplified94.8%
metadata-eval94.8%
sub-neg94.8%
add-sqr-sqrt94.7%
pow294.7%
*-commutative94.7%
sub-neg94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Taylor expanded in x around inf 67.7%
neg-mul-167.7%
Simplified67.7%
Taylor expanded in x around inf 1.3%
mul-1-neg1.3%
Simplified1.3%
Final simplification1.3%
(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 2023279
(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)))