
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 1e-92)
(+
(+ 0.91893853320467 (* (log x) -0.5))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(+
(* z (+ (/ 0.0007936500793651 x) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e-92) {
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) + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-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 (x <= 1d-92) 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) + ((0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 / x) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e-92) {
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) + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e-92: 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) + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e-92) 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(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e-92) 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) + ((0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e-92], 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[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{-92}:\\
\;\;\;\;\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) + \left(0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
if x < 9.99999999999999988e-93Initial program 99.9%
Taylor expanded in x around 0 99.9%
if 9.99999999999999988e-93 < x Initial program 92.9%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 99.6%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (+ (* (fma z (+ 0.0007936500793651 y) -0.0027777777777778) (/ z x)) (* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((fma(z, (0.0007936500793651 + y), -0.0027777777777778) * (z / x)) + (0.083333333333333 * (1.0 / x)));
}
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778) * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / 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[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right) \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)
\end{array}
Initial program 95.0%
Taylor expanded in z around 0 95.8%
Taylor expanded in x around 0 95.0%
*-commutative95.0%
associate-/l*98.9%
fma-neg98.9%
metadata-eval98.9%
Simplified98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (* (log x) -0.5)))
(t_1 (+ t_0 (* z (* y (/ z x)))))
(t_2 (+ t_0 (* z (* 0.0007936500793651 (/ z x))))))
(if (<= z -2.65e+278)
t_2
(if (<= z -8e+86)
t_1
(if (<= z -8.2e+72)
(+ t_0 (* z (/ (* z 0.0007936500793651) x)))
(if (<= z -4e+45)
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (* x (+ (log x) -1.0))))
(if (<= z -2.05e+40)
t_1
(if (<= z 0.4)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))
(if (<= z 3.2e+126) t_1 t_2)))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -2.65e+278) {
tmp = t_2;
} else if (z <= -8e+86) {
tmp = t_1;
} else if (z <= -8.2e+72) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -4e+45) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
} else if (z <= -2.05e+40) {
tmp = t_1;
} else if (z <= 0.4) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
} else if (z <= 3.2e+126) {
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) :: tmp
t_0 = 0.91893853320467d0 + (log(x) * (-0.5d0))
t_1 = t_0 + (z * (y * (z / x)))
t_2 = t_0 + (z * (0.0007936500793651d0 * (z / x)))
if (z <= (-2.65d+278)) then
tmp = t_2
else if (z <= (-8d+86)) then
tmp = t_1
else if (z <= (-8.2d+72)) then
tmp = t_0 + (z * ((z * 0.0007936500793651d0) / x))
else if (z <= (-4d+45)) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
else if (z <= (-2.05d+40)) then
tmp = t_1
else if (z <= 0.4d0) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
else if (z <= 3.2d+126) 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.91893853320467 + (Math.log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -2.65e+278) {
tmp = t_2;
} else if (z <= -8e+86) {
tmp = t_1;
} else if (z <= -8.2e+72) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -4e+45) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
} else if (z <= -2.05e+40) {
tmp = t_1;
} else if (z <= 0.4) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
} else if (z <= 3.2e+126) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (math.log(x) * -0.5) t_1 = t_0 + (z * (y * (z / x))) t_2 = t_0 + (z * (0.0007936500793651 * (z / x))) tmp = 0 if z <= -2.65e+278: tmp = t_2 elif z <= -8e+86: tmp = t_1 elif z <= -8.2e+72: tmp = t_0 + (z * ((z * 0.0007936500793651) / x)) elif z <= -4e+45: tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (math.log(x) + -1.0))) elif z <= -2.05e+40: tmp = t_1 elif z <= 0.4: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x) elif z <= 3.2e+126: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(log(x) * -0.5)) t_1 = Float64(t_0 + Float64(z * Float64(y * Float64(z / x)))) t_2 = Float64(t_0 + Float64(z * Float64(0.0007936500793651 * Float64(z / x)))) tmp = 0.0 if (z <= -2.65e+278) tmp = t_2; elseif (z <= -8e+86) tmp = t_1; elseif (z <= -8.2e+72) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * 0.0007936500793651) / x))); elseif (z <= -4e+45) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))); elseif (z <= -2.05e+40) tmp = t_1; elseif (z <= 0.4) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); elseif (z <= 3.2e+126) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (log(x) * -0.5); t_1 = t_0 + (z * (y * (z / x))); t_2 = t_0 + (z * (0.0007936500793651 * (z / x))); tmp = 0.0; if (z <= -2.65e+278) tmp = t_2; elseif (z <= -8e+86) tmp = t_1; elseif (z <= -8.2e+72) tmp = t_0 + (z * ((z * 0.0007936500793651) / x)); elseif (z <= -4e+45) tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0))); elseif (z <= -2.05e+40) tmp = t_1; elseif (z <= 0.4) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); elseif (z <= 3.2e+126) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(z * N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(z * N[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+278], t$95$2, If[LessEqual[z, -8e+86], t$95$1, If[LessEqual[z, -8.2e+72], N[(t$95$0 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e+45], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e+40], t$95$1, If[LessEqual[z, 0.4], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+126], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
t_1 := t\_0 + z \cdot \left(y \cdot \frac{z}{x}\right)\\
t_2 := t\_0 + z \cdot \left(0.0007936500793651 \cdot \frac{z}{x}\right)\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{+278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+72}:\\
\;\;\;\;t\_0 + z \cdot \frac{z \cdot 0.0007936500793651}{x}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+45}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.4:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.64999999999999996e278 or 3.1999999999999998e126 < z Initial program 87.8%
Taylor expanded in z around 0 99.9%
fma-define99.9%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 90.0%
unpow290.0%
associate-*l*99.9%
distribute-rgt-in91.0%
associate-*r/91.1%
metadata-eval91.1%
associate-*l/91.0%
associate-*r/91.1%
associate-*l/88.9%
associate-/l*82.2%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in x around 0 91.7%
Taylor expanded in y around 0 78.5%
if -2.64999999999999996e278 < z < -8.0000000000000001e86 or -3.9999999999999997e45 < z < -2.0500000000000001e40 or 0.40000000000000002 < z < 3.1999999999999998e126Initial program 90.5%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 94.5%
unpow294.5%
associate-*l*99.2%
distribute-rgt-in89.0%
associate-*r/89.1%
metadata-eval89.1%
associate-*l/89.1%
associate-*r/89.1%
associate-*l/87.5%
associate-/l*89.1%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 86.0%
Taylor expanded in y around inf 65.1%
if -8.0000000000000001e86 < z < -8.19999999999999926e72Initial program 99.6%
Taylor expanded in z around 0 99.2%
fma-define99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around inf 100.0%
unpow2100.0%
associate-*l*99.2%
distribute-rgt-in99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*l/99.2%
associate-*r/99.2%
associate-*l/99.2%
associate-/l*74.2%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 87.9%
Taylor expanded in y around 0 87.9%
*-commutative87.9%
associate-*l/88.3%
Simplified88.3%
if -8.19999999999999926e72 < z < -3.9999999999999997e45Initial program 68.2%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
mul-1-neg66.4%
log-rec66.4%
remove-double-neg66.4%
metadata-eval66.4%
+-commutative66.4%
Simplified66.4%
if -2.0500000000000001e40 < z < 0.40000000000000002Initial program 99.5%
Taylor expanded in z around 0 92.6%
associate-+l-99.5%
sub-neg99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Applied egg-rr92.6%
Final simplification83.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (* (log x) -0.5)))
(t_1 (+ t_0 (* z (* y (/ z x)))))
(t_2 (+ t_0 (* z (* 0.0007936500793651 (/ z x))))))
(if (<= z -1.5e+278)
t_2
(if (<= z -4.7e+89)
t_1
(if (<= z -2.1e+73)
(+ t_0 (* z (/ (* z 0.0007936500793651) x)))
(if (<= z -8.6e+43)
(+
(/ 0.083333333333333 x)
(+ 0.91893853320467 (* x (+ (log x) -1.0))))
(if (<= z -1.3e+39)
t_1
(if (<= z 0.37)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(if (<= z 1.55e+125) t_1 t_2)))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -1.5e+278) {
tmp = t_2;
} else if (z <= -4.7e+89) {
tmp = t_1;
} else if (z <= -2.1e+73) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -8.6e+43) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
} else if (z <= -1.3e+39) {
tmp = t_1;
} else if (z <= 0.37) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (z <= 1.55e+125) {
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) :: tmp
t_0 = 0.91893853320467d0 + (log(x) * (-0.5d0))
t_1 = t_0 + (z * (y * (z / x)))
t_2 = t_0 + (z * (0.0007936500793651d0 * (z / x)))
if (z <= (-1.5d+278)) then
tmp = t_2
else if (z <= (-4.7d+89)) then
tmp = t_1
else if (z <= (-2.1d+73)) then
tmp = t_0 + (z * ((z * 0.0007936500793651d0) / x))
else if (z <= (-8.6d+43)) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
else if (z <= (-1.3d+39)) then
tmp = t_1
else if (z <= 0.37d0) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else if (z <= 1.55d+125) 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.91893853320467 + (Math.log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -1.5e+278) {
tmp = t_2;
} else if (z <= -4.7e+89) {
tmp = t_1;
} else if (z <= -2.1e+73) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -8.6e+43) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
} else if (z <= -1.3e+39) {
tmp = t_1;
} else if (z <= 0.37) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else if (z <= 1.55e+125) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (math.log(x) * -0.5) t_1 = t_0 + (z * (y * (z / x))) t_2 = t_0 + (z * (0.0007936500793651 * (z / x))) tmp = 0 if z <= -1.5e+278: tmp = t_2 elif z <= -4.7e+89: tmp = t_1 elif z <= -2.1e+73: tmp = t_0 + (z * ((z * 0.0007936500793651) / x)) elif z <= -8.6e+43: tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (math.log(x) + -1.0))) elif z <= -1.3e+39: tmp = t_1 elif z <= 0.37: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) elif z <= 1.55e+125: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(log(x) * -0.5)) t_1 = Float64(t_0 + Float64(z * Float64(y * Float64(z / x)))) t_2 = Float64(t_0 + Float64(z * Float64(0.0007936500793651 * Float64(z / x)))) tmp = 0.0 if (z <= -1.5e+278) tmp = t_2; elseif (z <= -4.7e+89) tmp = t_1; elseif (z <= -2.1e+73) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * 0.0007936500793651) / x))); elseif (z <= -8.6e+43) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))); elseif (z <= -1.3e+39) tmp = t_1; elseif (z <= 0.37) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); elseif (z <= 1.55e+125) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (log(x) * -0.5); t_1 = t_0 + (z * (y * (z / x))); t_2 = t_0 + (z * (0.0007936500793651 * (z / x))); tmp = 0.0; if (z <= -1.5e+278) tmp = t_2; elseif (z <= -4.7e+89) tmp = t_1; elseif (z <= -2.1e+73) tmp = t_0 + (z * ((z * 0.0007936500793651) / x)); elseif (z <= -8.6e+43) tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0))); elseif (z <= -1.3e+39) tmp = t_1; elseif (z <= 0.37) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); elseif (z <= 1.55e+125) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(z * N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(z * N[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+278], t$95$2, If[LessEqual[z, -4.7e+89], t$95$1, If[LessEqual[z, -2.1e+73], N[(t$95$0 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.6e+43], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e+39], t$95$1, If[LessEqual[z, 0.37], 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, 1.55e+125], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
t_1 := t\_0 + z \cdot \left(y \cdot \frac{z}{x}\right)\\
t_2 := t\_0 + z \cdot \left(0.0007936500793651 \cdot \frac{z}{x}\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+73}:\\
\;\;\;\;t\_0 + z \cdot \frac{z \cdot 0.0007936500793651}{x}\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.37:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.5e278 or 1.55e125 < z Initial program 87.8%
Taylor expanded in z around 0 99.9%
fma-define99.9%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 90.0%
unpow290.0%
associate-*l*99.9%
distribute-rgt-in91.0%
associate-*r/91.1%
metadata-eval91.1%
associate-*l/91.0%
associate-*r/91.1%
associate-*l/88.9%
associate-/l*82.2%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in x around 0 91.7%
Taylor expanded in y around 0 78.5%
if -1.5e278 < z < -4.70000000000000022e89 or -8.6e43 < z < -1.3e39 or 0.37 < z < 1.55e125Initial program 90.5%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 94.5%
unpow294.5%
associate-*l*99.2%
distribute-rgt-in89.0%
associate-*r/89.1%
metadata-eval89.1%
associate-*l/89.1%
associate-*r/89.1%
associate-*l/87.5%
associate-/l*89.1%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 86.0%
Taylor expanded in y around inf 65.1%
if -4.70000000000000022e89 < z < -2.1000000000000001e73Initial program 99.6%
Taylor expanded in z around 0 99.2%
fma-define99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around inf 100.0%
unpow2100.0%
associate-*l*99.2%
distribute-rgt-in99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*l/99.2%
associate-*r/99.2%
associate-*l/99.2%
associate-/l*74.2%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 87.9%
Taylor expanded in y around 0 87.9%
*-commutative87.9%
associate-*l/88.3%
Simplified88.3%
if -2.1000000000000001e73 < z < -8.6e43Initial program 68.2%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
mul-1-neg66.4%
log-rec66.4%
remove-double-neg66.4%
metadata-eval66.4%
+-commutative66.4%
Simplified66.4%
if -1.3e39 < z < 0.37Initial program 99.5%
Taylor expanded in z around 0 92.6%
Final simplification83.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (* (log x) -0.5)))
(t_1 (+ t_0 (* z (* y (/ z x)))))
(t_2 (+ t_0 (* z (* 0.0007936500793651 (/ z x)))))
(t_3 (* x (+ (log x) -1.0))))
(if (<= z -1.2e+279)
t_2
(if (<= z -4e+93)
t_1
(if (<= z -4.5e+71)
(+ t_0 (* z (/ (* z 0.0007936500793651) x)))
(if (<= z -1.5e+44)
(+ (/ 0.083333333333333 x) (+ 0.91893853320467 t_3))
(if (<= z -5.1e+38)
t_1
(if (<= z 0.0031)
(+ (/ 0.083333333333333 x) t_3)
(if (<= z 1.2e+124) t_1 t_2)))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double t_3 = x * (log(x) + -1.0);
double tmp;
if (z <= -1.2e+279) {
tmp = t_2;
} else if (z <= -4e+93) {
tmp = t_1;
} else if (z <= -4.5e+71) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -1.5e+44) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + t_3);
} else if (z <= -5.1e+38) {
tmp = t_1;
} else if (z <= 0.0031) {
tmp = (0.083333333333333 / x) + t_3;
} else if (z <= 1.2e+124) {
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.91893853320467d0 + (log(x) * (-0.5d0))
t_1 = t_0 + (z * (y * (z / x)))
t_2 = t_0 + (z * (0.0007936500793651d0 * (z / x)))
t_3 = x * (log(x) + (-1.0d0))
if (z <= (-1.2d+279)) then
tmp = t_2
else if (z <= (-4d+93)) then
tmp = t_1
else if (z <= (-4.5d+71)) then
tmp = t_0 + (z * ((z * 0.0007936500793651d0) / x))
else if (z <= (-1.5d+44)) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + t_3)
else if (z <= (-5.1d+38)) then
tmp = t_1
else if (z <= 0.0031d0) then
tmp = (0.083333333333333d0 / x) + t_3
else if (z <= 1.2d+124) 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.91893853320467 + (Math.log(x) * -0.5);
double t_1 = t_0 + (z * (y * (z / x)));
double t_2 = t_0 + (z * (0.0007936500793651 * (z / x)));
double t_3 = x * (Math.log(x) + -1.0);
double tmp;
if (z <= -1.2e+279) {
tmp = t_2;
} else if (z <= -4e+93) {
tmp = t_1;
} else if (z <= -4.5e+71) {
tmp = t_0 + (z * ((z * 0.0007936500793651) / x));
} else if (z <= -1.5e+44) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + t_3);
} else if (z <= -5.1e+38) {
tmp = t_1;
} else if (z <= 0.0031) {
tmp = (0.083333333333333 / x) + t_3;
} else if (z <= 1.2e+124) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (math.log(x) * -0.5) t_1 = t_0 + (z * (y * (z / x))) t_2 = t_0 + (z * (0.0007936500793651 * (z / x))) t_3 = x * (math.log(x) + -1.0) tmp = 0 if z <= -1.2e+279: tmp = t_2 elif z <= -4e+93: tmp = t_1 elif z <= -4.5e+71: tmp = t_0 + (z * ((z * 0.0007936500793651) / x)) elif z <= -1.5e+44: tmp = (0.083333333333333 / x) + (0.91893853320467 + t_3) elif z <= -5.1e+38: tmp = t_1 elif z <= 0.0031: tmp = (0.083333333333333 / x) + t_3 elif z <= 1.2e+124: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(log(x) * -0.5)) t_1 = Float64(t_0 + Float64(z * Float64(y * Float64(z / x)))) t_2 = Float64(t_0 + Float64(z * Float64(0.0007936500793651 * Float64(z / x)))) t_3 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -1.2e+279) tmp = t_2; elseif (z <= -4e+93) tmp = t_1; elseif (z <= -4.5e+71) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * 0.0007936500793651) / x))); elseif (z <= -1.5e+44) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + t_3)); elseif (z <= -5.1e+38) tmp = t_1; elseif (z <= 0.0031) tmp = Float64(Float64(0.083333333333333 / x) + t_3); elseif (z <= 1.2e+124) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (log(x) * -0.5); t_1 = t_0 + (z * (y * (z / x))); t_2 = t_0 + (z * (0.0007936500793651 * (z / x))); t_3 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -1.2e+279) tmp = t_2; elseif (z <= -4e+93) tmp = t_1; elseif (z <= -4.5e+71) tmp = t_0 + (z * ((z * 0.0007936500793651) / x)); elseif (z <= -1.5e+44) tmp = (0.083333333333333 / x) + (0.91893853320467 + t_3); elseif (z <= -5.1e+38) tmp = t_1; elseif (z <= 0.0031) tmp = (0.083333333333333 / x) + t_3; elseif (z <= 1.2e+124) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(z * N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(z * N[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+279], t$95$2, If[LessEqual[z, -4e+93], t$95$1, If[LessEqual[z, -4.5e+71], N[(t$95$0 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e+44], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e+38], t$95$1, If[LessEqual[z, 0.0031], N[(N[(0.083333333333333 / x), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[z, 1.2e+124], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
t_1 := t\_0 + z \cdot \left(y \cdot \frac{z}{x}\right)\\
t_2 := t\_0 + z \cdot \left(0.0007936500793651 \cdot \frac{z}{x}\right)\\
t_3 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+279}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+71}:\\
\;\;\;\;t\_0 + z \cdot \frac{z \cdot 0.0007936500793651}{x}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + t\_3\right)\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0031:\\
\;\;\;\;\frac{0.083333333333333}{x} + t\_3\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.2e279 or 1.20000000000000003e124 < z Initial program 87.8%
Taylor expanded in z around 0 99.9%
fma-define99.9%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 90.0%
unpow290.0%
associate-*l*99.9%
distribute-rgt-in91.0%
associate-*r/91.1%
metadata-eval91.1%
associate-*l/91.0%
associate-*r/91.1%
associate-*l/88.9%
associate-/l*82.2%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in x around 0 91.7%
Taylor expanded in y around 0 78.5%
if -1.2e279 < z < -4.00000000000000017e93 or -1.49999999999999993e44 < z < -5.1000000000000001e38 or 0.00309999999999999989 < z < 1.20000000000000003e124Initial program 90.5%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 94.5%
unpow294.5%
associate-*l*99.2%
distribute-rgt-in89.0%
associate-*r/89.1%
metadata-eval89.1%
associate-*l/89.1%
associate-*r/89.1%
associate-*l/87.5%
associate-/l*89.1%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 86.0%
Taylor expanded in y around inf 65.1%
if -4.00000000000000017e93 < z < -4.50000000000000043e71Initial program 99.6%
Taylor expanded in z around 0 99.2%
fma-define99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
associate-*r/98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around inf 100.0%
unpow2100.0%
associate-*l*99.2%
distribute-rgt-in99.2%
associate-*r/98.8%
metadata-eval98.8%
associate-*l/99.2%
associate-*r/99.2%
associate-*l/99.2%
associate-/l*74.2%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 87.9%
Taylor expanded in y around 0 87.9%
*-commutative87.9%
associate-*l/88.3%
Simplified88.3%
if -4.50000000000000043e71 < z < -1.49999999999999993e44Initial program 68.2%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
mul-1-neg66.4%
log-rec66.4%
remove-double-neg66.4%
metadata-eval66.4%
+-commutative66.4%
Simplified66.4%
if -5.1000000000000001e38 < z < 0.00309999999999999989Initial program 99.5%
Taylor expanded in z around 0 92.6%
Taylor expanded in x around 0 92.7%
sub-neg92.7%
metadata-eval92.7%
distribute-rgt-in92.6%
*-commutative92.6%
neg-mul-192.6%
associate-+l+92.6%
+-commutative92.6%
distribute-rgt-out92.6%
*-commutative92.6%
associate-+l+92.6%
sub-neg92.6%
+-commutative92.6%
*-commutative92.6%
fma-define92.6%
Simplified92.6%
Taylor expanded in x around inf 90.7%
sub-neg90.7%
mul-1-neg90.7%
log-rec90.7%
remove-double-neg90.7%
metadata-eval90.7%
Simplified90.7%
Final simplification82.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0)))
(t_1 (+ 0.91893853320467 (* (log x) -0.5)))
(t_2 (+ t_1 (* z (* y (/ z x)))))
(t_3 (+ t_1 (* z (* 0.0007936500793651 (/ z x))))))
(if (<= z -4.4e+278)
t_3
(if (<= z -4.5e+88)
t_2
(if (<= z -2.3e+69)
t_3
(if (<= z -2.4e+50)
(+ (/ 0.083333333333333 x) (+ 0.91893853320467 t_0))
(if (<= z -2.8e+40)
t_2
(if (<= z 0.37)
(+ (/ 0.083333333333333 x) t_0)
(if (<= z 1.1e+127) t_2 t_3)))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double t_1 = 0.91893853320467 + (log(x) * -0.5);
double t_2 = t_1 + (z * (y * (z / x)));
double t_3 = t_1 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -4.4e+278) {
tmp = t_3;
} else if (z <= -4.5e+88) {
tmp = t_2;
} else if (z <= -2.3e+69) {
tmp = t_3;
} else if (z <= -2.4e+50) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + t_0);
} else if (z <= -2.8e+40) {
tmp = t_2;
} else if (z <= 0.37) {
tmp = (0.083333333333333 / x) + t_0;
} else if (z <= 1.1e+127) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = x * (log(x) + (-1.0d0))
t_1 = 0.91893853320467d0 + (log(x) * (-0.5d0))
t_2 = t_1 + (z * (y * (z / x)))
t_3 = t_1 + (z * (0.0007936500793651d0 * (z / x)))
if (z <= (-4.4d+278)) then
tmp = t_3
else if (z <= (-4.5d+88)) then
tmp = t_2
else if (z <= (-2.3d+69)) then
tmp = t_3
else if (z <= (-2.4d+50)) then
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + t_0)
else if (z <= (-2.8d+40)) then
tmp = t_2
else if (z <= 0.37d0) then
tmp = (0.083333333333333d0 / x) + t_0
else if (z <= 1.1d+127) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double t_1 = 0.91893853320467 + (Math.log(x) * -0.5);
double t_2 = t_1 + (z * (y * (z / x)));
double t_3 = t_1 + (z * (0.0007936500793651 * (z / x)));
double tmp;
if (z <= -4.4e+278) {
tmp = t_3;
} else if (z <= -4.5e+88) {
tmp = t_2;
} else if (z <= -2.3e+69) {
tmp = t_3;
} else if (z <= -2.4e+50) {
tmp = (0.083333333333333 / x) + (0.91893853320467 + t_0);
} else if (z <= -2.8e+40) {
tmp = t_2;
} else if (z <= 0.37) {
tmp = (0.083333333333333 / x) + t_0;
} else if (z <= 1.1e+127) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) t_1 = 0.91893853320467 + (math.log(x) * -0.5) t_2 = t_1 + (z * (y * (z / x))) t_3 = t_1 + (z * (0.0007936500793651 * (z / x))) tmp = 0 if z <= -4.4e+278: tmp = t_3 elif z <= -4.5e+88: tmp = t_2 elif z <= -2.3e+69: tmp = t_3 elif z <= -2.4e+50: tmp = (0.083333333333333 / x) + (0.91893853320467 + t_0) elif z <= -2.8e+40: tmp = t_2 elif z <= 0.37: tmp = (0.083333333333333 / x) + t_0 elif z <= 1.1e+127: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) t_1 = Float64(0.91893853320467 + Float64(log(x) * -0.5)) t_2 = Float64(t_1 + Float64(z * Float64(y * Float64(z / x)))) t_3 = Float64(t_1 + Float64(z * Float64(0.0007936500793651 * Float64(z / x)))) tmp = 0.0 if (z <= -4.4e+278) tmp = t_3; elseif (z <= -4.5e+88) tmp = t_2; elseif (z <= -2.3e+69) tmp = t_3; elseif (z <= -2.4e+50) tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + t_0)); elseif (z <= -2.8e+40) tmp = t_2; elseif (z <= 0.37) tmp = Float64(Float64(0.083333333333333 / x) + t_0); elseif (z <= 1.1e+127) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); t_1 = 0.91893853320467 + (log(x) * -0.5); t_2 = t_1 + (z * (y * (z / x))); t_3 = t_1 + (z * (0.0007936500793651 * (z / x))); tmp = 0.0; if (z <= -4.4e+278) tmp = t_3; elseif (z <= -4.5e+88) tmp = t_2; elseif (z <= -2.3e+69) tmp = t_3; elseif (z <= -2.4e+50) tmp = (0.083333333333333 / x) + (0.91893853320467 + t_0); elseif (z <= -2.8e+40) tmp = t_2; elseif (z <= 0.37) tmp = (0.083333333333333 / x) + t_0; elseif (z <= 1.1e+127) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(z * N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(z * N[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+278], t$95$3, If[LessEqual[z, -4.5e+88], t$95$2, If[LessEqual[z, -2.3e+69], t$95$3, If[LessEqual[z, -2.4e+50], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e+40], t$95$2, If[LessEqual[z, 0.37], N[(N[(0.083333333333333 / x), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[z, 1.1e+127], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
t_1 := 0.91893853320467 + \log x \cdot -0.5\\
t_2 := t\_1 + z \cdot \left(y \cdot \frac{z}{x}\right)\\
t_3 := t\_1 + z \cdot \left(0.0007936500793651 \cdot \frac{z}{x}\right)\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+278}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+69}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+50}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + t\_0\right)\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 0.37:\\
\;\;\;\;\frac{0.083333333333333}{x} + t\_0\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -4.39999999999999978e278 or -4.5e88 < z < -2.30000000000000017e69 or 1.1000000000000001e127 < z Initial program 88.7%
Taylor expanded in z around 0 99.9%
fma-define99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 90.8%
unpow290.8%
associate-*l*99.9%
distribute-rgt-in91.7%
associate-*r/91.7%
metadata-eval91.7%
associate-*l/91.7%
associate-*r/91.7%
associate-*l/89.7%
associate-/l*81.5%
distribute-rgt-out99.9%
Simplified99.9%
Taylor expanded in x around 0 91.4%
Taylor expanded in y around 0 79.3%
if -4.39999999999999978e278 < z < -4.5e88 or -2.4000000000000002e50 < z < -2.8000000000000001e40 or 0.37 < z < 1.1000000000000001e127Initial program 90.5%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 94.5%
unpow294.5%
associate-*l*99.2%
distribute-rgt-in89.0%
associate-*r/89.1%
metadata-eval89.1%
associate-*l/89.1%
associate-*r/89.1%
associate-*l/87.5%
associate-/l*89.1%
distribute-rgt-out99.2%
Simplified99.2%
Taylor expanded in x around 0 86.0%
Taylor expanded in y around inf 65.1%
if -2.30000000000000017e69 < z < -2.4000000000000002e50Initial program 68.2%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around inf 66.4%
sub-neg66.4%
mul-1-neg66.4%
log-rec66.4%
remove-double-neg66.4%
metadata-eval66.4%
+-commutative66.4%
Simplified66.4%
if -2.8000000000000001e40 < z < 0.37Initial program 99.5%
Taylor expanded in z around 0 92.6%
Taylor expanded in x around 0 92.7%
sub-neg92.7%
metadata-eval92.7%
distribute-rgt-in92.6%
*-commutative92.6%
neg-mul-192.6%
associate-+l+92.6%
+-commutative92.6%
distribute-rgt-out92.6%
*-commutative92.6%
associate-+l+92.6%
sub-neg92.6%
+-commutative92.6%
*-commutative92.6%
fma-define92.6%
Simplified92.6%
Taylor expanded in x around inf 90.7%
sub-neg90.7%
mul-1-neg90.7%
log-rec90.7%
remove-double-neg90.7%
metadata-eval90.7%
Simplified90.7%
Final simplification82.3%
(FPCore (x y z)
:precision binary64
(if (<= x 1000000000.0)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* z (* (+ 0.0007936500793651 y) (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1000000000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * ((0.0007936500793651 + y) * (z / 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 <= 1000000000.0d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (z * ((0.0007936500793651d0 + y) * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1000000000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (z * ((0.0007936500793651 + y) * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1000000000.0: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (z * ((0.0007936500793651 + y) * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1000000000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1000000000.0) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * ((0.0007936500793651 + y) * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 1e9Initial program 99.7%
associate-+l-99.8%
sub-neg99.8%
metadata-eval99.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
if 1e9 < x Initial program 90.7%
Taylor expanded in z around 0 99.5%
fma-define99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 94.2%
unpow294.2%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.1%
associate-/l*99.6%
distribute-rgt-out99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= x 10000000.0)
(+
t_0
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(+ t_0 (* z (* (+ 0.0007936500793651 y) (/ z x)))))))
double code(double x, double y, double z) {
double t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (x <= 10000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z * ((0.0007936500793651 + y) * (z / 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 <= 10000000.0d0) then
tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = t_0 + (z * ((0.0007936500793651d0 + y) * (z / 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 <= 10000000.0) {
tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = t_0 + (z * ((0.0007936500793651 + y) * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if x <= 10000000.0: tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = t_0 + (z * ((0.0007936500793651 + y) * (z / 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 <= 10000000.0) tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(t_0 + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / 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 <= 10000000.0) tmp = t_0 + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = t_0 + (z * ((0.0007936500793651 + y) * (z / 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, 10000000.0], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / 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 10000000:\\
\;\;\;\;t\_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 1e7Initial program 99.8%
if 1e7 < x Initial program 90.8%
Taylor expanded in z around 0 99.5%
fma-define99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 94.2%
unpow294.2%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/98.1%
associate-/l*99.6%
distribute-rgt-out99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.3e+65) (not (<= z 0.0295)))
(+
(+ 0.91893853320467 (* (log x) -0.5))
(* z (* z (/ (+ 0.0007936500793651 y) x))))
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.3e+65) || !(z <= 0.0295)) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * ((0.0007936500793651 + y) / 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 ((z <= (-2.3d+65)) .or. (.not. (z <= 0.0295d0))) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (z * ((0.0007936500793651d0 + y) / 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 ((z <= -2.3e+65) || !(z <= 0.0295)) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (z * ((0.0007936500793651 + y) / 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 (z <= -2.3e+65) or not (z <= 0.0295): tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (z * ((0.0007936500793651 + y) / 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 ((z <= -2.3e+65) || !(z <= 0.0295)) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)))); else tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - 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.3e+65) || ~((z <= 0.0295))) tmp = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * ((0.0007936500793651 + y) / x))); else tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.3e+65], N[Not[LessEqual[z, 0.0295]], $MachinePrecision]], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $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.3 \cdot 10^{+65} \lor \neg \left(z \leq 0.0295\right):\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -2.3e65 or 0.029499999999999998 < z Initial program 89.6%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 92.7%
unpow292.7%
associate-*l*99.5%
distribute-rgt-in90.2%
associate-*r/90.2%
metadata-eval90.2%
associate-*l/90.2%
associate-*r/90.2%
associate-*l/88.4%
associate-/l*85.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around 0 88.4%
Taylor expanded in z around 0 87.5%
associate-/l*99.5%
Simplified88.4%
if -2.3e65 < z < 0.029499999999999998Initial program 98.9%
Taylor expanded in z around 0 91.5%
associate-+l-98.9%
sub-neg98.9%
metadata-eval98.9%
sub-neg98.9%
metadata-eval98.9%
Applied egg-rr91.5%
Final simplification90.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.91893853320467 (* (log x) -0.5))))
(if (<= z -4.6e+62)
(+ t_0 (* z (/ (* z (+ 0.0007936500793651 y)) x)))
(if (<= z 0.4)
(+
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467))
(/ 0.083333333333333 x))
(+ t_0 (* z (* z (/ (+ 0.0007936500793651 y) x))))))))
double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (log(x) * -0.5);
double tmp;
if (z <= -4.6e+62) {
tmp = t_0 + (z * ((z * (0.0007936500793651 + y)) / x));
} else if (z <= 0.4) {
tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
} else {
tmp = t_0 + (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) :: t_0
real(8) :: tmp
t_0 = 0.91893853320467d0 + (log(x) * (-0.5d0))
if (z <= (-4.6d+62)) then
tmp = t_0 + (z * ((z * (0.0007936500793651d0 + y)) / x))
else if (z <= 0.4d0) then
tmp = ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0))) + (0.083333333333333d0 / x)
else
tmp = t_0 + (z * (z * ((0.0007936500793651d0 + y) / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.91893853320467 + (Math.log(x) * -0.5);
double tmp;
if (z <= -4.6e+62) {
tmp = t_0 + (z * ((z * (0.0007936500793651 + y)) / x));
} else if (z <= 0.4) {
tmp = ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x);
} else {
tmp = t_0 + (z * (z * ((0.0007936500793651 + y) / x)));
}
return tmp;
}
def code(x, y, z): t_0 = 0.91893853320467 + (math.log(x) * -0.5) tmp = 0 if z <= -4.6e+62: tmp = t_0 + (z * ((z * (0.0007936500793651 + y)) / x)) elif z <= 0.4: tmp = ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x) else: tmp = t_0 + (z * (z * ((0.0007936500793651 + y) / x))) return tmp
function code(x, y, z) t_0 = Float64(0.91893853320467 + Float64(log(x) * -0.5)) tmp = 0.0 if (z <= -4.6e+62) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) / x))); elseif (z <= 0.4) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)) + Float64(0.083333333333333 / x)); else tmp = Float64(t_0 + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.91893853320467 + (log(x) * -0.5); tmp = 0.0; if (z <= -4.6e+62) tmp = t_0 + (z * ((z * (0.0007936500793651 + y)) / x)); elseif (z <= 0.4) tmp = ((log(x) * (x + -0.5)) - (x + -0.91893853320467)) + (0.083333333333333 / x); else tmp = t_0 + (z * (z * ((0.0007936500793651 + y) / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+62], N[(t$95$0 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.4], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.91893853320467 + \log x \cdot -0.5\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+62}:\\
\;\;\;\;t\_0 + z \cdot \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}\\
\mathbf{elif}\;z \leq 0.4:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
\end{array}
\end{array}
if z < -4.59999999999999968e62Initial program 91.4%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 93.1%
unpow293.1%
associate-*l*99.8%
distribute-rgt-in86.8%
associate-*r/86.8%
metadata-eval86.8%
associate-*l/86.9%
associate-*r/86.8%
associate-*l/86.8%
associate-/l*83.2%
distribute-rgt-out99.8%
Simplified99.8%
Taylor expanded in x around 0 92.1%
Taylor expanded in z around 0 92.1%
if -4.59999999999999968e62 < z < 0.40000000000000002Initial program 98.9%
Taylor expanded in z around 0 91.5%
associate-+l-98.9%
sub-neg98.9%
metadata-eval98.9%
sub-neg98.9%
metadata-eval98.9%
Applied egg-rr91.5%
if 0.40000000000000002 < z Initial program 87.7%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 92.4%
unpow292.4%
associate-*l*99.2%
distribute-rgt-in93.5%
associate-*r/93.6%
metadata-eval93.6%
associate-*l/93.6%
associate-*r/93.6%
associate-*l/90.0%
associate-/l*87.9%
distribute-rgt-out99.3%
Simplified99.3%
Taylor expanded in x around 0 84.6%
Taylor expanded in z around 0 82.9%
associate-/l*99.3%
Simplified84.6%
Final simplification90.2%
(FPCore (x y z)
:precision binary64
(if (<= x 0.00025)
(+
(+ 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 (* (+ 0.0007936500793651 y) (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00025) {
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 * ((0.0007936500793651 + y) * (z / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.00025d0) 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 * ((0.0007936500793651d0 + y) * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.00025) {
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 * ((0.0007936500793651 + y) * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00025: 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 * ((0.0007936500793651 + y) * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00025) 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(Float64(0.0007936500793651 + y) * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00025) 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 * ((0.0007936500793651 + y) * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00025], 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[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00025:\\
\;\;\;\;\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(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 2.5000000000000001e-4Initial program 99.8%
Taylor expanded in x around 0 99.3%
if 2.5000000000000001e-4 < x Initial program 91.3%
Taylor expanded in z around 0 99.5%
fma-define99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 94.1%
unpow294.1%
associate-*l*99.0%
distribute-rgt-in99.0%
associate-*r/99.1%
metadata-eval99.1%
associate-*l/99.1%
associate-*r/99.1%
associate-*l/97.7%
associate-/l*99.1%
distribute-rgt-out99.1%
Simplified99.1%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 0.00025)
(+
(+ 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 <= 0.00025) {
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 <= 0.00025d0) 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 <= 0.00025) {
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 <= 0.00025: 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 <= 0.00025) 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 <= 0.00025) 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, 0.00025], 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 0.00025:\\
\;\;\;\;\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 < 2.5000000000000001e-4Initial program 99.8%
Taylor expanded in x around 0 99.3%
if 2.5000000000000001e-4 < x Initial program 91.3%
Taylor expanded in z around 0 99.5%
fma-define99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 94.1%
unpow294.1%
associate-*l*99.0%
distribute-rgt-in99.0%
associate-*r/99.1%
metadata-eval99.1%
associate-*l/99.1%
associate-*r/99.1%
associate-*l/97.7%
associate-/l*99.1%
distribute-rgt-out99.1%
Simplified99.1%
Taylor expanded in z around 0 97.7%
associate-/l*99.1%
Simplified99.1%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 8.2e+19)
(+
(+ 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 (* 0.0007936500793651 (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.2e+19) {
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 * (0.0007936500793651 * (z / 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 <= 8.2d+19) 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 * (0.0007936500793651d0 * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8.2e+19) {
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 * (0.0007936500793651 * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8.2e+19: 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 * (0.0007936500793651 * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8.2e+19) 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(0.0007936500793651 * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8.2e+19) 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 * (0.0007936500793651 * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8.2e+19], 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[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+19}:\\
\;\;\;\;\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(0.0007936500793651 \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 8.2e19Initial program 99.0%
Taylor expanded in x around 0 95.6%
if 8.2e19 < x Initial program 90.9%
Taylor expanded in z around 0 99.5%
fma-define99.5%
associate-*r/99.6%
metadata-eval99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 93.8%
unpow293.8%
associate-*l*99.5%
distribute-rgt-in99.5%
associate-*r/99.6%
metadata-eval99.6%
associate-*l/99.6%
associate-*r/99.6%
associate-*l/98.1%
associate-/l*99.6%
distribute-rgt-out99.6%
Simplified99.6%
Taylor expanded in y around 0 91.1%
Final simplification93.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -9.5e+65) (not (<= z 1.55e+97)))
(+
(+ 0.91893853320467 (* (log x) -0.5))
(* z (* 0.0007936500793651 (/ z x))))
(+ (/ 0.083333333333333 x) (+ 0.91893853320467 (* x (+ (log x) -1.0))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -9.5e+65) || !(z <= 1.55e+97)) {
tmp = (0.91893853320467 + (log(x) * -0.5)) + (z * (0.0007936500793651 * (z / x)));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-9.5d+65)) .or. (.not. (z <= 1.55d+97))) then
tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (0.0007936500793651d0 * (z / x)))
else
tmp = (0.083333333333333d0 / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -9.5e+65) || !(z <= 1.55e+97)) {
tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (0.0007936500793651 * (z / x)));
} else {
tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -9.5e+65) or not (z <= 1.55e+97): tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (0.0007936500793651 * (z / x))) else: tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (math.log(x) + -1.0))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -9.5e+65) || !(z <= 1.55e+97)) tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(0.0007936500793651 * Float64(z / x)))); else tmp = Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -9.5e+65) || ~((z <= 1.55e+97))) tmp = (0.91893853320467 + (log(x) * -0.5)) + (z * (0.0007936500793651 * (z / x))); else tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -9.5e+65], N[Not[LessEqual[z, 1.55e+97]], $MachinePrecision]], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(0.0007936500793651 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+65} \lor \neg \left(z \leq 1.55 \cdot 10^{+97}\right):\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(0.0007936500793651 \cdot \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\end{array}
\end{array}
if z < -9.5000000000000005e65 or 1.54999999999999991e97 < z Initial program 88.8%
Taylor expanded in z around 0 99.8%
fma-define99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 91.9%
unpow291.9%
associate-*l*99.8%
distribute-rgt-in88.8%
associate-*r/88.9%
metadata-eval88.9%
associate-*l/88.9%
associate-*r/88.9%
associate-*l/86.8%
associate-/l*83.4%
distribute-rgt-out99.8%
Simplified99.8%
Taylor expanded in x around 0 91.1%
Taylor expanded in y around 0 62.9%
if -9.5000000000000005e65 < z < 1.54999999999999991e97Initial program 98.4%
Taylor expanded in z around 0 85.3%
Taylor expanded in x around inf 83.7%
sub-neg83.7%
mul-1-neg83.7%
log-rec83.7%
remove-double-neg83.7%
metadata-eval83.7%
+-commutative83.7%
Simplified83.7%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (+ 0.91893853320467 (* x (+ (log x) -1.0)))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
}
def code(x, y, z): return (0.083333333333333 / x) + (0.91893853320467 + (x * (math.log(x) + -1.0)))
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (0.91893853320467 + (x * (log(x) + -1.0))); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)
\end{array}
Initial program 95.0%
Taylor expanded in z around 0 59.3%
Taylor expanded in x around inf 58.2%
sub-neg58.2%
mul-1-neg58.2%
log-rec58.2%
remove-double-neg58.2%
metadata-eval58.2%
+-commutative58.2%
Simplified58.2%
Final simplification58.2%
(FPCore (x y z) :precision binary64 (+ (/ 0.083333333333333 x) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (log(x) + -1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 / x) + (x * (log(x) + (-1.0d0)))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 / x) + (x * (Math.log(x) + -1.0));
}
def code(x, y, z): return (0.083333333333333 / x) + (x * (math.log(x) + -1.0))
function code(x, y, z) return Float64(Float64(0.083333333333333 / x) + Float64(x * Float64(log(x) + -1.0))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 / x) + (x * (log(x) + -1.0)); end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Initial program 95.0%
Taylor expanded in z around 0 59.3%
Taylor expanded in x around 0 59.3%
sub-neg59.3%
metadata-eval59.3%
distribute-rgt-in59.3%
*-commutative59.3%
neg-mul-159.3%
associate-+l+59.3%
+-commutative59.3%
distribute-rgt-out59.3%
*-commutative59.3%
associate-+l+59.3%
sub-neg59.3%
+-commutative59.3%
*-commutative59.3%
fma-define59.3%
Simplified59.3%
Taylor expanded in x around inf 58.2%
sub-neg58.2%
mul-1-neg58.2%
log-rec58.2%
remove-double-neg58.2%
metadata-eval58.2%
Simplified58.2%
Final simplification58.2%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 95.0%
Taylor expanded in z around 0 59.3%
Taylor expanded in x around 0 22.7%
Taylor expanded in x around 0 23.5%
(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 2024118
(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)))