
(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
(let* ((t_0 (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)))
(if (<= x 0.0026)
(+
t_0
(pow
(/
x
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333))
-1.0))
(+ t_0 (* z (* z (+ (/ 0.0007936500793651 x) (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (((x + -0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 0.0026) {
tmp = t_0 + pow((x / fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333)), -1.0);
} else {
tmp = t_0 + (z * (z * ((0.0007936500793651 / x) + (y / x))));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 0.0026) tmp = Float64(t_0 + (Float64(x / fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333)) ^ -1.0)); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 0.0026], N[(t$95$0 + N[Power[N[(x / N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;t_0 + {\left(\frac{x}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
fma-neg99.6%
fma-def99.6%
clear-num99.7%
inv-pow99.7%
*-commutative99.7%
fma-udef99.7%
fma-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around inf 87.3%
associate-+r+87.3%
fma-def87.3%
associate-*r/87.3%
metadata-eval87.3%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Taylor expanded in z around inf 89.5%
unpow289.5%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 4e+22)
(+
(+ 0.91893853320467 (fma (+ x -0.5) (log x) (- x)))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(* z (* z (+ (/ 0.0007936500793651 x) (/ y x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4e+22) {
tmp = (0.91893853320467 + fma((x + -0.5), log(x), -x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (y / x))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 4e+22) tmp = Float64(Float64(0.91893853320467 + fma(Float64(x + -0.5), log(x), Float64(-x))) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 4e+22], N[(N[(0.91893853320467 + N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+22}:\\
\;\;\;\;\left(0.91893853320467 + \mathsf{fma}\left(x + -0.5, \log x, -x\right)\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if x < 4e22Initial program 99.6%
fma-neg99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 4e22 < x Initial program 86.1%
sub-neg86.1%
metadata-eval86.1%
fma-def86.1%
fma-neg86.1%
metadata-eval86.1%
Simplified86.1%
Taylor expanded in z around inf 86.1%
associate-+r+86.1%
fma-def86.1%
associate-*r/86.1%
metadata-eval86.1%
associate-/l*88.6%
unpow288.6%
Simplified88.6%
Taylor expanded in z around inf 88.5%
unpow288.5%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)))
(if (<= x 0.0026)
(+
t_0
(/
(fma
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
z
0.083333333333333)
x))
(+ t_0 (* z (* z (+ (/ 0.0007936500793651 x) (/ y x))))))))
double code(double x, double y, double z) {
double t_0 = (((x + -0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 0.0026) {
tmp = t_0 + (fma(fma((y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x);
} else {
tmp = t_0 + (z * (z * ((0.0007936500793651 / x) + (y / x))));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 0.0026) tmp = Float64(t_0 + Float64(fma(fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), z, 0.083333333333333) / x)); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 0.0026], N[(t$95$0 + N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;t_0 + \frac{\mathsf{fma}\left(\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around inf 87.3%
associate-+r+87.3%
fma-def87.3%
associate-*r/87.3%
metadata-eval87.3%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Taylor expanded in z around inf 89.5%
unpow289.5%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0026)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(* z (* z (+ (/ 0.0007936500793651 x) (/ y x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (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 <= 0.0026d0) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + (z * (z * ((0.0007936500793651d0 / x) + (y / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (y / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0026: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (y / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0026) 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(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0026) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (y / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0026], 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[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around inf 87.3%
associate-+r+87.3%
fma-def87.3%
associate-*r/87.3%
metadata-eval87.3%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Taylor expanded in z around inf 89.5%
unpow289.5%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0026)
(-
(/
(fma
(- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)
z
0.083333333333333)
x)
x)
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(* z (* z (+ (/ 0.0007936500793651 x) (/ y x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = (fma((((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x;
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 / x) + (y / x))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 0.0026) tmp = Float64(Float64(fma(Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 0.0026], N[(N[(N[(N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778, z, 0.083333333333333\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around inf 87.3%
associate-+r+87.3%
fma-def87.3%
associate-*r/87.3%
metadata-eval87.3%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Taylor expanded in z around inf 89.5%
unpow289.5%
associate-*l*99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0026)
(-
(/
(fma
(- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)
z
0.083333333333333)
x)
x)
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = (fma((((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x;
} else {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 0.0026) tmp = Float64(Float64(fma(Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x); else tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 0.0026], N[(N[(N[(N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $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 0.0026:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778, z, 0.083333333333333\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
metadata-eval87.3%
fma-neg87.3%
fma-def87.3%
clear-num87.3%
inv-pow87.3%
*-commutative87.3%
fma-udef87.3%
fma-neg87.3%
metadata-eval87.3%
Applied egg-rr87.3%
Taylor expanded in z around inf 87.3%
*-commutative87.3%
associate-*r/89.5%
unpow289.5%
associate-/l*98.9%
Simplified98.9%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(if (<= x 18500.0)
(-
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
x)
(if (or (<= x 2.5e+236) (not (<= x 5e+301)))
(+ (- (* x (log x)) x) (/ y (/ x (* z z))))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 18500.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 2.5e+236) || !(x <= 5e+301)) {
tmp = ((x * log(x)) - x) + (y / (x / (z * z)));
} 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 <= 18500.0d0) then
tmp = ((0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x) - x
else if ((x <= 2.5d+236) .or. (.not. (x <= 5d+301))) then
tmp = ((x * log(x)) - x) + (y / (x / (z * z)))
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 <= 18500.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 2.5e+236) || !(x <= 5e+301)) {
tmp = ((x * Math.log(x)) - x) + (y / (x / (z * z)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 18500.0: tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x elif (x <= 2.5e+236) or not (x <= 5e+301): tmp = ((x * math.log(x)) - x) + (y / (x / (z * z))) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 18500.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) - x); elseif ((x <= 2.5e+236) || !(x <= 5e+301)) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(y / Float64(x / Float64(z * z)))); 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 <= 18500.0) tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x; elseif ((x <= 2.5e+236) || ~((x <= 5e+301))) tmp = ((x * log(x)) - x) + (y / (x / (z * z))); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 18500.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 2.5e+236], N[Not[LessEqual[x, 5e+301]], $MachinePrecision]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 18500:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+236} \lor \neg \left(x \leq 5 \cdot 10^{+301}\right):\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 18500Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
Taylor expanded in x around 0 98.9%
if 18500 < x < 2.49999999999999985e236 or 5.0000000000000004e301 < x Initial program 91.2%
sub-neg91.2%
metadata-eval91.2%
fma-def91.2%
fma-neg91.2%
metadata-eval91.2%
Simplified91.2%
Taylor expanded in y around inf 86.9%
associate-/l*31.1%
unpow231.1%
Simplified88.8%
Taylor expanded in x around inf 88.2%
sub-neg88.2%
mul-1-neg88.2%
log-rec88.2%
remove-double-neg88.2%
metadata-eval88.2%
distribute-rgt-in88.2%
*-rgt-identity88.2%
neg-mul-188.2%
*-rgt-identity88.2%
sub-neg88.2%
*-commutative88.2%
Simplified88.2%
if 2.49999999999999985e236 < x < 5.0000000000000004e301Initial program 70.2%
sub-neg70.2%
metadata-eval70.2%
fma-def70.2%
fma-neg70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in z around 0 90.2%
Taylor expanded in x around inf 90.2%
sub-neg90.2%
mul-1-neg90.2%
log-rec90.2%
remove-double-neg90.2%
metadata-eval90.2%
Simplified90.2%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= x 54000000.0)
(-
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
x)
(if (<= x 4.2e+77)
(+
(+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(if (<= x 2.3e+90)
(- (/ (* z z) (/ x (+ y 0.0007936500793651))) x)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 54000000.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if (x <= 4.2e+77) {
tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (x <= 2.3e+90) {
tmp = ((z * z) / (x / (y + 0.0007936500793651))) - 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 <= 54000000.0d0) then
tmp = ((0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x) - x
else if (x <= 4.2d+77) then
tmp = ((((x + (-0.5d0)) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else if (x <= 2.3d+90) then
tmp = ((z * z) / (x / (y + 0.0007936500793651d0))) - 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 <= 54000000.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if (x <= 4.2e+77) {
tmp = ((((x + -0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (x <= 2.3e+90) {
tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 54000000.0: tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x elif x <= 4.2e+77: tmp = ((((x + -0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) elif x <= 2.3e+90: tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 54000000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) - x); elseif (x <= 4.2e+77) tmp = Float64(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); elseif (x <= 2.3e+90) tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651))) - 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 <= 54000000.0) tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x; elseif (x <= 4.2e+77) tmp = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); elseif (x <= 2.3e+90) tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 54000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[x, 4.2e+77], 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], If[LessEqual[x, 2.3e+90], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $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 54000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+77}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+90}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 5.4e7Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
Taylor expanded in x around 0 98.9%
if 5.4e7 < x < 4.1999999999999997e77Initial program 96.4%
sub-neg96.4%
metadata-eval96.4%
fma-def96.4%
fma-neg96.4%
metadata-eval96.4%
Simplified96.4%
Taylor expanded in z around 0 64.9%
if 4.1999999999999997e77 < x < 2.3e90Initial program 88.2%
sub-neg88.2%
metadata-eval88.2%
fma-def88.2%
fma-neg88.2%
metadata-eval88.2%
Simplified88.2%
metadata-eval88.2%
sub-neg88.2%
add-cube-cbrt88.2%
pow388.2%
*-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 88.2%
neg-mul-188.2%
Simplified88.2%
Taylor expanded in z around inf 88.2%
associate-/l*100.0%
unpow2100.0%
Simplified100.0%
if 2.3e90 < x Initial program 83.6%
sub-neg83.6%
metadata-eval83.6%
fma-def83.6%
fma-neg83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in z around 0 75.8%
Taylor expanded in x around inf 75.8%
sub-neg75.8%
mul-1-neg75.8%
log-rec75.8%
remove-double-neg75.8%
metadata-eval75.8%
Simplified75.8%
Final simplification87.4%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0026)
(-
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
x)
(+ (* (+ y 0.0007936500793651) (/ z (/ x z))) (- (* x (log x)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((y + 0.0007936500793651) * (z / (x / z))) + ((x * log(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 (x <= 0.0026d0) then
tmp = ((0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x) - x
else
tmp = ((y + 0.0007936500793651d0) * (z / (x / z))) + ((x * log(x)) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((y + 0.0007936500793651) * (z / (x / z))) + ((x * Math.log(x)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0026: tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x else: tmp = ((y + 0.0007936500793651) * (z / (x / z))) + ((x * math.log(x)) - x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0026) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z))) + Float64(Float64(x * log(x)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0026) tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x; else tmp = ((y + 0.0007936500793651) * (z / (x / z))) + ((x * log(x)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0026], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}} + \left(x \cdot \log x - x\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
Taylor expanded in x around 0 98.9%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
metadata-eval87.3%
fma-neg87.3%
fma-def87.3%
clear-num87.3%
inv-pow87.3%
*-commutative87.3%
fma-udef87.3%
fma-neg87.3%
metadata-eval87.3%
Applied egg-rr87.3%
Taylor expanded in z around inf 87.3%
*-commutative87.3%
associate-*r/89.5%
unpow289.5%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in x around inf 98.5%
sub-neg83.9%
mul-1-neg83.9%
log-rec83.9%
remove-double-neg83.9%
metadata-eval83.9%
distribute-rgt-in83.9%
*-rgt-identity83.9%
neg-mul-183.9%
*-rgt-identity83.9%
sub-neg83.9%
*-commutative83.9%
Simplified98.5%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= x 0.0026)
(-
(/
(fma
(- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)
z
0.083333333333333)
x)
x)
(+ (* (+ y 0.0007936500793651) (/ z (/ x z))) (- (* x (log x)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0026) {
tmp = (fma((((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x;
} else {
tmp = ((y + 0.0007936500793651) * (z / (x / z))) + ((x * log(x)) - x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 0.0026) tmp = Float64(Float64(fma(Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778), z, 0.083333333333333) / x) - x); else tmp = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z))) + Float64(Float64(x * log(x)) - x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 0.0026], N[(N[(N[(N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0026:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778, z, 0.083333333333333\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}} + \left(x \cdot \log x - x\right)\\
\end{array}
\end{array}
if x < 0.0025999999999999999Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
if 0.0025999999999999999 < x Initial program 87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
metadata-eval87.3%
fma-neg87.3%
fma-def87.3%
clear-num87.3%
inv-pow87.3%
*-commutative87.3%
fma-udef87.3%
fma-neg87.3%
metadata-eval87.3%
Applied egg-rr87.3%
Taylor expanded in z around inf 87.3%
*-commutative87.3%
associate-*r/89.5%
unpow289.5%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in x around inf 98.5%
sub-neg83.9%
mul-1-neg83.9%
log-rec83.9%
remove-double-neg83.9%
metadata-eval83.9%
distribute-rgt-in83.9%
*-rgt-identity83.9%
neg-mul-183.9%
*-rgt-identity83.9%
sub-neg83.9%
*-commutative83.9%
Simplified98.5%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= x 2800000000.0)
(-
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
x)
(if (or (<= x 1.35e+76) (not (<= x 2.8e+90)))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(- (/ (* z z) (/ x (+ y 0.0007936500793651))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2800000000.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.35e+76) || !(x <= 2.8e+90)) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (y + 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 <= 2800000000.0d0) then
tmp = ((0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x) - x
else if ((x <= 1.35d+76) .or. (.not. (x <= 2.8d+90))) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = ((z * z) / (x / (y + 0.0007936500793651d0))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2800000000.0) {
tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 1.35e+76) || !(x <= 2.8e+90)) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2800000000.0: tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x elif (x <= 1.35e+76) or not (x <= 2.8e+90): tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2800000000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) - x); elseif ((x <= 1.35e+76) || !(x <= 2.8e+90)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2800000000.0) tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x; elseif ((x <= 1.35e+76) || ~((x <= 2.8e+90))) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = ((z * z) / (x / (y + 0.0007936500793651))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2800000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 1.35e+76], N[Not[LessEqual[x, 2.8e+90]], $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] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2800000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+76} \lor \neg \left(x \leq 2.8 \cdot 10^{+90}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}} - x\\
\end{array}
\end{array}
if x < 2.8e9Initial program 99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
sub-neg99.7%
add-cube-cbrt99.7%
pow399.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 98.9%
neg-mul-198.9%
Simplified98.9%
Taylor expanded in y around 0 98.9%
Taylor expanded in x around 0 98.9%
if 2.8e9 < x < 1.34999999999999995e76 or 2.8e90 < x Initial program 86.8%
sub-neg86.8%
metadata-eval86.8%
fma-def86.8%
fma-neg86.8%
metadata-eval86.8%
Simplified86.8%
Taylor expanded in z around 0 73.1%
Taylor expanded in x around inf 72.6%
sub-neg72.6%
mul-1-neg72.6%
log-rec72.6%
remove-double-neg72.6%
metadata-eval72.6%
Simplified72.6%
if 1.34999999999999995e76 < x < 2.8e90Initial program 88.2%
sub-neg88.2%
metadata-eval88.2%
fma-def88.2%
fma-neg88.2%
metadata-eval88.2%
Simplified88.2%
metadata-eval88.2%
sub-neg88.2%
add-cube-cbrt88.2%
pow388.2%
*-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in x around inf 88.2%
neg-mul-188.2%
Simplified88.2%
Taylor expanded in z around inf 88.2%
associate-/l*100.0%
unpow2100.0%
Simplified100.0%
Final simplification87.2%
(FPCore (x y z)
:precision binary64
(-
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 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 * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Initial program 93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.6%
metadata-eval93.6%
Simplified93.6%
metadata-eval93.6%
sub-neg93.6%
add-cube-cbrt93.1%
pow393.1%
*-commutative93.1%
sub-neg93.1%
metadata-eval93.1%
Applied egg-rr93.1%
Taylor expanded in x around inf 64.5%
neg-mul-164.5%
Simplified64.5%
Taylor expanded in y around 0 64.5%
Taylor expanded in x around 0 64.5%
Final simplification64.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -7e-33) (not (<= z 3.5e-79))) (- (* (* z z) (/ (+ y 0.0007936500793651) x)) x) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-33) || !(z <= 3.5e-79)) {
tmp = ((z * z) * ((y + 0.0007936500793651) / x)) - 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 <= (-7d-33)) .or. (.not. (z <= 3.5d-79))) then
tmp = ((z * z) * ((y + 0.0007936500793651d0) / x)) - 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 <= -7e-33) || !(z <= 3.5e-79)) {
tmp = ((z * z) * ((y + 0.0007936500793651) / x)) - x;
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e-33) or not (z <= 3.5e-79): tmp = ((z * z) * ((y + 0.0007936500793651) / x)) - x else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e-33) || !(z <= 3.5e-79)) tmp = Float64(Float64(Float64(z * z) * Float64(Float64(y + 0.0007936500793651) / x)) - x); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e-33) || ~((z <= 3.5e-79))) tmp = ((z * z) * ((y + 0.0007936500793651) / x)) - x; else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e-33], N[Not[LessEqual[z, 3.5e-79]], $MachinePrecision]], N[(N[(N[(z * z), $MachinePrecision] * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-33} \lor \neg \left(z \leq 3.5 \cdot 10^{-79}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -6.9999999999999997e-33 or 3.5000000000000003e-79 < z Initial program 89.7%
sub-neg89.7%
metadata-eval89.7%
fma-def89.7%
fma-neg89.7%
metadata-eval89.7%
Simplified89.7%
metadata-eval89.7%
sub-neg89.7%
add-cube-cbrt89.4%
pow389.4%
*-commutative89.4%
sub-neg89.4%
metadata-eval89.4%
Applied egg-rr89.4%
Taylor expanded in x around inf 72.9%
neg-mul-172.9%
Simplified72.9%
Taylor expanded in z around inf 70.3%
*-lft-identity70.3%
times-frac70.9%
/-rgt-identity70.9%
unpow270.9%
Simplified70.9%
if -6.9999999999999997e-33 < z < 3.5000000000000003e-79Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 93.7%
Taylor expanded in x around inf 92.2%
sub-neg92.2%
mul-1-neg92.2%
log-rec92.2%
remove-double-neg92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in x around 0 47.2%
Final simplification61.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -8.4e-50) (not (<= z 3.4e-79))) (- (* (+ y 0.0007936500793651) (/ (* z z) x)) x) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.4e-50) || !(z <= 3.4e-79)) {
tmp = ((y + 0.0007936500793651) * ((z * z) / x)) - 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 <= (-8.4d-50)) .or. (.not. (z <= 3.4d-79))) then
tmp = ((y + 0.0007936500793651d0) * ((z * z) / x)) - 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 <= -8.4e-50) || !(z <= 3.4e-79)) {
tmp = ((y + 0.0007936500793651) * ((z * z) / x)) - x;
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.4e-50) or not (z <= 3.4e-79): tmp = ((y + 0.0007936500793651) * ((z * z) / x)) - x else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.4e-50) || !(z <= 3.4e-79)) tmp = Float64(Float64(Float64(y + 0.0007936500793651) * Float64(Float64(z * z) / x)) - x); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.4e-50) || ~((z <= 3.4e-79))) tmp = ((y + 0.0007936500793651) * ((z * z) / x)) - x; else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.4e-50], N[Not[LessEqual[z, 3.4e-79]], $MachinePrecision]], N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{-50} \lor \neg \left(z \leq 3.4 \cdot 10^{-79}\right):\\
\;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -8.4000000000000003e-50 or 3.39999999999999976e-79 < z Initial program 89.9%
sub-neg89.9%
metadata-eval89.9%
fma-def89.9%
fma-neg89.9%
metadata-eval89.9%
Simplified89.9%
metadata-eval89.9%
sub-neg89.9%
add-cube-cbrt89.6%
pow389.6%
*-commutative89.6%
sub-neg89.6%
metadata-eval89.6%
Applied egg-rr89.6%
Taylor expanded in x around inf 72.2%
neg-mul-172.2%
Simplified72.2%
Taylor expanded in z around inf 69.6%
associate-/l*69.6%
associate-/r/70.8%
unpow270.8%
Simplified70.8%
if -8.4000000000000003e-50 < z < 3.39999999999999976e-79Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 94.5%
Taylor expanded in x around inf 93.0%
sub-neg93.0%
mul-1-neg93.0%
log-rec93.0%
remove-double-neg93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in x around 0 48.6%
Final simplification62.3%
(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 93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.6%
metadata-eval93.6%
Simplified93.6%
metadata-eval93.6%
sub-neg93.6%
add-cube-cbrt93.1%
pow393.1%
*-commutative93.1%
sub-neg93.1%
metadata-eval93.1%
Applied egg-rr93.1%
Taylor expanded in x around inf 64.5%
neg-mul-164.5%
Simplified64.5%
Taylor expanded in x around 0 64.5%
Final simplification64.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5e-50) (not (<= z 3.5e-79))) (- (/ y (/ x (* z z))) x) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5e-50) || !(z <= 3.5e-79)) {
tmp = (y / (x / (z * 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 <= (-5d-50)) .or. (.not. (z <= 3.5d-79))) then
tmp = (y / (x / (z * 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 <= -5e-50) || !(z <= 3.5e-79)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5e-50) or not (z <= 3.5e-79): tmp = (y / (x / (z * z))) - x else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5e-50) || !(z <= 3.5e-79)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5e-50) || ~((z <= 3.5e-79))) tmp = (y / (x / (z * z))) - x; else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5e-50], N[Not[LessEqual[z, 3.5e-79]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-50} \lor \neg \left(z \leq 3.5 \cdot 10^{-79}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.99999999999999968e-50 or 3.5000000000000003e-79 < z Initial program 89.9%
sub-neg89.9%
metadata-eval89.9%
fma-def89.9%
fma-neg89.9%
metadata-eval89.9%
Simplified89.9%
metadata-eval89.9%
sub-neg89.9%
add-cube-cbrt89.6%
pow389.6%
*-commutative89.6%
sub-neg89.6%
metadata-eval89.6%
Applied egg-rr89.6%
Taylor expanded in x around inf 72.2%
neg-mul-172.2%
Simplified72.2%
Taylor expanded in y around inf 48.4%
associate-/l*50.7%
unpow250.7%
Simplified50.7%
if -4.99999999999999968e-50 < z < 3.5000000000000003e-79Initial program 99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 94.5%
Taylor expanded in x around inf 93.0%
sub-neg93.0%
mul-1-neg93.0%
log-rec93.0%
remove-double-neg93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in x around 0 48.6%
Final simplification49.9%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.6%
metadata-eval93.6%
Simplified93.6%
Taylor expanded in z around 0 52.8%
Taylor expanded in x around inf 52.2%
sub-neg52.2%
mul-1-neg52.2%
log-rec52.2%
remove-double-neg52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in x around 0 21.2%
Final simplification21.2%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2023293
(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)))