
(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 21 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 5e-40)
(*
(fma
z
(* z (- (+ 0.0007936500793651 y) (/ 0.0027777777777778 z)))
0.083333333333333)
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (pow (sqrt x) -2.0))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 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 <= 5e-40) {
tmp = fma(z, (z * ((0.0007936500793651 + y) - (0.0027777777777778 / z))), 0.083333333333333) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * pow(sqrt(x), -2.0)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (log(x) * (x - 0.5))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 5e-40) tmp = Float64(fma(z, Float64(z * Float64(Float64(0.0007936500793651 + y) - Float64(0.0027777777777778 / z))), 0.083333333333333) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * (sqrt(x) ^ -2.0)) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(log(x) * Float64(x - 0.5))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 5e-40], N[(N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[Power[N[Sqrt[x], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $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 5 \cdot 10^{-40}:\\
\;\;\;\;\mathsf{fma}\left(z, z \cdot \left(\left(0.0007936500793651 + y\right) - \frac{0.0027777777777778}{z}\right), 0.083333333333333\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(0.083333333333333 \cdot {\left(\sqrt{x}\right)}^{-2} + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{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 < 4.99999999999999965e-40Initial program 99.7%
associate-+l+99.7%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
div-inv99.8%
+-commutative99.8%
fma-define99.8%
fmm-def99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
if 4.99999999999999965e-40 < x Initial program 87.2%
associate-+l+87.2%
fmm-def87.3%
sub-neg87.3%
metadata-eval87.3%
fma-define87.3%
fmm-def87.3%
metadata-eval87.3%
Simplified87.3%
Taylor expanded in z around 0 99.5%
inv-pow99.5%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x 4.8e-67)
(*
(fma
z
(* z (- (+ 0.0007936500793651 y) (/ 0.0027777777777778 z)))
0.083333333333333)
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* (log x) (- x 0.5)))
(* 0.083333333333333 (/ 1.0 x))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.8e-67) {
tmp = fma(z, (z * ((0.0007936500793651 + y) - (0.0027777777777778 / z))), 0.083333333333333) * (1.0 / x);
} else {
tmp = (0.91893853320467 + (((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (log(x) * (x - 0.5))) + (0.083333333333333 * (1.0 / x)))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 4.8e-67) tmp = Float64(fma(z, Float64(z * Float64(Float64(0.0007936500793651 + y) - Float64(0.0027777777777778 / z))), 0.083333333333333) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(log(x) * Float64(x - 0.5))) + Float64(0.083333333333333 * Float64(1.0 / x)))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 4.8e-67], N[(N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $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] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{-67}:\\
\;\;\;\;\mathsf{fma}\left(z, z \cdot \left(\left(0.0007936500793651 + y\right) - \frac{0.0027777777777778}{z}\right), 0.083333333333333\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \log x \cdot \left(x - 0.5\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\right)\right) - x\\
\end{array}
\end{array}
if x < 4.8e-67Initial program 99.7%
associate-+l+99.7%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
div-inv99.8%
+-commutative99.8%
fma-define99.8%
fmm-def99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 99.8%
associate-*r/99.8%
metadata-eval99.8%
Simplified99.8%
if 4.8e-67 < x Initial program 88.5%
associate-+l+88.5%
fmm-def88.6%
sub-neg88.6%
metadata-eval88.6%
fma-define88.6%
fmm-def88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in z around 0 99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(if (<= t_0 2e+298)
(+
(- (* (log x) (+ x -0.5)) (* x (- 1.0 (/ 0.91893853320467 x))))
(/ (+ 0.083333333333333 t_0) x))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((log(x) * (x + -0.5)) - (x * (1.0 - (0.91893853320467 / x)))) + ((0.083333333333333 + t_0) / x);
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
if (t_0 <= 2d+298) then
tmp = ((log(x) * (x + (-0.5d0))) - (x * (1.0d0 - (0.91893853320467d0 / x)))) + ((0.083333333333333d0 + t_0) / x)
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((Math.log(x) * (x + -0.5)) - (x * (1.0 - (0.91893853320467 / x)))) + ((0.083333333333333 + t_0) / x);
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778) tmp = 0 if t_0 <= 2e+298: tmp = ((math.log(x) * (x + -0.5)) - (x * (1.0 - (0.91893853320467 / x)))) + ((0.083333333333333 + t_0) / x) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= 2e+298) tmp = Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x * Float64(1.0 - Float64(0.91893853320467 / x)))) + Float64(Float64(0.083333333333333 + t_0) / x)); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778); tmp = 0.0; if (t_0 <= 2e+298) tmp = ((log(x) * (x + -0.5)) - (x * (1.0 - (0.91893853320467 / x)))) + ((0.083333333333333 + t_0) / x); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+298], N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 - N[(0.91893853320467 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + t$95$0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) - x \cdot \left(1 - \frac{0.91893853320467}{x}\right)\right) + \frac{0.083333333333333 + t\_0}{x}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e298Initial program 97.0%
add-cube-cbrt96.5%
pow396.5%
sub-neg96.5%
metadata-eval96.5%
*-commutative96.5%
Applied egg-rr96.5%
rem-cube-cbrt97.0%
associate-+l-97.0%
Applied egg-rr97.0%
Taylor expanded in x around inf 97.0%
associate-*r/97.0%
metadata-eval97.0%
Simplified97.0%
if 1.9999999999999999e298 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 79.5%
associate-+l+79.5%
fmm-def79.5%
sub-neg79.5%
metadata-eval79.5%
fma-define79.5%
fmm-def79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around 0 88.7%
Final simplification94.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(if (<= t_0 2e+298)
(+
(/ (+ 0.083333333333333 t_0) x)
(- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
if (t_0 <= 2d+298) then
tmp = ((0.083333333333333d0 + t_0) / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778) tmp = 0 if t_0 <= 2e+298: tmp = ((0.083333333333333 + t_0) / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467)) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= 2e+298) tmp = Float64(Float64(Float64(0.083333333333333 + t_0) / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467))); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778); tmp = 0.0; if (t_0 <= 2e+298) tmp = ((0.083333333333333 + t_0) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467)); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+298], N[(N[(N[(0.083333333333333 + t$95$0), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\frac{0.083333333333333 + t\_0}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e298Initial program 97.0%
associate-+l-97.0%
sub-neg97.0%
metadata-eval97.0%
*-commutative97.0%
sub-neg97.0%
metadata-eval97.0%
Applied egg-rr97.0%
if 1.9999999999999999e298 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 79.5%
associate-+l+79.5%
fmm-def79.5%
sub-neg79.5%
metadata-eval79.5%
fma-define79.5%
fmm-def79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around 0 88.7%
Final simplification94.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(if (<= t_0 2e+298)
(+
(/ (+ 0.083333333333333 t_0) x)
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
if (t_0 <= 2d+298) then
tmp = ((0.083333333333333d0 + t_0) / x) + (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x))
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778) tmp = 0 if t_0 <= 2e+298: tmp = ((0.083333333333333 + t_0) / x) + (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= 2e+298) tmp = Float64(Float64(Float64(0.083333333333333 + t_0) / x) + Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778); tmp = 0.0; if (t_0 <= 2e+298) tmp = ((0.083333333333333 + t_0) / x) + (0.91893853320467 + ((log(x) * (x - 0.5)) - x)); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+298], N[(N[(N[(0.083333333333333 + t$95$0), $MachinePrecision] / x), $MachinePrecision] + N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\frac{0.083333333333333 + t\_0}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e298Initial program 97.0%
if 1.9999999999999999e298 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 79.5%
associate-+l+79.5%
fmm-def79.5%
sub-neg79.5%
metadata-eval79.5%
fma-define79.5%
fmm-def79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around 0 88.7%
Final simplification94.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(if (<= t_0 2e+298)
(+ (/ (+ 0.083333333333333 t_0) x) (* x (+ (log x) -1.0)))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + (x * (log(x) + -1.0));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
if (t_0 <= 2d+298) then
tmp = ((0.083333333333333d0 + t_0) / x) + (x * (log(x) + (-1.0d0)))
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
double tmp;
if (t_0 <= 2e+298) {
tmp = ((0.083333333333333 + t_0) / x) + (x * (Math.log(x) + -1.0));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778) tmp = 0 if t_0 <= 2e+298: tmp = ((0.083333333333333 + t_0) / x) + (x * (math.log(x) + -1.0)) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)) tmp = 0.0 if (t_0 <= 2e+298) tmp = Float64(Float64(Float64(0.083333333333333 + t_0) / x) + Float64(x * Float64(log(x) + -1.0))); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778); tmp = 0.0; if (t_0 <= 2e+298) tmp = ((0.083333333333333 + t_0) / x) + (x * (log(x) + -1.0)); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+298], N[(N[(N[(0.083333333333333 + t$95$0), $MachinePrecision] / x), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;\frac{0.083333333333333 + t\_0}{x} + x \cdot \left(\log x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.9999999999999999e298Initial program 97.0%
add-cube-cbrt96.5%
pow396.5%
sub-neg96.5%
metadata-eval96.5%
*-commutative96.5%
Applied egg-rr96.5%
Taylor expanded in x around inf 95.8%
sub-neg95.8%
mul-1-neg95.8%
log-rec95.8%
remove-double-neg95.8%
metadata-eval95.8%
Simplified95.8%
if 1.9999999999999999e298 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 79.5%
associate-+l+79.5%
fmm-def79.5%
sub-neg79.5%
metadata-eval79.5%
fma-define79.5%
fmm-def79.5%
metadata-eval79.5%
Simplified79.5%
Taylor expanded in x around 0 79.5%
Taylor expanded in z around 0 88.7%
Final simplification94.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.083333333333333 (/ 1.0 x))))
(if (<= z -1.02e-14)
(*
(* z z)
(-
(+ (/ y x) (/ 0.0007936500793651 x))
(/ (+ (/ 0.0027777777777778 x) (/ -0.083333333333333 (* x z))) z)))
(if (<= z 2.6e-29)
(- (+ 0.91893853320467 (+ (* (log x) (- x 0.5)) t_0)) x)
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -1.02e-14) {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z));
} else if (z <= 2.6e-29) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) + t_0)) - x;
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + 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 = 0.083333333333333d0 * (1.0d0 / x)
if (z <= (-1.02d-14)) then
tmp = (z * z) * (((y / x) + (0.0007936500793651d0 / x)) - (((0.0027777777777778d0 / x) + ((-0.083333333333333d0) / (x * z))) / z))
else if (z <= 2.6d-29) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) + t_0)) - x
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -1.02e-14) {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z));
} else if (z <= 2.6e-29) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) + t_0)) - x;
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 * (1.0 / x) tmp = 0 if z <= -1.02e-14: tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)) elif z <= 2.6e-29: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) + t_0)) - x else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0 return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 * Float64(1.0 / x)) tmp = 0.0 if (z <= -1.02e-14) tmp = Float64(Float64(z * z) * Float64(Float64(Float64(y / x) + Float64(0.0007936500793651 / x)) - Float64(Float64(Float64(0.0027777777777778 / x) + Float64(-0.083333333333333 / Float64(x * z))) / z))); elseif (z <= 2.6e-29) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) + t_0)) - x); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.083333333333333 * (1.0 / x); tmp = 0.0; if (z <= -1.02e-14) tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)); elseif (z <= 2.6e-29) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) + t_0)) - x; else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e-14], N[(N[(z * z), $MachinePrecision] * N[(N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.0027777777777778 / x), $MachinePrecision] + N[(-0.083333333333333 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-29], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-14}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right) - \frac{\frac{0.0027777777777778}{x} + \frac{-0.083333333333333}{x \cdot z}}{z}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-29}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) + t\_0\right)\right) - x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + t\_0\\
\end{array}
\end{array}
if z < -1.02e-14Initial program 90.8%
associate-+l+90.8%
fmm-def90.8%
sub-neg90.8%
metadata-eval90.8%
fma-define90.8%
fmm-def90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around -inf 77.0%
+-commutative77.0%
associate-*r/77.0%
metadata-eval77.0%
mul-1-neg77.0%
unsub-neg77.0%
sub-neg77.0%
associate-*r/77.0%
metadata-eval77.0%
associate-*r/77.0%
metadata-eval77.0%
distribute-neg-frac77.0%
metadata-eval77.0%
*-commutative77.0%
Simplified77.0%
unpow277.0%
Applied egg-rr77.0%
if -1.02e-14 < z < 2.6000000000000002e-29Initial program 99.3%
associate-+l+99.3%
fmm-def99.5%
sub-neg99.5%
metadata-eval99.5%
fma-define99.5%
fmm-def99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.7%
if 2.6000000000000002e-29 < z Initial program 83.5%
associate-+l+83.5%
fmm-def83.5%
sub-neg83.5%
metadata-eval83.5%
fma-define83.5%
fmm-def83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in x around 0 72.8%
Taylor expanded in z around 0 82.7%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(if (<= z -9e-15)
(*
(* z z)
(-
(+ (/ y x) (/ 0.0007936500793651 x))
(/ (+ (/ 0.0027777777777778 x) (/ -0.083333333333333 (* x z))) z)))
(if (<= z 2.5e-29)
(+
0.91893853320467
(- (+ (* (log x) (+ x -0.5)) (/ 0.083333333333333 x)) x))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -9e-15) {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z));
} else if (z <= 2.5e-29) {
tmp = 0.91893853320467 + (((log(x) * (x + -0.5)) + (0.083333333333333 / x)) - x);
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-9d-15)) then
tmp = (z * z) * (((y / x) + (0.0007936500793651d0 / x)) - (((0.0027777777777778d0 / x) + ((-0.083333333333333d0) / (x * z))) / z))
else if (z <= 2.5d-29) then
tmp = 0.91893853320467d0 + (((log(x) * (x + (-0.5d0))) + (0.083333333333333d0 / x)) - x)
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -9e-15) {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z));
} else if (z <= 2.5e-29) {
tmp = 0.91893853320467 + (((Math.log(x) * (x + -0.5)) + (0.083333333333333 / x)) - x);
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -9e-15: tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)) elif z <= 2.5e-29: tmp = 0.91893853320467 + (((math.log(x) * (x + -0.5)) + (0.083333333333333 / x)) - x) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -9e-15) tmp = Float64(Float64(z * z) * Float64(Float64(Float64(y / x) + Float64(0.0007936500793651 / x)) - Float64(Float64(Float64(0.0027777777777778 / x) + Float64(-0.083333333333333 / Float64(x * z))) / z))); elseif (z <= 2.5e-29) tmp = Float64(0.91893853320467 + Float64(Float64(Float64(log(x) * Float64(x + -0.5)) + Float64(0.083333333333333 / x)) - x)); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -9e-15) tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)); elseif (z <= 2.5e-29) tmp = 0.91893853320467 + (((log(x) * (x + -0.5)) + (0.083333333333333 / x)) - x); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -9e-15], N[(N[(z * z), $MachinePrecision] * N[(N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.0027777777777778 / x), $MachinePrecision] + N[(-0.083333333333333 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-29], N[(0.91893853320467 + N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-15}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right) - \frac{\frac{0.0027777777777778}{x} + \frac{-0.083333333333333}{x \cdot z}}{z}\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-29}:\\
\;\;\;\;0.91893853320467 + \left(\left(\log x \cdot \left(x + -0.5\right) + \frac{0.083333333333333}{x}\right) - x\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -8.9999999999999995e-15Initial program 90.8%
associate-+l+90.8%
fmm-def90.8%
sub-neg90.8%
metadata-eval90.8%
fma-define90.8%
fmm-def90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around -inf 77.0%
+-commutative77.0%
associate-*r/77.0%
metadata-eval77.0%
mul-1-neg77.0%
unsub-neg77.0%
sub-neg77.0%
associate-*r/77.0%
metadata-eval77.0%
associate-*r/77.0%
metadata-eval77.0%
distribute-neg-frac77.0%
metadata-eval77.0%
*-commutative77.0%
Simplified77.0%
unpow277.0%
Applied egg-rr77.0%
if -8.9999999999999995e-15 < z < 2.49999999999999993e-29Initial program 99.3%
associate-+l+99.3%
fmm-def99.5%
sub-neg99.5%
metadata-eval99.5%
fma-define99.5%
fmm-def99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 97.7%
associate--l+97.7%
associate-*r/97.6%
metadata-eval97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
if 2.49999999999999993e-29 < z Initial program 83.5%
associate-+l+83.5%
fmm-def83.5%
sub-neg83.5%
metadata-eval83.5%
fma-define83.5%
fmm-def83.4%
metadata-eval83.4%
Simplified83.4%
Taylor expanded in x around 0 72.8%
Taylor expanded in z around 0 82.7%
Final simplification87.6%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+53)
(*
(fma
z
(* z (- (+ 0.0007936500793651 y) (/ 0.0027777777777778 z)))
0.083333333333333)
(/ 1.0 x))
(+
(* x (+ (log x) -1.0))
(/
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+53) {
tmp = fma(z, (z * ((0.0007936500793651 + y) - (0.0027777777777778 / z))), 0.083333333333333) * (1.0 / x);
} else {
tmp = (x * (log(x) + -1.0)) + ((0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 5e+53) tmp = Float64(fma(z, Float64(z * Float64(Float64(0.0007936500793651 + y) - Float64(0.0027777777777778 / z))), 0.083333333333333) * Float64(1.0 / x)); else tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 5e+53], N[(N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] - N[(0.0027777777777778 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(z, z \cdot \left(\left(0.0007936500793651 + y\right) - \frac{0.0027777777777778}{z}\right), 0.083333333333333\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 5.0000000000000004e53Initial program 99.6%
associate-+l+99.6%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 93.7%
div-inv93.8%
+-commutative93.8%
fma-define93.8%
fmm-def93.8%
metadata-eval93.8%
Applied egg-rr93.8%
Taylor expanded in z around inf 93.8%
associate-*r/93.8%
metadata-eval93.8%
Simplified93.8%
if 5.0000000000000004e53 < x Initial program 82.7%
add-cube-cbrt82.0%
pow381.9%
sub-neg81.9%
metadata-eval81.9%
*-commutative81.9%
Applied egg-rr81.9%
Taylor expanded in x around inf 82.7%
sub-neg82.7%
mul-1-neg82.7%
log-rec82.8%
remove-double-neg82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in y around 0 79.6%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(if (<= x 8.2e+61)
(*
(/ 1.0 x)
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8.2e+61) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} 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 <= 8.2d+61) then
tmp = (1.0d0 / x) * (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)))
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 <= 8.2e+61) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8.2e+61: tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8.2e+61) tmp = Float64(Float64(1.0 / x) * Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)))); 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 <= 8.2e+61) tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8.2e+61], N[(N[(1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+61}:\\
\;\;\;\;\frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 8.19999999999999944e61Initial program 99.6%
associate-+l+99.6%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 92.6%
div-inv92.7%
+-commutative92.7%
fma-define92.7%
fmm-def92.7%
metadata-eval92.7%
Applied egg-rr92.7%
Taylor expanded in z around 0 92.7%
if 8.19999999999999944e61 < x Initial program 82.0%
associate-+l+82.0%
fmm-def82.1%
sub-neg82.1%
metadata-eval82.1%
fma-define82.1%
fmm-def82.1%
metadata-eval82.1%
Simplified82.1%
Taylor expanded in x around inf 74.0%
sub-neg74.0%
mul-1-neg74.0%
log-rec74.0%
remove-double-neg74.0%
metadata-eval74.0%
Simplified74.0%
Final simplification85.1%
(FPCore (x y z)
:precision binary64
(if (<= x 2e-76)
(*
(/ 1.0 x)
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* 0.083333333333333 (/ 1.0 x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e-76) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2d-76) then
tmp = (1.0d0 / x) * (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)))
else
tmp = (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + (0.083333333333333d0 * (1.0d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e-76) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} else {
tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e-76: tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) else: tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e-76) tmp = Float64(Float64(1.0 / x) * Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)))); else tmp = Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(0.083333333333333 * Float64(1.0 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e-76) tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))); else tmp = (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (0.083333333333333 * (1.0 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e-76], N[(N[(1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-76}:\\
\;\;\;\;\frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if x < 1.99999999999999985e-76Initial program 99.7%
associate-+l+99.7%
fmm-def99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fmm-def99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
div-inv99.8%
+-commutative99.8%
fma-define99.8%
fmm-def99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 99.8%
if 1.99999999999999985e-76 < x Initial program 88.8%
associate-+l+88.8%
fmm-def88.9%
sub-neg88.9%
metadata-eval88.9%
fma-define88.9%
fmm-def88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in x around 0 45.1%
Taylor expanded in z around 0 50.3%
Final simplification66.7%
(FPCore (x y z)
:precision binary64
(if (<= x 5.2e+71)
(*
(/ 1.0 x)
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
(*
(* z z)
(-
(+ (/ y x) (/ 0.0007936500793651 x))
(/ (+ (/ 0.0027777777777778 x) (/ -0.083333333333333 (* x z))) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.2e+71) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} else {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (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) :: tmp
if (x <= 5.2d+71) then
tmp = (1.0d0 / x) * (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)))
else
tmp = (z * z) * (((y / x) + (0.0007936500793651d0 / x)) - (((0.0027777777777778d0 / x) + ((-0.083333333333333d0) / (x * z))) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5.2e+71) {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
} else {
tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5.2e+71: tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) else: tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5.2e+71) tmp = Float64(Float64(1.0 / x) * Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)))); else tmp = Float64(Float64(z * z) * Float64(Float64(Float64(y / x) + Float64(0.0007936500793651 / x)) - Float64(Float64(Float64(0.0027777777777778 / x) + Float64(-0.083333333333333 / Float64(x * z))) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5.2e+71) tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))); else tmp = (z * z) * (((y / x) + (0.0007936500793651 / x)) - (((0.0027777777777778 / x) + (-0.083333333333333 / (x * z))) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5.2e+71], N[(N[(1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * N[(N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.0027777777777778 / x), $MachinePrecision] + N[(-0.083333333333333 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.2 \cdot 10^{+71}:\\
\;\;\;\;\frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right) - \frac{\frac{0.0027777777777778}{x} + \frac{-0.083333333333333}{x \cdot z}}{z}\right)\\
\end{array}
\end{array}
if x < 5.19999999999999983e71Initial program 98.5%
associate-+l+98.5%
fmm-def98.5%
sub-neg98.5%
metadata-eval98.5%
fma-define98.5%
fmm-def98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in x around 0 89.4%
div-inv89.5%
+-commutative89.5%
fma-define89.5%
fmm-def89.5%
metadata-eval89.5%
Applied egg-rr89.5%
Taylor expanded in z around 0 89.5%
if 5.19999999999999983e71 < x Initial program 82.6%
associate-+l+82.6%
fmm-def82.7%
sub-neg82.7%
metadata-eval82.7%
fma-define82.7%
fmm-def82.7%
metadata-eval82.7%
Simplified82.7%
Taylor expanded in x around 0 21.0%
Taylor expanded in z around -inf 25.9%
+-commutative25.9%
associate-*r/25.9%
metadata-eval25.9%
mul-1-neg25.9%
unsub-neg25.9%
sub-neg25.9%
associate-*r/25.9%
metadata-eval25.9%
associate-*r/25.9%
metadata-eval25.9%
distribute-neg-frac25.9%
metadata-eval25.9%
*-commutative25.9%
Simplified25.9%
unpow225.9%
Applied egg-rr25.9%
Final simplification65.2%
(FPCore (x y z)
:precision binary64
(if (or (<= y -0.0065) (not (<= y 5.4e-95)))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
(*
(/ 1.0 x)
(+
0.083333333333333
(* z (- (* z 0.0007936500793651) 0.0027777777777778))))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0065) || !(y <= 5.4e-95)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-0.0065d0)) .or. (.not. (y <= 5.4d-95))) then
tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
else
tmp = (1.0d0 / x) * (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0065) || !(y <= 5.4e-95)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.0065) or not (y <= 5.4e-95): tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x else: tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.0065) || !(y <= 5.4e-95)) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x); else tmp = Float64(Float64(1.0 / x) * Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.0065) || ~((y <= 5.4e-95))) tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x; else tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.0065], N[Not[LessEqual[y, 5.4e-95]], $MachinePrecision]], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0065 \lor \neg \left(y \leq 5.4 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)\right)\\
\end{array}
\end{array}
if y < -0.0064999999999999997 or 5.4e-95 < y Initial program 92.5%
associate-+l+92.5%
fmm-def92.6%
sub-neg92.6%
metadata-eval92.6%
fma-define92.6%
fmm-def92.6%
metadata-eval92.6%
Simplified92.6%
Taylor expanded in x around 0 67.0%
Taylor expanded in y around inf 66.7%
*-commutative66.7%
Simplified66.7%
if -0.0064999999999999997 < y < 5.4e-95Initial program 92.3%
associate-+l+92.3%
fmm-def92.3%
sub-neg92.3%
metadata-eval92.3%
fma-define92.3%
fmm-def92.3%
metadata-eval92.3%
Simplified92.3%
Taylor expanded in x around 0 58.5%
div-inv58.6%
+-commutative58.6%
fma-define58.6%
fmm-def58.6%
metadata-eval58.6%
Applied egg-rr58.6%
Taylor expanded in y around 0 58.6%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(if (or (<= y -0.0065) (not (<= y 2.2e-71)))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0065) || !(y <= 2.2e-71)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 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 ((y <= (-0.0065d0)) .or. (.not. (y <= 2.2d-71))) then
tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -0.0065) || !(y <= 2.2e-71)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -0.0065) or not (y <= 2.2e-71): tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -0.0065) || !(y <= 2.2e-71)) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -0.0065) || ~((y <= 2.2e-71))) tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x; else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -0.0065], N[Not[LessEqual[y, 2.2e-71]], $MachinePrecision]], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0065 \lor \neg \left(y \leq 2.2 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -0.0064999999999999997 or 2.19999999999999997e-71 < y Initial program 92.2%
associate-+l+92.2%
fmm-def92.3%
sub-neg92.3%
metadata-eval92.3%
fma-define92.3%
fmm-def92.3%
metadata-eval92.3%
Simplified92.3%
Taylor expanded in x around 0 68.4%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
if -0.0064999999999999997 < y < 2.19999999999999997e-71Initial program 92.7%
associate-+l+92.7%
fmm-def92.7%
sub-neg92.7%
metadata-eval92.7%
fma-define92.7%
fmm-def92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in x around 0 57.4%
Taylor expanded in y around 0 57.4%
*-commutative57.4%
Simplified57.4%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(if (or (<= y -7.8e+29) (not (<= y 3.6e+97)))
(* y (/ (* z z) x))
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7.8e+29) || !(y <= 3.6e+97)) {
tmp = y * ((z * z) / x);
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 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 ((y <= (-7.8d+29)) .or. (.not. (y <= 3.6d+97))) then
tmp = y * ((z * z) / x)
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -7.8e+29) || !(y <= 3.6e+97)) {
tmp = y * ((z * z) / x);
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7.8e+29) or not (y <= 3.6e+97): tmp = y * ((z * z) / x) else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7.8e+29) || !(y <= 3.6e+97)) tmp = Float64(y * Float64(Float64(z * z) / x)); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -7.8e+29) || ~((y <= 3.6e+97))) tmp = y * ((z * z) / x); else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7.8e+29], N[Not[LessEqual[y, 3.6e+97]], $MachinePrecision]], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+29} \lor \neg \left(y \leq 3.6 \cdot 10^{+97}\right):\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -7.79999999999999937e29 or 3.59999999999999966e97 < y Initial program 92.1%
associate-+l+92.1%
fmm-def92.2%
sub-neg92.2%
metadata-eval92.2%
fma-define92.2%
fmm-def92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in y around inf 54.6%
associate-/l*59.1%
Simplified59.1%
unpow257.7%
Applied egg-rr59.1%
if -7.79999999999999937e29 < y < 3.59999999999999966e97Initial program 92.6%
associate-+l+92.6%
fmm-def92.6%
sub-neg92.6%
metadata-eval92.6%
fma-define92.6%
fmm-def92.6%
metadata-eval92.6%
Simplified92.6%
Taylor expanded in x around 0 60.4%
Taylor expanded in y around 0 57.9%
*-commutative57.9%
Simplified57.9%
Final simplification58.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.9e-58) (not (<= z 2e-22))) (* y (/ (* z z) x)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.9e-58) || !(z <= 2e-22)) {
tmp = y * ((z * z) / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.9d-58)) .or. (.not. (z <= 2d-22))) then
tmp = y * ((z * z) / x)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.9e-58) || !(z <= 2e-22)) {
tmp = y * ((z * z) / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.9e-58) or not (z <= 2e-22): tmp = y * ((z * z) / x) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.9e-58) || !(z <= 2e-22)) tmp = Float64(y * Float64(Float64(z * z) / x)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.9e-58) || ~((z <= 2e-22))) tmp = y * ((z * z) / x); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.9e-58], N[Not[LessEqual[z, 2e-22]], $MachinePrecision]], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-58} \lor \neg \left(z \leq 2 \cdot 10^{-22}\right):\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -1.8999999999999999e-58 or 2.0000000000000001e-22 < z Initial program 87.7%
associate-+l+87.7%
fmm-def87.7%
sub-neg87.7%
metadata-eval87.7%
fma-define87.7%
fmm-def87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in y around inf 56.5%
associate-/l*60.6%
Simplified60.6%
unpow274.1%
Applied egg-rr60.6%
if -1.8999999999999999e-58 < z < 2.0000000000000001e-22Initial program 99.3%
associate-+l+99.3%
fmm-def99.5%
sub-neg99.5%
metadata-eval99.5%
fma-define99.5%
fmm-def99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 50.6%
Taylor expanded in z around 0 50.7%
*-commutative50.7%
Simplified50.7%
Taylor expanded in z around 0 50.7%
div-inv50.8%
inv-pow50.8%
metadata-eval50.8%
sqrt-pow250.6%
*-commutative50.6%
sqrt-pow250.8%
metadata-eval50.8%
inv-pow50.8%
Applied egg-rr50.8%
Final simplification56.6%
(FPCore (x y z) :precision binary64 (* (/ 1.0 x) (+ 0.083333333333333 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))))
double code(double x, double y, double z) {
return (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 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 = (1.0d0 / x) * (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)))
end function
public static double code(double x, double y, double z) {
return (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)));
}
def code(x, y, z): return (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)))
function code(x, y, z) return Float64(Float64(1.0 / x) * Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778)))) end
function tmp = code(x, y, z) tmp = (1.0 / x) * (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))); end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] * N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x} \cdot \left(0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\right)
\end{array}
Initial program 92.4%
associate-+l+92.4%
fmm-def92.5%
sub-neg92.5%
metadata-eval92.5%
fma-define92.5%
fmm-def92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in x around 0 63.2%
div-inv63.3%
+-commutative63.3%
fma-define63.3%
fmm-def63.3%
metadata-eval63.3%
Applied egg-rr63.3%
Taylor expanded in z around 0 63.3%
Final simplification63.3%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 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 * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 92.4%
associate-+l+92.4%
fmm-def92.5%
sub-neg92.5%
metadata-eval92.5%
fma-define92.5%
fmm-def92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in x around 0 63.2%
(FPCore (x y z) :precision binary64 (if (<= z -4.2e-13) (* -0.0027777777777778 (/ z x)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e-13) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4.2d-13)) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e-13) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.2e-13: tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.2e-13) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.2e-13) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.2e-13], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-13}:\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -4.19999999999999977e-13Initial program 90.8%
associate-+l+90.8%
fmm-def90.8%
sub-neg90.8%
metadata-eval90.8%
fma-define90.8%
fmm-def90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around 0 20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in z around inf 20.4%
if -4.19999999999999977e-13 < z Initial program 93.0%
associate-+l+93.0%
fmm-def93.1%
sub-neg93.1%
metadata-eval93.1%
fma-define93.1%
fmm-def93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in x around 0 59.0%
Taylor expanded in z around 0 33.4%
*-commutative33.4%
Simplified33.4%
Taylor expanded in z around 0 31.2%
div-inv31.3%
inv-pow31.3%
metadata-eval31.3%
sqrt-pow231.2%
*-commutative31.2%
sqrt-pow231.3%
metadata-eval31.3%
inv-pow31.3%
Applied egg-rr31.3%
Final simplification28.3%
(FPCore (x y z) :precision binary64 (if (<= z -4.2e-13) (* -0.0027777777777778 (/ z x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.2e-13) {
tmp = -0.0027777777777778 * (z / x);
} 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 <= (-4.2d-13)) then
tmp = (-0.0027777777777778d0) * (z / x)
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 <= -4.2e-13) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.2e-13: tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.2e-13) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.2e-13) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.2e-13], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-13}:\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -4.19999999999999977e-13Initial program 90.8%
associate-+l+90.8%
fmm-def90.8%
sub-neg90.8%
metadata-eval90.8%
fma-define90.8%
fmm-def90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around 0 20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in z around inf 20.4%
if -4.19999999999999977e-13 < z Initial program 93.0%
associate-+l+93.0%
fmm-def93.1%
sub-neg93.1%
metadata-eval93.1%
fma-define93.1%
fmm-def93.1%
metadata-eval93.1%
Simplified93.1%
Taylor expanded in x around 0 59.0%
Taylor expanded in z around 0 33.4%
*-commutative33.4%
Simplified33.4%
Taylor expanded in z around 0 31.2%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 92.4%
associate-+l+92.4%
fmm-def92.5%
sub-neg92.5%
metadata-eval92.5%
fma-define92.5%
fmm-def92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in x around 0 63.2%
Taylor expanded in z around 0 29.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in z around 0 23.5%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2024170
(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)))