
(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 (+ 0.0007936500793651 y))))
(if (<= x 4e+23)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(pow (/ x (+ 0.083333333333333 (* z (- t_0 0.0027777777777778)))) -1.0))
(+ (* x (+ (log x) -1.0)) (* t_0 (/ z x))))))
double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 4e+23) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + pow((x / (0.083333333333333 + (z * (t_0 - 0.0027777777777778)))), -1.0);
} else {
tmp = (x * (log(x) + -1.0)) + (t_0 * (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 = z * (0.0007936500793651d0 + y)
if (x <= 4d+23) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((x / (0.083333333333333d0 + (z * (t_0 - 0.0027777777777778d0)))) ** (-1.0d0))
else
tmp = (x * (log(x) + (-1.0d0))) + (t_0 * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 4e+23) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + Math.pow((x / (0.083333333333333 + (z * (t_0 - 0.0027777777777778)))), -1.0);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (t_0 * (z / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.0007936500793651 + y) tmp = 0 if x <= 4e+23: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + math.pow((x / (0.083333333333333 + (z * (t_0 - 0.0027777777777778)))), -1.0) else: tmp = (x * (math.log(x) + -1.0)) + (t_0 * (z / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.0007936500793651 + y)) tmp = 0.0 if (x <= 4e+23) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + (Float64(x / Float64(0.083333333333333 + Float64(z * Float64(t_0 - 0.0027777777777778)))) ^ -1.0)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(t_0 * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.0007936500793651 + y); tmp = 0.0; if (x <= 4e+23) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((x / (0.083333333333333 + (z * (t_0 - 0.0027777777777778)))) ^ -1.0); else tmp = (x * (log(x) + -1.0)) + (t_0 * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4e+23], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[Power[N[(x / N[(0.083333333333333 + N[(z * N[(t$95$0 - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
\mathbf{if}\;x \leq 4 \cdot 10^{+23}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + {\left(\frac{x}{0.083333333333333 + z \cdot \left(t_0 - 0.0027777777777778\right)}\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + t_0 \cdot \frac{z}{x}\\
\end{array}
\end{array}
if x < 3.9999999999999997e23Initial program 99.7%
clear-num99.7%
inv-pow99.7%
*-commutative99.7%
fma-udef99.7%
fma-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 99.7%
if 3.9999999999999997e23 < x Initial program 89.9%
Taylor expanded in z around inf 89.9%
associate-/l*96.4%
unpow296.4%
Simplified96.4%
div-inv96.3%
times-frac97.0%
+-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
associate-/r/97.0%
/-rgt-identity97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 97.2%
*-commutative97.2%
sub-neg97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ 0.0007936500793651 y))))
(if (<= x 4e+23)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/ (+ 0.083333333333333 (* z (- t_0 0.0027777777777778))) x))
(+ (* x (+ (log x) -1.0)) (* t_0 (/ z x))))))
double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 4e+23) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x);
} else {
tmp = (x * (log(x) + -1.0)) + (t_0 * (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 = z * (0.0007936500793651d0 + y)
if (x <= 4d+23) then
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((0.083333333333333d0 + (z * (t_0 - 0.0027777777777778d0))) / x)
else
tmp = (x * (log(x) + (-1.0d0))) + (t_0 * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 4e+23) {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x);
} else {
tmp = (x * (Math.log(x) + -1.0)) + (t_0 * (z / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.0007936500793651 + y) tmp = 0 if x <= 4e+23: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) else: tmp = (x * (math.log(x) + -1.0)) + (t_0 * (z / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.0007936500793651 + y)) tmp = 0.0 if (x <= 4e+23) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(t_0 - 0.0027777777777778))) / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(t_0 * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.0007936500793651 + y); tmp = 0.0; if (x <= 4e+23) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x); else tmp = (x * (log(x) + -1.0)) + (t_0 * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 4e+23], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(t$95$0 - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
\mathbf{if}\;x \leq 4 \cdot 10^{+23}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(t_0 - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + t_0 \cdot \frac{z}{x}\\
\end{array}
\end{array}
if x < 3.9999999999999997e23Initial program 99.7%
if 3.9999999999999997e23 < x Initial program 89.9%
Taylor expanded in z around inf 89.9%
associate-/l*96.4%
unpow296.4%
Simplified96.4%
div-inv96.3%
times-frac97.0%
+-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
associate-/r/97.0%
/-rgt-identity97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 97.2%
*-commutative97.2%
sub-neg97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ 0.0007936500793651 y))))
(if (<= x 1.55e-10)
(- (/ (+ 0.083333333333333 (* z (- t_0 0.0027777777777778))) x) x)
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (* t_0 (/ z x))))))
double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 1.55e-10) {
tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x;
} else {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (t_0 * (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 = z * (0.0007936500793651d0 + y)
if (x <= 1.55d-10) then
tmp = ((0.083333333333333d0 + (z * (t_0 - 0.0027777777777778d0))) / x) - x
else
tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (t_0 * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 1.55e-10) {
tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x;
} else {
tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (t_0 * (z / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.0007936500793651 + y) tmp = 0 if x <= 1.55e-10: tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x else: tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (t_0 * (z / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.0007936500793651 + y)) tmp = 0.0 if (x <= 1.55e-10) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(t_0 - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(t_0 * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.0007936500793651 + y); tmp = 0.0; if (x <= 1.55e-10) tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x; else tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (t_0 * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.55e-10], N[(N[(N[(0.083333333333333 + N[(z * N[(t$95$0 - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(t$95$0 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
\mathbf{if}\;x \leq 1.55 \cdot 10^{-10}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(t_0 - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + t_0 \cdot \frac{z}{x}\\
\end{array}
\end{array}
if x < 1.55000000000000008e-10Initial 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 99.2%
neg-mul-199.2%
Simplified99.2%
if 1.55000000000000008e-10 < x Initial program 90.8%
Taylor expanded in z around inf 90.0%
associate-/l*95.9%
unpow295.9%
Simplified95.9%
div-inv95.9%
times-frac96.5%
+-commutative96.5%
Applied egg-rr96.5%
*-commutative96.5%
associate-/r/96.5%
/-rgt-identity96.5%
+-commutative96.5%
Simplified96.5%
Final simplification97.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ 0.0007936500793651 y))))
(if (<= x 0.42)
(- (/ (+ 0.083333333333333 (* z (- t_0 0.0027777777777778))) x) x)
(+ (* x (+ (log x) -1.0)) (* t_0 (/ z x))))))
double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 0.42) {
tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + (t_0 * (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 = z * (0.0007936500793651d0 + y)
if (x <= 0.42d0) then
tmp = ((0.083333333333333d0 + (z * (t_0 - 0.0027777777777778d0))) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + (t_0 * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.0007936500793651 + y);
double tmp;
if (x <= 0.42) {
tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (t_0 * (z / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.0007936500793651 + y) tmp = 0 if x <= 0.42: tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + (t_0 * (z / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.0007936500793651 + y)) tmp = 0.0 if (x <= 0.42) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(t_0 - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(t_0 * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.0007936500793651 + y); tmp = 0.0; if (x <= 0.42) tmp = ((0.083333333333333 + (z * (t_0 - 0.0027777777777778))) / x) - x; else tmp = (x * (log(x) + -1.0)) + (t_0 * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.42], N[(N[(N[(0.083333333333333 + N[(z * N[(t$95$0 - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
\mathbf{if}\;x \leq 0.42:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(t_0 - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + t_0 \cdot \frac{z}{x}\\
\end{array}
\end{array}
if x < 0.419999999999999984Initial 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 98.5%
neg-mul-198.5%
Simplified98.5%
if 0.419999999999999984 < x Initial program 90.5%
Taylor expanded in z around inf 90.4%
associate-/l*96.4%
unpow296.4%
Simplified96.4%
div-inv96.4%
times-frac97.0%
+-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
associate-/r/97.0%
/-rgt-identity97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 96.9%
*-commutative96.9%
sub-neg96.9%
mul-1-neg96.9%
log-rec96.9%
remove-double-neg96.9%
metadata-eval96.9%
Simplified96.9%
Final simplification97.7%
(FPCore (x y z)
:precision binary64
(if (<= x 2.15e+27)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
x)
(if (or (<= x 9.5e+36) (not (<= x 6.2e+43)))
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
(- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.15e+27) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 9.5e+36) || !(x <= 6.2e+43)) {
tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.15d+27) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
else if ((x <= 9.5d+36) .or. (.not. (x <= 6.2d+43))) then
tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
else
tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.15e+27) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else if ((x <= 9.5e+36) || !(x <= 6.2e+43)) {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.15e+27: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x elif (x <= 9.5e+36) or not (x <= 6.2e+43): tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) else: tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.15e+27) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x); elseif ((x <= 9.5e+36) || !(x <= 6.2e+43)) tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.15e+27) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x; elseif ((x <= 9.5e+36) || ~((x <= 6.2e+43))) tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); else tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.15e+27], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[Or[LessEqual[x, 9.5e+36], N[Not[LessEqual[x, 6.2e+43]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.15 \cdot 10^{+27}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+36} \lor \neg \left(x \leq 6.2 \cdot 10^{+43}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\
\end{array}
\end{array}
if x < 2.15000000000000004e27Initial 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.5%
neg-mul-196.5%
Simplified96.5%
if 2.15000000000000004e27 < x < 9.49999999999999974e36 or 6.2000000000000003e43 < x Initial program 90.1%
Taylor expanded in z around 0 77.1%
Taylor expanded in x around inf 77.2%
*-commutative97.0%
sub-neg97.0%
mul-1-neg97.0%
log-rec97.0%
remove-double-neg97.0%
metadata-eval97.0%
Simplified77.2%
if 9.49999999999999974e36 < x < 6.2000000000000003e43Initial program 84.2%
add-sqr-sqrt84.2%
pow284.2%
sub-neg84.2%
metadata-eval84.2%
Applied egg-rr84.2%
Taylor expanded in x around inf 84.2%
neg-mul-184.2%
Simplified84.2%
Taylor expanded in z around inf 84.5%
associate-/l*84.7%
unpow284.7%
Simplified84.7%
Final simplification87.9%
(FPCore (x y z)
:precision binary64
(if (<= x 8.3e+15)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
x)
(if (<= x 9e+36)
(+ (+ 0.91893853320467 (- (* x (log x)) x)) (/ 0.083333333333333 x))
(if (<= x 8.4e+43)
(- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x)
(+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.3e+15) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else if (x <= 9e+36) {
tmp = (0.91893853320467 + ((x * log(x)) - x)) + (0.083333333333333 / x);
} else if (x <= 8.4e+43) {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - 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 <= 8.3d+15) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
else if (x <= 9d+36) then
tmp = (0.91893853320467d0 + ((x * log(x)) - x)) + (0.083333333333333d0 / x)
else if (x <= 8.4d+43) then
tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - 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 <= 8.3e+15) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else if (x <= 9e+36) {
tmp = (0.91893853320467 + ((x * Math.log(x)) - x)) + (0.083333333333333 / x);
} else if (x <= 8.4e+43) {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8.3e+15: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x elif x <= 9e+36: tmp = (0.91893853320467 + ((x * math.log(x)) - x)) + (0.083333333333333 / x) elif x <= 8.4e+43: tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x else: tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8.3e+15) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x); elseif (x <= 9e+36) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(x * log(x)) - x)) + Float64(0.083333333333333 / x)); elseif (x <= 8.4e+43) tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - 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 <= 8.3e+15) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x; elseif (x <= 9e+36) tmp = (0.91893853320467 + ((x * log(x)) - x)) + (0.083333333333333 / x); elseif (x <= 8.4e+43) tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x; else tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8.3e+15], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[x, 9e+36], N[(N[(0.91893853320467 + N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.4e+43], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+36}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{+43}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if x < 8.3e15Initial 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 97.9%
neg-mul-197.9%
Simplified97.9%
if 8.3e15 < x < 8.99999999999999994e36Initial program 99.3%
Taylor expanded in z around 0 67.7%
Taylor expanded in x around inf 67.7%
mul-1-neg67.7%
distribute-lft-neg-in67.7%
log-rec67.7%
remove-double-neg67.7%
*-commutative67.7%
Simplified67.7%
if 8.99999999999999994e36 < x < 8.40000000000000007e43Initial program 84.2%
add-sqr-sqrt84.2%
pow284.2%
sub-neg84.2%
metadata-eval84.2%
Applied egg-rr84.2%
Taylor expanded in x around inf 84.2%
neg-mul-184.2%
Simplified84.2%
Taylor expanded in z around inf 84.5%
associate-/l*84.7%
unpow284.7%
Simplified84.7%
if 8.40000000000000007e43 < x Initial program 89.4%
Taylor expanded in z around 0 77.2%
Taylor expanded in x around inf 77.3%
*-commutative96.8%
sub-neg96.8%
mul-1-neg96.8%
log-rec96.8%
remove-double-neg96.8%
metadata-eval96.8%
Simplified77.3%
Final simplification87.9%
(FPCore (x y z)
:precision binary64
(if (<= x 17000.0)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
x)
(+ (* x (+ (log x) -1.0)) (* 0.0007936500793651 (* z (/ z x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 17000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + (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 <= 17000.0d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + (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 <= 17000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + (0.0007936500793651 * (z * (z / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 17000.0: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + (0.0007936500793651 * (z * (z / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 17000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.0007936500793651 * Float64(z * Float64(z / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 17000.0) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x; else tmp = (x * (log(x) + -1.0)) + (0.0007936500793651 * (z * (z / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 17000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.0007936500793651 * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 17000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + 0.0007936500793651 \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < 17000Initial 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 98.6%
neg-mul-198.6%
Simplified98.6%
if 17000 < x Initial program 90.4%
Taylor expanded in z around inf 90.3%
associate-/l*96.4%
unpow296.4%
Simplified96.4%
div-inv96.3%
times-frac97.0%
+-commutative97.0%
Applied egg-rr97.0%
*-commutative97.0%
associate-/r/97.0%
/-rgt-identity97.0%
+-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 96.9%
*-commutative96.9%
sub-neg96.9%
mul-1-neg96.9%
log-rec96.9%
remove-double-neg96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in y around 0 80.6%
unpow280.6%
associate-*r/81.5%
Simplified81.5%
Final simplification90.2%
(FPCore (x y z)
:precision binary64
(if (<= x 20000000000000.0)
(-
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
x)
(+ (* x (+ (log x) -1.0)) (* (/ z x) (* z y)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 20000000000000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (log(x) + -1.0)) + ((z / x) * (z * y));
}
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 <= 20000000000000.0d0) then
tmp = ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
else
tmp = (x * (log(x) + (-1.0d0))) + ((z / x) * (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 20000000000000.0) {
tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
} else {
tmp = (x * (Math.log(x) + -1.0)) + ((z / x) * (z * y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 20000000000000.0: tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x else: tmp = (x * (math.log(x) + -1.0)) + ((z / x) * (z * y)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 20000000000000.0) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(z / x) * Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 20000000000000.0) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x; else tmp = (x * (log(x) + -1.0)) + ((z / x) * (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 20000000000000.0], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 20000000000000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z}{x} \cdot \left(z \cdot y\right)\\
\end{array}
\end{array}
if x < 2e13Initial 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 97.9%
neg-mul-197.9%
Simplified97.9%
if 2e13 < x Initial program 90.1%
Taylor expanded in z around inf 90.1%
associate-/l*96.4%
unpow296.4%
Simplified96.4%
div-inv96.4%
times-frac97.1%
+-commutative97.1%
Applied egg-rr97.1%
*-commutative97.1%
associate-/r/97.1%
/-rgt-identity97.1%
+-commutative97.1%
Simplified97.1%
Taylor expanded in x around inf 97.2%
*-commutative97.2%
sub-neg97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
metadata-eval97.2%
Simplified97.2%
Taylor expanded in y around inf 88.6%
*-commutative88.6%
Simplified88.6%
Final simplification93.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.52e-12) (not (<= z 1.25e-5))) (- (* (+ 0.0007936500793651 y) (/ (* z z) x)) x) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.52e-12) || !(z <= 1.25e-5)) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.52d-12)) .or. (.not. (z <= 1.25d-5))) then
tmp = ((0.0007936500793651d0 + y) * ((z * z) / x)) - x
else
tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.52e-12) || !(z <= 1.25e-5)) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.52e-12) or not (z <= 1.25e-5): tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.52e-12) || !(z <= 1.25e-5)) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(Float64(z * z) / x)) - x); else tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.52e-12) || ~((z <= 1.25e-5))) tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x; else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.52e-12], N[Not[LessEqual[z, 1.25e-5]], $MachinePrecision]], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{-12} \lor \neg \left(z \leq 1.25 \cdot 10^{-5}\right):\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -1.52e-12 or 1.25000000000000006e-5 < z Initial program 91.4%
add-sqr-sqrt91.3%
pow291.3%
sub-neg91.3%
metadata-eval91.3%
Applied egg-rr91.3%
Taylor expanded in x around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in z around inf 74.6%
associate-/l*76.5%
+-commutative76.5%
associate-/r/76.5%
unpow276.5%
+-commutative76.5%
Simplified76.5%
if -1.52e-12 < z < 1.25000000000000006e-5Initial program 99.5%
Taylor expanded in z around 0 94.2%
Taylor expanded in x around inf 92.5%
mul-1-neg92.5%
distribute-lft-neg-in92.5%
log-rec92.5%
remove-double-neg92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x around 0 46.2%
associate-*r/46.2%
metadata-eval46.2%
+-commutative46.2%
Simplified46.2%
Final simplification62.2%
(FPCore (x y z)
:precision binary64
(if (<= z -4.2e-12)
(- (* (+ 0.0007936500793651 y) (/ (* z z) x)) x)
(if (<= z 1.3e-5)
(+ 0.91893853320467 (/ 0.083333333333333 x))
(- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e-12) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else if (z <= 1.3e-5) {
tmp = 0.91893853320467 + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4.2d-12)) then
tmp = ((0.0007936500793651d0 + y) * ((z * z) / x)) - x
else if (z <= 1.3d-5) then
tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
else
tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e-12) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else if (z <= 1.3e-5) {
tmp = 0.91893853320467 + (0.083333333333333 / x);
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.2e-12: tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x elif z <= 1.3e-5: tmp = 0.91893853320467 + (0.083333333333333 / x) else: tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.2e-12) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(Float64(z * z) / x)) - x); elseif (z <= 1.3e-5) tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x)); else tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.2e-12) tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x; elseif (z <= 1.3e-5) tmp = 0.91893853320467 + (0.083333333333333 / x); else tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.2e-12], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 1.3e-5], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-12}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-5}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\
\end{array}
\end{array}
if z < -4.19999999999999988e-12Initial program 90.1%
add-sqr-sqrt90.0%
pow290.0%
sub-neg90.0%
metadata-eval90.0%
Applied egg-rr90.0%
Taylor expanded in x around inf 71.0%
neg-mul-171.0%
Simplified71.0%
Taylor expanded in z around inf 70.9%
associate-/l*72.1%
+-commutative72.1%
associate-/r/72.1%
unpow272.1%
+-commutative72.1%
Simplified72.1%
if -4.19999999999999988e-12 < z < 1.29999999999999992e-5Initial program 99.5%
Taylor expanded in z around 0 94.2%
Taylor expanded in x around inf 92.5%
mul-1-neg92.5%
distribute-lft-neg-in92.5%
log-rec92.5%
remove-double-neg92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x around 0 46.2%
associate-*r/46.2%
metadata-eval46.2%
+-commutative46.2%
Simplified46.2%
if 1.29999999999999992e-5 < z Initial program 92.6%
add-sqr-sqrt92.6%
pow292.6%
sub-neg92.6%
metadata-eval92.6%
Applied egg-rr92.6%
Taylor expanded in x around inf 78.2%
neg-mul-178.2%
Simplified78.2%
Taylor expanded in z around inf 78.2%
associate-/l*99.7%
unpow299.7%
Simplified80.9%
Final simplification62.2%
(FPCore (x y z)
:precision binary64
(if (<= z -4.2e+15)
(- (* (+ 0.0007936500793651 y) (/ (* z z) x)) x)
(if (<= z 6.6)
(- (/ (+ 0.083333333333333 (* z (* z y))) x) x)
(- (/ (* z z) (/ x (+ 0.0007936500793651 y))) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e+15) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else if (z <= 6.6) {
tmp = ((0.083333333333333 + (z * (z * y))) / x) - x;
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4.2d+15)) then
tmp = ((0.0007936500793651d0 + y) * ((z * z) / x)) - x
else if (z <= 6.6d0) then
tmp = ((0.083333333333333d0 + (z * (z * y))) / x) - x
else
tmp = ((z * z) / (x / (0.0007936500793651d0 + y))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e+15) {
tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x;
} else if (z <= 6.6) {
tmp = ((0.083333333333333 + (z * (z * y))) / x) - x;
} else {
tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.2e+15: tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x elif z <= 6.6: tmp = ((0.083333333333333 + (z * (z * y))) / x) - x else: tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.2e+15) tmp = Float64(Float64(Float64(0.0007936500793651 + y) * Float64(Float64(z * z) / x)) - x); elseif (z <= 6.6) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(z * y))) / x) - x); else tmp = Float64(Float64(Float64(z * z) / Float64(x / Float64(0.0007936500793651 + y))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.2e+15) tmp = ((0.0007936500793651 + y) * ((z * z) / x)) - x; elseif (z <= 6.6) tmp = ((0.083333333333333 + (z * (z * y))) / x) - x; else tmp = ((z * z) / (x / (0.0007936500793651 + y))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.2e+15], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 6.6], N[(N[(N[(0.083333333333333 + N[(z * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] / N[(x / N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+15}:\\
\;\;\;\;\left(0.0007936500793651 + y\right) \cdot \frac{z \cdot z}{x} - x\\
\mathbf{elif}\;z \leq 6.6:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} - x\\
\end{array}
\end{array}
if z < -4.2e15Initial program 89.0%
add-sqr-sqrt89.0%
pow289.0%
sub-neg89.0%
metadata-eval89.0%
Applied egg-rr89.0%
Taylor expanded in x around inf 72.6%
neg-mul-172.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
associate-/l*73.9%
+-commutative73.9%
associate-/r/73.9%
unpow273.9%
+-commutative73.9%
Simplified73.9%
if -4.2e15 < z < 6.5999999999999996Initial program 99.4%
add-sqr-sqrt99.3%
pow299.3%
sub-neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 49.4%
neg-mul-149.4%
Simplified49.4%
Taylor expanded in y around inf 49.0%
*-commutative49.0%
unpow249.0%
associate-*r*49.0%
Simplified49.0%
if 6.5999999999999996 < z Initial program 92.6%
add-sqr-sqrt92.6%
pow292.6%
sub-neg92.6%
metadata-eval92.6%
Applied egg-rr92.6%
Taylor expanded in x around inf 78.2%
neg-mul-178.2%
Simplified78.2%
Taylor expanded in z around inf 78.2%
associate-/l*99.7%
unpow299.7%
Simplified80.9%
Final simplification63.3%
(FPCore (x y z)
:precision binary64
(-
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
x))
double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - 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 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x) - x
end function
public static double code(double x, double y, double z) {
return ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x;
}
def code(x, y, z): return ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x
function code(x, y, z) return Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x) end
function tmp = code(x, y, z) tmp = ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) - x; end
code[x_, y_, z_] := N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} - x
\end{array}
Initial program 95.2%
add-sqr-sqrt95.1%
pow295.1%
sub-neg95.1%
metadata-eval95.1%
Applied egg-rr95.1%
Taylor expanded in x around inf 62.5%
neg-mul-162.5%
Simplified62.5%
Final simplification62.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.4e-12) (not (<= z 2.15e-5))) (- (/ y (/ x (* z z))) x) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.4e-12) || !(z <= 2.15e-5)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4.4d-12)) .or. (.not. (z <= 2.15d-5))) then
tmp = (y / (x / (z * z))) - x
else
tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4.4e-12) || !(z <= 2.15e-5)) {
tmp = (y / (x / (z * z))) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.4e-12) or not (z <= 2.15e-5): tmp = (y / (x / (z * z))) - x else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.4e-12) || !(z <= 2.15e-5)) tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x); else tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.4e-12) || ~((z <= 2.15e-5))) tmp = (y / (x / (z * z))) - x; else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.4e-12], N[Not[LessEqual[z, 2.15e-5]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-12} \lor \neg \left(z \leq 2.15 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.39999999999999983e-12 or 2.1500000000000001e-5 < z Initial program 91.4%
add-sqr-sqrt91.3%
pow291.3%
sub-neg91.3%
metadata-eval91.3%
Applied egg-rr91.3%
Taylor expanded in x around inf 74.6%
neg-mul-174.6%
Simplified74.6%
Taylor expanded in y around inf 50.1%
associate-/l*52.8%
unpow252.8%
Simplified52.8%
if -4.39999999999999983e-12 < z < 2.1500000000000001e-5Initial program 99.5%
Taylor expanded in z around 0 94.2%
Taylor expanded in x around inf 92.5%
mul-1-neg92.5%
distribute-lft-neg-in92.5%
log-rec92.5%
remove-double-neg92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in x around 0 46.2%
associate-*r/46.2%
metadata-eval46.2%
+-commutative46.2%
Simplified46.2%
Final simplification49.7%
(FPCore (x y z) :precision binary64 (if (<= z -4.8e+91) (- (* (/ z x) -0.0027777777777778) x) (+ 0.91893853320467 (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.8e+91) {
tmp = ((z / x) * -0.0027777777777778) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4.8d+91)) then
tmp = ((z / x) * (-0.0027777777777778d0)) - x
else
tmp = 0.91893853320467d0 + (0.083333333333333d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.8e+91) {
tmp = ((z / x) * -0.0027777777777778) - x;
} else {
tmp = 0.91893853320467 + (0.083333333333333 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.8e+91: tmp = ((z / x) * -0.0027777777777778) - x else: tmp = 0.91893853320467 + (0.083333333333333 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.8e+91) tmp = Float64(Float64(Float64(z / x) * -0.0027777777777778) - x); else tmp = Float64(0.91893853320467 + Float64(0.083333333333333 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.8e+91) tmp = ((z / x) * -0.0027777777777778) - x; else tmp = 0.91893853320467 + (0.083333333333333 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.8e+91], N[(N[(N[(z / x), $MachinePrecision] * -0.0027777777777778), $MachinePrecision] - x), $MachinePrecision], N[(0.91893853320467 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{z}{x} \cdot -0.0027777777777778 - x\\
\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.79999999999999966e91Initial program 85.2%
add-sqr-sqrt85.2%
pow285.2%
sub-neg85.2%
metadata-eval85.2%
Applied egg-rr85.2%
Taylor expanded in x around inf 78.5%
neg-mul-178.5%
Simplified78.5%
Taylor expanded in z around 0 35.6%
Taylor expanded in z around inf 35.6%
if -4.79999999999999966e91 < z Initial program 97.2%
Taylor expanded in z around 0 65.8%
Taylor expanded in x around inf 64.8%
mul-1-neg64.8%
distribute-lft-neg-in64.8%
log-rec64.8%
remove-double-neg64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x around 0 28.0%
associate-*r/28.0%
metadata-eval28.0%
+-commutative28.0%
Simplified28.0%
Final simplification29.3%
(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 95.2%
Taylor expanded in z around 0 57.2%
Taylor expanded in x around inf 56.4%
mul-1-neg56.4%
distribute-lft-neg-in56.4%
log-rec56.4%
remove-double-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in x around 0 23.9%
associate-*r/23.9%
metadata-eval23.9%
+-commutative23.9%
Simplified23.9%
Final simplification23.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 95.2%
add-sqr-sqrt95.1%
pow295.1%
sub-neg95.1%
metadata-eval95.1%
Applied egg-rr95.1%
Taylor expanded in x around inf 62.5%
neg-mul-162.5%
Simplified62.5%
Taylor expanded in z around 0 22.3%
Taylor expanded in x around 0 23.3%
Final simplification23.3%
(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 95.2%
add-sqr-sqrt95.1%
pow295.1%
sub-neg95.1%
metadata-eval95.1%
Applied egg-rr95.1%
Taylor expanded in x around inf 62.5%
neg-mul-162.5%
Simplified62.5%
Taylor expanded in z around 0 22.3%
Taylor expanded in x around inf 1.3%
neg-mul-11.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 2023240
(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)))