
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 5e+138)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)
(/ 1.0 (* x 12.000000000000048))))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+138) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (1.0 / (x * 12.000000000000048)));
} else {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5d+138) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x) + (1.0d0 / (x * 12.000000000000048d0)))
else
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+138) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (1.0 / (x * 12.000000000000048)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+138: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (1.0 / (x * 12.000000000000048))) else: tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+138) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x) + Float64(1.0 / Float64(x * 12.000000000000048)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+138) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (1.0 / (x * 12.000000000000048))); else tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+138], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+138}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \frac{1}{x \cdot 12.000000000000048}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if x < 5.00000000000000016e138Initial program 97.8%
*-commutative97.8%
fma-udef97.8%
fma-neg97.8%
metadata-eval97.8%
div-inv97.8%
Applied egg-rr97.8%
*-commutative97.8%
fma-udef97.8%
distribute-rgt-in97.8%
div-inv97.8%
Applied egg-rr97.8%
clear-num97.8%
inv-pow97.8%
div-inv97.8%
metadata-eval97.8%
Applied egg-rr97.8%
unpow-197.8%
Simplified97.8%
Taylor expanded in x around 0 97.9%
if 5.00000000000000016e138 < x Initial program 79.9%
Taylor expanded in y around inf 79.5%
associate-/l*85.7%
Simplified85.7%
*-un-lft-identity85.7%
unpow285.7%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
metadata-eval96.1%
Simplified96.1%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (<= x 2.2e+136)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)
(/ 0.083333333333333 x)))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.2e+136) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 / x));
} else {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.2d+136) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x) + (0.083333333333333d0 / x))
else
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.2e+136) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 / x));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.2e+136: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 / x)) else: tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.2e+136) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x) + Float64(0.083333333333333 / x))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.2e+136) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 / x)); else tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.2e+136], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.2 \cdot 10^{+136}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \frac{0.083333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if x < 2.1999999999999999e136Initial program 97.8%
*-commutative97.8%
fma-udef97.8%
fma-neg97.8%
metadata-eval97.8%
div-inv97.8%
Applied egg-rr97.8%
*-commutative97.8%
fma-udef97.8%
distribute-rgt-in97.8%
div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in x around 0 97.8%
if 2.1999999999999999e136 < x Initial program 79.9%
Taylor expanded in y around inf 79.5%
associate-/l*85.7%
Simplified85.7%
*-un-lft-identity85.7%
unpow285.7%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
metadata-eval96.1%
Simplified96.1%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (<= x 4.6e+138)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.6e+138) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.6d+138) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.6e+138) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.6e+138: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.6e+138) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.6e+138) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.6e+138], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $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[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6 \cdot 10^{+138}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if x < 4.60000000000000015e138Initial program 97.8%
if 4.60000000000000015e138 < x Initial program 79.9%
Taylor expanded in y around inf 79.5%
associate-/l*85.7%
Simplified85.7%
*-un-lft-identity85.7%
unpow285.7%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
metadata-eval96.1%
Simplified96.1%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+136)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (- (* x (log x)) x)))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+136) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((x * log(x)) - x));
} else {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5d+136) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((x * log(x)) - x))
else
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+136) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((x * Math.log(x)) - x));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+136: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((x * math.log(x)) - x)) else: tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+136) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+136) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((x * log(x)) - x)); else tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+136], 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[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+136}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if x < 5.0000000000000002e136Initial program 97.8%
Taylor expanded in x around inf 96.3%
mul-1-neg96.3%
distribute-rgt-neg-in96.3%
log-rec96.8%
remove-double-neg96.8%
Simplified96.8%
if 5.0000000000000002e136 < x Initial program 79.9%
Taylor expanded in y around inf 79.5%
associate-/l*85.7%
Simplified85.7%
*-un-lft-identity85.7%
unpow285.7%
times-frac95.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
metadata-eval96.1%
Simplified96.1%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 1.72e+109)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+ t_0 (/ y (* (/ 1.0 z) (/ x z)))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 1.72e+109) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 1.72d+109) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 1.72e+109) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 1.72e+109: tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = t_0 + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 1.72e+109) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 1.72e+109) tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = t_0 + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.72e+109], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 1.72 \cdot 10^{+109}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if x < 1.71999999999999999e109Initial program 97.7%
Taylor expanded in x around inf 96.1%
sub-neg52.0%
mul-1-neg52.0%
log-rec52.6%
remove-double-neg52.6%
metadata-eval52.6%
Simplified96.6%
if 1.71999999999999999e109 < x Initial program 82.9%
Taylor expanded in y around inf 82.6%
associate-/l*87.8%
Simplified87.8%
*-un-lft-identity87.8%
unpow287.8%
times-frac96.5%
Applied egg-rr96.5%
Taylor expanded in x around inf 96.6%
sub-neg96.6%
mul-1-neg96.6%
log-rec96.6%
remove-double-neg96.6%
metadata-eval96.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.2e-51) (not (<= z 5e-30)))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))
(+
(- (* (log x) (+ x -0.5)) x)
(+ 0.91893853320467 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e-51) || !(z <= 5e-30)) {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
} else {
tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.2d-51)) .or. (.not. (z <= 5d-30))) then
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
else
tmp = ((log(x) * (x + (-0.5d0))) - x) + (0.91893853320467d0 + (0.083333333333333d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e-51) || !(z <= 5e-30)) {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
} else {
tmp = ((Math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.2e-51) or not (z <= 5e-30): tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) else: tmp = ((math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.2e-51) || !(z <= 5e-30)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); else tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + Float64(0.91893853320467 + Float64(0.083333333333333 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.2e-51) || ~((z <= 5e-30))) tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); else tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.2e-51], N[Not[LessEqual[z, 5e-30]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-51} \lor \neg \left(z \leq 5 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\
\end{array}
\end{array}
if z < -2.2e-51 or 4.99999999999999972e-30 < z Initial program 88.9%
Taylor expanded in y around inf 69.0%
associate-/l*74.2%
Simplified74.2%
*-un-lft-identity74.2%
unpow274.2%
times-frac78.6%
Applied egg-rr78.6%
Taylor expanded in x around inf 77.9%
sub-neg77.9%
mul-1-neg77.9%
log-rec78.6%
remove-double-neg78.6%
metadata-eval78.6%
Simplified78.6%
if -2.2e-51 < z < 4.99999999999999972e-30Initial program 99.5%
associate-+l+99.5%
sub-neg99.5%
sub-neg99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 96.7%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -3.1e-53) (not (<= z 5.2e-30)))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z))))
(+
(- (* (log x) (+ x -0.5)) x)
(+ 0.91893853320467 (/ 1.0 (* x 12.000000000000048))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.1e-53) || !(z <= 5.2e-30)) {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
} else {
tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-3.1d-53)) .or. (.not. (z <= 5.2d-30))) then
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
else
tmp = ((log(x) * (x + (-0.5d0))) - x) + (0.91893853320467d0 + (1.0d0 / (x * 12.000000000000048d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.1e-53) || !(z <= 5.2e-30)) {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
} else {
tmp = ((Math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.1e-53) or not (z <= 5.2e-30): tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) else: tmp = ((math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.1e-53) || !(z <= 5.2e-30)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); else tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + Float64(0.91893853320467 + Float64(1.0 / Float64(x * 12.000000000000048)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.1e-53) || ~((z <= 5.2e-30))) tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); else tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.1e-53], N[Not[LessEqual[z, 5.2e-30]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.91893853320467 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{-53} \lor \neg \left(z \leq 5.2 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{x \cdot 12.000000000000048}\right)\\
\end{array}
\end{array}
if z < -3.10000000000000015e-53 or 5.19999999999999973e-30 < z Initial program 88.9%
Taylor expanded in y around inf 69.0%
associate-/l*74.2%
Simplified74.2%
*-un-lft-identity74.2%
unpow274.2%
times-frac78.6%
Applied egg-rr78.6%
Taylor expanded in x around inf 77.9%
sub-neg77.9%
mul-1-neg77.9%
log-rec78.6%
remove-double-neg78.6%
metadata-eval78.6%
Simplified78.6%
if -3.10000000000000015e-53 < z < 5.19999999999999973e-30Initial program 99.5%
associate-+l+99.5%
sub-neg99.5%
sub-neg99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 96.7%
clear-num99.4%
inv-pow99.4%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr96.7%
unpow-199.6%
Simplified96.7%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(if (<= z -7e-54)
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ y (/ (/ x z) z)))
(if (<= z 6.5e-30)
(+
(- (* (log x) (+ x -0.5)) x)
(+ 0.91893853320467 (/ 1.0 (* x 12.000000000000048))))
(+ (* x (+ (log x) -1.0)) (/ y (* (/ 1.0 z) (/ x z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7e-54) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 6.5e-30) {
tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048)));
} else {
tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-7d-54)) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
else if (z <= 6.5d-30) then
tmp = ((log(x) * (x + (-0.5d0))) - x) + (0.91893853320467d0 + (1.0d0 / (x * 12.000000000000048d0)))
else
tmp = (x * (log(x) + (-1.0d0))) + (y / ((1.0d0 / z) * (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7e-54) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 6.5e-30) {
tmp = ((Math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048)));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7e-54: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (y / ((x / z) / z)) elif z <= 6.5e-30: tmp = ((math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048))) else: tmp = (x * (math.log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7e-54) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); elseif (z <= 6.5e-30) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + Float64(0.91893853320467 + Float64(1.0 / Float64(x * 12.000000000000048)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(y / Float64(Float64(1.0 / z) * Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7e-54) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (y / ((x / z) / z)); elseif (z <= 6.5e-30) tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (1.0 / (x * 12.000000000000048))); else tmp = (x * (log(x) + -1.0)) + (y / ((1.0 / z) * (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7e-54], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-30], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.91893853320467 + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-54}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-30}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{1}{x \cdot 12.000000000000048}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{1}{z} \cdot \frac{x}{z}}\\
\end{array}
\end{array}
if z < -6.99999999999999964e-54Initial program 93.1%
Taylor expanded in y around inf 72.6%
associate-/l*77.1%
Simplified77.1%
*-un-lft-identity77.1%
unpow277.1%
times-frac79.5%
Applied egg-rr79.5%
associate-*l/79.4%
*-lft-identity79.4%
Simplified79.4%
if -6.99999999999999964e-54 < z < 6.5000000000000005e-30Initial program 99.5%
associate-+l+99.5%
sub-neg99.5%
sub-neg99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 96.7%
clear-num99.4%
inv-pow99.4%
div-inv99.6%
metadata-eval99.6%
Applied egg-rr96.7%
unpow-199.6%
Simplified96.7%
if 6.5000000000000005e-30 < z Initial program 83.5%
Taylor expanded in y around inf 64.5%
associate-/l*70.5%
Simplified70.5%
*-un-lft-identity70.5%
unpow270.5%
times-frac77.5%
Applied egg-rr77.5%
Taylor expanded in x around inf 76.0%
sub-neg76.0%
mul-1-neg76.0%
log-rec77.5%
remove-double-neg77.5%
metadata-eval77.5%
Simplified77.5%
Final simplification86.5%
(FPCore (x y z)
:precision binary64
(if (<= x 2.1)
(+
(* (log x) -0.5)
(+ 0.91893853320467 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
(+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.1) {
tmp = (log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x));
} else {
tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.1d0) then
tmp = (log(x) * (-0.5d0)) + (0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x))
else
tmp = 0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.1) {
tmp = (Math.log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x));
} else {
tmp = 0.91893853320467 + ((Math.log(x) * (x + -0.5)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.1: tmp = (math.log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x)) else: tmp = 0.91893853320467 + ((math.log(x) * (x + -0.5)) - x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.1) tmp = Float64(Float64(log(x) * -0.5) + Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x))); else tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.1) tmp = (log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x)); else tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.1], N[(N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision] + N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1:\\
\;\;\;\;\log x \cdot -0.5 + \left(0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\
\end{array}
\end{array}
if x < 2.10000000000000009Initial program 99.6%
associate-+l+99.6%
sub-neg99.6%
sub-neg99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 53.9%
*-commutative53.9%
Simplified53.9%
Taylor expanded in x around 0 52.8%
if 2.10000000000000009 < x Initial program 87.3%
associate-+l+87.3%
sub-neg87.3%
sub-neg87.3%
sub-neg87.3%
metadata-eval87.3%
fma-def87.3%
fma-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around 0 62.0%
Taylor expanded in x around inf 62.0%
Final simplification57.4%
(FPCore (x y z)
:precision binary64
(if (<= x 1.75e-19)
(+
(* (log x) -0.5)
(+ 0.91893853320467 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
(+
(- (* (log x) (+ x -0.5)) x)
(+ 0.91893853320467 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.75e-19) {
tmp = (log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x));
} else {
tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.75d-19) then
tmp = (log(x) * (-0.5d0)) + (0.91893853320467d0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x))
else
tmp = ((log(x) * (x + (-0.5d0))) - x) + (0.91893853320467d0 + (0.083333333333333d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.75e-19) {
tmp = (Math.log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x));
} else {
tmp = ((Math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.75e-19: tmp = (math.log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x)) else: tmp = ((math.log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.75e-19) tmp = Float64(Float64(log(x) * -0.5) + Float64(0.91893853320467 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x))); else tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + Float64(0.91893853320467 + Float64(0.083333333333333 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.75e-19) tmp = (log(x) * -0.5) + (0.91893853320467 + ((0.083333333333333 + (z * -0.0027777777777778)) / x)); else tmp = ((log(x) * (x + -0.5)) - x) + (0.91893853320467 + (0.083333333333333 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.75e-19], N[(N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision] + N[(0.91893853320467 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;\log x \cdot -0.5 + \left(0.91893853320467 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x\right) + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\
\end{array}
\end{array}
if x < 1.75000000000000008e-19Initial program 99.6%
associate-+l+99.6%
sub-neg99.6%
sub-neg99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in x around 0 53.2%
if 1.75000000000000008e-19 < x Initial program 87.9%
associate-+l+87.9%
sub-neg87.9%
sub-neg87.9%
sub-neg87.9%
metadata-eval87.9%
fma-def87.9%
fma-neg87.9%
metadata-eval87.9%
Simplified87.9%
Taylor expanded in z around 0 62.3%
Final simplification57.9%
(FPCore (x y z) :precision binary64 (if (<= x 650000000.0) (+ (* (log x) -0.5) (+ 0.91893853320467 (* 0.083333333333333 (/ 1.0 x)))) (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = (log(x) * -0.5) + (0.91893853320467 + (0.083333333333333 * (1.0 / x)));
} else {
tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - 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 <= 650000000.0d0) then
tmp = (log(x) * (-0.5d0)) + (0.91893853320467d0 + (0.083333333333333d0 * (1.0d0 / x)))
else
tmp = 0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = (Math.log(x) * -0.5) + (0.91893853320467 + (0.083333333333333 * (1.0 / x)));
} else {
tmp = 0.91893853320467 + ((Math.log(x) * (x + -0.5)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 650000000.0: tmp = (math.log(x) * -0.5) + (0.91893853320467 + (0.083333333333333 * (1.0 / x))) else: tmp = 0.91893853320467 + ((math.log(x) * (x + -0.5)) - x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 650000000.0) tmp = Float64(Float64(log(x) * -0.5) + Float64(0.91893853320467 + Float64(0.083333333333333 * Float64(1.0 / x)))); else tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 650000000.0) tmp = (log(x) * -0.5) + (0.91893853320467 + (0.083333333333333 * (1.0 / x))); else tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 650000000.0], N[(N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision] + N[(0.91893853320467 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 650000000:\\
\;\;\;\;\log x \cdot -0.5 + \left(0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\
\end{array}
\end{array}
if x < 6.5e8Initial program 99.6%
associate-+l+99.7%
sub-neg99.7%
sub-neg99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 46.9%
Taylor expanded in x around 0 45.9%
div-inv46.1%
Applied egg-rr46.6%
if 6.5e8 < x Initial program 87.0%
associate-+l+87.0%
sub-neg87.0%
sub-neg87.0%
sub-neg87.0%
metadata-eval87.0%
fma-def87.0%
fma-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in z around 0 63.5%
Taylor expanded in x around inf 63.5%
Final simplification54.8%
(FPCore (x y z) :precision binary64 (if (<= x 650000000.0) (+ 0.91893853320467 (* 0.083333333333333 (/ 1.0 x))) (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x));
} else {
tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - 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 <= 650000000.0d0) then
tmp = 0.91893853320467d0 + (0.083333333333333d0 * (1.0d0 / x))
else
tmp = 0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) - x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x));
} else {
tmp = 0.91893853320467 + ((Math.log(x) * (x + -0.5)) - x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 650000000.0: tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x)) else: tmp = 0.91893853320467 + ((math.log(x) * (x + -0.5)) - x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 650000000.0) tmp = Float64(0.91893853320467 + Float64(0.083333333333333 * Float64(1.0 / x))); else tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 650000000.0) tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x)); else tmp = 0.91893853320467 + ((log(x) * (x + -0.5)) - x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 650000000.0], N[(0.91893853320467 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 650000000:\\
\;\;\;\;0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\
\end{array}
\end{array}
if x < 6.5e8Initial program 99.6%
associate-+l+99.7%
sub-neg99.7%
sub-neg99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 46.9%
Taylor expanded in x around inf 45.4%
sub-neg45.4%
mul-1-neg45.4%
log-rec45.5%
remove-double-neg45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in x around 0 46.2%
if 6.5e8 < x Initial program 87.0%
associate-+l+87.0%
sub-neg87.0%
sub-neg87.0%
sub-neg87.0%
metadata-eval87.0%
fma-def87.0%
fma-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in z around 0 63.5%
Taylor expanded in x around inf 63.5%
Final simplification54.5%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (0.91893853320467 + (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 * (log(x) + (-1.0d0))) + (0.91893853320467d0 + (0.083333333333333d0 / x))
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (0.91893853320467 + (0.083333333333333 / x));
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (0.91893853320467 + (0.083333333333333 / x))
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.91893853320467 + Float64(0.083333333333333 / x))) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (0.91893853320467 + (0.083333333333333 / x)); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)
\end{array}
Initial program 93.5%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around inf 54.1%
sub-neg54.1%
mul-1-neg54.1%
log-rec54.2%
remove-double-neg54.2%
metadata-eval54.2%
Simplified54.2%
Final simplification54.2%
(FPCore (x y z) :precision binary64 (if (<= x 650000000.0) (+ 0.91893853320467 (* 0.083333333333333 (/ 1.0 x))) (+ 0.91893853320467 (* x (+ (log x) -1.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x));
} else {
tmp = 0.91893853320467 + (x * (log(x) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 650000000.0d0) then
tmp = 0.91893853320467d0 + (0.083333333333333d0 * (1.0d0 / x))
else
tmp = 0.91893853320467d0 + (x * (log(x) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 650000000.0) {
tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x));
} else {
tmp = 0.91893853320467 + (x * (Math.log(x) + -1.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 650000000.0: tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x)) else: tmp = 0.91893853320467 + (x * (math.log(x) + -1.0)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 650000000.0) tmp = Float64(0.91893853320467 + Float64(0.083333333333333 * Float64(1.0 / x))); else tmp = Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 650000000.0) tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x)); else tmp = 0.91893853320467 + (x * (log(x) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 650000000.0], N[(0.91893853320467 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 650000000:\\
\;\;\;\;0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 6.5e8Initial program 99.6%
associate-+l+99.7%
sub-neg99.7%
sub-neg99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 46.9%
Taylor expanded in x around inf 45.4%
sub-neg45.4%
mul-1-neg45.4%
log-rec45.5%
remove-double-neg45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in x around 0 46.2%
if 6.5e8 < x Initial program 87.0%
associate-+l+87.0%
sub-neg87.0%
sub-neg87.0%
sub-neg87.0%
metadata-eval87.0%
fma-def87.0%
fma-neg87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in z around 0 63.5%
Taylor expanded in x around inf 63.5%
sub-neg63.5%
mul-1-neg63.5%
log-rec63.5%
remove-double-neg63.5%
metadata-eval63.5%
Simplified63.5%
Taylor expanded in x around inf 63.5%
Final simplification54.5%
(FPCore (x y z) :precision binary64 (+ 0.91893853320467 (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 * (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 = 0.91893853320467d0 + (0.083333333333333d0 * (1.0d0 / x))
end function
public static double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 * (1.0 / x));
}
def code(x, y, z): return 0.91893853320467 + (0.083333333333333 * (1.0 / x))
function code(x, y, z) return Float64(0.91893853320467 + Float64(0.083333333333333 * Float64(1.0 / x))) end
function tmp = code(x, y, z) tmp = 0.91893853320467 + (0.083333333333333 * (1.0 / x)); end
code[x_, y_, z_] := N[(0.91893853320467 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 93.5%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around inf 54.1%
sub-neg54.1%
mul-1-neg54.1%
log-rec54.2%
remove-double-neg54.2%
metadata-eval54.2%
Simplified54.2%
Taylor expanded in x around 0 25.8%
Final simplification25.8%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (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 = 0.083333333333333d0 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 93.5%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around 0 24.3%
Taylor expanded in x around 0 24.9%
div-inv25.3%
Applied egg-rr25.3%
Final simplification25.3%
(FPCore (x y z) :precision binary64 (+ 0.91893853320467 (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return 0.91893853320467 + (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.91893853320467d0 + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 / x);
}
def code(x, y, z): return 0.91893853320467 + (0.083333333333333 / x)
function code(x, y, z) return Float64(0.91893853320467 + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = 0.91893853320467 + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Initial program 93.5%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around inf 54.1%
sub-neg54.1%
mul-1-neg54.1%
log-rec54.2%
remove-double-neg54.2%
metadata-eval54.2%
Simplified54.2%
Taylor expanded in x around 0 25.8%
associate-*r/25.5%
metadata-eval25.5%
Simplified25.5%
Final simplification25.5%
(FPCore (x y z) :precision binary64 (/ -0.083333333333333 x))
double code(double x, double y, double z) {
return -0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (-0.083333333333333d0) / x
end function
public static double code(double x, double y, double z) {
return -0.083333333333333 / x;
}
def code(x, y, z): return -0.083333333333333 / x
function code(x, y, z) return Float64(-0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = -0.083333333333333 / x; end
code[x_, y_, z_] := N[(-0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.083333333333333}{x}
\end{array}
Initial program 93.5%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around 0 24.3%
Taylor expanded in x around 0 24.9%
frac-2neg24.9%
div-inv25.3%
metadata-eval25.3%
add-sqr-sqrt0.0%
sqrt-unprod3.6%
sqr-neg3.6%
sqrt-unprod1.4%
add-sqr-sqrt1.4%
Applied egg-rr1.4%
associate-*r/1.4%
metadata-eval1.4%
Simplified1.4%
Final simplification1.4%
(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%
associate-+l+93.5%
sub-neg93.5%
sub-neg93.5%
sub-neg93.5%
metadata-eval93.5%
fma-def93.5%
fma-neg93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in z around 0 54.9%
Taylor expanded in x around 0 24.3%
Taylor expanded in x around 0 24.9%
Final simplification24.9%
(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 2023310
(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)))