
(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
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778)))
(t_1 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
(if (<= t_0 1e+159)
(+ t_1 (pow (/ x (+ t_0 0.083333333333333)) -1.0))
(+ t_1 (pow (* z (sqrt (/ (+ y 0.0007936500793651) x))) 2.0)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double t_1 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if (t_0 <= 1e+159) {
tmp = t_1 + pow((x / (t_0 + 0.083333333333333)), -1.0);
} else {
tmp = t_1 + pow((z * sqrt(((y + 0.0007936500793651) / x))), 2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)
t_1 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
if (t_0 <= 1d+159) then
tmp = t_1 + ((x / (t_0 + 0.083333333333333d0)) ** (-1.0d0))
else
tmp = t_1 + ((z * sqrt(((y + 0.0007936500793651d0) / x))) ** 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double t_1 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
double tmp;
if (t_0 <= 1e+159) {
tmp = t_1 + Math.pow((x / (t_0 + 0.083333333333333)), -1.0);
} else {
tmp = t_1 + Math.pow((z * Math.sqrt(((y + 0.0007936500793651) / x))), 2.0);
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) t_1 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467 tmp = 0 if t_0 <= 1e+159: tmp = t_1 + math.pow((x / (t_0 + 0.083333333333333)), -1.0) else: tmp = t_1 + math.pow((z * math.sqrt(((y + 0.0007936500793651) / x))), 2.0) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) t_1 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) tmp = 0.0 if (t_0 <= 1e+159) tmp = Float64(t_1 + (Float64(x / Float64(t_0 + 0.083333333333333)) ^ -1.0)); else tmp = Float64(t_1 + (Float64(z * sqrt(Float64(Float64(y + 0.0007936500793651) / x))) ^ 2.0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); t_1 = (((x - 0.5) * log(x)) - x) + 0.91893853320467; tmp = 0.0; if (t_0 <= 1e+159) tmp = t_1 + ((x / (t_0 + 0.083333333333333)) ^ -1.0); else tmp = t_1 + ((z * sqrt(((y + 0.0007936500793651) / x))) ^ 2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[t$95$0, 1e+159], N[(t$95$1 + N[Power[N[(x / N[(t$95$0 + 0.083333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[Power[N[(z * N[Sqrt[N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
t_1 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;t\_0 \leq 10^{+159}:\\
\;\;\;\;t\_1 + {\left(\frac{x}{t\_0 + 0.083333333333333}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + {\left(z \cdot \sqrt{\frac{y + 0.0007936500793651}{x}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 9.9999999999999993e158Initial program 97.9%
clear-num97.9%
inv-pow97.9%
*-commutative97.9%
fma-undefine97.9%
fma-neg97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Taylor expanded in x around 0 97.9%
if 9.9999999999999993e158 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 86.8%
Taylor expanded in z around inf 85.7%
associate-/l*87.8%
Simplified87.8%
add-sqr-sqrt87.8%
pow287.8%
sqrt-prod87.8%
unpow287.8%
sqrt-prod52.2%
add-sqr-sqrt99.7%
+-commutative99.7%
Applied egg-rr99.7%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(if (<= x 1.8e+228)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(pow
(/
x
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333))
-1.0))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+228) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + pow((x / ((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333)), -1.0);
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.8d+228) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((x / ((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0)) ** (-1.0d0))
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+228) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + Math.pow((x / ((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333)), -1.0);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.8e+228: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + math.pow((x / ((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333)), -1.0) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.8e+228) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + (Float64(x / Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333)) ^ -1.0)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.8e+228) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((x / ((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333)) ^ -1.0); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.8e+228], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[Power[N[(x / N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.8 \cdot 10^{+228}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.8e228Initial program 96.4%
clear-num96.4%
inv-pow96.4%
*-commutative96.4%
fma-undefine96.4%
fma-neg96.4%
metadata-eval96.4%
Applied egg-rr96.4%
Taylor expanded in x around 0 96.4%
if 1.8e228 < x Initial program 79.8%
Taylor expanded in z around 0 94.6%
Taylor expanded in x around inf 94.6%
sub-neg94.6%
mul-1-neg94.6%
log-rec94.6%
remove-double-neg94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (<= t_0 -5e-9)
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(if (<= t_0 5e+92)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(* 0.083333333333333 (/ 1.0 x)))
(- (/ (+ t_0 0.083333333333333) x) x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
} else {
tmp = ((t_0 + 0.083333333333333) / 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) :: t_0
real(8) :: tmp
t_0 = z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)
if (t_0 <= (-5d-9)) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else if (t_0 <= 5d+92) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 * (1.0d0 / x))
else
tmp = ((t_0 + 0.083333333333333d0) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x));
} else {
tmp = ((t_0 + 0.083333333333333) / x) - x;
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if t_0 <= -5e-9: tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x elif t_0 <= 5e+92: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)) else: tmp = ((t_0 + 0.083333333333333) / x) - x return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= -5e-9) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); elseif (t_0 <= 5e+92) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 * Float64(1.0 / x))); else tmp = Float64(Float64(Float64(t_0 + 0.083333333333333) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if (t_0 <= -5e-9) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; elseif (t_0 <= 5e+92) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 * (1.0 / x)); else tmp = ((t_0 + 0.083333333333333) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-9], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[t$95$0, 5e+92], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$0 + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+92}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 + 0.083333333333333}{x} - x\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -5.0000000000000001e-9Initial program 90.9%
add-sqr-sqrt90.8%
pow290.8%
sub-neg90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 75.4%
neg-mul-175.4%
Simplified75.4%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
Simplified75.4%
if -5.0000000000000001e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 5.00000000000000022e92Initial program 99.4%
Taylor expanded in z around 0 94.9%
clear-num94.9%
associate-/r/94.9%
Applied egg-rr94.9%
if 5.00000000000000022e92 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 88.3%
add-sqr-sqrt88.3%
pow288.3%
sub-neg88.3%
metadata-eval88.3%
Applied egg-rr88.3%
Taylor expanded in x around inf 79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification86.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (<= t_0 -5e-9)
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(if (<= t_0 5e+92)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 1.0 (* x 12.000000000000048)))
(- (/ (+ t_0 0.083333333333333) x) x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
} else {
tmp = ((t_0 + 0.083333333333333) / 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) :: t_0
real(8) :: tmp
t_0 = z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)
if (t_0 <= (-5d-9)) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else if (t_0 <= 5d+92) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (1.0d0 / (x * 12.000000000000048d0))
else
tmp = ((t_0 + 0.083333333333333d0) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
} else {
tmp = ((t_0 + 0.083333333333333) / x) - x;
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if t_0 <= -5e-9: tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x elif t_0 <= 5e+92: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)) else: tmp = ((t_0 + 0.083333333333333) / x) - x return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= -5e-9) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); elseif (t_0 <= 5e+92) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048))); else tmp = Float64(Float64(Float64(t_0 + 0.083333333333333) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if (t_0 <= -5e-9) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; elseif (t_0 <= 5e+92) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048)); else tmp = ((t_0 + 0.083333333333333) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-9], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[t$95$0, 5e+92], 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[(N[(N[(t$95$0 + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+92}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 + 0.083333333333333}{x} - x\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -5.0000000000000001e-9Initial program 90.9%
add-sqr-sqrt90.8%
pow290.8%
sub-neg90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 75.4%
neg-mul-175.4%
Simplified75.4%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
Simplified75.4%
if -5.0000000000000001e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 5.00000000000000022e92Initial program 99.4%
Taylor expanded in z around 0 94.9%
clear-num94.9%
inv-pow94.9%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
unpow-195.0%
Simplified95.0%
if 5.00000000000000022e92 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 88.3%
add-sqr-sqrt88.3%
pow288.3%
sub-neg88.3%
metadata-eval88.3%
Applied egg-rr88.3%
Taylor expanded in x around inf 79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification86.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))))
(if (<= t_0 -5e-9)
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(if (<= t_0 5e+92)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ 0.083333333333333 x))
(- (/ (+ t_0 0.083333333333333) x) x)))))
double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = ((t_0 + 0.083333333333333) / 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) :: t_0
real(8) :: tmp
t_0 = z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)
if (t_0 <= (-5d-9)) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else if (t_0 <= 5d+92) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
else
tmp = ((t_0 + 0.083333333333333d0) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778);
double tmp;
if (t_0 <= -5e-9) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else if (t_0 <= 5e+92) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
} else {
tmp = ((t_0 + 0.083333333333333) / x) - x;
}
return tmp;
}
def code(x, y, z): t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778) tmp = 0 if t_0 <= -5e-9: tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x elif t_0 <= 5e+92: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x) else: tmp = ((t_0 + 0.083333333333333) / x) - x return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= -5e-9) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); elseif (t_0 <= 5e+92) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(t_0 + 0.083333333333333) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (((y + 0.0007936500793651) * z) - 0.0027777777777778); tmp = 0.0; if (t_0 <= -5e-9) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; elseif (t_0 <= 5e+92) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x); else tmp = ((t_0 + 0.083333333333333) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-9], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[t$95$0, 5e+92], 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[(N[(N[(t$95$0 + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+92}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 + 0.083333333333333}{x} - x\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -5.0000000000000001e-9Initial program 90.9%
add-sqr-sqrt90.8%
pow290.8%
sub-neg90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 75.4%
neg-mul-175.4%
Simplified75.4%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
Simplified75.4%
if -5.0000000000000001e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 5.00000000000000022e92Initial program 99.4%
Taylor expanded in z around 0 94.9%
if 5.00000000000000022e92 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) Initial program 88.3%
add-sqr-sqrt88.3%
pow288.3%
sub-neg88.3%
metadata-eval88.3%
Applied egg-rr88.3%
Taylor expanded in x around inf 79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification86.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.15e+230)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.15e+230) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.15d+230) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.15e+230) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.15e+230: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.15e+230) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.15e+230) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x); else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.15e+230], 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[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+230}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.1499999999999999e230Initial program 96.4%
if 1.1499999999999999e230 < x Initial program 79.8%
Taylor expanded in z around 0 94.6%
Taylor expanded in x around inf 94.6%
sub-neg94.6%
mul-1-neg94.6%
log-rec94.6%
remove-double-neg94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification96.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 2.4e+229)
(+
t_0
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
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 (x <= 2.4e+229) {
tmp = t_0 + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / 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 (x <= 2.4d+229) then
tmp = t_0 + (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / 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 (x <= 2.4e+229) {
tmp = t_0 + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / 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 x <= 2.4e+229: tmp = t_0 + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / 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 (x <= 2.4e+229) tmp = Float64(t_0 + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / 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 (x <= 2.4e+229) tmp = t_0 + (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / 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[LessEqual[x, 2.4e+229], N[(t$95$0 + N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $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}\;x \leq 2.4 \cdot 10^{+229}:\\
\;\;\;\;t\_0 + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 2.4000000000000001e229Initial program 96.4%
Taylor expanded in x around inf 94.9%
sub-neg50.1%
mul-1-neg50.1%
log-rec50.1%
remove-double-neg50.1%
metadata-eval50.1%
Simplified94.9%
if 2.4000000000000001e229 < x Initial program 79.8%
Taylor expanded in z around 0 94.6%
Taylor expanded in x around inf 94.6%
sub-neg94.6%
mul-1-neg94.6%
log-rec94.6%
remove-double-neg94.6%
metadata-eval94.6%
Simplified94.6%
Final simplification94.9%
(FPCore (x y z)
:precision binary64
(if (<= x 1.8e+23)
(-
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
x)
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+23) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.8d+23) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.8e+23) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.8e+23: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.8e+23) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.8e+23) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x; else tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.8e+23], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 1.7999999999999999e23Initial program 99.7%
add-sqr-sqrt99.7%
pow299.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 96.9%
neg-mul-196.9%
Simplified96.9%
if 1.7999999999999999e23 < x Initial program 88.4%
Taylor expanded in x around inf 88.5%
sub-neg70.6%
mul-1-neg70.6%
log-rec70.6%
remove-double-neg70.6%
metadata-eval70.6%
Simplified88.5%
Taylor expanded in y around 0 82.6%
*-commutative15.9%
Simplified82.6%
Final simplification90.0%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+30)
(-
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
x)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+30) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.3d+30) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+30) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.3e+30: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+30) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.3e+30) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+30], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+30}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.29999999999999994e30Initial program 99.7%
add-sqr-sqrt99.7%
pow299.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 96.3%
neg-mul-196.3%
Simplified96.3%
if 1.29999999999999994e30 < x Initial program 88.2%
Taylor expanded in z around 0 71.4%
Taylor expanded in x around inf 71.5%
sub-neg71.5%
mul-1-neg71.5%
log-rec71.5%
remove-double-neg71.5%
metadata-eval71.5%
Simplified71.5%
Final simplification84.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -7.0) (not (<= z 1.56e+31)))
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)
(+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.0) || !(z <= 1.56e+31)) {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-7.0d0)) .or. (.not. (z <= 1.56d+31))) then
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7.0) || !(z <= 1.56e+31)) {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7.0) or not (z <= 1.56e+31): tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7.0) || !(z <= 1.56e+31)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7.0) || ~((z <= 1.56e+31))) tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.0], N[Not[LessEqual[z, 1.56e+31]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \lor \neg \left(z \leq 1.56 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -7 or 1.56000000000000004e31 < z Initial program 88.1%
add-sqr-sqrt88.1%
pow288.1%
sub-neg88.1%
metadata-eval88.1%
Applied egg-rr88.1%
Taylor expanded in x around inf 77.5%
neg-mul-177.5%
Simplified77.5%
Taylor expanded in y around 0 61.4%
*-commutative61.4%
Simplified61.4%
if -7 < z < 1.56000000000000004e31Initial program 99.5%
add-sqr-sqrt99.2%
pow299.2%
sub-neg99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in x around inf 47.4%
neg-mul-147.4%
Simplified47.4%
Taylor expanded in z around 0 38.0%
*-un-lft-identity38.0%
*-commutative38.0%
add-sqr-sqrt0.0%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod44.9%
add-sqr-sqrt44.9%
Applied egg-rr44.9%
*-rgt-identity44.9%
Simplified44.9%
Final simplification52.5%
(FPCore (x y z)
:precision binary64
(if (or (<= y -6500000.0) (not (<= y 1.35e-72)))
(- (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x) x)
(-
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6500000.0) || !(y <= 1.35e-72)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / 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 ((y <= (-6500000.0d0)) .or. (.not. (y <= 1.35d-72))) then
tmp = ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x) - x
else
tmp = ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6500000.0) || !(y <= 1.35e-72)) {
tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x;
} else {
tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6500000.0) or not (y <= 1.35e-72): tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x else: tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6500000.0) || !(y <= 1.35e-72)) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6500000.0) || ~((y <= 1.35e-72))) tmp = ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) - x; else tmp = ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6500000.0], N[Not[LessEqual[y, 1.35e-72]], $MachinePrecision]], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6500000 \lor \neg \left(y \leq 1.35 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} - x\\
\end{array}
\end{array}
if y < -6.5e6 or 1.35e-72 < y Initial program 95.0%
add-sqr-sqrt94.8%
pow294.8%
sub-neg94.8%
metadata-eval94.8%
Applied egg-rr94.8%
Taylor expanded in x around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Taylor expanded in y around inf 61.3%
*-commutative61.3%
Simplified61.3%
if -6.5e6 < y < 1.35e-72Initial program 93.3%
add-sqr-sqrt93.1%
pow293.1%
sub-neg93.1%
metadata-eval93.1%
Applied egg-rr93.1%
Taylor expanded in x around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Taylor expanded in y around 0 61.3%
*-commutative61.3%
Simplified61.3%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(if (<= x 4.4e+216)
(-
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)
x)
(+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.4e+216) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 4.4d+216) then
tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.4e+216) {
tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.4e+216: tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.4e+216) tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.4e+216) tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.4e+216], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+216}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 4.4e216Initial program 96.7%
add-sqr-sqrt96.6%
pow296.6%
sub-neg96.6%
metadata-eval96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 71.7%
neg-mul-171.7%
Simplified71.7%
if 4.4e216 < x Initial program 79.9%
add-sqr-sqrt79.7%
pow279.7%
sub-neg79.7%
metadata-eval79.7%
Applied egg-rr79.7%
Taylor expanded in x around inf 1.6%
neg-mul-11.6%
Simplified1.6%
Taylor expanded in z around 0 0.4%
*-un-lft-identity0.4%
*-commutative0.4%
add-sqr-sqrt0.0%
sqrt-unprod8.4%
sqr-neg8.4%
sqrt-unprod13.3%
add-sqr-sqrt13.3%
Applied egg-rr13.3%
*-rgt-identity13.3%
Simplified13.3%
Final simplification63.0%
(FPCore (x y z) :precision binary64 (if (<= x 5.9e-103) (- (+ (* -0.0027777777777778 (/ z x)) (* 0.083333333333333 (/ 1.0 x))) x) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-103) {
tmp = ((-0.0027777777777778 * (z / x)) + (0.083333333333333 * (1.0 / x))) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5.9d-103) then
tmp = (((-0.0027777777777778d0) * (z / x)) + (0.083333333333333d0 * (1.0d0 / x))) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.9e-103) {
tmp = ((-0.0027777777777778 * (z / x)) + (0.083333333333333 * (1.0 / x))) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.9e-103: tmp = ((-0.0027777777777778 * (z / x)) + (0.083333333333333 * (1.0 / x))) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.9e-103) tmp = Float64(Float64(Float64(-0.0027777777777778 * Float64(z / x)) + Float64(0.083333333333333 * Float64(1.0 / x))) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.9e-103) tmp = ((-0.0027777777777778 * (z / x)) + (0.083333333333333 * (1.0 / x))) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.9e-103], N[(N[(N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.9 \cdot 10^{-103}:\\
\;\;\;\;\left(-0.0027777777777778 \cdot \frac{z}{x} + 0.083333333333333 \cdot \frac{1}{x}\right) - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 5.8999999999999999e-103Initial program 99.8%
add-sqr-sqrt99.8%
pow299.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 99.8%
neg-mul-199.8%
Simplified99.8%
Taylor expanded in z around 0 59.7%
if 5.8999999999999999e-103 < x Initial program 92.0%
add-sqr-sqrt91.7%
pow291.7%
sub-neg91.7%
metadata-eval91.7%
Applied egg-rr91.7%
Taylor expanded in x around inf 45.3%
neg-mul-145.3%
Simplified45.3%
Taylor expanded in z around 0 13.5%
*-un-lft-identity13.5%
*-commutative13.5%
add-sqr-sqrt0.0%
sqrt-unprod20.1%
sqr-neg20.1%
sqrt-unprod20.6%
add-sqr-sqrt20.6%
Applied egg-rr20.6%
*-rgt-identity20.6%
Simplified20.6%
Final simplification32.1%
(FPCore (x y z) :precision binary64 (if (<= x 1.4e-101) (- (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x) x) (+ x (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.4e-101) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1.4d-101) then
tmp = ((0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x) - x
else
tmp = x + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.4e-101) {
tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x;
} else {
tmp = x + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.4e-101: tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x else: tmp = x + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.4e-101) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) - x); else tmp = Float64(x + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.4e-101) tmp = ((0.083333333333333 + (z * -0.0027777777777778)) / x) - x; else tmp = x + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.4e-101], N[(N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4 \cdot 10^{-101}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 1.39999999999999995e-101Initial program 99.8%
add-sqr-sqrt99.8%
pow299.8%
sub-neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 99.8%
neg-mul-199.8%
Simplified99.8%
Taylor expanded in z around 0 58.6%
*-commutative58.6%
Simplified58.6%
if 1.39999999999999995e-101 < x Initial program 92.0%
add-sqr-sqrt91.7%
pow291.7%
sub-neg91.7%
metadata-eval91.7%
Applied egg-rr91.7%
Taylor expanded in x around inf 45.3%
neg-mul-145.3%
Simplified45.3%
Taylor expanded in z around 0 13.5%
*-un-lft-identity13.5%
*-commutative13.5%
add-sqr-sqrt0.0%
sqrt-unprod20.1%
sqr-neg20.1%
sqrt-unprod20.6%
add-sqr-sqrt20.6%
Applied egg-rr20.6%
*-rgt-identity20.6%
Simplified20.6%
Final simplification31.7%
(FPCore (x y z) :precision binary64 (+ x (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
return x + (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.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
return x + (0.083333333333333 / x);
}
def code(x, y, z): return x + (0.083333333333333 / x)
function code(x, y, z) return Float64(x + Float64(0.083333333333333 / x)) end
function tmp = code(x, y, z) tmp = x + (0.083333333333333 / x); end
code[x_, y_, z_] := N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.083333333333333}{x}
\end{array}
Initial program 94.2%
add-sqr-sqrt94.1%
pow294.1%
sub-neg94.1%
metadata-eval94.1%
Applied egg-rr94.1%
Taylor expanded in x around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Taylor expanded in z around 0 22.0%
*-un-lft-identity22.0%
*-commutative22.0%
add-sqr-sqrt0.0%
sqrt-unprod26.6%
sqr-neg26.6%
sqrt-unprod27.0%
add-sqr-sqrt27.0%
Applied egg-rr27.0%
*-rgt-identity27.0%
Simplified27.0%
Final simplification27.0%
(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 94.2%
add-sqr-sqrt94.1%
pow294.1%
sub-neg94.1%
metadata-eval94.1%
Applied egg-rr94.1%
Taylor expanded in x around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Taylor expanded in z around 0 22.0%
Taylor expanded in x around 0 23.0%
Final simplification23.0%
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
return -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
end function
public static double code(double x, double y, double z) {
return -x;
}
def code(x, y, z): return -x
function code(x, y, z) return Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 94.2%
add-sqr-sqrt94.1%
pow294.1%
sub-neg94.1%
metadata-eval94.1%
Applied egg-rr94.1%
Taylor expanded in x around inf 61.3%
neg-mul-161.3%
Simplified61.3%
Taylor expanded in z around 0 22.0%
Taylor expanded in x around inf 1.3%
mul-1-neg1.3%
Simplified1.3%
Final simplification1.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 2024043
(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)))