
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 1.06e+39)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(*
(/ -1.0 x)
(-
-0.083333333333333
(* z (fma (+ y 0.0007936500793651) z -0.0027777777777778)))))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.06e+39) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((-1.0 / x) * (-0.083333333333333 - (z * fma((y + 0.0007936500793651), z, -0.0027777777777778))));
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.06e+39) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(-1.0 / x) * Float64(-0.083333333333333 - Float64(z * fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778))))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.06e+39], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(-1.0 / x), $MachinePrecision] * N[(-0.083333333333333 - N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.06 \cdot 10^{+39}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{-1}{x} \cdot \left(-0.083333333333333 - z \cdot \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 1.06000000000000005e39Initial program 99.7%
frac-2neg99.7%
div-inv99.8%
*-commutative99.8%
neg-mul-199.8%
associate-/r*99.8%
metadata-eval99.8%
neg-sub099.8%
+-commutative99.8%
associate--r+99.8%
metadata-eval99.8%
*-commutative99.8%
fma-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
if 1.06000000000000005e39 < x Initial program 81.5%
Taylor expanded in z around inf 80.6%
+-commutative80.6%
associate-/l*85.7%
unpow285.7%
+-commutative85.7%
Simplified85.7%
associate-/r/85.7%
associate-/l*99.6%
+-commutative99.6%
Applied egg-rr99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 4.7e+15)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.7e+15) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (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 <= 4.7d+15) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.7e+15) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.7e+15: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.7e+15) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.7e+15) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.7e+15], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.7 \cdot 10^{+15}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 4.7e15Initial program 99.7%
if 4.7e15 < x Initial program 83.4%
Taylor expanded in z around inf 82.6%
+-commutative82.6%
associate-/l*87.1%
unpow287.1%
+-commutative87.1%
Simplified87.1%
associate-/r/87.1%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 5e+15)
(+
t_0
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x))
(+ t_0 (* (+ y 0.0007936500793651) (* z (/ z x)))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 5e+15) {
tmp = t_0 + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (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 * (log(x) + (-1.0d0))
if (x <= 5d+15) then
tmp = t_0 + (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = t_0 + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (x <= 5e+15) {
tmp = t_0 + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 5e+15: tmp = t_0 + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 5e+15) tmp = Float64(t_0 + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 5e+15) tmp = t_0 + (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5e+15], N[(t$95$0 + N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 5 \cdot 10^{+15}:\\
\;\;\;\;t_0 + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 5e15Initial program 99.7%
Taylor expanded in x around inf 97.8%
sub-neg70.0%
metadata-eval70.0%
mul-1-neg70.0%
log-rec70.0%
remove-double-neg70.0%
Simplified97.8%
if 5e15 < x Initial program 83.4%
Taylor expanded in z around inf 82.6%
+-commutative82.6%
associate-/l*87.1%
unpow287.1%
+-commutative87.1%
Simplified87.1%
associate-/r/87.1%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
sub-neg99.7%
metadata-eval99.7%
mul-1-neg99.7%
log-rec99.7%
remove-double-neg99.7%
Simplified99.7%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= x 0.08)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(+ 0.91893853320467 (* (log x) -0.5)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.08) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5));
} else {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.08d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
else
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.08) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.08: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (math.log(x) * -0.5)) else: tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.08) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.08) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5)); else tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.08], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.08:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 0.0800000000000000017Initial program 99.7%
Taylor expanded in x around 0 98.7%
if 0.0800000000000000017 < x Initial program 84.7%
Taylor expanded in z around inf 83.9%
+-commutative83.9%
associate-/l*88.1%
unpow288.1%
+-commutative88.1%
Simplified88.1%
associate-/r/88.1%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.6%
sub-neg99.5%
metadata-eval99.5%
mul-1-neg99.5%
log-rec99.5%
remove-double-neg99.5%
Simplified99.6%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= x 28000000000.0)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(+ 0.91893853320467 (* (log x) -0.5)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* z (* (+ y 0.0007936500793651) (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 28000000000.0) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * ((y + 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 <= 28000000000.0d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (z * ((y + 0.0007936500793651d0) * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 28000000000.0) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (z * ((y + 0.0007936500793651) * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 28000000000.0: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (math.log(x) * -0.5)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (z * ((y + 0.0007936500793651) * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 28000000000.0) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(z * Float64(Float64(y + 0.0007936500793651) * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 28000000000.0) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (z * ((y + 0.0007936500793651) * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 28000000000.0], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $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[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28000000000:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 2.8e10Initial program 99.7%
Taylor expanded in x around 0 98.7%
if 2.8e10 < x Initial program 83.8%
frac-2neg83.8%
div-inv83.8%
*-commutative83.8%
neg-mul-183.8%
associate-/r*83.8%
metadata-eval83.8%
neg-sub083.8%
+-commutative83.8%
associate--r+83.8%
metadata-eval83.8%
*-commutative83.8%
fma-neg83.8%
metadata-eval83.8%
Applied egg-rr83.8%
Taylor expanded in z around inf 83.0%
+-commutative83.0%
associate-/l*87.4%
unpow287.4%
associate-*r/99.6%
associate-/r/99.6%
+-commutative99.6%
Simplified99.6%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 36000000000.0)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(+ 0.91893853320467 (* (log x) -0.5)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* (+ y 0.0007936500793651) (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 36000000000.0) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z * (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 <= 36000000000.0d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 36000000000.0) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 36000000000.0: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (math.log(x) * -0.5)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 36000000000.0) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 36000000000.0) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 36000000000.0], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 36000000000:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 3.6e10Initial program 99.7%
Taylor expanded in x around 0 98.8%
if 3.6e10 < x Initial program 83.6%
Taylor expanded in z around inf 82.9%
+-commutative82.9%
associate-/l*87.3%
unpow287.3%
+-commutative87.3%
Simplified87.3%
associate-/r/87.3%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 0.08)
(+
(/
(+
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))
0.083333333333333)
x)
(+ 0.91893853320467 (* (log x) -0.5)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* (+ y 0.0007936500793651) (/ z (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.08) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.08d0) then
tmp = (((z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((y + 0.0007936500793651d0) * (z / (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.08) {
tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (Math.log(x) * -0.5));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z / (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.08: tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (math.log(x) * -0.5)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z / (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.08) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(0.91893853320467 + Float64(log(x) * -0.5))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.08) tmp = (((z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)) + 0.083333333333333) / x) + (0.91893853320467 + (log(x) * -0.5)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((y + 0.0007936500793651) * (z / (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.08], N[(N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.08:\\
\;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\end{array}
\end{array}
if x < 0.0800000000000000017Initial program 99.7%
Taylor expanded in x around 0 98.7%
if 0.0800000000000000017 < x Initial program 84.7%
Taylor expanded in z around inf 83.9%
+-commutative83.9%
associate-/l*88.1%
unpow288.1%
+-commutative88.1%
Simplified88.1%
associate-/r/88.1%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7e-31) (not (<= z 1.1e-62)))
(+ (* x (+ (log x) -1.0)) (* (+ y 0.0007936500793651) (* z (/ z x))))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-31) || !(z <= 1.1e-62)) {
tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x)));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-7d-31)) .or. (.not. (z <= 1.1d-62))) then
tmp = (x * (log(x) + (-1.0d0))) + ((y + 0.0007936500793651d0) * (z * (z / x)))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-31) || !(z <= 1.1e-62)) {
tmp = (x * (Math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x)));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e-31) or not (z <= 1.1e-62): tmp = (x * (math.log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x))) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e-31) || !(z <= 1.1e-62)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e-31) || ~((z <= 1.1e-62))) tmp = (x * (log(x) + -1.0)) + ((y + 0.0007936500793651) * (z * (z / x))); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e-31], N[Not[LessEqual[z, 1.1e-62]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / 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[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-31} \lor \neg \left(z \leq 1.1 \cdot 10^{-62}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -6.99999999999999971e-31 or 1.10000000000000009e-62 < z Initial program 88.6%
Taylor expanded in z around inf 84.4%
+-commutative84.4%
associate-/l*86.7%
unpow286.7%
+-commutative86.7%
Simplified86.7%
associate-/r/87.5%
associate-/l*96.1%
+-commutative96.1%
Applied egg-rr96.1%
associate-/r/96.1%
Applied egg-rr96.1%
Taylor expanded in x around inf 96.1%
sub-neg96.1%
metadata-eval96.1%
mul-1-neg96.1%
log-rec96.1%
remove-double-neg96.1%
Simplified96.1%
if -6.99999999999999971e-31 < z < 1.10000000000000009e-62Initial program 99.5%
Taylor expanded in z around 0 94.2%
Final simplification95.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -6.8e-31)
(+ t_0 (* (+ y 0.0007936500793651) (/ z (/ x z))))
(if (<= z 1.05e-62)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(+ t_0 (* (+ y 0.0007936500793651) (* z (/ z x))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -6.8e-31) {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z)));
} else if (z <= 1.05e-62) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (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 * (log(x) + (-1.0d0))
if (z <= (-6.8d-31)) then
tmp = t_0 + ((y + 0.0007936500793651d0) * (z / (x / z)))
else if (z <= 1.05d-62) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else
tmp = t_0 + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (z <= -6.8e-31) {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z)));
} else if (z <= 1.05e-62) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -6.8e-31: tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))) elif z <= 1.05e-62: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) else: tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -6.8e-31) tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); elseif (z <= 1.05e-62) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); else tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -6.8e-31) tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))); elseif (z <= 1.05e-62) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); else tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e-31], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-62], 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], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-62}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if z < -6.8000000000000002e-31Initial program 85.1%
Taylor expanded in z around inf 83.0%
+-commutative83.0%
associate-/l*86.6%
unpow286.6%
+-commutative86.6%
Simplified86.6%
associate-/r/86.6%
associate-/l*97.6%
+-commutative97.6%
Applied egg-rr97.6%
Taylor expanded in x around inf 97.6%
sub-neg97.6%
metadata-eval97.6%
mul-1-neg97.6%
log-rec97.6%
remove-double-neg97.6%
Simplified97.6%
if -6.8000000000000002e-31 < z < 1.05e-62Initial program 99.5%
Taylor expanded in z around 0 94.2%
if 1.05e-62 < z Initial program 91.4%
Taylor expanded in z around inf 85.6%
+-commutative85.6%
associate-/l*86.7%
unpow286.7%
+-commutative86.7%
Simplified86.7%
associate-/r/88.3%
associate-/l*95.0%
+-commutative95.0%
Applied egg-rr95.0%
associate-/r/95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 94.9%
sub-neg94.9%
metadata-eval94.9%
mul-1-neg94.9%
log-rec94.9%
remove-double-neg94.9%
Simplified94.9%
Final simplification95.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -6.8e-31)
(+ t_0 (* (+ y 0.0007936500793651) (/ z (/ x z))))
(if (<= z 9.2e-63)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 1.0 (* x 12.000000000000048)))
(+ t_0 (* (+ y 0.0007936500793651) (* z (/ z x))))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -6.8e-31) {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z)));
} else if (z <= 9.2e-63) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (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 * (log(x) + (-1.0d0))
if (z <= (-6.8d-31)) then
tmp = t_0 + ((y + 0.0007936500793651d0) * (z / (x / z)))
else if (z <= 9.2d-63) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (1.0d0 / (x * 12.000000000000048d0))
else
tmp = t_0 + ((y + 0.0007936500793651d0) * (z * (z / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (z <= -6.8e-31) {
tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z)));
} else if (z <= 9.2e-63) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
} else {
tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -6.8e-31: tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))) elif z <= 9.2e-63: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)) else: tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -6.8e-31) tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z / Float64(x / z)))); elseif (z <= 9.2e-63) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048))); else tmp = Float64(t_0 + Float64(Float64(y + 0.0007936500793651) * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -6.8e-31) tmp = t_0 + ((y + 0.0007936500793651) * (z / (x / z))); elseif (z <= 9.2e-63) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)); else tmp = t_0 + ((y + 0.0007936500793651) * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e-31], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-63], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z}{\frac{x}{z}}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-63}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if z < -6.8000000000000002e-31Initial program 85.1%
Taylor expanded in z around inf 83.0%
+-commutative83.0%
associate-/l*86.6%
unpow286.6%
+-commutative86.6%
Simplified86.6%
associate-/r/86.6%
associate-/l*97.6%
+-commutative97.6%
Applied egg-rr97.6%
Taylor expanded in x around inf 97.6%
sub-neg97.6%
metadata-eval97.6%
mul-1-neg97.6%
log-rec97.6%
remove-double-neg97.6%
Simplified97.6%
if -6.8000000000000002e-31 < z < 9.2e-63Initial program 99.5%
Taylor expanded in z around 0 94.2%
clear-num42.5%
inv-pow42.5%
div-inv42.7%
metadata-eval42.7%
Applied egg-rr94.4%
unpow-142.7%
Simplified94.4%
if 9.2e-63 < z Initial program 91.4%
Taylor expanded in z around inf 85.6%
+-commutative85.6%
associate-/l*86.7%
unpow286.7%
+-commutative86.7%
Simplified86.7%
associate-/r/88.3%
associate-/l*95.0%
+-commutative95.0%
Applied egg-rr95.0%
associate-/r/95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 94.9%
sub-neg94.9%
metadata-eval94.9%
mul-1-neg94.9%
log-rec94.9%
remove-double-neg94.9%
Simplified94.9%
Final simplification95.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -2.5e-8) (not (<= z 5.2e-13)))
(+ t_0 (* 0.0007936500793651 (/ (* z z) x)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -2.5e-8) || !(z <= 5.2e-13)) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / x));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((z <= (-2.5d-8)) .or. (.not. (z <= 5.2d-13))) then
tmp = t_0 + (0.0007936500793651d0 * ((z * z) / x))
else
tmp = t_0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if ((z <= -2.5e-8) || !(z <= 5.2e-13)) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / x));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -2.5e-8) or not (z <= 5.2e-13): tmp = t_0 + (0.0007936500793651 * ((z * z) / x)) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -2.5e-8) || !(z <= 5.2e-13)) tmp = Float64(t_0 + Float64(0.0007936500793651 * Float64(Float64(z * z) / x))); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -2.5e-8) || ~((z <= 5.2e-13))) tmp = t_0 + (0.0007936500793651 * ((z * z) / x)); else tmp = t_0 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.5e-8], N[Not[LessEqual[z, 5.2e-13]], $MachinePrecision]], N[(t$95$0 + N[(0.0007936500793651 * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-8} \lor \neg \left(z \leq 5.2 \cdot 10^{-13}\right):\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -2.4999999999999999e-8 or 5.2000000000000001e-13 < z Initial program 87.4%
Taylor expanded in z around inf 86.0%
+-commutative86.0%
associate-/l*89.5%
unpow289.5%
+-commutative89.5%
Simplified89.5%
Taylor expanded in y around 0 62.5%
unpow262.5%
Simplified62.5%
Taylor expanded in x around inf 62.5%
sub-neg98.9%
metadata-eval98.9%
mul-1-neg98.9%
log-rec98.9%
remove-double-neg98.9%
Simplified62.5%
if -2.4999999999999999e-8 < z < 5.2000000000000001e-13Initial program 99.5%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around inf 82.8%
sub-neg59.9%
metadata-eval59.9%
mul-1-neg59.9%
log-rec59.9%
remove-double-neg59.9%
Simplified82.8%
Final simplification70.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (or (<= z -7e-31) (not (<= z 1.86e-31)))
(+ t_0 (/ (* z z) (/ x y)))
(+ t_0 (/ 0.083333333333333 x)))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if ((z <= -7e-31) || !(z <= 1.86e-31)) {
tmp = t_0 + ((z * z) / (x / y));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if ((z <= (-7d-31)) .or. (.not. (z <= 1.86d-31))) then
tmp = t_0 + ((z * z) / (x / y))
else
tmp = t_0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if ((z <= -7e-31) || !(z <= 1.86e-31)) {
tmp = t_0 + ((z * z) / (x / y));
} else {
tmp = t_0 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if (z <= -7e-31) or not (z <= 1.86e-31): tmp = t_0 + ((z * z) / (x / y)) else: tmp = t_0 + (0.083333333333333 / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if ((z <= -7e-31) || !(z <= 1.86e-31)) tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / y))); else tmp = Float64(t_0 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if ((z <= -7e-31) || ~((z <= 1.86e-31))) tmp = t_0 + ((z * z) / (x / y)); else tmp = t_0 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -7e-31], N[Not[LessEqual[z, 1.86e-31]], $MachinePrecision]], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{-31} \lor \neg \left(z \leq 1.86 \cdot 10^{-31}\right):\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -6.99999999999999971e-31 or 1.85999999999999995e-31 < z Initial program 88.3%
Taylor expanded in z around inf 85.3%
+-commutative85.3%
associate-/l*88.5%
unpow288.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in x around inf 88.5%
sub-neg97.2%
metadata-eval97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
Simplified88.5%
Taylor expanded in y around inf 71.4%
if -6.99999999999999971e-31 < z < 1.85999999999999995e-31Initial program 99.6%
Taylor expanded in z around 0 91.3%
Taylor expanded in x around inf 89.6%
sub-neg57.8%
metadata-eval57.8%
mul-1-neg57.8%
log-rec57.8%
remove-double-neg57.8%
Simplified89.6%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6.8e-31) (not (<= z 1.45e-31)))
(+ (* x (+ (log x) -1.0)) (/ (* z z) (/ x y)))
(+
(/ 1.0 (* x 12.000000000000048))
(+ 0.91893853320467 (- (* x (log x)) x)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e-31) || !(z <= 1.45e-31)) {
tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = (1.0 / (x * 12.000000000000048)) + (0.91893853320467 + ((x * log(x)) - 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 <= (-6.8d-31)) .or. (.not. (z <= 1.45d-31))) then
tmp = (x * (log(x) + (-1.0d0))) + ((z * z) / (x / y))
else
tmp = (1.0d0 / (x * 12.000000000000048d0)) + (0.91893853320467d0 + ((x * log(x)) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e-31) || !(z <= 1.45e-31)) {
tmp = (x * (Math.log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = (1.0 / (x * 12.000000000000048)) + (0.91893853320467 + ((x * Math.log(x)) - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6.8e-31) or not (z <= 1.45e-31): tmp = (x * (math.log(x) + -1.0)) + ((z * z) / (x / y)) else: tmp = (1.0 / (x * 12.000000000000048)) + (0.91893853320467 + ((x * math.log(x)) - x)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6.8e-31) || !(z <= 1.45e-31)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * z) / Float64(x / y))); else tmp = Float64(Float64(1.0 / Float64(x * 12.000000000000048)) + Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6.8e-31) || ~((z <= 1.45e-31))) tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y)); else tmp = (1.0 / (x * 12.000000000000048)) + (0.91893853320467 + ((x * log(x)) - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.8e-31], N[Not[LessEqual[z, 1.45e-31]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31} \lor \neg \left(z \leq 1.45 \cdot 10^{-31}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\
\end{array}
\end{array}
if z < -6.8000000000000002e-31 or 1.45e-31 < z Initial program 88.3%
Taylor expanded in z around inf 85.3%
+-commutative85.3%
associate-/l*88.5%
unpow288.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in x around inf 88.5%
sub-neg97.2%
metadata-eval97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
Simplified88.5%
Taylor expanded in y around inf 71.4%
if -6.8000000000000002e-31 < z < 1.45e-31Initial program 99.6%
Taylor expanded in z around 0 91.3%
Taylor expanded in x around inf 89.6%
*-commutative89.6%
associate-*r*89.6%
mul-1-neg89.6%
log-rec89.6%
remove-double-neg89.6%
*-commutative89.6%
Simplified89.6%
clear-num42.6%
inv-pow42.6%
div-inv42.7%
metadata-eval42.7%
Applied egg-rr89.7%
unpow-142.7%
Simplified89.7%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6.8e-31) (not (<= z 6e-17)))
(+ (* x (+ (log x) -1.0)) (/ (* z z) (/ x y)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e-31) || !(z <= 6e-17)) {
tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-6.8d-31)) .or. (.not. (z <= 6d-17))) then
tmp = (x * (log(x) + (-1.0d0))) + ((z * z) / (x / y))
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -6.8e-31) || !(z <= 6e-17)) {
tmp = (x * (Math.log(x) + -1.0)) + ((z * z) / (x / y));
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -6.8e-31) or not (z <= 6e-17): tmp = (x * (math.log(x) + -1.0)) + ((z * z) / (x / y)) else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -6.8e-31) || !(z <= 6e-17)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z * z) / Float64(x / y))); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -6.8e-31) || ~((z <= 6e-17))) tmp = (x * (log(x) + -1.0)) + ((z * z) / (x / y)); else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.8e-31], N[Not[LessEqual[z, 6e-17]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31} \lor \neg \left(z \leq 6 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -6.8000000000000002e-31 or 6.00000000000000012e-17 < z Initial program 88.0%
Taylor expanded in z around inf 86.0%
+-commutative86.0%
associate-/l*89.3%
unpow289.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in x around inf 89.4%
sub-neg98.4%
metadata-eval98.4%
mul-1-neg98.4%
log-rec98.4%
remove-double-neg98.4%
Simplified89.4%
Taylor expanded in y around inf 71.8%
if -6.8000000000000002e-31 < z < 6.00000000000000012e-17Initial program 99.5%
Taylor expanded in z around 0 89.9%
Final simplification78.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= z -2.5e-8)
(+ t_0 (* 0.0007936500793651 (/ (* z z) x)))
(if (<= z 5.2e-13)
(+ t_0 (/ 0.083333333333333 x))
(+ t_0 (/ (* z z) (* x 1260.0011340009878)))))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (z <= -2.5e-8) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / x));
} else if (z <= 5.2e-13) {
tmp = t_0 + (0.083333333333333 / x);
} else {
tmp = t_0 + ((z * z) / (x * 1260.0011340009878));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (z <= (-2.5d-8)) then
tmp = t_0 + (0.0007936500793651d0 * ((z * z) / x))
else if (z <= 5.2d-13) then
tmp = t_0 + (0.083333333333333d0 / x)
else
tmp = t_0 + ((z * z) / (x * 1260.0011340009878d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (Math.log(x) + -1.0);
double tmp;
if (z <= -2.5e-8) {
tmp = t_0 + (0.0007936500793651 * ((z * z) / x));
} else if (z <= 5.2e-13) {
tmp = t_0 + (0.083333333333333 / x);
} else {
tmp = t_0 + ((z * z) / (x * 1260.0011340009878));
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if z <= -2.5e-8: tmp = t_0 + (0.0007936500793651 * ((z * z) / x)) elif z <= 5.2e-13: tmp = t_0 + (0.083333333333333 / x) else: tmp = t_0 + ((z * z) / (x * 1260.0011340009878)) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (z <= -2.5e-8) tmp = Float64(t_0 + Float64(0.0007936500793651 * Float64(Float64(z * z) / x))); elseif (z <= 5.2e-13) tmp = Float64(t_0 + Float64(0.083333333333333 / x)); else tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x * 1260.0011340009878))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (z <= -2.5e-8) tmp = t_0 + (0.0007936500793651 * ((z * z) / x)); elseif (z <= 5.2e-13) tmp = t_0 + (0.083333333333333 / x); else tmp = t_0 + ((z * z) / (x * 1260.0011340009878)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e-8], N[(t$95$0 + N[(0.0007936500793651 * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-13], N[(t$95$0 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x * 1260.0011340009878), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-8}:\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-13}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{x \cdot 1260.0011340009878}\\
\end{array}
\end{array}
if z < -2.4999999999999999e-8Initial program 84.1%
Taylor expanded in z around inf 83.1%
+-commutative83.1%
associate-/l*87.0%
unpow287.0%
+-commutative87.0%
Simplified87.0%
Taylor expanded in y around 0 63.5%
unpow263.5%
Simplified63.5%
Taylor expanded in x around inf 63.5%
sub-neg98.8%
metadata-eval98.8%
mul-1-neg98.8%
log-rec98.8%
remove-double-neg98.8%
Simplified63.5%
if -2.4999999999999999e-8 < z < 5.2000000000000001e-13Initial program 99.5%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around inf 82.8%
sub-neg59.9%
metadata-eval59.9%
mul-1-neg59.9%
log-rec59.9%
remove-double-neg59.9%
Simplified82.8%
if 5.2000000000000001e-13 < z Initial program 90.2%
Taylor expanded in z around inf 88.4%
+-commutative88.4%
associate-/l*91.5%
unpow291.5%
+-commutative91.5%
Simplified91.5%
Taylor expanded in x around inf 91.6%
sub-neg99.1%
metadata-eval99.1%
mul-1-neg99.1%
log-rec99.1%
remove-double-neg99.1%
Simplified91.6%
Taylor expanded in y around 0 61.7%
*-commutative61.7%
Simplified61.7%
Final simplification70.4%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.25e+91) (not (<= z 7e+157)))
(cbrt
(*
(/ 0.083333333333333 x)
(* (/ 0.083333333333333 x) (/ 0.083333333333333 x))))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.25e+91) || !(z <= 7e+157)) {
tmp = cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.25e+91) || !(z <= 7e+157)) {
tmp = Math.cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -2.25e+91) || !(z <= 7e+157)) tmp = cbrt(Float64(Float64(0.083333333333333 / x) * Float64(Float64(0.083333333333333 / x) * Float64(0.083333333333333 / x)))); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.25e+91], N[Not[LessEqual[z, 7e+157]], $MachinePrecision]], N[Power[N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+91} \lor \neg \left(z \leq 7 \cdot 10^{+157}\right):\\
\;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -2.25e91 or 7.00000000000000004e157 < z Initial program 83.2%
Taylor expanded in z around 0 10.1%
Taylor expanded in x around inf 10.2%
*-commutative10.2%
associate-*r*10.2%
mul-1-neg10.2%
log-rec10.2%
remove-double-neg10.2%
*-commutative10.2%
Simplified10.2%
Taylor expanded in x around 0 3.1%
add-cbrt-cube_binary6423.9%
Applied rewrite-once23.9%
if -2.25e91 < z < 7.00000000000000004e157Initial program 97.3%
Taylor expanded in z around 0 69.4%
Taylor expanded in x around inf 68.1%
sub-neg74.5%
metadata-eval74.5%
mul-1-neg74.5%
log-rec74.5%
remove-double-neg74.5%
Simplified68.1%
Final simplification51.8%
(FPCore (x y z) :precision binary64 (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
def code(x, y, z): return (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
function code(x, y, z) return Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}
\end{array}
Initial program 92.1%
Taylor expanded in z around 0 47.6%
Taylor expanded in x around inf 46.8%
sub-neg83.8%
metadata-eval83.8%
mul-1-neg83.8%
log-rec83.8%
remove-double-neg83.8%
Simplified46.8%
Final simplification46.8%
(FPCore (x y z) :precision binary64 (if (<= x 16500000000.0) (/ 1.0 (* x 12.000000000000048)) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 16500000000.0) {
tmp = 1.0 / (x * 12.000000000000048);
} else {
tmp = x * (log(x) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 16500000000.0d0) then
tmp = 1.0d0 / (x * 12.000000000000048d0)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 16500000000.0) {
tmp = 1.0 / (x * 12.000000000000048);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 16500000000.0: tmp = 1.0 / (x * 12.000000000000048) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 16500000000.0) tmp = Float64(1.0 / Float64(x * 12.000000000000048)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 16500000000.0) tmp = 1.0 / (x * 12.000000000000048); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 16500000000.0], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 16500000000:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.65e10Initial program 99.7%
Taylor expanded in z around 0 32.3%
Taylor expanded in x around inf 30.6%
*-commutative30.6%
associate-*r*30.6%
mul-1-neg30.6%
log-rec30.6%
remove-double-neg30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in x around 0 30.6%
clear-num30.6%
inv-pow30.6%
div-inv30.7%
metadata-eval30.7%
Applied egg-rr30.7%
unpow-130.7%
Simplified30.7%
if 1.65e10 < x Initial program 83.9%
fma-neg84.0%
sub-neg84.0%
metadata-eval84.0%
*-commutative84.0%
fma-def84.0%
fma-neg84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in z around 0 64.3%
Taylor expanded in x around inf 64.3%
sub-neg64.3%
metadata-eval64.3%
mul-1-neg64.3%
log-rec64.3%
remove-double-neg64.3%
Simplified64.3%
Final simplification46.8%
(FPCore (x y z) :precision binary64 (+ 0.91893853320467 (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.91893853320467d0 + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.91893853320467 + (0.083333333333333 / x);
}
def code(x, y, z): return 0.91893853320467 + (0.083333333333333 / x)
function code(x, y, z) return Float64(0.91893853320467 + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = 0.91893853320467 + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Initial program 92.1%
Taylor expanded in z around 0 47.6%
Taylor expanded in x around inf 46.8%
*-commutative46.8%
associate-*r*46.8%
mul-1-neg46.8%
log-rec46.8%
remove-double-neg46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in x around 0 17.9%
+-commutative17.9%
associate-*r/17.9%
metadata-eval17.9%
Simplified17.9%
Final simplification17.9%
(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 92.1%
Taylor expanded in z around 0 47.6%
Taylor expanded in x around inf 46.8%
*-commutative46.8%
associate-*r*46.8%
mul-1-neg46.8%
log-rec46.8%
remove-double-neg46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in x around 0 17.3%
Final simplification17.3%
(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 2023297
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))