
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x 1e+16)
(+
(+ (* (log x) (+ x -0.5)) (- 0.91893853320467 x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (/ 1.0 x))
(+
(*
z
(+
(* z (+ (/ 0.0007936500793651 x) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* (log x) (- x 0.5)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (log(x) * (x - 0.5))))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1d+16) then
tmp = ((log(x) * (x + (-0.5d0))) + (0.91893853320467d0 - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 * (1.0d0 / x)) + ((z * ((z * ((0.0007936500793651d0 / x) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (log(x) * (x - 0.5d0))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((Math.log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (Math.log(x) * (x - 0.5))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+16: tmp = ((math.log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (math.log(x) * (x - 0.5))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+16) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 / x) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(log(x) * Float64(x - 0.5))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+16) tmp = ((log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 / x) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (log(x) * (x - 0.5))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+16], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 / x), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+16}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(z \cdot \left(z \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1e16Initial program 99.7%
flip--99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.7%
fma-neg99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
associate-+l-99.7%
un-div-inv99.7%
metadata-eval99.7%
metadata-eval99.7%
fma-neg99.7%
flip--99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1e16 < x Initial program 83.1%
sub-neg83.1%
associate-+l+83.1%
fma-define83.2%
sub-neg83.2%
metadata-eval83.2%
+-commutative83.2%
unsub-neg83.2%
*-commutative83.2%
fma-define83.2%
fma-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in z around 0 99.4%
Taylor expanded in y around 0 95.6%
associate-*r/95.6%
associate-*l/95.6%
associate-*l/99.5%
distribute-rgt-in99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 2700.0)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(if (<= x 4.5e+243)
(+
(+ 0.91893853320467 t_0)
(/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x))
t_0))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 2700.0) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else if (x <= 4.5e+243) {
tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_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) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 2700.0d0) then
tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
else if (x <= 4.5d+243) then
tmp = (0.91893853320467d0 + t_0) + ((0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x)
else
tmp = t_0
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 <= 2700.0) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else if (x <= 4.5e+243) {
tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 2700.0: tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x elif x <= 4.5e+243: tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 2700.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x); elseif (x <= 4.5e+243) tmp = Float64(Float64(0.91893853320467 + t_0) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 2700.0) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; elseif (x <= 4.5e+243) tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x); else tmp = t_0; 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, 2700.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 4.5e+243], N[(N[(0.91893853320467 + t$95$0), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 2700:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+243}:\\
\;\;\;\;\left(0.91893853320467 + t\_0\right) + \frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 2700Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 98.8%
if 2700 < x < 4.5e243Initial program 89.5%
flip--59.1%
metadata-eval59.1%
metadata-eval59.1%
div-inv59.1%
fma-neg59.1%
metadata-eval59.1%
metadata-eval59.1%
Applied egg-rr59.1%
Taylor expanded in x around inf 87.3%
sub-neg87.3%
mul-1-neg87.3%
log-rec87.3%
remove-double-neg87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in y around inf 79.3%
*-commutative79.3%
Simplified79.3%
if 4.5e243 < x Initial program 66.4%
sub-neg66.4%
associate-+l+66.4%
fma-define66.4%
sub-neg66.4%
metadata-eval66.4%
+-commutative66.4%
unsub-neg66.4%
*-commutative66.4%
fma-define66.4%
fma-neg66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in x around inf 92.7%
sub-neg92.7%
mul-1-neg92.7%
log-rec92.7%
remove-double-neg92.7%
metadata-eval92.7%
Simplified92.7%
Final simplification91.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 4.3e+35)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(if (<= x 5.1e+238)
(+
(+ 0.91893853320467 t_0)
(/
(+
0.083333333333333
(* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x))
t_0))))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 4.3e+35) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else if (x <= 5.1e+238) {
tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = t_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) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 4.3d+35) then
tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
else if (x <= 5.1d+238) then
tmp = (0.91893853320467d0 + t_0) + ((0.083333333333333d0 + (z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0))) / x)
else
tmp = t_0
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 <= 4.3e+35) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else if (x <= 5.1e+238) {
tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 4.3e+35: tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x elif x <= 5.1e+238: tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 4.3e+35) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x); elseif (x <= 5.1e+238) tmp = Float64(Float64(0.91893853320467 + t_0) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778))) / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 4.3e+35) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; elseif (x <= 5.1e+238) tmp = (0.91893853320467 + t_0) + ((0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x); else tmp = t_0; 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, 4.3e+35], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 5.1e+238], N[(N[(0.91893853320467 + t$95$0), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 4.3 \cdot 10^{+35}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{+238}:\\
\;\;\;\;\left(0.91893853320467 + t\_0\right) + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 4.2999999999999998e35Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
unsub-neg99.1%
*-commutative99.1%
fma-define99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 93.9%
if 4.2999999999999998e35 < x < 5.1000000000000002e238Initial program 89.7%
flip--55.0%
metadata-eval55.0%
metadata-eval55.0%
div-inv55.0%
fma-neg55.0%
metadata-eval55.0%
metadata-eval55.0%
Applied egg-rr55.0%
Taylor expanded in x around inf 89.8%
sub-neg89.8%
mul-1-neg89.8%
log-rec89.8%
remove-double-neg89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in y around 0 83.0%
if 5.1000000000000002e238 < x Initial program 66.6%
sub-neg66.6%
associate-+l+66.6%
fma-define66.6%
sub-neg66.6%
metadata-eval66.6%
+-commutative66.6%
unsub-neg66.6%
*-commutative66.6%
fma-define66.6%
fma-neg66.6%
metadata-eval66.6%
Simplified66.6%
Taylor expanded in x around inf 87.7%
sub-neg87.7%
mul-1-neg87.7%
log-rec87.7%
remove-double-neg87.7%
metadata-eval87.7%
Simplified87.7%
Final simplification89.9%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+15)
(+
(+ (* (log x) (+ x -0.5)) (- 0.91893853320467 x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+15) {
tmp = ((log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5d+15) then
tmp = ((log(x) * (x + (-0.5d0))) + (0.91893853320467d0 - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+15) {
tmp = ((Math.log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+15: tmp = ((math.log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+15) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.91893853320467 - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+15) tmp = ((log(x) * (x + -0.5)) + (0.91893853320467 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+15], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 5e15Initial program 99.7%
flip--99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.7%
fma-neg99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
associate-+l-99.7%
un-div-inv99.7%
metadata-eval99.7%
metadata-eval99.7%
fma-neg99.7%
flip--99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 5e15 < x Initial program 83.1%
sub-neg83.1%
associate-+l+83.1%
fma-define83.2%
sub-neg83.2%
metadata-eval83.2%
+-commutative83.2%
unsub-neg83.2%
*-commutative83.2%
fma-define83.2%
fma-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in z around 0 99.4%
Taylor expanded in z around inf 88.6%
*-commutative88.6%
associate-*r/88.6%
metadata-eval88.6%
unpow288.6%
associate-*r*99.5%
*-commutative99.5%
distribute-rgt-in99.5%
associate-*l/99.4%
associate-*r/99.4%
associate-*l/95.6%
associate-/l*99.4%
distribute-rgt-out99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around inf 99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
log-rec99.4%
remove-double-neg99.4%
Simplified99.4%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+15)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+15) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 5d+15) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+15) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+15: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+15) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+15) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+15], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 5e15Initial program 99.7%
if 5e15 < x Initial program 83.1%
sub-neg83.1%
associate-+l+83.1%
fma-define83.2%
sub-neg83.2%
metadata-eval83.2%
+-commutative83.2%
unsub-neg83.2%
*-commutative83.2%
fma-define83.2%
fma-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in z around 0 99.4%
Taylor expanded in z around inf 88.6%
*-commutative88.6%
associate-*r/88.6%
metadata-eval88.6%
unpow288.6%
associate-*r*99.5%
*-commutative99.5%
distribute-rgt-in99.5%
associate-*l/99.4%
associate-*r/99.4%
associate-*l/95.6%
associate-/l*99.4%
distribute-rgt-out99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around inf 99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
log-rec99.4%
remove-double-neg99.4%
Simplified99.4%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1e+16)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (* x (+ (log x) -1.0))))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* z (* (/ z x) (+ y 0.0007936500793651))) (* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 1d+16) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((z / x) * (y + 0.0007936500793651d0))) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1e+16) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1e+16: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (math.log(x) + -1.0))) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * math.log(x))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1e+16) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(z / x) * Float64(y + 0.0007936500793651))) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1e+16) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (log(x) + -1.0))); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((z / x) * (y + 0.0007936500793651))) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1e+16], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+16}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1e16Initial program 99.7%
flip--99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.7%
fma-neg99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 97.2%
sub-neg97.2%
mul-1-neg97.2%
log-rec97.2%
remove-double-neg97.2%
metadata-eval97.2%
Simplified97.2%
if 1e16 < x Initial program 83.1%
sub-neg83.1%
associate-+l+83.1%
fma-define83.2%
sub-neg83.2%
metadata-eval83.2%
+-commutative83.2%
unsub-neg83.2%
*-commutative83.2%
fma-define83.2%
fma-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in z around 0 99.4%
Taylor expanded in z around inf 88.6%
*-commutative88.6%
associate-*r/88.6%
metadata-eval88.6%
unpow288.6%
associate-*r*99.5%
*-commutative99.5%
distribute-rgt-in99.5%
associate-*l/99.4%
associate-*r/99.4%
associate-*l/95.6%
associate-/l*99.4%
distribute-rgt-out99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around inf 99.4%
mul-1-neg99.4%
distribute-rgt-neg-in99.4%
log-rec99.4%
remove-double-neg99.4%
Simplified99.4%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (<= x 1.04e+170)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 (* x (+ (log x) -1.0))))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* (log x) (- x 0.5)) (* z (* z (/ 0.0007936500793651 x))))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.04e+170) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (log(x) + -1.0)));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * (z * (0.0007936500793651 / 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 (x <= 1.04d+170) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + (x * (log(x) + (-1.0d0))))
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((log(x) * (x - 0.5d0)) + (z * (z * (0.0007936500793651d0 / x)))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.04e+170) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (Math.log(x) + -1.0)));
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((Math.log(x) * (x - 0.5)) + (z * (z * (0.0007936500793651 / x)))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.04e+170: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (math.log(x) + -1.0))) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((math.log(x) * (x - 0.5)) + (z * (z * (0.0007936500793651 / x)))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.04e+170) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(z * Float64(0.0007936500793651 / x)))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.04e+170) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + (x * (log(x) + -1.0))); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * (z * (0.0007936500793651 / x)))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.04e+170], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.04 \cdot 10^{+170}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1.04e170Initial program 98.2%
flip--94.7%
metadata-eval94.7%
metadata-eval94.7%
div-inv94.7%
fma-neg94.7%
metadata-eval94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Taylor expanded in x around inf 96.4%
sub-neg96.4%
mul-1-neg96.4%
log-rec96.4%
remove-double-neg96.4%
metadata-eval96.4%
Simplified96.4%
if 1.04e170 < x Initial program 74.0%
sub-neg74.0%
associate-+l+74.0%
fma-define74.0%
sub-neg74.0%
metadata-eval74.0%
+-commutative74.0%
unsub-neg74.0%
*-commutative74.0%
fma-define74.0%
fma-neg74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in z around 0 99.5%
Taylor expanded in z around inf 81.1%
*-commutative81.1%
associate-*r/81.1%
metadata-eval81.1%
unpow281.1%
associate-*r*99.5%
*-commutative99.5%
distribute-rgt-in99.5%
associate-*l/99.5%
associate-*r/99.5%
associate-*l/93.8%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around 0 87.1%
*-commutative87.1%
associate-*l/87.1%
associate-/l*87.1%
Simplified87.1%
Final simplification94.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ (log x) -1.0))))
(if (<= x 4.4e+243)
(+
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+ 0.91893853320467 t_0))
t_0)))
double code(double x, double y, double z) {
double t_0 = x * (log(x) + -1.0);
double tmp;
if (x <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + t_0);
} else {
tmp = t_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) :: tmp
t_0 = x * (log(x) + (-1.0d0))
if (x <= 4.4d+243) then
tmp = ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x) + (0.91893853320467d0 + t_0)
else
tmp = t_0
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 <= 4.4e+243) {
tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + t_0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x * (math.log(x) + -1.0) tmp = 0 if x <= 4.4e+243: tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + t_0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(log(x) + -1.0)) tmp = 0.0 if (x <= 4.4e+243) tmp = Float64(Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) + Float64(0.91893853320467 + t_0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (log(x) + -1.0); tmp = 0.0; if (x <= 4.4e+243) tmp = ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) + (0.91893853320467 + t_0); else tmp = t_0; 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, 4.4e+243], N[(N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + t$95$0), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;x \leq 4.4 \cdot 10^{+243}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 4.40000000000000018e243Initial program 95.5%
flip--83.0%
metadata-eval83.0%
metadata-eval83.0%
div-inv83.0%
fma-neg83.0%
metadata-eval83.0%
metadata-eval83.0%
Applied egg-rr83.0%
Taylor expanded in x around inf 94.0%
sub-neg94.0%
mul-1-neg94.0%
log-rec94.0%
remove-double-neg94.0%
metadata-eval94.0%
Simplified94.0%
if 4.40000000000000018e243 < x Initial program 66.4%
sub-neg66.4%
associate-+l+66.4%
fma-define66.4%
sub-neg66.4%
metadata-eval66.4%
+-commutative66.4%
unsub-neg66.4%
*-commutative66.4%
fma-define66.4%
fma-neg66.4%
metadata-eval66.4%
Simplified66.4%
Taylor expanded in x around inf 92.7%
sub-neg92.7%
mul-1-neg92.7%
log-rec92.7%
remove-double-neg92.7%
metadata-eval92.7%
Simplified92.7%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= x 400.0)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(-
(+ 0.91893853320467 (+ (* (log x) (+ x -0.5)) (/ 0.083333333333333 x)))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 400.0) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = (0.91893853320467 + ((log(x) * (x + -0.5)) + (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) :: tmp
if (x <= 400.0d0) then
tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
else
tmp = (0.91893853320467d0 + ((log(x) * (x + (-0.5d0))) + (0.083333333333333d0 / x))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 400.0) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = (0.91893853320467 + ((Math.log(x) * (x + -0.5)) + (0.083333333333333 / x))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 400.0: tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x else: tmp = (0.91893853320467 + ((math.log(x) * (x + -0.5)) + (0.083333333333333 / x))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 400.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.083333333333333 / x))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 400.0) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; else tmp = (0.91893853320467 + ((log(x) * (x + -0.5)) + (0.083333333333333 / x))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 400.0], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 400:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) + \frac{0.083333333333333}{x}\right)\right) - x\\
\end{array}
\end{array}
if x < 400Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 98.8%
if 400 < x Initial program 83.9%
sub-neg83.9%
associate-+l+83.9%
fma-define84.0%
sub-neg84.0%
metadata-eval84.0%
+-commutative84.0%
unsub-neg84.0%
*-commutative84.0%
fma-define84.0%
fma-neg84.0%
metadata-eval84.0%
Simplified84.0%
Taylor expanded in z around 0 72.1%
associate-*r/72.1%
metadata-eval72.1%
sub-neg72.1%
metadata-eval72.1%
+-commutative72.1%
Simplified72.1%
Final simplification86.0%
(FPCore (x y z)
:precision binary64
(if (<= x 9e+35)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 9e+35) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = x * (log(x) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 9d+35) then
tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 9e+35) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 9e+35: tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 9e+35) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 9e+35) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 9e+35], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{+35}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 8.9999999999999993e35Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
unsub-neg99.1%
*-commutative99.1%
fma-define99.1%
fma-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 93.9%
if 8.9999999999999993e35 < x Initial program 82.7%
sub-neg82.7%
associate-+l+82.7%
fma-define82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
unsub-neg82.8%
*-commutative82.8%
fma-define82.8%
fma-neg82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in x around inf 74.9%
sub-neg74.9%
mul-1-neg74.9%
log-rec74.9%
remove-double-neg74.9%
metadata-eval74.9%
Simplified74.9%
Final simplification85.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (/ y x) (* z z))))
(if (<= z -0.00012)
t_0
(if (<= z 14500000.0)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
(if (<= z 2.9e+125) t_0 (* (/ 0.0007936500793651 x) (* z z)))))))
double code(double x, double y, double z) {
double t_0 = (y / x) * (z * z);
double tmp;
if (z <= -0.00012) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else if (z <= 2.9e+125) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (y / x) * (z * z)
if (z <= (-0.00012d0)) then
tmp = t_0
else if (z <= 14500000.0d0) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else if (z <= 2.9d+125) then
tmp = t_0
else
tmp = (0.0007936500793651d0 / x) * (z * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y / x) * (z * z);
double tmp;
if (z <= -0.00012) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else if (z <= 2.9e+125) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * z);
}
return tmp;
}
def code(x, y, z): t_0 = (y / x) * (z * z) tmp = 0 if z <= -0.00012: tmp = t_0 elif z <= 14500000.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x elif z <= 2.9e+125: tmp = t_0 else: tmp = (0.0007936500793651 / x) * (z * z) return tmp
function code(x, y, z) t_0 = Float64(Float64(y / x) * Float64(z * z)) tmp = 0.0 if (z <= -0.00012) tmp = t_0; elseif (z <= 14500000.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); elseif (z <= 2.9e+125) tmp = t_0; else tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y / x) * (z * z); tmp = 0.0; if (z <= -0.00012) tmp = t_0; elseif (z <= 14500000.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; elseif (z <= 2.9e+125) tmp = t_0; else tmp = (0.0007936500793651 / x) * (z * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00012], t$95$0, If[LessEqual[z, 14500000.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 2.9e+125], t$95$0, N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -0.00012:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
\end{array}
\end{array}
if z < -1.20000000000000003e-4 or 1.45e7 < z < 2.89999999999999993e125Initial program 85.6%
sub-neg85.6%
associate-+l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
unsub-neg85.6%
*-commutative85.6%
fma-define85.6%
fma-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in z around inf 72.5%
unpow272.5%
Applied egg-rr72.5%
Taylor expanded in y around inf 54.4%
if -1.20000000000000003e-4 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 50.5%
Taylor expanded in z around 0 43.4%
*-commutative43.4%
Simplified43.4%
if 2.89999999999999993e125 < z Initial program 85.9%
sub-neg85.9%
associate-+l+85.9%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
+-commutative86.0%
unsub-neg86.0%
*-commutative86.0%
fma-define86.0%
fma-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around inf 83.7%
unpow283.7%
Applied egg-rr83.7%
Taylor expanded in y around 0 67.5%
Final simplification51.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (/ y x) (* z z))))
(if (<= z -1.1e-93)
t_0
(if (<= z 14500000.0)
(/ 0.083333333333333 x)
(if (<= z 7e+127) t_0 (* (/ 0.0007936500793651 x) (* z z)))))))
double code(double x, double y, double z) {
double t_0 = (y / x) * (z * z);
double tmp;
if (z <= -1.1e-93) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else if (z <= 7e+127) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (y / x) * (z * z)
if (z <= (-1.1d-93)) then
tmp = t_0
else if (z <= 14500000.0d0) then
tmp = 0.083333333333333d0 / x
else if (z <= 7d+127) then
tmp = t_0
else
tmp = (0.0007936500793651d0 / x) * (z * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y / x) * (z * z);
double tmp;
if (z <= -1.1e-93) {
tmp = t_0;
} else if (z <= 14500000.0) {
tmp = 0.083333333333333 / x;
} else if (z <= 7e+127) {
tmp = t_0;
} else {
tmp = (0.0007936500793651 / x) * (z * z);
}
return tmp;
}
def code(x, y, z): t_0 = (y / x) * (z * z) tmp = 0 if z <= -1.1e-93: tmp = t_0 elif z <= 14500000.0: tmp = 0.083333333333333 / x elif z <= 7e+127: tmp = t_0 else: tmp = (0.0007936500793651 / x) * (z * z) return tmp
function code(x, y, z) t_0 = Float64(Float64(y / x) * Float64(z * z)) tmp = 0.0 if (z <= -1.1e-93) tmp = t_0; elseif (z <= 14500000.0) tmp = Float64(0.083333333333333 / x); elseif (z <= 7e+127) tmp = t_0; else tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y / x) * (z * z); tmp = 0.0; if (z <= -1.1e-93) tmp = t_0; elseif (z <= 14500000.0) tmp = 0.083333333333333 / x; elseif (z <= 7e+127) tmp = t_0; else tmp = (0.0007936500793651 / x) * (z * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-93], t$95$0, If[LessEqual[z, 14500000.0], N[(0.083333333333333 / x), $MachinePrecision], If[LessEqual[z, 7e+127], t$95$0, N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
\end{array}
\end{array}
if z < -1.09999999999999998e-93 or 1.45e7 < z < 6.99999999999999956e127Initial program 87.2%
sub-neg87.2%
associate-+l+87.2%
fma-define87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
unsub-neg87.2%
*-commutative87.2%
fma-define87.2%
fma-neg87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in z around inf 66.8%
unpow266.8%
Applied egg-rr66.8%
Taylor expanded in y around inf 50.5%
if -1.09999999999999998e-93 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
unsub-neg99.4%
*-commutative99.4%
fma-define99.4%
fma-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 50.4%
Taylor expanded in z around 0 45.4%
*-commutative45.4%
Simplified45.4%
Taylor expanded in z around 0 45.0%
if 6.99999999999999956e127 < z Initial program 85.9%
sub-neg85.9%
associate-+l+85.9%
fma-define86.0%
sub-neg86.0%
metadata-eval86.0%
+-commutative86.0%
unsub-neg86.0%
*-commutative86.0%
fma-define86.0%
fma-neg86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around inf 83.7%
unpow283.7%
Applied egg-rr83.7%
Taylor expanded in y around 0 67.5%
Final simplification50.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -900000000000.0) (not (<= z 9.2e+57))) (* (* z z) (/ (+ y 0.0007936500793651) x)) (/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -900000000000.0) || !(z <= 9.2e+57)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (0.083333333333333 + (z * ((y * 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 ((z <= (-900000000000.0d0)) .or. (.not. (z <= 9.2d+57))) then
tmp = (z * z) * ((y + 0.0007936500793651d0) / x)
else
tmp = (0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -900000000000.0) || !(z <= 9.2e+57)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -900000000000.0) or not (z <= 9.2e+57): tmp = (z * z) * ((y + 0.0007936500793651) / x) else: tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -900000000000.0) || !(z <= 9.2e+57)) tmp = Float64(Float64(z * z) * Float64(Float64(y + 0.0007936500793651) / x)); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -900000000000.0) || ~((z <= 9.2e+57))) tmp = (z * z) * ((y + 0.0007936500793651) / x); else tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -900000000000.0], N[Not[LessEqual[z, 9.2e+57]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -900000000000 \lor \neg \left(z \leq 9.2 \cdot 10^{+57}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if z < -9e11 or 9.1999999999999995e57 < z Initial program 84.6%
sub-neg84.6%
associate-+l+84.6%
fma-define84.6%
sub-neg84.6%
metadata-eval84.6%
+-commutative84.6%
unsub-neg84.6%
*-commutative84.6%
fma-define84.6%
fma-neg84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in z around inf 75.4%
unpow275.4%
Applied egg-rr75.4%
Taylor expanded in x around 0 75.4%
if -9e11 < z < 9.1999999999999995e57Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 52.8%
Taylor expanded in y around inf 52.0%
*-commutative52.0%
Simplified52.0%
Final simplification63.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -0.00014) (not (<= z 14500000.0)))
(* (* z z) (/ (+ y 0.0007936500793651) x))
(/
(+ 0.083333333333333 (* z (- (* 0.0007936500793651 z) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.00014) || !(z <= 14500000.0)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (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 ((z <= (-0.00014d0)) .or. (.not. (z <= 14500000.0d0))) then
tmp = (z * z) * ((y + 0.0007936500793651d0) / x)
else
tmp = (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 ((z <= -0.00014) || !(z <= 14500000.0)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.00014) or not (z <= 14500000.0): tmp = (z * z) * ((y + 0.0007936500793651) / x) else: tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.00014) || !(z <= 14500000.0)) tmp = Float64(Float64(z * z) * Float64(Float64(y + 0.0007936500793651) / x)); else tmp = 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 ((z <= -0.00014) || ~((z <= 14500000.0))) tmp = (z * z) * ((y + 0.0007936500793651) / x); else tmp = (0.083333333333333 + (z * ((0.0007936500793651 * z) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.00014], N[Not[LessEqual[z, 14500000.0]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00014 \lor \neg \left(z \leq 14500000\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if z < -1.3999999999999999e-4 or 1.45e7 < z Initial program 85.7%
sub-neg85.7%
associate-+l+85.7%
fma-define85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
unsub-neg85.7%
*-commutative85.7%
fma-define85.7%
fma-neg85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in z around inf 75.8%
unpow275.8%
Applied egg-rr75.8%
Taylor expanded in x around 0 75.8%
if -1.3999999999999999e-4 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 50.5%
Taylor expanded in y around 0 44.2%
*-commutative44.2%
Simplified44.2%
Final simplification61.0%
(FPCore (x y z)
:precision binary64
(if (<= z -900000000000.0)
(* (* z z) (+ (/ y x) (* 0.0007936500793651 (/ 1.0 x))))
(if (<= z 9.2e+57)
(/ (+ 0.083333333333333 (* z (- (* y z) 0.0027777777777778))) x)
(* (* z z) (/ (+ y 0.0007936500793651) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -900000000000.0) {
tmp = (z * z) * ((y / x) + (0.0007936500793651 * (1.0 / x)));
} else if (z <= 9.2e+57) {
tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x;
} else {
tmp = (z * z) * ((y + 0.0007936500793651) / 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 <= (-900000000000.0d0)) then
tmp = (z * z) * ((y / x) + (0.0007936500793651d0 * (1.0d0 / x)))
else if (z <= 9.2d+57) then
tmp = (0.083333333333333d0 + (z * ((y * z) - 0.0027777777777778d0))) / x
else
tmp = (z * z) * ((y + 0.0007936500793651d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -900000000000.0) {
tmp = (z * z) * ((y / x) + (0.0007936500793651 * (1.0 / x)));
} else if (z <= 9.2e+57) {
tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x;
} else {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -900000000000.0: tmp = (z * z) * ((y / x) + (0.0007936500793651 * (1.0 / x))) elif z <= 9.2e+57: tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x else: tmp = (z * z) * ((y + 0.0007936500793651) / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -900000000000.0) tmp = Float64(Float64(z * z) * Float64(Float64(y / x) + Float64(0.0007936500793651 * Float64(1.0 / x)))); elseif (z <= 9.2e+57) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(y * z) - 0.0027777777777778))) / x); else tmp = Float64(Float64(z * z) * Float64(Float64(y + 0.0007936500793651) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -900000000000.0) tmp = (z * z) * ((y / x) + (0.0007936500793651 * (1.0 / x))); elseif (z <= 9.2e+57) tmp = (0.083333333333333 + (z * ((y * z) - 0.0027777777777778))) / x; else tmp = (z * z) * ((y + 0.0007936500793651) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -900000000000.0], N[(N[(z * z), $MachinePrecision] * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+57], N[(N[(0.083333333333333 + N[(z * N[(N[(y * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -900000000000:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+57}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\
\end{array}
\end{array}
if z < -9e11Initial program 85.6%
sub-neg85.6%
associate-+l+85.6%
fma-define85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
unsub-neg85.6%
*-commutative85.6%
fma-define85.6%
fma-neg85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in z around inf 73.0%
unpow273.0%
Applied egg-rr73.0%
if -9e11 < z < 9.1999999999999995e57Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 52.8%
Taylor expanded in y around inf 52.0%
*-commutative52.0%
Simplified52.0%
if 9.1999999999999995e57 < z Initial program 83.4%
sub-neg83.4%
associate-+l+83.4%
fma-define83.5%
sub-neg83.5%
metadata-eval83.5%
+-commutative83.5%
unsub-neg83.5%
*-commutative83.5%
fma-define83.5%
fma-neg83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in z around inf 78.3%
unpow278.3%
Applied egg-rr78.3%
Taylor expanded in x around 0 78.4%
Final simplification63.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -8.8e-5) (not (<= z 14500000.0))) (* (* z z) (/ (+ y 0.0007936500793651) x)) (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -8.8e-5) || !(z <= 14500000.0)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (0.083333333333333 + (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 ((z <= (-8.8d-5)) .or. (.not. (z <= 14500000.0d0))) then
tmp = (z * z) * ((y + 0.0007936500793651d0) / x)
else
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -8.8e-5) || !(z <= 14500000.0)) {
tmp = (z * z) * ((y + 0.0007936500793651) / x);
} else {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -8.8e-5) or not (z <= 14500000.0): tmp = (z * z) * ((y + 0.0007936500793651) / x) else: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -8.8e-5) || !(z <= 14500000.0)) tmp = Float64(Float64(z * z) * Float64(Float64(y + 0.0007936500793651) / x)); else tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -8.8e-5) || ~((z <= 14500000.0))) tmp = (z * z) * ((y + 0.0007936500793651) / x); else tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -8.8e-5], N[Not[LessEqual[z, 14500000.0]], $MachinePrecision]], N[(N[(z * z), $MachinePrecision] * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-5} \lor \neg \left(z \leq 14500000\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\end{array}
\end{array}
if z < -8.7999999999999998e-5 or 1.45e7 < z Initial program 85.7%
sub-neg85.7%
associate-+l+85.7%
fma-define85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
unsub-neg85.7%
*-commutative85.7%
fma-define85.7%
fma-neg85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in z around inf 75.8%
unpow275.8%
Applied egg-rr75.8%
Taylor expanded in x around 0 75.8%
if -8.7999999999999998e-5 < z < 1.45e7Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 50.5%
Taylor expanded in z around 0 43.4%
*-commutative43.4%
Simplified43.4%
Final simplification60.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -3600000000.0) (not (<= z 10.2))) (* (/ 0.0007936500793651 x) (* z z)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 10.2)) {
tmp = (0.0007936500793651 / x) * (z * z);
} else {
tmp = 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 <= (-3600000000.0d0)) .or. (.not. (z <= 10.2d0))) then
tmp = (0.0007936500793651d0 / x) * (z * z)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 10.2)) {
tmp = (0.0007936500793651 / x) * (z * z);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3600000000.0) or not (z <= 10.2): tmp = (0.0007936500793651 / x) * (z * z) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3600000000.0) || !(z <= 10.2)) tmp = Float64(Float64(0.0007936500793651 / x) * Float64(z * z)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3600000000.0) || ~((z <= 10.2))) tmp = (0.0007936500793651 / x) * (z * z); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3600000000.0], N[Not[LessEqual[z, 10.2]], $MachinePrecision]], N[(N[(0.0007936500793651 / x), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000 \lor \neg \left(z \leq 10.2\right):\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.6e9 or 10.199999999999999 < z Initial program 85.5%
sub-neg85.5%
associate-+l+85.5%
fma-define85.5%
sub-neg85.5%
metadata-eval85.5%
+-commutative85.5%
unsub-neg85.5%
*-commutative85.5%
fma-define85.5%
fma-neg85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in z around inf 74.7%
unpow274.7%
Applied egg-rr74.7%
Taylor expanded in y around 0 48.0%
if -3.6e9 < z < 10.199999999999999Initial program 99.4%
sub-neg99.4%
associate-+l+99.4%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
unsub-neg99.5%
*-commutative99.5%
fma-define99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 52.1%
Taylor expanded in z around 0 42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in z around 0 41.5%
Final simplification44.9%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / 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 * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.2%
sub-neg92.2%
metadata-eval92.2%
+-commutative92.2%
unsub-neg92.2%
*-commutative92.2%
fma-define92.2%
fma-neg92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in x around 0 62.9%
Final simplification62.9%
(FPCore (x y z) :precision binary64 (if (<= z -3600000000.0) (* (/ z x) -0.0027777777777778) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -3600000000.0) {
tmp = (z / x) * -0.0027777777777778;
} else {
tmp = 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 <= (-3600000000.0d0)) then
tmp = (z / x) * (-0.0027777777777778d0)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3600000000.0) {
tmp = (z / x) * -0.0027777777777778;
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3600000000.0: tmp = (z / x) * -0.0027777777777778 else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3600000000.0) tmp = Float64(Float64(z / x) * -0.0027777777777778); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3600000000.0) tmp = (z / x) * -0.0027777777777778; else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3600000000.0], N[(N[(z / x), $MachinePrecision] * -0.0027777777777778), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000:\\
\;\;\;\;\frac{z}{x} \cdot -0.0027777777777778\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -3.6e9Initial program 85.8%
sub-neg85.8%
associate-+l+85.8%
fma-define85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
unsub-neg85.8%
*-commutative85.8%
fma-define85.8%
fma-neg85.8%
metadata-eval85.8%
Simplified85.8%
Taylor expanded in x around 0 72.2%
Taylor expanded in z around 0 18.9%
*-commutative18.9%
Simplified18.9%
Taylor expanded in z around inf 18.9%
if -3.6e9 < z Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
fma-define94.6%
sub-neg94.6%
metadata-eval94.6%
+-commutative94.6%
unsub-neg94.6%
*-commutative94.6%
fma-define94.6%
fma-neg94.6%
metadata-eval94.6%
Simplified94.6%
Taylor expanded in x around 0 59.4%
Taylor expanded in z around 0 31.0%
*-commutative31.0%
Simplified31.0%
Taylor expanded in z around 0 28.4%
Final simplification25.8%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 92.1%
sub-neg92.1%
associate-+l+92.1%
fma-define92.2%
sub-neg92.2%
metadata-eval92.2%
+-commutative92.2%
unsub-neg92.2%
*-commutative92.2%
fma-define92.2%
fma-neg92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in x around 0 62.9%
Taylor expanded in z around 0 27.7%
*-commutative27.7%
Simplified27.7%
Taylor expanded in z around 0 21.5%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2024137
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))