
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 1.85e-8)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* z (* z (/ (+ 0.0007936500793651 y) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-8) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.85d-8) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (z * (z * ((0.0007936500793651d0 + y) / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-8) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.85e-8: tmp = (0.91893853320467 + (math.log(x) * -0.5)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.85e-8) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.85e-8) tmp = (0.91893853320467 + (log(x) * -0.5)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.85e-8], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
\end{array}
\end{array}
if x < 1.85e-8Initial program 99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
Simplified99.6%
if 1.85e-8 < x Initial program 90.6%
Taylor expanded in z around inf 88.3%
associate-/l*93.3%
unpow293.3%
associate-*l*98.0%
Applied egg-rr98.0%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ 0.0007936500793651 y) x))
(t_1 (* t_0 (pow z 2.0)))
(t_2 (+ (+ 0.91893853320467 (* (log x) -0.5)) (* z (* z t_0))))
(t_3 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= z -1e+61)
t_2
(if (<= z 4.6e+17)
(+ t_3 (* 0.083333333333333 (/ 1.0 x)))
(if (<= z 5.4e+66)
t_1
(if (<= z 4e+99)
(+ t_3 (* y (/ 0.083333333333333 (* x y))))
(if (<= z 6.1e+115)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 6.2e+115)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(if (<= z 4.4e+155) t_1 t_2)))))))))
double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = t_0 * pow(z, 2.0);
double t_2 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0));
double t_3 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (z <= -1e+61) {
tmp = t_2;
} else if (z <= 4.6e+17) {
tmp = t_3 + (0.083333333333333 * (1.0 / x));
} else if (z <= 5.4e+66) {
tmp = t_1;
} else if (z <= 4e+99) {
tmp = t_3 + (y * (0.083333333333333 / (x * y)));
} else if (z <= 6.1e+115) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 6.2e+115) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else if (z <= 4.4e+155) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (0.0007936500793651d0 + y) / x
t_1 = t_0 * (z ** 2.0d0)
t_2 = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (z * t_0))
t_3 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (z <= (-1d+61)) then
tmp = t_2
else if (z <= 4.6d+17) then
tmp = t_3 + (0.083333333333333d0 * (1.0d0 / x))
else if (z <= 5.4d+66) then
tmp = t_1
else if (z <= 4d+99) then
tmp = t_3 + (y * (0.083333333333333d0 / (x * y)))
else if (z <= 6.1d+115) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 6.2d+115) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else if (z <= 4.4d+155) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = t_0 * Math.pow(z, 2.0);
double t_2 = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (z * t_0));
double t_3 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double tmp;
if (z <= -1e+61) {
tmp = t_2;
} else if (z <= 4.6e+17) {
tmp = t_3 + (0.083333333333333 * (1.0 / x));
} else if (z <= 5.4e+66) {
tmp = t_1;
} else if (z <= 4e+99) {
tmp = t_3 + (y * (0.083333333333333 / (x * y)));
} else if (z <= 6.1e+115) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 6.2e+115) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else if (z <= 4.4e+155) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = (0.0007936500793651 + y) / x t_1 = t_0 * math.pow(z, 2.0) t_2 = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (z * t_0)) t_3 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if z <= -1e+61: tmp = t_2 elif z <= 4.6e+17: tmp = t_3 + (0.083333333333333 * (1.0 / x)) elif z <= 5.4e+66: tmp = t_1 elif z <= 4e+99: tmp = t_3 + (y * (0.083333333333333 / (x * y))) elif z <= 6.1e+115: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 6.2e+115: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) elif z <= 4.4e+155: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(Float64(0.0007936500793651 + y) / x) t_1 = Float64(t_0 * (z ^ 2.0)) t_2 = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(z * t_0))) t_3 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (z <= -1e+61) tmp = t_2; elseif (z <= 4.6e+17) tmp = Float64(t_3 + Float64(0.083333333333333 * Float64(1.0 / x))); elseif (z <= 5.4e+66) tmp = t_1; elseif (z <= 4e+99) tmp = Float64(t_3 + Float64(y * Float64(0.083333333333333 / Float64(x * y)))); elseif (z <= 6.1e+115) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 6.2e+115) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); elseif (z <= 4.4e+155) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.0007936500793651 + y) / x; t_1 = t_0 * (z ^ 2.0); t_2 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0)); t_3 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; tmp = 0.0; if (z <= -1e+61) tmp = t_2; elseif (z <= 4.6e+17) tmp = t_3 + (0.083333333333333 * (1.0 / x)); elseif (z <= 5.4e+66) tmp = t_1; elseif (z <= 4e+99) tmp = t_3 + (y * (0.083333333333333 / (x * y))); elseif (z <= 6.1e+115) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 6.2e+115) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); elseif (z <= 4.4e+155) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[z, -1e+61], t$95$2, If[LessEqual[z, 4.6e+17], N[(t$95$3 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+66], t$95$1, If[LessEqual[z, 4e+99], N[(t$95$3 + N[(y * N[(0.083333333333333 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e+115], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 6.2e+115], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+155], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.0007936500793651 + y}{x}\\
t_1 := t\_0 \cdot {z}^{2}\\
t_2 := \left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot t\_0\right)\\
t_3 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;t\_3 + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+99}:\\
\;\;\;\;t\_3 + y \cdot \frac{0.083333333333333}{x \cdot y}\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{+115}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.99999999999999949e60 or 4.4000000000000005e155 < z Initial program 90.6%
flip--83.4%
metadata-eval83.4%
metadata-eval83.4%
associate-*l/83.4%
fma-neg83.4%
metadata-eval83.4%
metadata-eval83.4%
Applied egg-rr83.4%
Taylor expanded in x around 0 85.9%
+-commutative85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 84.7%
associate-/l*91.9%
unpow291.9%
associate-*l*99.9%
Applied egg-rr86.9%
if -9.99999999999999949e60 < z < 4.6e17Initial program 98.1%
Taylor expanded in z around 0 85.0%
clear-num85.0%
inv-pow85.0%
Applied egg-rr85.0%
unpow-185.0%
associate-/r/85.0%
Simplified85.0%
if 4.6e17 < z < 5.4e66 or 6.2000000000000001e115 < z < 4.4000000000000005e155Initial program 95.4%
flip--81.9%
metadata-eval81.9%
metadata-eval81.9%
associate-*l/81.9%
fma-neg81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Taylor expanded in x around 0 80.6%
+-commutative80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in z around inf 80.6%
Taylor expanded in x around 0 80.8%
associate-/l*85.3%
Simplified85.3%
if 5.4e66 < z < 3.9999999999999999e99Initial program 60.1%
add-sqr-sqrt60.1%
*-un-lft-identity60.1%
times-frac60.1%
*-commutative60.1%
fma-undefine60.1%
fma-neg60.1%
metadata-eval60.1%
Applied egg-rr60.1%
associate-*l/60.1%
*-lft-identity60.1%
fma-define60.1%
+-commutative60.1%
*-commutative60.1%
fma-define60.1%
Simplified60.1%
Taylor expanded in y around inf 99.4%
*-commutative99.4%
associate-/r*99.4%
associate-/l*99.4%
fma-define99.4%
*-commutative99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
associate-/r*79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in z around 0 99.4%
if 3.9999999999999999e99 < z < 6.09999999999999966e115Initial program 100.0%
flip--100.0%
metadata-eval100.0%
metadata-eval100.0%
associate-*l/100.0%
fma-neg100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 100.0%
if 6.09999999999999966e115 < z < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 100.0%
sub-neg100.0%
mul-1-neg100.0%
log-rec100.0%
remove-double-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Final simplification86.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 2.6e-100)
(+
t_0
(/
(+
(* y (* z (+ z (/ (- (* z 0.0007936500793651) 0.0027777777777778) y))))
0.083333333333333)
x))
(+
t_0
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x)))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 2.6e-100) {
tmp = t_0 + (((y * (z * (z + (((z * 0.0007936500793651) - 0.0027777777777778) / y)))) + 0.083333333333333) / x);
} else {
tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (x <= 2.6d-100) then
tmp = t_0 + (((y * (z * (z + (((z * 0.0007936500793651d0) - 0.0027777777777778d0) / y)))) + 0.083333333333333d0) / x)
else
tmp = t_0 + ((z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x)))
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 (x <= 2.6e-100) {
tmp = t_0 + (((y * (z * (z + (((z * 0.0007936500793651) - 0.0027777777777778) / y)))) + 0.083333333333333) / x);
} else {
tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if x <= 2.6e-100: tmp = t_0 + (((y * (z * (z + (((z * 0.0007936500793651) - 0.0027777777777778) / y)))) + 0.083333333333333) / x) else: tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (x <= 2.6e-100) tmp = Float64(t_0 + Float64(Float64(Float64(y * Float64(z * Float64(z + Float64(Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778) / y)))) + 0.083333333333333) / x)); else tmp = Float64(t_0 + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x)))); 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 (x <= 2.6e-100) tmp = t_0 + (((y * (z * (z + (((z * 0.0007936500793651) - 0.0027777777777778) / y)))) + 0.083333333333333) / x); else tmp = t_0 + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[x, 2.6e-100], N[(t$95$0 + N[(N[(N[(y * N[(z * N[(z + N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 2.6 \cdot 10^{-100}:\\
\;\;\;\;t\_0 + \frac{y \cdot \left(z \cdot \left(z + \frac{z \cdot 0.0007936500793651 - 0.0027777777777778}{y}\right)\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\end{array}
\end{array}
if x < 2.5999999999999998e-100Initial program 99.6%
add-sqr-sqrt99.5%
*-un-lft-identity99.5%
times-frac99.5%
*-commutative99.5%
fma-undefine99.5%
fma-neg99.5%
metadata-eval99.5%
Applied egg-rr99.5%
associate-*l/99.6%
*-lft-identity99.6%
fma-define99.6%
+-commutative99.6%
*-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around inf 57.5%
*-commutative57.5%
associate-/r*57.4%
associate-/l*60.0%
fma-define63.8%
*-commutative63.8%
fma-neg63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in x around 0 81.9%
*-commutative81.9%
associate-/l*66.6%
associate-*r/66.6%
metadata-eval66.6%
+-commutative66.6%
unpow266.6%
associate-/l*71.7%
distribute-lft-out84.4%
*-commutative84.4%
fma-neg84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in x around 0 99.6%
distribute-rgt-in99.6%
associate--l+99.6%
associate-*r/99.6%
un-div-inv99.6%
sub-div99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 99.7%
if 2.5999999999999998e-100 < x Initial program 92.7%
Taylor expanded in z around 0 98.0%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ 0.0007936500793651 y) x))
(t_1 (+ (+ 0.91893853320467 (* (log x) -0.5)) (* z (* z t_0)))))
(if (<= z -1.06e+61)
t_1
(if (<= z 4.1e+16)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* 0.083333333333333 (/ 1.0 x)))
(if (<= z 7.5e+67)
(* t_0 (pow z 2.0))
(if (<= z 1.05e+68)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
t_1))))))
double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0));
double tmp;
if (z <= -1.06e+61) {
tmp = t_1;
} else if (z <= 4.1e+16) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
} else if (z <= 7.5e+67) {
tmp = t_0 * pow(z, 2.0);
} else if (z <= 1.05e+68) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (0.0007936500793651d0 + y) / x
t_1 = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (z * t_0))
if (z <= (-1.06d+61)) then
tmp = t_1
else if (z <= 4.1d+16) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 * (1.0d0 / x))
else if (z <= 7.5d+67) then
tmp = t_0 * (z ** 2.0d0)
else if (z <= 1.05d+68) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (z * t_0));
double tmp;
if (z <= -1.06e+61) {
tmp = t_1;
} else if (z <= 4.1e+16) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
} else if (z <= 7.5e+67) {
tmp = t_0 * Math.pow(z, 2.0);
} else if (z <= 1.05e+68) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (0.0007936500793651 + y) / x t_1 = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (z * t_0)) tmp = 0 if z <= -1.06e+61: tmp = t_1 elif z <= 4.1e+16: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)) elif z <= 7.5e+67: tmp = t_0 * math.pow(z, 2.0) elif z <= 1.05e+68: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(0.0007936500793651 + y) / x) t_1 = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(z * t_0))) tmp = 0.0 if (z <= -1.06e+61) tmp = t_1; elseif (z <= 4.1e+16) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 * Float64(1.0 / x))); elseif (z <= 7.5e+67) tmp = Float64(t_0 * (z ^ 2.0)); elseif (z <= 1.05e+68) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.0007936500793651 + y) / x; t_1 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0)); tmp = 0.0; if (z <= -1.06e+61) tmp = t_1; elseif (z <= 4.1e+16) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)); elseif (z <= 7.5e+67) tmp = t_0 * (z ^ 2.0); elseif (z <= 1.05e+68) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.06e+61], t$95$1, If[LessEqual[z, 4.1e+16], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+67], N[(t$95$0 * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+68], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.0007936500793651 + y}{x}\\
t_1 := \left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot t\_0\right)\\
\mathbf{if}\;z \leq -1.06 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+16}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+67}:\\
\;\;\;\;t\_0 \cdot {z}^{2}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0599999999999999e61 or 1.05e68 < z Initial program 89.7%
flip--81.1%
metadata-eval81.1%
metadata-eval81.1%
associate-*l/81.1%
fma-neg81.1%
metadata-eval81.1%
metadata-eval81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 83.0%
+-commutative83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in z around inf 82.1%
associate-/l*93.5%
unpow293.5%
associate-*l*99.8%
Applied egg-rr84.7%
if -1.0599999999999999e61 < z < 4.1e16Initial program 98.1%
Taylor expanded in z around 0 85.0%
clear-num85.0%
inv-pow85.0%
Applied egg-rr85.0%
unpow-185.0%
associate-/r/85.0%
Simplified85.0%
if 4.1e16 < z < 7.5000000000000005e67Initial program 99.5%
flip--79.2%
metadata-eval79.2%
metadata-eval79.2%
associate-*l/79.2%
fma-neg79.2%
metadata-eval79.2%
metadata-eval79.2%
Applied egg-rr79.2%
Taylor expanded in x around 0 76.0%
+-commutative76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in z around inf 76.2%
Taylor expanded in x around 0 76.5%
associate-/l*76.6%
Simplified76.6%
if 7.5000000000000005e67 < z < 1.05e68Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 100.0%
sub-neg100.0%
mul-1-neg100.0%
log-rec100.0%
remove-double-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Final simplification84.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ 0.0007936500793651 y) x))
(t_1 (+ (+ 0.91893853320467 (* (log x) -0.5)) (* z (* z t_0)))))
(if (<= z -4.5e+61)
t_1
(if (<= z 5e+16)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(if (<= z 5.4e+66)
(* t_0 (pow z 2.0))
(if (<= z 7.3e+81)
(+ (- (* x (log x)) x) (/ 0.083333333333333 x))
t_1))))))
double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0));
double tmp;
if (z <= -4.5e+61) {
tmp = t_1;
} else if (z <= 5e+16) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (z <= 5.4e+66) {
tmp = t_0 * pow(z, 2.0);
} else if (z <= 7.3e+81) {
tmp = ((x * log(x)) - x) + (0.083333333333333 / x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (0.0007936500793651d0 + y) / x
t_1 = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (z * t_0))
if (z <= (-4.5d+61)) then
tmp = t_1
else if (z <= 5d+16) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else if (z <= 5.4d+66) then
tmp = t_0 * (z ** 2.0d0)
else if (z <= 7.3d+81) then
tmp = ((x * log(x)) - x) + (0.083333333333333d0 / x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.0007936500793651 + y) / x;
double t_1 = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (z * t_0));
double tmp;
if (z <= -4.5e+61) {
tmp = t_1;
} else if (z <= 5e+16) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (z <= 5.4e+66) {
tmp = t_0 * Math.pow(z, 2.0);
} else if (z <= 7.3e+81) {
tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (0.0007936500793651 + y) / x t_1 = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (z * t_0)) tmp = 0 if z <= -4.5e+61: tmp = t_1 elif z <= 5e+16: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) elif z <= 5.4e+66: tmp = t_0 * math.pow(z, 2.0) elif z <= 7.3e+81: tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x) else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(0.0007936500793651 + y) / x) t_1 = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(z * t_0))) tmp = 0.0 if (z <= -4.5e+61) tmp = t_1; elseif (z <= 5e+16) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); elseif (z <= 5.4e+66) tmp = Float64(t_0 * (z ^ 2.0)); elseif (z <= 7.3e+81) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(0.083333333333333 / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.0007936500793651 + y) / x; t_1 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0)); tmp = 0.0; if (z <= -4.5e+61) tmp = t_1; elseif (z <= 5e+16) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); elseif (z <= 5.4e+66) tmp = t_0 * (z ^ 2.0); elseif (z <= 7.3e+81) tmp = ((x * log(x)) - x) + (0.083333333333333 / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+61], t$95$1, If[LessEqual[z, 5e+16], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+66], N[(t$95$0 * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.3e+81], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0.0007936500793651 + y}{x}\\
t_1 := \left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot t\_0\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+16}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_0 \cdot {z}^{2}\\
\mathbf{elif}\;z \leq 7.3 \cdot 10^{+81}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5e61 or 7.2999999999999997e81 < z Initial program 89.6%
flip--81.9%
metadata-eval81.9%
metadata-eval81.9%
associate-*l/81.9%
fma-neg81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Taylor expanded in x around 0 83.8%
+-commutative83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in z around inf 82.9%
associate-/l*93.5%
unpow293.5%
associate-*l*99.8%
Applied egg-rr85.5%
if -4.5e61 < z < 5e16Initial program 98.1%
Taylor expanded in z around 0 85.0%
if 5e16 < z < 5.4e66Initial program 99.5%
flip--79.2%
metadata-eval79.2%
metadata-eval79.2%
associate-*l/79.2%
fma-neg79.2%
metadata-eval79.2%
metadata-eval79.2%
Applied egg-rr79.2%
Taylor expanded in x around 0 76.0%
+-commutative76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in z around inf 76.2%
Taylor expanded in x around 0 76.5%
associate-/l*76.6%
Simplified76.6%
if 5.4e66 < z < 7.2999999999999997e81Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 99.2%
sub-neg99.2%
mul-1-neg99.2%
log-rec99.2%
remove-double-neg99.2%
metadata-eval99.2%
+-commutative99.2%
Simplified99.2%
+-commutative99.2%
distribute-lft-in100.0%
*-commutative100.0%
neg-mul-1100.0%
Applied egg-rr100.0%
unsub-neg100.0%
Applied egg-rr100.0%
Final simplification85.0%
(FPCore (x y z)
:precision binary64
(if (<= z -1.35e+61)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (<= z 6e+17)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(if (or (<= z 7.5e+67) (not (<= z 1.7e+92)))
(* (/ (+ 0.0007936500793651 y) x) (pow z 2.0))
(+ (- (* x (log x)) x) (/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.35e+61) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if (z <= 6e+17) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if ((z <= 7.5e+67) || !(z <= 1.7e+92)) {
tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.0);
} 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 (z <= (-1.35d+61)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if (z <= 6d+17) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else if ((z <= 7.5d+67) .or. (.not. (z <= 1.7d+92))) then
tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
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 (z <= -1.35e+61) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if (z <= 6e+17) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if ((z <= 7.5e+67) || !(z <= 1.7e+92)) {
tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
} else {
tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.35e+61: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif z <= 6e+17: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) elif (z <= 7.5e+67) or not (z <= 1.7e+92): tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0) else: tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.35e+61) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif (z <= 6e+17) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); elseif ((z <= 7.5e+67) || !(z <= 1.7e+92)) tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0)); 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 (z <= -1.35e+61) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif (z <= 6e+17) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); elseif ((z <= 7.5e+67) || ~((z <= 1.7e+92))) tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0); else tmp = ((x * log(x)) - x) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.35e+61], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 6e+17], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.5e+67], N[Not[LessEqual[z, 1.7e+92]], $MachinePrecision]], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $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}\;z \leq -1.35 \cdot 10^{+61}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+17}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+67} \lor \neg \left(z \leq 1.7 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.3500000000000001e61Initial program 91.0%
flip--82.1%
metadata-eval82.1%
metadata-eval82.1%
associate-*l/82.1%
fma-neg82.1%
metadata-eval82.1%
metadata-eval82.1%
Applied egg-rr82.1%
Taylor expanded in x around 0 83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 82.2%
Taylor expanded in x around 0 82.2%
if -1.3500000000000001e61 < z < 6e17Initial program 98.1%
Taylor expanded in z around 0 85.0%
if 6e17 < z < 7.5000000000000005e67 or 1.6999999999999999e92 < z Initial program 91.4%
flip--82.7%
metadata-eval82.7%
metadata-eval82.7%
associate-*l/82.7%
fma-neg82.7%
metadata-eval82.7%
metadata-eval82.7%
Applied egg-rr82.7%
Taylor expanded in x around 0 83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 84.0%
Taylor expanded in x around 0 84.0%
associate-/l*85.7%
Simplified85.7%
if 7.5000000000000005e67 < z < 1.6999999999999999e92Initial program 66.7%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around inf 99.0%
sub-neg66.2%
mul-1-neg66.2%
log-rec66.2%
remove-double-neg66.2%
metadata-eval66.2%
+-commutative66.2%
Simplified99.0%
+-commutative99.0%
distribute-lft-in99.5%
*-commutative99.5%
neg-mul-199.5%
Applied egg-rr99.5%
unsub-neg99.5%
Applied egg-rr99.5%
Final simplification84.8%
(FPCore (x y z)
:precision binary64
(if (<= z -1e+61)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (or (<= z 6.8e+16) (and (not (<= z 7.5e+67)) (<= z 3.45e+71)))
(+ (- (* x (log x)) x) (/ 0.083333333333333 x))
(* (/ (+ 0.0007936500793651 y) x) (pow z 2.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1e+61) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
tmp = ((x * log(x)) - x) + (0.083333333333333 / x);
} else {
tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.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 (z <= (-1d+61)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if ((z <= 6.8d+16) .or. (.not. (z <= 7.5d+67)) .and. (z <= 3.45d+71)) then
tmp = ((x * log(x)) - x) + (0.083333333333333d0 / x)
else
tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1e+61) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
} else {
tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1e+61: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif (z <= 6.8e+16) or (not (z <= 7.5e+67) and (z <= 3.45e+71)): tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x) else: tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1e+61) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1e+61) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif ((z <= 6.8e+16) || (~((z <= 7.5e+67)) && (z <= 3.45e+71))) tmp = ((x * log(x)) - x) + (0.083333333333333 / x); else tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1e+61], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[z, 6.8e+16], And[N[Not[LessEqual[z, 7.5e+67]], $MachinePrecision], LessEqual[z, 3.45e+71]]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\
\end{array}
\end{array}
if z < -9.99999999999999949e60Initial program 91.0%
flip--82.1%
metadata-eval82.1%
metadata-eval82.1%
associate-*l/82.1%
fma-neg82.1%
metadata-eval82.1%
metadata-eval82.1%
Applied egg-rr82.1%
Taylor expanded in x around 0 83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 82.2%
Taylor expanded in x around 0 82.2%
if -9.99999999999999949e60 < z < 6.8e16 or 7.5000000000000005e67 < z < 3.44999999999999987e71Initial program 98.2%
Taylor expanded in z around 0 85.2%
Taylor expanded in x around inf 82.8%
sub-neg95.5%
mul-1-neg95.5%
log-rec95.5%
remove-double-neg95.5%
metadata-eval95.5%
+-commutative95.5%
Simplified82.8%
+-commutative82.8%
distribute-lft-in82.8%
*-commutative82.8%
neg-mul-182.8%
Applied egg-rr82.8%
unsub-neg82.8%
Applied egg-rr82.8%
if 6.8e16 < z < 7.5000000000000005e67 or 3.44999999999999987e71 < z Initial program 89.8%
flip--81.3%
metadata-eval81.3%
metadata-eval81.3%
associate-*l/81.3%
fma-neg81.3%
metadata-eval81.3%
metadata-eval81.3%
Applied egg-rr81.3%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in z around inf 82.5%
Taylor expanded in x around 0 82.5%
associate-/l*84.2%
Simplified84.2%
Final simplification83.0%
(FPCore (x y z)
:precision binary64
(if (<= z -1e+61)
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
(if (or (<= z 4.5e+16) (and (not (<= z 7.5e+67)) (<= z 3.45e+71)))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(* (/ (+ 0.0007936500793651 y) x) (pow z 2.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1e+61) {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
} else if ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.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 (z <= (-1d+61)) then
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
else if ((z <= 4.5d+16) .or. (.not. (z <= 7.5d+67)) .and. (z <= 3.45d+71)) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1e+61) {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
} else if ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1e+61: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x elif (z <= 4.5e+16) or (not (z <= 7.5e+67) and (z <= 3.45e+71)): tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1e+61) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); elseif ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1e+61) tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; elseif ((z <= 4.5e+16) || (~((z <= 7.5e+67)) && (z <= 3.45e+71))) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1e+61], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[z, 4.5e+16], And[N[Not[LessEqual[z, 7.5e+67]], $MachinePrecision], LessEqual[z, 3.45e+71]]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\
\end{array}
\end{array}
if z < -9.99999999999999949e60Initial program 91.0%
flip--82.1%
metadata-eval82.1%
metadata-eval82.1%
associate-*l/82.1%
fma-neg82.1%
metadata-eval82.1%
metadata-eval82.1%
Applied egg-rr82.1%
Taylor expanded in x around 0 83.9%
+-commutative83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in z around inf 82.2%
Taylor expanded in x around 0 82.2%
if -9.99999999999999949e60 < z < 4.5e16 or 7.5000000000000005e67 < z < 3.44999999999999987e71Initial program 98.2%
Taylor expanded in z around 0 85.2%
Taylor expanded in x around inf 82.8%
sub-neg95.5%
mul-1-neg95.5%
log-rec95.5%
remove-double-neg95.5%
metadata-eval95.5%
+-commutative95.5%
Simplified82.8%
if 4.5e16 < z < 7.5000000000000005e67 or 3.44999999999999987e71 < z Initial program 89.8%
flip--81.3%
metadata-eval81.3%
metadata-eval81.3%
associate-*l/81.3%
fma-neg81.3%
metadata-eval81.3%
metadata-eval81.3%
Applied egg-rr81.3%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in z around inf 82.5%
Taylor expanded in x around 0 82.5%
associate-/l*84.2%
Simplified84.2%
Final simplification83.0%
(FPCore (x y z)
:precision binary64
(if (<= x 5.9e-12)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(+
(/ (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)) x)
(* 0.083333333333333 (/ 1.0 x))))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* z (* z (/ (+ 0.0007936500793651 y) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-12) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 * (1.0 / x)));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.9d-12) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (((z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)) / x) + (0.083333333333333d0 * (1.0d0 / x)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (z * (z * ((0.0007936500793651d0 + y) / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-12) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 * (1.0 / x)));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.9e-12: tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 * (1.0 / x))) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.9e-12) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) / x) + Float64(0.083333333333333 * Float64(1.0 / x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.9e-12) tmp = (0.91893853320467 + (log(x) * -0.5)) + (((z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)) / x) + (0.083333333333333 * (1.0 / x))); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * (z * ((0.0007936500793651 + y) / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.9e-12], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.9 \cdot 10^{-12}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
\end{array}
\end{array}
if x < 5.9e-12Initial program 99.6%
flip--99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*l/99.6%
fma-neg99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 86.9%
Taylor expanded in x around 0 99.7%
if 5.9e-12 < x Initial program 90.7%
Taylor expanded in z around inf 87.8%
associate-/l*92.7%
unpow292.7%
associate-*l*97.4%
Applied egg-rr97.4%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(if (<= x 6e+209)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0)))
(+ (- (* x (log x)) x) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 6e+209) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0));
} 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 <= 6d+209) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + (x * (log(x) + (-1.0d0)))
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 <= 6e+209) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 6e+209: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (math.log(x) + -1.0)) else: tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 6e+209) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(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 <= 6e+209) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + (x * (log(x) + -1.0)); else tmp = ((x * log(x)) - x) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 6e+209], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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 6 \cdot 10^{+209}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 5.99999999999999971e209Initial program 98.3%
Taylor expanded in x around inf 96.5%
sub-neg96.5%
mul-1-neg96.5%
log-rec96.5%
remove-double-neg96.5%
metadata-eval96.5%
+-commutative96.5%
Simplified96.5%
if 5.99999999999999971e209 < x Initial program 79.6%
Taylor expanded in z around 0 89.4%
Taylor expanded in x around inf 89.3%
sub-neg79.4%
mul-1-neg79.4%
log-rec79.4%
remove-double-neg79.4%
metadata-eval79.4%
+-commutative79.4%
Simplified89.3%
+-commutative89.3%
distribute-lft-in89.4%
*-commutative89.4%
neg-mul-189.4%
Applied egg-rr89.4%
unsub-neg89.4%
Applied egg-rr89.4%
Final simplification95.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -1800000.0) (not (<= z 5.2e-137))) (* (/ (+ 0.0007936500793651 y) x) (pow z 2.0)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1800000.0) || !(z <= 5.2e-137)) {
tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.0);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1800000.0d0)) .or. (.not. (z <= 5.2d-137))) then
tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1800000.0) || !(z <= 5.2e-137)) {
tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1800000.0) or not (z <= 5.2e-137): tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1800000.0) || !(z <= 5.2e-137)) tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1800000.0) || ~((z <= 5.2e-137))) tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1800000.0], N[Not[LessEqual[z, 5.2e-137]], $MachinePrecision]], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1800000 \lor \neg \left(z \leq 5.2 \cdot 10^{-137}\right):\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.8e6 or 5.1999999999999999e-137 < z Initial program 91.6%
flip--79.6%
metadata-eval79.6%
metadata-eval79.6%
associate-*l/79.6%
fma-neg79.6%
metadata-eval79.6%
metadata-eval79.6%
Applied egg-rr79.6%
Taylor expanded in x around 0 71.4%
+-commutative71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in z around inf 68.4%
Taylor expanded in x around 0 68.7%
associate-/l*68.6%
Simplified68.6%
if -1.8e6 < z < 5.1999999999999999e-137Initial program 99.4%
Taylor expanded in z around 0 92.4%
clear-num92.4%
inv-pow92.4%
Applied egg-rr92.4%
unpow-192.4%
associate-/r/92.4%
Simplified92.4%
Taylor expanded in x around 0 46.2%
+-commutative53.1%
Simplified46.2%
Taylor expanded in x around 0 46.2%
clear-num92.4%
inv-pow92.4%
Applied egg-rr46.2%
unpow-192.4%
associate-/r/92.4%
Simplified46.3%
Final simplification59.3%
(FPCore (x y z)
:precision binary64
(if (<= z -4.6e-13)
(* (/ (+ 0.0007936500793651 y) x) (pow z 2.0))
(if (<= z 5.2e-137)
(* 0.083333333333333 (/ 1.0 x))
(/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.6e-13) {
tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.0);
} else if (z <= 5.2e-137) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4.6d-13)) then
tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
else if (z <= 5.2d-137) then
tmp = 0.083333333333333d0 * (1.0d0 / x)
else
tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.6e-13) {
tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
} else if (z <= 5.2e-137) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.6e-13: tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0) elif z <= 5.2e-137: tmp = 0.083333333333333 * (1.0 / x) else: tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.6e-13) tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0)); elseif (z <= 5.2e-137) tmp = Float64(0.083333333333333 * Float64(1.0 / x)); else tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.6e-13) tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0); elseif (z <= 5.2e-137) tmp = 0.083333333333333 * (1.0 / x); else tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.6e-13], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-137], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-13}:\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-137}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\
\end{array}
\end{array}
if z < -4.59999999999999958e-13Initial program 90.7%
flip--76.7%
metadata-eval76.7%
metadata-eval76.7%
associate-*l/76.7%
fma-neg76.7%
metadata-eval76.7%
metadata-eval76.7%
Applied egg-rr76.7%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in z around inf 69.8%
Taylor expanded in x around 0 70.1%
associate-/l*71.3%
Simplified71.3%
if -4.59999999999999958e-13 < z < 5.1999999999999999e-137Initial program 99.4%
Taylor expanded in z around 0 93.7%
clear-num93.6%
inv-pow93.6%
Applied egg-rr93.6%
unpow-193.6%
associate-/r/93.7%
Simplified93.7%
Taylor expanded in x around 0 49.2%
+-commutative54.8%
Simplified49.2%
Taylor expanded in x around 0 49.1%
clear-num93.6%
inv-pow93.6%
Applied egg-rr49.0%
unpow-193.6%
associate-/r/93.7%
Simplified49.1%
if 5.1999999999999999e-137 < z Initial program 93.0%
flip--79.5%
metadata-eval79.5%
metadata-eval79.5%
associate-*l/79.4%
fma-neg79.4%
metadata-eval79.4%
metadata-eval79.4%
Applied egg-rr79.4%
Taylor expanded in x around 0 67.1%
+-commutative67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in z around inf 62.8%
Taylor expanded in x around 0 63.2%
Final simplification60.0%
(FPCore (x y z) :precision binary64 (if (<= x 0.0055) (* 0.083333333333333 (/ 1.0 x)) (* x (- (log x) 0.916666666666667))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.0055) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = x * (log(x) - 0.916666666666667);
}
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.0055d0) then
tmp = 0.083333333333333d0 * (1.0d0 / x)
else
tmp = x * (log(x) - 0.916666666666667d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.0055) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = x * (Math.log(x) - 0.916666666666667);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.0055: tmp = 0.083333333333333 * (1.0 / x) else: tmp = x * (math.log(x) - 0.916666666666667) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.0055) tmp = Float64(0.083333333333333 * Float64(1.0 / x)); else tmp = Float64(x * Float64(log(x) - 0.916666666666667)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.0055) tmp = 0.083333333333333 * (1.0 / x); else tmp = x * (log(x) - 0.916666666666667); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.0055], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] - 0.916666666666667), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0055:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x - 0.916666666666667\right)\\
\end{array}
\end{array}
if x < 0.0054999999999999997Initial program 99.6%
Taylor expanded in z around 0 44.4%
clear-num44.4%
inv-pow44.4%
Applied egg-rr44.4%
unpow-144.4%
associate-/r/44.5%
Simplified44.5%
Taylor expanded in x around 0 44.1%
+-commutative99.3%
Simplified44.1%
Taylor expanded in x around 0 43.0%
clear-num44.4%
inv-pow44.4%
Applied egg-rr43.0%
unpow-144.4%
associate-/r/44.5%
Simplified43.1%
if 0.0054999999999999997 < x Initial program 90.4%
Taylor expanded in z around 0 68.4%
Taylor expanded in x around inf 67.0%
sub-neg89.0%
mul-1-neg89.0%
log-rec89.0%
remove-double-neg89.0%
metadata-eval89.0%
+-commutative89.0%
Simplified67.0%
*-un-lft-identity67.0%
div-inv67.0%
add-exp-log67.0%
add-sqr-sqrt0.0%
sqrt-unprod25.7%
log-rec25.7%
log-rec25.7%
sqr-neg25.7%
sqrt-unprod25.7%
add-sqr-sqrt25.7%
add-exp-log25.7%
Applied egg-rr25.7%
*-lft-identity25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x around 0 25.7%
Final simplification34.0%
(FPCore (x y z) :precision binary64 (if (<= x 1.85e-8) (* 0.083333333333333 (/ 1.0 x)) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-8) {
tmp = 0.083333333333333 * (1.0 / 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 <= 1.85d-8) then
tmp = 0.083333333333333d0 * (1.0d0 / 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 <= 1.85e-8) {
tmp = 0.083333333333333 * (1.0 / x);
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.85e-8: tmp = 0.083333333333333 * (1.0 / x) else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.85e-8) tmp = Float64(0.083333333333333 * Float64(1.0 / x)); else tmp = Float64(x * 0.083333333333333); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.85e-8) tmp = 0.083333333333333 * (1.0 / x); else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.85e-8], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 1.85e-8Initial program 99.6%
Taylor expanded in z around 0 43.5%
clear-num43.5%
inv-pow43.5%
Applied egg-rr43.5%
unpow-143.5%
associate-/r/43.6%
Simplified43.6%
Taylor expanded in x around 0 43.6%
+-commutative99.6%
Simplified43.6%
Taylor expanded in x around 0 43.0%
clear-num43.5%
inv-pow43.5%
Applied egg-rr43.0%
unpow-143.5%
associate-/r/43.6%
Simplified43.0%
if 1.85e-8 < x Initial program 90.6%
Taylor expanded in z around 0 68.9%
clear-num68.9%
inv-pow68.9%
Applied egg-rr68.9%
unpow-168.9%
associate-/r/68.9%
Simplified68.9%
Taylor expanded in x around 0 2.4%
+-commutative31.5%
Simplified2.4%
Taylor expanded in x around 0 3.7%
*-un-lft-identity66.7%
div-inv66.7%
add-exp-log66.7%
add-sqr-sqrt0.7%
sqrt-unprod25.9%
log-rec25.9%
log-rec25.9%
sqr-neg25.9%
sqrt-unprod25.3%
add-sqr-sqrt25.3%
add-exp-log25.3%
Applied egg-rr10.0%
*-lft-identity25.3%
*-commutative25.3%
Simplified10.0%
Final simplification25.6%
(FPCore (x y z) :precision binary64 (if (<= x 1.85e-8) (/ 0.083333333333333 x) (* x 0.083333333333333)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.85e-8) {
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 <= 1.85d-8) 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 <= 1.85e-8) {
tmp = 0.083333333333333 / x;
} else {
tmp = x * 0.083333333333333;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.85e-8: tmp = 0.083333333333333 / x else: tmp = x * 0.083333333333333 return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.85e-8) 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 <= 1.85e-8) tmp = 0.083333333333333 / x; else tmp = x * 0.083333333333333; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.85e-8], N[(0.083333333333333 / x), $MachinePrecision], N[(x * 0.083333333333333), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.083333333333333\\
\end{array}
\end{array}
if x < 1.85e-8Initial program 99.6%
Taylor expanded in z around 0 43.5%
clear-num43.5%
inv-pow43.5%
Applied egg-rr43.5%
unpow-143.5%
associate-/r/43.6%
Simplified43.6%
Taylor expanded in x around 0 43.6%
+-commutative99.6%
Simplified43.6%
Taylor expanded in x around 0 43.0%
if 1.85e-8 < x Initial program 90.6%
Taylor expanded in z around 0 68.9%
clear-num68.9%
inv-pow68.9%
Applied egg-rr68.9%
unpow-168.9%
associate-/r/68.9%
Simplified68.9%
Taylor expanded in x around 0 2.4%
+-commutative31.5%
Simplified2.4%
Taylor expanded in x around 0 3.7%
*-un-lft-identity66.7%
div-inv66.7%
add-exp-log66.7%
add-sqr-sqrt0.7%
sqrt-unprod25.9%
log-rec25.9%
log-rec25.9%
sqr-neg25.9%
sqrt-unprod25.3%
add-sqr-sqrt25.3%
add-exp-log25.3%
Applied egg-rr10.0%
*-lft-identity25.3%
*-commutative25.3%
Simplified10.0%
(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 94.8%
Taylor expanded in z around 0 56.9%
clear-num56.9%
inv-pow56.9%
Applied egg-rr56.9%
unpow-156.9%
associate-/r/56.9%
Simplified56.9%
Taylor expanded in x around 0 21.9%
+-commutative63.7%
Simplified21.9%
Taylor expanded in x around 0 22.3%
*-un-lft-identity55.5%
div-inv55.5%
add-exp-log54.0%
add-sqr-sqrt18.9%
sqrt-unprod32.5%
log-rec32.5%
log-rec32.5%
sqr-neg32.5%
sqrt-unprod13.3%
add-sqr-sqrt14.1%
add-exp-log14.1%
Applied egg-rr6.6%
*-lft-identity14.1%
*-commutative14.1%
Simplified6.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 2024107
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))