
(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 18 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
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* z (+ (* (/ z x) (+ 0.0007936500793651 y)) (/ -0.0027777777777778 x)))
(* (log x) (- x 0.5)))))
x))
double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (log(x) * (x - 0.5))))) - 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.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * (((z / x) * (0.0007936500793651d0 + y)) + ((-0.0027777777777778d0) / x))) + (log(x) * (x - 0.5d0))))) - x
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (Math.log(x) * (x - 0.5))))) - x;
}
def code(x, y, z): return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (math.log(x) * (x - 0.5))))) - x
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) + Float64(-0.0027777777777778 / x))) + Float64(log(x) * Float64(x - 0.5))))) - x) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (log(x) * (x - 0.5))))) - x; end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around 0 96.6%
pow196.6%
div-inv96.6%
+-commutative96.6%
un-div-inv96.6%
Applied egg-rr96.6%
unpow196.6%
sub-neg96.6%
distribute-rgt-in91.1%
associate-*l/93.1%
associate-/l*92.2%
associate-*l/92.2%
associate-*r/92.2%
distribute-rgt-out99.3%
+-commutative99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
(FPCore (x y z)
:precision binary64
(if (<= x 1.05e+24)
(/
(+
0.083333333333333
(* y (* z (+ z (/ (fma 0.0007936500793651 z -0.0027777777777778) y)))))
x)
(if (<= x 1.08e+108)
(* (* x y) (+ (/ (log x) y) (/ -1.0 y)))
(if (<= x 2.1e+123)
(* (* z z) (/ y x))
(* x (* y (- (/ -1.0 y) (/ (log (/ 1.0 x)) y))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.05e+24) {
tmp = (0.083333333333333 + (y * (z * (z + (fma(0.0007936500793651, z, -0.0027777777777778) / y))))) / x;
} else if (x <= 1.08e+108) {
tmp = (x * y) * ((log(x) / y) + (-1.0 / y));
} else if (x <= 2.1e+123) {
tmp = (z * z) * (y / x);
} else {
tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.05e+24) tmp = Float64(Float64(0.083333333333333 + Float64(y * Float64(z * Float64(z + Float64(fma(0.0007936500793651, z, -0.0027777777777778) / y))))) / x); elseif (x <= 1.08e+108) tmp = Float64(Float64(x * y) * Float64(Float64(log(x) / y) + Float64(-1.0 / y))); elseif (x <= 2.1e+123) tmp = Float64(Float64(z * z) * Float64(y / x)); else tmp = Float64(x * Float64(y * Float64(Float64(-1.0 / y) - Float64(log(Float64(1.0 / x)) / y)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.05e+24], N[(N[(0.083333333333333 + N[(y * N[(z * N[(z + N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 1.08e+108], N[(N[(x * y), $MachinePrecision] * N[(N[(N[Log[x], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+123], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(N[(-1.0 / y), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.05 \cdot 10^{+24}:\\
\;\;\;\;\frac{0.083333333333333 + y \cdot \left(z \cdot \left(z + \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{y}\right)\right)}{x}\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{+108}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+123}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(\frac{-1}{y} - \frac{\log \left(\frac{1}{x}\right)}{y}\right)\right)\\
\end{array}
\end{array}
if x < 1.0500000000000001e24Initial program 99.7%
sub-neg99.7%
associate-+l+99.8%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 64.3%
Taylor expanded in x around 0 78.9%
distribute-rgt-in78.9%
associate-*l*78.8%
lft-mult-inverse78.9%
metadata-eval78.9%
+-commutative78.9%
unpow278.9%
associate-/l*82.7%
distribute-lft-out95.7%
fma-neg95.7%
metadata-eval95.7%
Simplified95.7%
if 1.0500000000000001e24 < x < 1.0800000000000001e108Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
fma-define93.9%
sub-neg93.9%
metadata-eval93.9%
+-commutative93.9%
unsub-neg93.9%
*-commutative93.9%
fma-define93.9%
fma-neg93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around inf 80.8%
Taylor expanded in x around inf 73.5%
associate-*r*76.4%
sub-neg76.4%
mul-1-neg76.4%
distribute-frac-neg76.4%
log-rec76.4%
remove-double-neg76.4%
distribute-neg-frac76.4%
metadata-eval76.4%
Simplified76.4%
if 1.0800000000000001e108 < x < 2.09999999999999994e123Initial program 58.9%
sub-neg58.9%
associate-+l+58.9%
fma-define58.7%
sub-neg58.7%
metadata-eval58.7%
+-commutative58.7%
unsub-neg58.7%
*-commutative58.7%
fma-define58.7%
fma-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in z around inf 69.1%
associate-*r/69.1%
metadata-eval69.1%
Simplified69.1%
unpow269.1%
Applied egg-rr69.1%
Taylor expanded in y around inf 69.1%
if 2.09999999999999994e123 < x Initial program 86.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.5%
sub-neg86.5%
metadata-eval86.5%
+-commutative86.5%
unsub-neg86.5%
*-commutative86.5%
fma-define86.5%
fma-neg86.5%
metadata-eval86.5%
Simplified86.5%
Taylor expanded in y around inf 48.6%
Taylor expanded in x around inf 84.1%
Final simplification88.6%
(FPCore (x y z)
:precision binary64
(if (<= x 8e+203)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(* x (* y (- (/ -1.0 y) (/ (log (/ 1.0 x)) y))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e+203) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y)));
}
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 <= 8d+203) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = x * (y * (((-1.0d0) / y) - (log((1.0d0 / x)) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8e+203) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = x * (y * ((-1.0 / y) - (Math.log((1.0 / x)) / y)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8e+203: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = x * (y * ((-1.0 / y) - (math.log((1.0 / x)) / y))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8e+203) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(x * Float64(y * Float64(Float64(-1.0 / y) - Float64(log(Float64(1.0 / x)) / y)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8e+203) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8e+203], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(N[(-1.0 / y), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+203}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(\frac{-1}{y} - \frac{\log \left(\frac{1}{x}\right)}{y}\right)\right)\\
\end{array}
\end{array}
if x < 7.9999999999999999e203Initial program 96.6%
associate-+l-96.6%
sub-neg96.6%
metadata-eval96.6%
sub-neg96.6%
metadata-eval96.6%
Applied egg-rr96.6%
if 7.9999999999999999e203 < x Initial program 78.4%
sub-neg78.4%
associate-+l+78.4%
fma-define78.6%
sub-neg78.6%
metadata-eval78.6%
+-commutative78.6%
unsub-neg78.6%
*-commutative78.6%
fma-define78.6%
fma-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in y around inf 45.6%
Taylor expanded in x around inf 89.7%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(if (<= x 4.5e+203)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(* x (* y (- (/ -1.0 y) (/ (log (/ 1.0 x)) y))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.5e+203) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y)));
}
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 <= 4.5d+203) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = x * (y * (((-1.0d0) / y) - (log((1.0d0 / x)) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.5e+203) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = x * (y * ((-1.0 / y) - (Math.log((1.0 / x)) / y)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.5e+203: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = x * (y * ((-1.0 / y) - (math.log((1.0 / x)) / y))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.5e+203) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(x * Float64(y * Float64(Float64(-1.0 / y) - Float64(log(Float64(1.0 / x)) / y)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.5e+203) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.5e+203], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(N[(-1.0 / y), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.5 \cdot 10^{+203}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(\frac{-1}{y} - \frac{\log \left(\frac{1}{x}\right)}{y}\right)\right)\\
\end{array}
\end{array}
if x < 4.5000000000000003e203Initial program 96.6%
if 4.5000000000000003e203 < x Initial program 78.4%
sub-neg78.4%
associate-+l+78.4%
fma-define78.6%
sub-neg78.6%
metadata-eval78.6%
+-commutative78.6%
unsub-neg78.6%
*-commutative78.6%
fma-define78.6%
fma-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in y around inf 45.6%
Taylor expanded in x around inf 89.7%
Final simplification95.3%
(FPCore (x y z)
:precision binary64
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (/ 1.0 x))
(+
(* (log x) (- x 0.5))
(* z (/ (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778) x)))))
x))
double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((log(x) * (x - 0.5)) + (z * (((z * (0.0007936500793651 + 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.91893853320467d0 + ((0.083333333333333d0 * (1.0d0 / x)) + ((log(x) * (x - 0.5d0)) + (z * (((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0) / x))))) - x
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((Math.log(x) * (x - 0.5)) + (z * (((z * (0.0007936500793651 + y)) - 0.0027777777777778) / x))))) - x;
}
def code(x, y, z): return (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((math.log(x) * (x - 0.5)) + (z * (((z * (0.0007936500793651 + y)) - 0.0027777777777778) / x))))) - x
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778) / x))))) - x) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((log(x) * (x - 0.5)) + (z * (((z * (0.0007936500793651 + y)) - 0.0027777777777778) / x))))) - x; end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \frac{z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778}{x}\right)\right)\right) - x
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around 0 96.6%
Taylor expanded in x around 0 98.5%
Taylor expanded in x around 0 98.5%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(if (<= x 3.5e+22)
(/ (* (pow z 2.0) (* y (+ 1.0 (/ 0.0007936500793651 y)))) x)
(if (or (<= x 1.08e+108) (not (<= x 3.1e+123)))
(* (* x y) (+ (/ (log x) y) (/ -1.0 y)))
(* (* z z) (/ y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.5e+22) {
tmp = (pow(z, 2.0) * (y * (1.0 + (0.0007936500793651 / y)))) / x;
} else if ((x <= 1.08e+108) || !(x <= 3.1e+123)) {
tmp = (x * y) * ((log(x) / y) + (-1.0 / y));
} else {
tmp = (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 <= 3.5d+22) then
tmp = ((z ** 2.0d0) * (y * (1.0d0 + (0.0007936500793651d0 / y)))) / x
else if ((x <= 1.08d+108) .or. (.not. (x <= 3.1d+123))) then
tmp = (x * y) * ((log(x) / y) + ((-1.0d0) / y))
else
tmp = (z * z) * (y / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.5e+22) {
tmp = (Math.pow(z, 2.0) * (y * (1.0 + (0.0007936500793651 / y)))) / x;
} else if ((x <= 1.08e+108) || !(x <= 3.1e+123)) {
tmp = (x * y) * ((Math.log(x) / y) + (-1.0 / y));
} else {
tmp = (z * z) * (y / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.5e+22: tmp = (math.pow(z, 2.0) * (y * (1.0 + (0.0007936500793651 / y)))) / x elif (x <= 1.08e+108) or not (x <= 3.1e+123): tmp = (x * y) * ((math.log(x) / y) + (-1.0 / y)) else: tmp = (z * z) * (y / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.5e+22) tmp = Float64(Float64((z ^ 2.0) * Float64(y * Float64(1.0 + Float64(0.0007936500793651 / y)))) / x); elseif ((x <= 1.08e+108) || !(x <= 3.1e+123)) tmp = Float64(Float64(x * y) * Float64(Float64(log(x) / y) + Float64(-1.0 / y))); else tmp = Float64(Float64(z * z) * Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.5e+22) tmp = ((z ^ 2.0) * (y * (1.0 + (0.0007936500793651 / y)))) / x; elseif ((x <= 1.08e+108) || ~((x <= 3.1e+123))) tmp = (x * y) * ((log(x) / y) + (-1.0 / y)); else tmp = (z * z) * (y / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.5e+22], N[(N[(N[Power[z, 2.0], $MachinePrecision] * N[(y * N[(1.0 + N[(0.0007936500793651 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, 1.08e+108], N[Not[LessEqual[x, 3.1e+123]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * N[(N[(N[Log[x], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{{z}^{2} \cdot \left(y \cdot \left(1 + \frac{0.0007936500793651}{y}\right)\right)}{x}\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{+108} \lor \neg \left(x \leq 3.1 \cdot 10^{+123}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\end{array}
\end{array}
if x < 3.5e22Initial program 99.7%
sub-neg99.7%
associate-+l+99.8%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 57.6%
associate-*r/57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in x around 0 58.4%
Taylor expanded in y around inf 58.3%
associate-*r/58.4%
metadata-eval58.4%
Simplified58.4%
if 3.5e22 < x < 1.0800000000000001e108 or 3.10000000000000006e123 < x Initial program 88.4%
sub-neg88.4%
associate-+l+88.4%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
+-commutative88.6%
unsub-neg88.6%
*-commutative88.6%
fma-define88.6%
fma-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around inf 57.5%
Taylor expanded in x around inf 81.2%
associate-*r*66.9%
sub-neg66.9%
mul-1-neg66.9%
distribute-frac-neg66.9%
log-rec66.9%
remove-double-neg66.9%
distribute-neg-frac66.9%
metadata-eval66.9%
Simplified66.9%
if 1.0800000000000001e108 < x < 3.10000000000000006e123Initial program 58.9%
sub-neg58.9%
associate-+l+58.9%
fma-define58.7%
sub-neg58.7%
metadata-eval58.7%
+-commutative58.7%
unsub-neg58.7%
*-commutative58.7%
fma-define58.7%
fma-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in z around inf 69.1%
associate-*r/69.1%
metadata-eval69.1%
Simplified69.1%
unpow269.1%
Applied egg-rr69.1%
Taylor expanded in y around inf 69.1%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+24)
(/ (* (+ 0.0007936500793651 y) (* z z)) x)
(if (or (<= x 2.8e+108) (not (<= x 2.1e+123)))
(* (* x y) (+ (/ (log x) y) (/ -1.0 y)))
(* (* z z) (/ y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+24) {
tmp = ((0.0007936500793651 + y) * (z * z)) / x;
} else if ((x <= 2.8e+108) || !(x <= 2.1e+123)) {
tmp = (x * y) * ((log(x) / y) + (-1.0 / y));
} else {
tmp = (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 <= 1.3d+24) then
tmp = ((0.0007936500793651d0 + y) * (z * z)) / x
else if ((x <= 2.8d+108) .or. (.not. (x <= 2.1d+123))) then
tmp = (x * y) * ((log(x) / y) + ((-1.0d0) / y))
else
tmp = (z * z) * (y / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+24) {
tmp = ((0.0007936500793651 + y) * (z * z)) / x;
} else if ((x <= 2.8e+108) || !(x <= 2.1e+123)) {
tmp = (x * y) * ((Math.log(x) / y) + (-1.0 / y));
} else {
tmp = (z * z) * (y / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.3e+24: tmp = ((0.0007936500793651 + y) * (z * z)) / x elif (x <= 2.8e+108) or not (x <= 2.1e+123): tmp = (x * y) * ((math.log(x) / y) + (-1.0 / y)) else: tmp = (z * z) * (y / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+24) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(z * z)) / x); elseif ((x <= 2.8e+108) || !(x <= 2.1e+123)) tmp = Float64(Float64(x * y) * Float64(Float64(log(x) / y) + Float64(-1.0 / y))); else tmp = Float64(Float64(z * z) * Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.3e+24) tmp = ((0.0007936500793651 + y) * (z * z)) / x; elseif ((x <= 2.8e+108) || ~((x <= 2.1e+123))) tmp = (x * y) * ((log(x) / y) + (-1.0 / y)); else tmp = (z * z) * (y / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+24], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, 2.8e+108], N[Not[LessEqual[x, 2.1e+123]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] * N[(N[(N[Log[x], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+108} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\
\;\;\;\;\left(x \cdot y\right) \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\end{array}
\end{array}
if x < 1.2999999999999999e24Initial program 99.7%
sub-neg99.7%
associate-+l+99.8%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 57.6%
associate-*r/57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in x around 0 58.4%
unpow257.6%
Applied egg-rr58.4%
if 1.2999999999999999e24 < x < 2.7999999999999998e108 or 2.09999999999999994e123 < x Initial program 88.4%
sub-neg88.4%
associate-+l+88.4%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
+-commutative88.6%
unsub-neg88.6%
*-commutative88.6%
fma-define88.6%
fma-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around inf 57.5%
Taylor expanded in x around inf 81.2%
associate-*r*66.9%
sub-neg66.9%
mul-1-neg66.9%
distribute-frac-neg66.9%
log-rec66.9%
remove-double-neg66.9%
distribute-neg-frac66.9%
metadata-eval66.9%
Simplified66.9%
if 2.7999999999999998e108 < x < 2.09999999999999994e123Initial program 58.9%
sub-neg58.9%
associate-+l+58.9%
fma-define58.7%
sub-neg58.7%
metadata-eval58.7%
+-commutative58.7%
unsub-neg58.7%
*-commutative58.7%
fma-define58.7%
fma-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in z around inf 69.1%
associate-*r/69.1%
metadata-eval69.1%
Simplified69.1%
unpow269.1%
Applied egg-rr69.1%
Taylor expanded in y around inf 69.1%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(if (<= x 5.2e+23)
(/ (* (+ 0.0007936500793651 y) (* z z)) x)
(if (or (<= x 6.5e+107) (not (<= x 2.1e+123)))
(* y (* x (+ (/ (log x) y) (/ -1.0 y))))
(* (* z z) (/ y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.2e+23) {
tmp = ((0.0007936500793651 + y) * (z * z)) / x;
} else if ((x <= 6.5e+107) || !(x <= 2.1e+123)) {
tmp = y * (x * ((log(x) / y) + (-1.0 / y)));
} else {
tmp = (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 <= 5.2d+23) then
tmp = ((0.0007936500793651d0 + y) * (z * z)) / x
else if ((x <= 6.5d+107) .or. (.not. (x <= 2.1d+123))) then
tmp = y * (x * ((log(x) / y) + ((-1.0d0) / y)))
else
tmp = (z * z) * (y / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.2e+23) {
tmp = ((0.0007936500793651 + y) * (z * z)) / x;
} else if ((x <= 6.5e+107) || !(x <= 2.1e+123)) {
tmp = y * (x * ((Math.log(x) / y) + (-1.0 / y)));
} else {
tmp = (z * z) * (y / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.2e+23: tmp = ((0.0007936500793651 + y) * (z * z)) / x elif (x <= 6.5e+107) or not (x <= 2.1e+123): tmp = y * (x * ((math.log(x) / y) + (-1.0 / y))) else: tmp = (z * z) * (y / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.2e+23) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(z * z)) / x); elseif ((x <= 6.5e+107) || !(x <= 2.1e+123)) tmp = Float64(y * Float64(x * Float64(Float64(log(x) / y) + Float64(-1.0 / y)))); else tmp = Float64(Float64(z * z) * Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.2e+23) tmp = ((0.0007936500793651 + y) * (z * z)) / x; elseif ((x <= 6.5e+107) || ~((x <= 2.1e+123))) tmp = y * (x * ((log(x) / y) + (-1.0 / y))); else tmp = (z * z) * (y / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.2e+23], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, 6.5e+107], N[Not[LessEqual[x, 2.1e+123]], $MachinePrecision]], N[(y * N[(x * N[(N[(N[Log[x], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.2 \cdot 10^{+23}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+107} \lor \neg \left(x \leq 2.1 \cdot 10^{+123}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(\frac{\log x}{y} + \frac{-1}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\end{array}
\end{array}
if x < 5.19999999999999983e23Initial program 99.7%
sub-neg99.7%
associate-+l+99.8%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 57.6%
associate-*r/57.6%
metadata-eval57.6%
Simplified57.6%
Taylor expanded in x around 0 58.4%
unpow257.6%
Applied egg-rr58.4%
if 5.19999999999999983e23 < x < 6.5000000000000006e107 or 2.09999999999999994e123 < x Initial program 88.4%
sub-neg88.4%
associate-+l+88.4%
fma-define88.6%
sub-neg88.6%
metadata-eval88.6%
+-commutative88.6%
unsub-neg88.6%
*-commutative88.6%
fma-define88.6%
fma-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around inf 57.5%
Taylor expanded in x around inf 59.1%
sub-neg59.1%
mul-1-neg59.1%
distribute-frac-neg59.1%
log-rec59.1%
remove-double-neg59.1%
distribute-neg-frac59.1%
metadata-eval59.1%
Simplified59.1%
if 6.5000000000000006e107 < x < 2.09999999999999994e123Initial program 58.9%
sub-neg58.9%
associate-+l+58.9%
fma-define58.7%
sub-neg58.7%
metadata-eval58.7%
+-commutative58.7%
unsub-neg58.7%
*-commutative58.7%
fma-define58.7%
fma-neg58.7%
metadata-eval58.7%
Simplified58.7%
Taylor expanded in z around inf 69.1%
associate-*r/69.1%
metadata-eval69.1%
Simplified69.1%
unpow269.1%
Applied egg-rr69.1%
Taylor expanded in y around inf 69.1%
Final simplification59.1%
(FPCore (x y z)
:precision binary64
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* z (+ (* (/ z x) (+ 0.0007936500793651 y)) (/ -0.0027777777777778 x)))
(* x (log x)))))
x))
double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * log(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.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * (((z / x) * (0.0007936500793651d0 + y)) + ((-0.0027777777777778d0) / x))) + (x * log(x))))) - x
end function
public static double code(double x, double y, double z) {
return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * Math.log(x))))) - x;
}
def code(x, y, z): return (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * math.log(x))))) - x
function code(x, y, z) return Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) + Float64(-0.0027777777777778 / x))) + Float64(x * log(x))))) - x) end
function tmp = code(x, y, z) tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * (((z / x) * (0.0007936500793651 + y)) + (-0.0027777777777778 / x))) + (x * log(x))))) - x; end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right) + \frac{-0.0027777777777778}{x}\right) + x \cdot \log x\right)\right)\right) - x
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around 0 96.6%
pow196.6%
div-inv96.6%
+-commutative96.6%
un-div-inv96.6%
Applied egg-rr96.6%
unpow196.6%
sub-neg96.6%
distribute-rgt-in91.1%
associate-*l/93.1%
associate-/l*92.2%
associate-*l/92.2%
associate-*r/92.2%
distribute-rgt-out99.3%
+-commutative99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
Taylor expanded in x around inf 98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
log-rec98.5%
remove-double-neg98.5%
Simplified98.5%
(FPCore (x y z)
:precision binary64
(if (<= x 8e+203)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(* x (* y (- (/ -1.0 y) (/ (log (/ 1.0 x)) y))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e+203) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} else {
tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y)));
}
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 <= 8d+203) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = x * (y * (((-1.0d0) / y) - (log((1.0d0 / x)) / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8e+203) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = x * (y * ((-1.0 / y) - (Math.log((1.0 / x)) / y)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8e+203: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = x * (y * ((-1.0 / y) - (math.log((1.0 / x)) / y))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8e+203) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(x * Float64(y * Float64(Float64(-1.0 / y) - Float64(log(Float64(1.0 / x)) / y)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8e+203) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = x * (y * ((-1.0 / y) - (log((1.0 / x)) / y))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8e+203], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(N[(-1.0 / y), $MachinePrecision] - N[(N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+203}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(\frac{-1}{y} - \frac{\log \left(\frac{1}{x}\right)}{y}\right)\right)\\
\end{array}
\end{array}
if x < 7.9999999999999999e203Initial program 96.6%
Taylor expanded in x around inf 95.6%
sub-neg95.6%
mul-1-neg95.6%
log-rec95.6%
remove-double-neg95.6%
metadata-eval95.6%
Simplified95.6%
if 7.9999999999999999e203 < x Initial program 78.4%
sub-neg78.4%
associate-+l+78.4%
fma-define78.6%
sub-neg78.6%
metadata-eval78.6%
+-commutative78.6%
unsub-neg78.6%
*-commutative78.6%
fma-define78.6%
fma-neg78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in y around inf 45.6%
Taylor expanded in x around inf 89.7%
Final simplification94.5%
(FPCore (x y z)
:precision binary64
(if (<= z -1300000000.0)
(* (* z z) (* (+ 0.0007936500793651 y) (/ 1.0 x)))
(if (<= z 4e+27)
(+
(/ 0.083333333333333 x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
(* (* z z) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1300000000.0) {
tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
} else if (z <= 4e+27) {
tmp = (0.083333333333333 / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * z) * ((0.0007936500793651 + 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 (z <= (-1300000000.0d0)) then
tmp = (z * z) * ((0.0007936500793651d0 + y) * (1.0d0 / x))
else if (z <= 4d+27) then
tmp = (0.083333333333333d0 / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
else
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1300000000.0) {
tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
} else if (z <= 4e+27) {
tmp = (0.083333333333333 / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1300000000.0: tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x)) elif z <= 4e+27: tmp = (0.083333333333333 / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) else: tmp = (z * z) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1300000000.0) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) * Float64(1.0 / x))); elseif (z <= 4e+27) tmp = Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1300000000.0) tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x)); elseif (z <= 4e+27) tmp = (0.083333333333333 / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467)); else tmp = (z * z) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1300000000.0], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+27], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1300000000:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{1}{x}\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+27}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -1.3e9Initial program 83.9%
sub-neg83.9%
associate-+l+83.9%
fma-define83.9%
sub-neg83.9%
metadata-eval83.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
fma-define83.9%
fma-neg83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in z around inf 76.4%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
unpow276.3%
Applied egg-rr76.3%
Taylor expanded in y around 0 76.4%
associate-*r/76.3%
metadata-eval76.3%
+-commutative76.3%
*-rgt-identity76.3%
associate-*r/76.4%
metadata-eval76.4%
associate-*r/76.4%
distribute-rgt-out76.4%
+-commutative76.4%
Simplified76.4%
if -1.3e9 < z < 4.0000000000000001e27Initial program 99.5%
associate-+l-99.5%
sub-neg99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 93.3%
if 4.0000000000000001e27 < z Initial program 88.0%
sub-neg88.0%
associate-+l+88.0%
fma-define88.0%
sub-neg88.0%
metadata-eval88.0%
+-commutative88.0%
unsub-neg88.0%
*-commutative88.0%
fma-define88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in z around inf 77.4%
associate-*r/77.4%
metadata-eval77.4%
Simplified77.4%
unpow277.4%
Applied egg-rr77.4%
Taylor expanded in x around 0 77.4%
Final simplification85.6%
(FPCore (x y z)
:precision binary64
(if (<= z -3400000000000.0)
(* (* z z) (* (+ 0.0007936500793651 y) (/ 1.0 x)))
(if (<= z 1.45e+27)
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(* (* z z) (/ (+ 0.0007936500793651 y) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3400000000000.0) {
tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
} else if (z <= 1.45e+27) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = (z * z) * ((0.0007936500793651 + 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 (z <= (-3400000000000.0d0)) then
tmp = (z * z) * ((0.0007936500793651d0 + y) * (1.0d0 / x))
else if (z <= 1.45d+27) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = (z * z) * ((0.0007936500793651d0 + y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3400000000000.0) {
tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
} else if (z <= 1.45e+27) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = (z * z) * ((0.0007936500793651 + y) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3400000000000.0: tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x)) elif z <= 1.45e+27: tmp = (0.083333333333333 / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = (z * z) * ((0.0007936500793651 + y) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3400000000000.0) tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) * Float64(1.0 / x))); elseif (z <= 1.45e+27) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3400000000000.0) tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x)); elseif (z <= 1.45e+27) tmp = (0.083333333333333 / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = (z * z) * ((0.0007936500793651 + y) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3400000000000.0], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+27], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3400000000000:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{1}{x}\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+27}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\
\end{array}
\end{array}
if z < -3.4e12Initial program 83.9%
sub-neg83.9%
associate-+l+83.9%
fma-define83.9%
sub-neg83.9%
metadata-eval83.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
fma-define83.9%
fma-neg83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in z around inf 76.4%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
unpow276.3%
Applied egg-rr76.3%
Taylor expanded in y around 0 76.4%
associate-*r/76.3%
metadata-eval76.3%
+-commutative76.3%
*-rgt-identity76.3%
associate-*r/76.4%
metadata-eval76.4%
associate-*r/76.4%
distribute-rgt-out76.4%
+-commutative76.4%
Simplified76.4%
if -3.4e12 < z < 1.4500000000000001e27Initial program 99.5%
Taylor expanded in z around 0 93.3%
if 1.4500000000000001e27 < z Initial program 88.0%
sub-neg88.0%
associate-+l+88.0%
fma-define88.0%
sub-neg88.0%
metadata-eval88.0%
+-commutative88.0%
unsub-neg88.0%
*-commutative88.0%
fma-define88.0%
fma-neg88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in z around inf 77.4%
associate-*r/77.4%
metadata-eval77.4%
Simplified77.4%
unpow277.4%
Applied egg-rr77.4%
Taylor expanded in x around 0 77.4%
Final simplification85.6%
(FPCore (x y z) :precision binary64 (* (+ 0.0007936500793651 y) (/ (pow z 2.0) x)))
double code(double x, double y, double z) {
return (0.0007936500793651 + y) * (pow(z, 2.0) / 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.0007936500793651d0 + y) * ((z ** 2.0d0) / x)
end function
public static double code(double x, double y, double z) {
return (0.0007936500793651 + y) * (Math.pow(z, 2.0) / x);
}
def code(x, y, z): return (0.0007936500793651 + y) * (math.pow(z, 2.0) / x)
function code(x, y, z) return Float64(Float64(0.0007936500793651 + y) * Float64((z ^ 2.0) / x)) end
function tmp = code(x, y, z) tmp = (0.0007936500793651 + y) * ((z ^ 2.0) / x); end
code[x_, y_, z_] := N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[Power[z, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.0007936500793651 + y\right) \cdot \frac{{z}^{2}}{x}
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around inf 40.1%
associate-*r/40.1%
metadata-eval40.1%
Simplified40.1%
Taylor expanded in x around 0 39.4%
Taylor expanded in y around 0 26.4%
associate-/l*26.2%
distribute-rgt-out40.5%
Simplified40.5%
Final simplification40.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -0.0008) (not (<= y 0.0008))) (* (* z z) (/ y x)) (* (* z z) (* 0.0007936500793651 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 0.0008)) {
tmp = (z * z) * (y / x);
} else {
tmp = (z * z) * (0.0007936500793651 * (1.0 / 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 ((y <= (-0.0008d0)) .or. (.not. (y <= 0.0008d0))) then
tmp = (z * z) * (y / x)
else
tmp = (z * z) * (0.0007936500793651d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 0.0008)) {
tmp = (z * z) * (y / x);
} else {
tmp = (z * z) * (0.0007936500793651 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.0008) or not (y <= 0.0008): tmp = (z * z) * (y / x) else: tmp = (z * z) * (0.0007936500793651 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.0008) || !(y <= 0.0008)) tmp = Float64(Float64(z * z) * Float64(y / x)); else tmp = Float64(Float64(z * z) * Float64(0.0007936500793651 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.0008) || ~((y <= 0.0008))) tmp = (z * z) * (y / x); else tmp = (z * z) * (0.0007936500793651 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.0008], N[Not[LessEqual[y, 0.0008]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0008 \lor \neg \left(y \leq 0.0008\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(0.0007936500793651 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 8.00000000000000038e-4 < y Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.1%
sub-neg92.1%
metadata-eval92.1%
+-commutative92.1%
unsub-neg92.1%
*-commutative92.1%
fma-define92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 48.4%
associate-*r/48.4%
metadata-eval48.4%
Simplified48.4%
unpow248.4%
Applied egg-rr48.4%
Taylor expanded in y around inf 48.4%
if -8.00000000000000038e-4 < y < 8.00000000000000038e-4Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
fma-define94.3%
sub-neg94.3%
metadata-eval94.3%
+-commutative94.3%
unsub-neg94.3%
*-commutative94.3%
fma-define94.3%
fma-neg94.2%
metadata-eval94.2%
Simplified94.2%
Taylor expanded in z around inf 32.7%
associate-*r/32.7%
metadata-eval32.7%
Simplified32.7%
unpow232.7%
Applied egg-rr32.7%
Taylor expanded in y around 0 32.6%
div-inv32.6%
*-commutative32.6%
Applied egg-rr32.6%
Final simplification40.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -0.0008) (not (<= y 0.0008))) (* (* z z) (/ y x)) (* (* z z) (/ 0.0007936500793651 x))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 0.0008)) {
tmp = (z * z) * (y / x);
} else {
tmp = (z * z) * (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 ((y <= (-0.0008d0)) .or. (.not. (y <= 0.0008d0))) then
tmp = (z * z) * (y / x)
else
tmp = (z * z) * (0.0007936500793651d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0008) || !(y <= 0.0008)) {
tmp = (z * z) * (y / x);
} else {
tmp = (z * z) * (0.0007936500793651 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.0008) or not (y <= 0.0008): tmp = (z * z) * (y / x) else: tmp = (z * z) * (0.0007936500793651 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.0008) || !(y <= 0.0008)) tmp = Float64(Float64(z * z) * Float64(y / x)); else tmp = Float64(Float64(z * z) * Float64(0.0007936500793651 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.0008) || ~((y <= 0.0008))) tmp = (z * z) * (y / x); else tmp = (z * z) * (0.0007936500793651 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.0008], N[Not[LessEqual[y, 0.0008]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0008 \lor \neg \left(y \leq 0.0008\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651}{x}\\
\end{array}
\end{array}
if y < -8.00000000000000038e-4 or 8.00000000000000038e-4 < y Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.1%
sub-neg92.1%
metadata-eval92.1%
+-commutative92.1%
unsub-neg92.1%
*-commutative92.1%
fma-define92.1%
fma-neg92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in z around inf 48.4%
associate-*r/48.4%
metadata-eval48.4%
Simplified48.4%
unpow248.4%
Applied egg-rr48.4%
Taylor expanded in y around inf 48.4%
if -8.00000000000000038e-4 < y < 8.00000000000000038e-4Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
fma-define94.3%
sub-neg94.3%
metadata-eval94.3%
+-commutative94.3%
unsub-neg94.3%
*-commutative94.3%
fma-define94.3%
fma-neg94.2%
metadata-eval94.2%
Simplified94.2%
Taylor expanded in z around inf 32.7%
associate-*r/32.7%
metadata-eval32.7%
Simplified32.7%
unpow232.7%
Applied egg-rr32.7%
Taylor expanded in y around 0 32.6%
Final simplification40.0%
(FPCore (x y z) :precision binary64 (* (* z z) (* (+ 0.0007936500793651 y) (/ 1.0 x))))
double code(double x, double y, double z) {
return (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (z * z) * ((0.0007936500793651d0 + y) * (1.0d0 / x))
end function
public static double code(double x, double y, double z) {
return (z * z) * ((0.0007936500793651 + y) * (1.0 / x));
}
def code(x, y, z): return (z * z) * ((0.0007936500793651 + y) * (1.0 / x))
function code(x, y, z) return Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) * Float64(1.0 / x))) end
function tmp = code(x, y, z) tmp = (z * z) * ((0.0007936500793651 + y) * (1.0 / x)); end
code[x_, y_, z_] := N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot z\right) \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{1}{x}\right)
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around inf 40.1%
associate-*r/40.1%
metadata-eval40.1%
Simplified40.1%
unpow240.1%
Applied egg-rr40.1%
Taylor expanded in y around 0 40.1%
associate-*r/40.1%
metadata-eval40.1%
+-commutative40.1%
*-rgt-identity40.1%
associate-*r/40.1%
metadata-eval40.1%
associate-*r/40.1%
distribute-rgt-out40.1%
+-commutative40.1%
Simplified40.1%
Final simplification40.1%
(FPCore (x y z) :precision binary64 (* (* z z) (/ (+ 0.0007936500793651 y) x)))
double code(double x, double y, double z) {
return (z * z) * ((0.0007936500793651 + y) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (z * z) * ((0.0007936500793651d0 + y) / x)
end function
public static double code(double x, double y, double z) {
return (z * z) * ((0.0007936500793651 + y) / x);
}
def code(x, y, z): return (z * z) * ((0.0007936500793651 + y) / x)
function code(x, y, z) return Float64(Float64(z * z) * Float64(Float64(0.0007936500793651 + y) / x)) end
function tmp = code(x, y, z) tmp = (z * z) * ((0.0007936500793651 + y) / x); end
code[x_, y_, z_] := N[(N[(z * z), $MachinePrecision] * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around inf 40.1%
associate-*r/40.1%
metadata-eval40.1%
Simplified40.1%
unpow240.1%
Applied egg-rr40.1%
Taylor expanded in x around 0 40.1%
(FPCore (x y z) :precision binary64 (* (* z z) (/ 0.0007936500793651 x)))
double code(double x, double y, double z) {
return (z * z) * (0.0007936500793651 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (z * z) * (0.0007936500793651d0 / x)
end function
public static double code(double x, double y, double z) {
return (z * z) * (0.0007936500793651 / x);
}
def code(x, y, z): return (z * z) * (0.0007936500793651 / x)
function code(x, y, z) return Float64(Float64(z * z) * Float64(0.0007936500793651 / x)) end
function tmp = code(x, y, z) tmp = (z * z) * (0.0007936500793651 / x); end
code[x_, y_, z_] := N[(N[(z * z), $MachinePrecision] * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot z\right) \cdot \frac{0.0007936500793651}{x}
\end{array}
Initial program 93.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
*-commutative93.2%
fma-define93.2%
fma-neg93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in z around inf 40.1%
associate-*r/40.1%
metadata-eval40.1%
Simplified40.1%
unpow240.1%
Applied egg-rr40.1%
Taylor expanded in y around 0 24.1%
(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 2024110
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(+ (+ (+ (* (- 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)))