
(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 20 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 8e+65)
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x))
(+
(* x (+ (log x) -1.0))
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e+65) {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 8d+65) then
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8e+65) {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8e+65: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8e+65) tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8e+65) tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8e+65], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{+65}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 7.9999999999999999e65Initial program 99.7%
associate-+l-99.8%
sub-neg99.8%
metadata-eval99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
if 7.9999999999999999e65 < x Initial program 82.1%
Taylor expanded in z around 0 89.0%
Taylor expanded in z around inf 89.0%
*-commutative89.0%
unpow289.0%
associate-*r/89.0%
metadata-eval89.0%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.7%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 1.8e+65)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- (* x (log x)) x))
(+
(* x (+ (log x) -1.0))
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+65) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.8d+65) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + ((x * log(x)) - x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+65) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * Math.log(x)) - x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.8e+65: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * math.log(x)) - x) else: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.8e+65) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(x * log(x)) - x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.8e+65) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x); else tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.8e+65], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(x \cdot \log x - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.79999999999999989e65Initial program 99.7%
associate-+l-99.8%
sub-neg99.8%
metadata-eval99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 98.1%
*-commutative50.1%
sub-neg50.1%
mul-1-neg50.1%
log-rec50.1%
remove-double-neg50.1%
metadata-eval50.1%
distribute-rgt-in50.1%
remove-double-neg50.1%
log-rec50.1%
distribute-lft-neg-in50.1%
mul-1-neg50.1%
neg-mul-150.1%
unsub-neg50.1%
mul-1-neg50.1%
distribute-lft-neg-in50.1%
log-rec50.1%
remove-double-neg50.1%
*-commutative50.1%
Simplified98.1%
if 1.79999999999999989e65 < x Initial program 82.1%
Taylor expanded in z around 0 89.0%
Taylor expanded in z around inf 89.0%
*-commutative89.0%
unpow289.0%
associate-*r/89.0%
metadata-eval89.0%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.7%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= x 1.5e+65)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(+ (- (* (log x) (- x 0.5)) x) 0.91893853320467))
(+
(* x (+ (log x) -1.0))
(+
(* 0.083333333333333 (/ 1.0 x))
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.5e+65) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (((log(x) * (x - 0.5)) - x) + 0.91893853320467);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.5d+65) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0)
else
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * (z * ((y / x) + (0.0007936500793651d0 / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.5e+65) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.5e+65: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) else: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.5e+65) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.5e+65) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (((log(x) * (x - 0.5)) - x) + 0.91893853320467); else tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * ((y / x) + (0.0007936500793651 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.5e+65], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+65}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.5000000000000001e65Initial program 99.7%
if 1.5000000000000001e65 < x Initial program 82.1%
Taylor expanded in z around 0 89.0%
Taylor expanded in z around inf 89.0%
*-commutative89.0%
unpow289.0%
associate-*r/89.0%
metadata-eval89.0%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in x around inf 99.7%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= y -0.051)
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))
(if (<= y 3.5e+97)
(+
(* x (+ (log x) -1.0))
(+ (* 0.083333333333333 (/ 1.0 x)) (* z (* z (/ 0.0007936500793651 x)))))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(* y (/ z (/ x z)))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -0.051) {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (y <= 3.5e+97) {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (0.0007936500793651 / x))));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (y * (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 (y <= (-0.051d0)) then
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
else if (y <= 3.5d+97) then
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * (z * (0.0007936500793651d0 / x))))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (y * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -0.051) {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (y <= 3.5e+97) {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (0.0007936500793651 / x))));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (y * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -0.051: tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) elif y <= 3.5e+97: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (0.0007936500793651 / x)))) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (y * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -0.051) tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); elseif (y <= 3.5e+97) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(z * Float64(0.0007936500793651 / x))))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(y * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -0.051) tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); elseif (y <= 3.5e+97) tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 * (1.0 / x)) + (z * (z * (0.0007936500793651 / x)))); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (y * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -0.051], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+97], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.051:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if y < -0.0509999999999999967Initial program 95.3%
Taylor expanded in y around inf 74.4%
associate-/l*77.5%
unpow277.5%
associate-/r*78.9%
Simplified78.9%
if -0.0509999999999999967 < y < 3.5000000000000001e97Initial program 93.3%
Taylor expanded in z around 0 87.8%
Taylor expanded in z around inf 92.9%
*-commutative92.9%
unpow292.9%
associate-*r/92.8%
metadata-eval92.8%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in x around inf 97.9%
*-commutative97.9%
sub-neg97.9%
mul-1-neg97.9%
log-rec97.9%
remove-double-neg97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in y around 0 96.5%
associate-*r/96.5%
associate-*l/96.6%
*-commutative96.6%
Simplified96.6%
if 3.5000000000000001e97 < y Initial program 90.1%
associate-+l-90.1%
sub-neg90.1%
metadata-eval90.1%
sub-neg90.1%
metadata-eval90.1%
Applied egg-rr90.1%
Taylor expanded in y around inf 82.3%
associate-/l*91.9%
unpow291.9%
Simplified91.9%
clear-num91.9%
associate-/r/91.9%
clear-num91.9%
associate-/l*91.9%
Applied egg-rr91.9%
Final simplification91.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -4.8e-10) (not (<= z 3.7e-9)))
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ x (* z z))))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.8e-10) || !(z <= 3.7e-9)) {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / (x / (z * z)));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4.8d-10)) .or. (.not. (z <= 3.7d-9))) then
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / (x / (z * z)))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4.8e-10) || !(z <= 3.7e-9)) {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / (x / (z * z)));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.8e-10) or not (z <= 3.7e-9): tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / (x / (z * z))) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.8e-10) || !(z <= 3.7e-9)) tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(x / Float64(z * z)))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.8e-10) || ~((z <= 3.7e-9))) tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / (x / (z * z))); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.8e-10], N[Not[LessEqual[z, 3.7e-9]], $MachinePrecision]], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-10} \lor \neg \left(z \leq 3.7 \cdot 10^{-9}\right):\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.8e-10 or 3.7e-9 < z Initial program 88.1%
Taylor expanded in y around inf 66.5%
associate-/l*73.8%
unpow273.8%
Simplified73.8%
if -4.8e-10 < z < 3.7e-9Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 95.9%
Final simplification83.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.3e-10) (not (<= z 7.8e-8)))
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.3e-10) || !(z <= 7.8e-8)) {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.3d-10)) .or. (.not. (z <= 7.8d-8))) then
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.3e-10) || !(z <= 7.8e-8)) {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.3e-10) or not (z <= 7.8e-8): tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.3e-10) || !(z <= 7.8e-8)) tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.3e-10) || ~((z <= 7.8e-8))) tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.3e-10], N[Not[LessEqual[z, 7.8e-8]], $MachinePrecision]], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-10} \lor \neg \left(z \leq 7.8 \cdot 10^{-8}\right):\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.29999999999999991e-10 or 7.7999999999999997e-8 < z Initial program 88.1%
Taylor expanded in y around inf 66.5%
associate-/l*73.8%
unpow273.8%
associate-/r*79.8%
Simplified79.8%
if -1.29999999999999991e-10 < z < 7.7999999999999997e-8Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 95.9%
Final simplification86.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))))
(if (<= z -1.05e-9)
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))
(if (<= z 1.75e-8)
(+ t_0 (/ 0.083333333333333 x))
(+ t_0 (* y (/ z (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467);
double tmp;
if (z <= -1.05e-9) {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 1.75e-8) {
tmp = t_0 + (0.083333333333333 / x);
} else {
tmp = t_0 + (y * (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 + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))
if (z <= (-1.05d-9)) then
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
else if (z <= 1.75d-8) then
tmp = t_0 + (0.083333333333333d0 / x)
else
tmp = t_0 + (y * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * Math.log(x)) - (x + -0.91893853320467);
double tmp;
if (z <= -1.05e-9) {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 1.75e-8) {
tmp = t_0 + (0.083333333333333 / x);
} else {
tmp = t_0 + (y * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = ((x + -0.5) * math.log(x)) - (x + -0.91893853320467) tmp = 0 if z <= -1.05e-9: tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) elif z <= 1.75e-8: tmp = t_0 + (0.083333333333333 / x) else: tmp = t_0 + (y * (z / (x / z))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) tmp = 0.0 if (z <= -1.05e-9) tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); elseif (z <= 1.75e-8) tmp = Float64(t_0 + Float64(0.083333333333333 / x)); else tmp = Float64(t_0 + Float64(y * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467); tmp = 0.0; if (z <= -1.05e-9) tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); elseif (z <= 1.75e-8) tmp = t_0 + (0.083333333333333 / x); else tmp = t_0 + (y * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e-9], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-8], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-9}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-8}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + y \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if z < -1.0500000000000001e-9Initial program 85.5%
Taylor expanded in y around inf 66.3%
associate-/l*73.6%
unpow273.6%
associate-/r*82.0%
Simplified82.0%
if -1.0500000000000001e-9 < z < 1.75000000000000012e-8Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 95.9%
if 1.75000000000000012e-8 < z Initial program 91.2%
associate-+l-91.2%
sub-neg91.2%
metadata-eval91.2%
sub-neg91.2%
metadata-eval91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 66.7%
associate-/l*74.0%
unpow274.0%
Simplified74.0%
clear-num74.0%
associate-/r/75.5%
clear-num75.5%
associate-/l*78.6%
Applied egg-rr78.6%
Final simplification87.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))))
(if (<= z -7e-11)
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))
(if (<= z 2.6e-5)
(+ t_0 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
(+ t_0 (* y (/ z (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467);
double tmp;
if (z <= -7e-11) {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 2.6e-5) {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = t_0 + (y * (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 + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))
if (z <= (-7d-11)) then
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
else if (z <= 2.6d-5) then
tmp = t_0 + ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x)
else
tmp = t_0 + (y * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x + -0.5) * Math.log(x)) - (x + -0.91893853320467);
double tmp;
if (z <= -7e-11) {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
} else if (z <= 2.6e-5) {
tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x);
} else {
tmp = t_0 + (y * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): t_0 = ((x + -0.5) * math.log(x)) - (x + -0.91893853320467) tmp = 0 if z <= -7e-11: tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) elif z <= 2.6e-5: tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x) else: tmp = t_0 + (y * (z / (x / z))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) tmp = 0.0 if (z <= -7e-11) tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); elseif (z <= 2.6e-5) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x)); else tmp = Float64(t_0 + Float64(y * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x + -0.5) * log(x)) - (x + -0.91893853320467); tmp = 0.0; if (z <= -7e-11) tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); elseif (z <= 2.6e-5) tmp = t_0 + ((0.083333333333333 + (z * -0.0027777777777778)) / x); else tmp = t_0 + (y * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e-11], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-5], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{-11}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-5}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + y \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if z < -7.00000000000000038e-11Initial program 85.5%
Taylor expanded in y around inf 66.3%
associate-/l*73.6%
unpow273.6%
associate-/r*82.0%
Simplified82.0%
if -7.00000000000000038e-11 < z < 2.59999999999999984e-5Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 96.4%
*-commutative96.4%
Simplified96.4%
if 2.59999999999999984e-5 < z Initial program 91.2%
associate-+l-91.2%
sub-neg91.2%
metadata-eval91.2%
sub-neg91.2%
metadata-eval91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 66.7%
associate-/l*74.0%
unpow274.0%
Simplified74.0%
clear-num74.0%
associate-/r/75.5%
clear-num75.5%
associate-/l*78.6%
Applied egg-rr78.6%
Final simplification87.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.45e+103)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(* x (+ (log x) -1.0)))
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.45e+103) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0));
} else {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.45d+103) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.45e+103) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.45e+103: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (math.log(x) + -1.0)) else: tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.45e+103) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.45e+103) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + (x * (log(x) + -1.0)); else tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.45e+103], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.45 \cdot 10^{+103}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\end{array}
\end{array}
if x < 1.4499999999999999e103Initial program 99.2%
Taylor expanded in x around inf 97.6%
*-commutative93.3%
sub-neg93.3%
mul-1-neg93.3%
log-rec93.3%
remove-double-neg93.3%
metadata-eval93.3%
Simplified97.6%
if 1.4499999999999999e103 < x Initial program 80.9%
Taylor expanded in y around inf 79.3%
associate-/l*87.1%
unpow287.1%
associate-/r*97.2%
Simplified97.2%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+103)
(+
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
(- (* x (log x)) x))
(+ (+ (- (* (log x) (- x 0.5)) x) 0.91893853320467) (/ y (/ (/ x z) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+103) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x);
} else {
tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.3d+103) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + ((x * log(x)) - x)
else
tmp = (((log(x) * (x - 0.5d0)) - x) + 0.91893853320467d0) + (y / ((x / z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+103) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * Math.log(x)) - x);
} else {
tmp = (((Math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.3e+103: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * math.log(x)) - x) else: tmp = (((math.log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+103) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(x * log(x)) - x)); else tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(y / Float64(Float64(x / z) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.3e+103) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((x * log(x)) - x); else tmp = (((log(x) * (x - 0.5)) - x) + 0.91893853320467) + (y / ((x / z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+103], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(x \cdot \log x - x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\
\end{array}
\end{array}
if x < 1.3000000000000001e103Initial program 99.2%
associate-+l-99.2%
sub-neg99.2%
metadata-eval99.2%
sub-neg99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in x around inf 97.6%
*-commutative51.4%
sub-neg51.4%
mul-1-neg51.4%
log-rec51.4%
remove-double-neg51.4%
metadata-eval51.4%
distribute-rgt-in51.5%
remove-double-neg51.5%
log-rec51.5%
distribute-lft-neg-in51.5%
mul-1-neg51.5%
neg-mul-151.5%
unsub-neg51.5%
mul-1-neg51.5%
distribute-lft-neg-in51.5%
log-rec51.5%
remove-double-neg51.5%
*-commutative51.5%
Simplified97.6%
if 1.3000000000000001e103 < x Initial program 81.4%
Taylor expanded in y around inf 79.7%
associate-/l*87.4%
unpow287.4%
associate-/r*97.2%
Simplified97.2%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7e-11) (not (<= z 1.12e-8)))
(+ (- (* x (log x)) x) (/ y (/ x (* z z))))
(+
(+ (- (* (log x) (- x 0.5)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-11) || !(z <= 1.12e-8)) {
tmp = ((x * log(x)) - x) + (y / (x / (z * 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 <= (-7d-11)) .or. (.not. (z <= 1.12d-8))) then
tmp = ((x * log(x)) - x) + (y / (x / (z * 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 <= -7e-11) || !(z <= 1.12e-8)) {
tmp = ((x * Math.log(x)) - x) + (y / (x / (z * 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 <= -7e-11) or not (z <= 1.12e-8): tmp = ((x * math.log(x)) - x) + (y / (x / (z * 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 <= -7e-11) || !(z <= 1.12e-8)) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(y / Float64(x / Float64(z * z)))); else tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e-11) || ~((z <= 1.12e-8))) tmp = ((x * log(x)) - x) + (y / (x / (z * 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, -7e-11], N[Not[LessEqual[z, 1.12e-8]], $MachinePrecision]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-11} \lor \neg \left(z \leq 1.12 \cdot 10^{-8}\right):\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -7.00000000000000038e-11 or 1.11999999999999994e-8 < z Initial program 88.1%
associate-+l-88.1%
sub-neg88.1%
metadata-eval88.1%
sub-neg88.1%
metadata-eval88.1%
Applied egg-rr88.1%
Taylor expanded in y around inf 66.5%
associate-/l*73.8%
unpow273.8%
Simplified73.8%
Taylor expanded in x around inf 73.7%
*-commutative73.7%
sub-neg73.7%
mul-1-neg73.7%
log-rec73.7%
remove-double-neg73.7%
metadata-eval73.7%
distribute-rgt-in73.7%
remove-double-neg73.7%
log-rec73.7%
distribute-lft-neg-in73.7%
mul-1-neg73.7%
neg-mul-173.7%
unsub-neg73.7%
mul-1-neg73.7%
distribute-lft-neg-in73.7%
log-rec73.7%
remove-double-neg73.7%
*-commutative73.7%
Simplified73.7%
if -7.00000000000000038e-11 < z < 1.11999999999999994e-8Initial program 99.6%
Taylor expanded in z around 0 95.8%
Final simplification83.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.5e-10) (not (<= z 4.8e-9)))
(+ (- (* x (log x)) x) (/ y (/ x (* z z))))
(+
(- (* (+ x -0.5) (log x)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.5e-10) || !(z <= 4.8e-9)) {
tmp = ((x * log(x)) - x) + (y / (x / (z * z)));
} else {
tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2.5d-10)) .or. (.not. (z <= 4.8d-9))) then
tmp = ((x * log(x)) - x) + (y / (x / (z * z)))
else
tmp = (((x + (-0.5d0)) * log(x)) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.5e-10) || !(z <= 4.8e-9)) {
tmp = ((x * Math.log(x)) - x) + (y / (x / (z * z)));
} else {
tmp = (((x + -0.5) * Math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.5e-10) or not (z <= 4.8e-9): tmp = ((x * math.log(x)) - x) + (y / (x / (z * z))) else: tmp = (((x + -0.5) * math.log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.5e-10) || !(z <= 4.8e-9)) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(y / Float64(x / Float64(z * z)))); else tmp = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.5e-10) || ~((z <= 4.8e-9))) tmp = ((x * log(x)) - x) + (y / (x / (z * z))); else tmp = (((x + -0.5) * log(x)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.5e-10], N[Not[LessEqual[z, 4.8e-9]], $MachinePrecision]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-10} \lor \neg \left(z \leq 4.8 \cdot 10^{-9}\right):\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{y}{\frac{x}{z \cdot z}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -2.50000000000000016e-10 or 4.8e-9 < z Initial program 88.1%
associate-+l-88.1%
sub-neg88.1%
metadata-eval88.1%
sub-neg88.1%
metadata-eval88.1%
Applied egg-rr88.1%
Taylor expanded in y around inf 66.5%
associate-/l*73.8%
unpow273.8%
Simplified73.8%
Taylor expanded in x around inf 73.7%
*-commutative73.7%
sub-neg73.7%
mul-1-neg73.7%
log-rec73.7%
remove-double-neg73.7%
metadata-eval73.7%
distribute-rgt-in73.7%
remove-double-neg73.7%
log-rec73.7%
distribute-lft-neg-in73.7%
mul-1-neg73.7%
neg-mul-173.7%
unsub-neg73.7%
mul-1-neg73.7%
distribute-lft-neg-in73.7%
log-rec73.7%
remove-double-neg73.7%
*-commutative73.7%
Simplified73.7%
if -2.50000000000000016e-10 < z < 4.8e-9Initial program 99.6%
associate-+l-99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 95.9%
Final simplification83.6%
(FPCore (x y z)
:precision binary64
(if (<= x 4.8e-31)
(/ (+ 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 <= 4.8e-31) {
tmp = (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 <= 4.8d-31) then
tmp = (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 <= 4.8e-31) {
tmp = (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 <= 4.8e-31: tmp = (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 <= 4.8e-31) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x - 0.5)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.8e-31) tmp = (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, 4.8e-31], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{-31}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\log x \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 4.8e-31Initial program 99.8%
Taylor expanded in z around 0 56.1%
Taylor expanded in x around inf 56.1%
*-commutative91.9%
sub-neg91.9%
mul-1-neg91.9%
log-rec91.9%
remove-double-neg91.9%
metadata-eval91.9%
Simplified56.1%
Taylor expanded in x around 0 56.2%
*-commutative56.2%
Simplified56.2%
if 4.8e-31 < x Initial program 88.5%
Taylor expanded in z around 0 65.1%
Final simplification61.4%
(FPCore (x y z) :precision binary64 (if (<= x 340.0) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 340.0d0) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 340.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 340.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 340.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 340.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 340:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 340Initial program 99.8%
Taylor expanded in z around 0 55.0%
Taylor expanded in x around inf 54.2%
*-commutative92.4%
sub-neg92.4%
mul-1-neg92.4%
log-rec92.4%
remove-double-neg92.4%
metadata-eval92.4%
Simplified54.2%
Taylor expanded in x around 0 53.7%
*-commutative53.7%
Simplified53.7%
if 340 < x Initial program 86.7%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 67.2%
*-commutative98.4%
sub-neg98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
metadata-eval98.4%
Simplified67.2%
Final simplification60.4%
(FPCore (x y z) :precision binary64 (if (<= x 340.0) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (+ (- (* x (log x)) x) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = ((x * log(x)) - x) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 340.0d0) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = ((x * log(x)) - x) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 340.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 340.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 340.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = ((x * log(x)) - x) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 340.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 340:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 340Initial program 99.8%
Taylor expanded in z around 0 55.0%
Taylor expanded in x around inf 54.2%
*-commutative92.4%
sub-neg92.4%
mul-1-neg92.4%
log-rec92.4%
remove-double-neg92.4%
metadata-eval92.4%
Simplified54.2%
Taylor expanded in x around 0 53.7%
*-commutative53.7%
Simplified53.7%
if 340 < x Initial program 86.7%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 67.2%
*-commutative98.4%
sub-neg98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
metadata-eval98.4%
Simplified67.2%
Taylor expanded in x around 0 67.2%
sub-neg67.2%
metadata-eval67.2%
*-commutative67.2%
distribute-rgt-in67.2%
mul-1-neg67.2%
unsub-neg67.2%
*-commutative67.2%
Simplified67.2%
Final simplification60.4%
(FPCore (x y z) :precision binary64 (if (<= x 340.0) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (sqrt (* x (* x 0.0069444444444443885)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = sqrt((x * (x * 0.0069444444444443885)));
}
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 <= 340.0d0) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = sqrt((x * (x * 0.0069444444444443885d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = Math.sqrt((x * (x * 0.0069444444444443885)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 340.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = math.sqrt((x * (x * 0.0069444444444443885))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 340.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = sqrt(Float64(x * Float64(x * 0.0069444444444443885))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 340.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = sqrt((x * (x * 0.0069444444444443885))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 340.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[Sqrt[N[(x * N[(x * 0.0069444444444443885), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 340:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot \left(x \cdot 0.0069444444444443885\right)}\\
\end{array}
\end{array}
if x < 340Initial program 99.8%
Taylor expanded in z around 0 55.0%
Taylor expanded in x around inf 54.2%
*-commutative92.4%
sub-neg92.4%
mul-1-neg92.4%
log-rec92.4%
remove-double-neg92.4%
metadata-eval92.4%
Simplified54.2%
Taylor expanded in x around 0 53.7%
*-commutative53.7%
Simplified53.7%
if 340 < x Initial program 86.7%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 67.2%
*-commutative98.4%
sub-neg98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
metadata-eval98.4%
Simplified67.2%
Taylor expanded in x around 0 3.0%
metadata-eval3.0%
associate-*l/3.0%
rem-exp-log3.0%
log-rec3.0%
rem-square-sqrt0.0%
fabs-sqr0.0%
rem-square-sqrt10.1%
fabs-neg10.1%
rem-square-sqrt10.1%
fabs-sqr10.1%
rem-square-sqrt10.1%
rem-exp-log10.1%
Simplified10.1%
add-sqr-sqrt10.1%
sqrt-unprod12.1%
swap-sqr12.0%
metadata-eval12.0%
Applied egg-rr12.0%
associate-*l*12.1%
Simplified12.1%
Final simplification32.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -30.0) (not (<= z 2.7e+128))) (* -0.0027777777777778 (/ z x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -30.0) || !(z <= 2.7e+128)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-30.0d0)) .or. (.not. (z <= 2.7d+128))) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -30.0) || !(z <= 2.7e+128)) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -30.0) or not (z <= 2.7e+128): tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -30.0) || !(z <= 2.7e+128)) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -30.0) || ~((z <= 2.7e+128))) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -30.0], N[Not[LessEqual[z, 2.7e+128]], $MachinePrecision]], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -30 \lor \neg \left(z \leq 2.7 \cdot 10^{+128}\right):\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -30 or 2.70000000000000001e128 < z Initial program 86.7%
Taylor expanded in z around 0 33.6%
Taylor expanded in x around inf 33.6%
*-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
metadata-eval99.7%
Simplified33.6%
Taylor expanded in z around inf 14.9%
*-commutative14.9%
Simplified14.9%
if -30 < z < 2.70000000000000001e128Initial program 98.4%
Taylor expanded in z around 0 84.0%
Taylor expanded in x around inf 82.1%
*-commutative91.9%
sub-neg91.9%
mul-1-neg91.9%
log-rec91.9%
remove-double-neg91.9%
metadata-eval91.9%
Simplified82.1%
Taylor expanded in x around 0 39.6%
Final simplification28.7%
(FPCore (x y z) :precision binary64 (if (<= x 340.0) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = x * 0.083333333333333;
}
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 <= 340.0d0) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = x * 0.083333333333333d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 340.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 340.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 340.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(x * 0.083333333333333); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 340.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 340.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 340:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 340Initial program 99.8%
Taylor expanded in z around 0 55.0%
Taylor expanded in x around inf 54.2%
*-commutative92.4%
sub-neg92.4%
mul-1-neg92.4%
log-rec92.4%
remove-double-neg92.4%
metadata-eval92.4%
Simplified54.2%
Taylor expanded in x around 0 53.7%
*-commutative53.7%
Simplified53.7%
if 340 < x Initial program 86.7%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 67.2%
*-commutative98.4%
sub-neg98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
metadata-eval98.4%
Simplified67.2%
Taylor expanded in x around 0 3.0%
metadata-eval3.0%
associate-*l/3.0%
rem-exp-log3.0%
log-rec3.0%
rem-square-sqrt0.0%
fabs-sqr0.0%
rem-square-sqrt10.1%
fabs-neg10.1%
rem-square-sqrt10.1%
fabs-sqr10.1%
rem-square-sqrt10.1%
rem-exp-log10.1%
Simplified10.1%
Final simplification31.9%
(FPCore (x y z) :precision binary64 (if (<= x 0.9) (/ 0.083333333333333 x) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.9) {
tmp = 0.083333333333333 / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.9d0) then
tmp = 0.083333333333333d0 / x
else
tmp = x * 0.083333333333333d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.9) {
tmp = 0.083333333333333 / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.9: tmp = 0.083333333333333 / x else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.9) tmp = Float64(0.083333333333333 / x); else tmp = Float64(x * 0.083333333333333); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.9) tmp = 0.083333333333333 / x; else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.9], N[(0.083333333333333 / x), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.9:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 0.900000000000000022Initial program 99.8%
Taylor expanded in z around 0 45.8%
Taylor expanded in x around inf 45.0%
*-commutative92.2%
sub-neg92.2%
mul-1-neg92.2%
log-rec92.2%
remove-double-neg92.2%
metadata-eval92.2%
Simplified45.0%
Taylor expanded in x around 0 45.0%
if 0.900000000000000022 < x Initial program 87.0%
Taylor expanded in z around 0 67.0%
Taylor expanded in x around inf 65.7%
*-commutative98.4%
sub-neg98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
metadata-eval98.4%
Simplified65.7%
Taylor expanded in x around 0 3.0%
metadata-eval3.0%
associate-*l/3.0%
rem-exp-log3.0%
log-rec3.0%
rem-square-sqrt0.0%
fabs-sqr0.0%
rem-square-sqrt9.9%
fabs-neg9.9%
rem-square-sqrt9.9%
fabs-sqr9.9%
rem-square-sqrt9.9%
rem-exp-log9.9%
Simplified9.9%
Final simplification27.1%
(FPCore (x y z) :precision binary64 (* x 0.083333333333333))
double code(double x, double y, double z) {
return x * 0.083333333333333;
}
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.083333333333333d0
end function
public static double code(double x, double y, double z) {
return x * 0.083333333333333;
}
def code(x, y, z): return x * 0.083333333333333
function code(x, y, z) return Float64(x * 0.083333333333333) end
function tmp = code(x, y, z) tmp = x * 0.083333333333333; end
code[x_, y_, z_] := N[(x * 0.083333333333333), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.083333333333333
\end{array}
Initial program 93.2%
Taylor expanded in z around 0 56.6%
Taylor expanded in x around inf 55.6%
*-commutative95.4%
sub-neg95.4%
mul-1-neg95.4%
log-rec95.4%
remove-double-neg95.4%
metadata-eval95.4%
Simplified55.6%
Taylor expanded in x around 0 23.5%
metadata-eval23.5%
associate-*l/23.5%
rem-exp-log21.9%
log-rec21.9%
rem-square-sqrt20.0%
fabs-sqr20.0%
rem-square-sqrt25.5%
fabs-neg25.5%
rem-square-sqrt5.1%
fabs-sqr5.1%
rem-square-sqrt6.6%
rem-exp-log6.6%
Simplified6.6%
Final simplification6.6%
(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 2023200
(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)))