
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2 (+ x (- (/ z y) (* x (/ a y))))))
(if (<= y -2.25e+94)
t_2
(if (<= y -1.06e-10)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_1)
(if (<= y 8.8e+67)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y t_1)))
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.25e+94) {
tmp = t_2;
} else if (y <= -1.06e-10) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else if (y <= 8.8e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = x + ((z / y) - (x * (a / y)))
if (y <= (-2.25d+94)) then
tmp = t_2
else if (y <= (-1.06d-10)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_1
else if (y <= 8.8d+67) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * t_1))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.25e+94) {
tmp = t_2;
} else if (y <= -1.06e-10) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else if (y <= 8.8e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = x + ((z / y) - (x * (a / y))) tmp = 0 if y <= -2.25e+94: tmp = t_2 elif y <= -1.06e-10: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1 elif y <= 8.8e+67: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))) tmp = 0.0 if (y <= -2.25e+94) tmp = t_2; elseif (y <= -1.06e-10) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_1); elseif (y <= 8.8e+67) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = x + ((z / y) - (x * (a / y))); tmp = 0.0; if (y <= -2.25e+94) tmp = t_2; elseif (y <= -1.06e-10) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1; elseif (y <= 8.8e+67) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.25e+94], t$95$2, If[LessEqual[y, -1.06e-10], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 8.8e+67], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -2.25 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-10}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t_1}\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.24999999999999986e94 or 8.8e67 < y Initial program 0.3%
add-cube-cbrt0.3%
pow30.3%
*-commutative0.3%
*-commutative0.3%
fma-def0.3%
fma-def0.3%
Applied egg-rr0.3%
Taylor expanded in y around inf 72.7%
associate--l+72.7%
associate-/l*77.7%
associate-/r/77.7%
Simplified77.7%
if -2.24999999999999986e94 < y < -1.06e-10Initial program 36.3%
Taylor expanded in i around 0 31.5%
Taylor expanded in t around 0 63.1%
if -1.06e-10 < y < 8.8e67Initial program 92.3%
Taylor expanded in x around 0 91.0%
Final simplification83.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
(if (<= t_1 INFINITY) t_1 (+ x (- (/ z y) (* x (/ a y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (x * (a / y)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (x * (a / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + ((z / y) - (x * (a / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + ((z / y) - (x * (a / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 88.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
add-cube-cbrt0.0%
pow30.0%
*-commutative0.0%
*-commutative0.0%
fma-def0.0%
fma-def0.0%
Applied egg-rr0.0%
Taylor expanded in y around inf 67.5%
associate--l+67.5%
associate-/l*71.2%
associate-/r/71.2%
Simplified71.2%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_1))
(t_3 (+ x (- (/ z y) (* x (/ a y))))))
(if (<= y -5.5e+94)
t_3
(if (<= y -8e-15)
t_2
(if (<= y 1.3e-14)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 6.2e+62) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
double t_3 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -5.5e+94) {
tmp = t_3;
} else if (y <= -8e-15) {
tmp = t_2;
} else if (y <= 1.3e-14) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 6.2e+62) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_1
t_3 = x + ((z / y) - (x * (a / y)))
if (y <= (-5.5d+94)) then
tmp = t_3
else if (y <= (-8d-15)) then
tmp = t_2
else if (y <= 1.3d-14) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 6.2d+62) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
double t_3 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -5.5e+94) {
tmp = t_3;
} else if (y <= -8e-15) {
tmp = t_2;
} else if (y <= 1.3e-14) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 6.2e+62) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1 t_3 = x + ((z / y) - (x * (a / y))) tmp = 0 if y <= -5.5e+94: tmp = t_3 elif y <= -8e-15: tmp = t_2 elif y <= 1.3e-14: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 6.2e+62: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))) tmp = 0.0 if (y <= -5.5e+94) tmp = t_3; elseif (y <= -8e-15) tmp = t_2; elseif (y <= 1.3e-14) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 6.2e+62) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1; t_3 = x + ((z / y) - (x * (a / y))); tmp = 0.0; if (y <= -5.5e+94) tmp = t_3; elseif (y <= -8e-15) tmp = t_2; elseif (y <= 1.3e-14) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 6.2e+62) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+94], t$95$3, If[LessEqual[y, -8e-15], t$95$2, If[LessEqual[y, 1.3e-14], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+62], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t_1}\\
t_3 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+94}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t_1}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -5.4999999999999997e94 or 6.20000000000000029e62 < y Initial program 1.3%
add-cube-cbrt1.3%
pow31.3%
*-commutative1.3%
*-commutative1.3%
fma-def1.3%
fma-def1.3%
Applied egg-rr1.3%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*77.0%
associate-/r/76.9%
Simplified76.9%
if -5.4999999999999997e94 < y < -8.0000000000000006e-15 or 1.29999999999999998e-14 < y < 6.20000000000000029e62Initial program 41.5%
Taylor expanded in i around 0 33.9%
Taylor expanded in t around 0 56.7%
if -8.0000000000000006e-15 < y < 1.29999999999999998e-14Initial program 99.8%
Taylor expanded in y around 0 95.6%
*-commutative95.6%
Simplified95.6%
Final simplification81.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* x (/ a y))))))
(if (<= y -2.9e-9)
t_1
(if (<= y -2.6e-105)
(/ 1.0 (/ (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))) t))
(if (<= y 4.5e+67)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y c)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -2.6e-105) {
tmp = 1.0 / ((i + (y * ((y * ((y * (y + a)) + b)) + c))) / t);
} else if (y <= 4.5e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (x * (a / y)))
if (y <= (-2.9d-9)) then
tmp = t_1
else if (y <= (-2.6d-105)) then
tmp = 1.0d0 / ((i + (y * ((y * ((y * (y + a)) + b)) + c))) / t)
else if (y <= 4.5d+67) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -2.6e-105) {
tmp = 1.0 / ((i + (y * ((y * ((y * (y + a)) + b)) + c))) / t);
} else if (y <= 4.5e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (x * (a / y))) tmp = 0 if y <= -2.9e-9: tmp = t_1 elif y <= -2.6e-105: tmp = 1.0 / ((i + (y * ((y * ((y * (y + a)) + b)) + c))) / t) elif y <= 4.5e+67: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))) tmp = 0.0 if (y <= -2.9e-9) tmp = t_1; elseif (y <= -2.6e-105) tmp = Float64(1.0 / Float64(Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) / t)); elseif (y <= 4.5e+67) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (x * (a / y))); tmp = 0.0; if (y <= -2.9e-9) tmp = t_1; elseif (y <= -2.6e-105) tmp = 1.0 / ((i + (y * ((y * ((y * (y + a)) + b)) + c))) / t); elseif (y <= 4.5e+67) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-9], t$95$1, If[LessEqual[y, -2.6e-105], N[(1.0 / N[(N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+67], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-105}:\\
\;\;\;\;\frac{1}{\frac{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}{t}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.89999999999999991e-9 or 4.4999999999999998e67 < y Initial program 6.2%
add-cube-cbrt6.2%
pow36.2%
*-commutative6.2%
*-commutative6.2%
fma-def6.2%
fma-def6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 63.6%
associate--l+63.6%
associate-/l*67.7%
associate-/r/67.7%
Simplified67.7%
if -2.89999999999999991e-9 < y < -2.5999999999999999e-105Initial program 99.3%
clear-num97.3%
inv-pow97.3%
Applied egg-rr97.3%
unpow-197.3%
fma-udef97.3%
*-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in t around inf 58.8%
if -2.5999999999999999e-105 < y < 4.4999999999999998e67Initial program 91.3%
Taylor expanded in x around 0 89.8%
Taylor expanded in y around 0 79.8%
*-commutative79.8%
Simplified79.8%
Final simplification72.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.9e-9) (not (<= y 4.5e+67))) (+ x (- (/ z y) (* x (/ a y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.9e-9) || !(y <= 4.5e+67)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.9d-9)) .or. (.not. (y <= 4.5d+67))) then
tmp = x + ((z / y) - (x * (a / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.9e-9) || !(y <= 4.5e+67)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.9e-9) or not (y <= 4.5e+67): tmp = x + ((z / y) - (x * (a / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.9e-9) || !(y <= 4.5e+67)) tmp = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.9e-9) || ~((y <= 4.5e+67))) tmp = x + ((z / y) - (x * (a / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.9e-9], N[Not[LessEqual[y, 4.5e+67]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-9} \lor \neg \left(y \leq 4.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -2.89999999999999991e-9 or 4.4999999999999998e67 < y Initial program 6.2%
add-cube-cbrt6.2%
pow36.2%
*-commutative6.2%
*-commutative6.2%
fma-def6.2%
fma-def6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 63.6%
associate--l+63.6%
associate-/l*67.7%
associate-/r/67.7%
Simplified67.7%
if -2.89999999999999991e-9 < y < 4.4999999999999998e67Initial program 92.3%
Taylor expanded in y around 0 82.6%
*-commutative82.6%
Simplified82.6%
Final simplification75.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* x (/ a y))))))
(if (<= y -2.9e-9)
t_1
(if (<= y -1.75e-90)
(/ (+ t (* y 230661.510616)) (* y (+ c (* y b))))
(if (<= y 8.5e-21)
(/ t i)
(if (<= y 9e+91)
(+ (/ 27464.7644705 (* y a)) (+ (/ z a) (/ (* x y) a)))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -1.75e-90) {
tmp = (t + (y * 230661.510616)) / (y * (c + (y * b)));
} else if (y <= 8.5e-21) {
tmp = t / i;
} else if (y <= 9e+91) {
tmp = (27464.7644705 / (y * a)) + ((z / a) + ((x * y) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (x * (a / y)))
if (y <= (-2.9d-9)) then
tmp = t_1
else if (y <= (-1.75d-90)) then
tmp = (t + (y * 230661.510616d0)) / (y * (c + (y * b)))
else if (y <= 8.5d-21) then
tmp = t / i
else if (y <= 9d+91) then
tmp = (27464.7644705d0 / (y * a)) + ((z / a) + ((x * y) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -1.75e-90) {
tmp = (t + (y * 230661.510616)) / (y * (c + (y * b)));
} else if (y <= 8.5e-21) {
tmp = t / i;
} else if (y <= 9e+91) {
tmp = (27464.7644705 / (y * a)) + ((z / a) + ((x * y) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (x * (a / y))) tmp = 0 if y <= -2.9e-9: tmp = t_1 elif y <= -1.75e-90: tmp = (t + (y * 230661.510616)) / (y * (c + (y * b))) elif y <= 8.5e-21: tmp = t / i elif y <= 9e+91: tmp = (27464.7644705 / (y * a)) + ((z / a) + ((x * y) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))) tmp = 0.0 if (y <= -2.9e-9) tmp = t_1; elseif (y <= -1.75e-90) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * Float64(c + Float64(y * b)))); elseif (y <= 8.5e-21) tmp = Float64(t / i); elseif (y <= 9e+91) tmp = Float64(Float64(27464.7644705 / Float64(y * a)) + Float64(Float64(z / a) + Float64(Float64(x * y) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (x * (a / y))); tmp = 0.0; if (y <= -2.9e-9) tmp = t_1; elseif (y <= -1.75e-90) tmp = (t + (y * 230661.510616)) / (y * (c + (y * b))); elseif (y <= 8.5e-21) tmp = t / i; elseif (y <= 9e+91) tmp = (27464.7644705 / (y * a)) + ((z / a) + ((x * y) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-9], t$95$1, If[LessEqual[y, -1.75e-90], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-21], N[(t / i), $MachinePrecision], If[LessEqual[y, 9e+91], N[(N[(27464.7644705 / N[(y * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z / a), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-90}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+91}:\\
\;\;\;\;\frac{27464.7644705}{y \cdot a} + \left(\frac{z}{a} + \frac{x \cdot y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.89999999999999991e-9 or 9e91 < y Initial program 6.3%
add-cube-cbrt6.3%
pow36.3%
*-commutative6.3%
*-commutative6.3%
fma-def6.3%
fma-def6.3%
Applied egg-rr6.3%
Taylor expanded in y around inf 65.7%
associate--l+65.7%
associate-/l*69.1%
associate-/r/69.1%
Simplified69.1%
if -2.89999999999999991e-9 < y < -1.7499999999999999e-90Initial program 99.1%
Taylor expanded in i around 0 72.1%
Taylor expanded in y around 0 53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in y around 0 44.3%
*-commutative44.3%
Simplified44.3%
if -1.7499999999999999e-90 < y < 8.4999999999999993e-21Initial program 99.9%
Taylor expanded in y around 0 70.5%
if 8.4999999999999993e-21 < y < 9e91Initial program 46.8%
Taylor expanded in i around 0 35.1%
Taylor expanded in a around inf 16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in y around inf 26.3%
associate-*r/26.3%
metadata-eval26.3%
*-commutative26.3%
*-commutative26.3%
Simplified26.3%
Final simplification63.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.9e-9) (not (<= y 4.5e+67))) (+ x (- (/ z y) (* x (/ a y)))) (/ t (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.9e-9) || !(y <= 4.5e+67)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.9d-9)) .or. (.not. (y <= 4.5d+67))) then
tmp = x + ((z / y) - (x * (a / y)))
else
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.9e-9) || !(y <= 4.5e+67)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.9e-9) or not (y <= 4.5e+67): tmp = x + ((z / y) - (x * (a / y))) else: tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.9e-9) || !(y <= 4.5e+67)) tmp = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.9e-9) || ~((y <= 4.5e+67))) tmp = x + ((z / y) - (x * (a / y))); else tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.9e-9], N[Not[LessEqual[y, 4.5e+67]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-9} \lor \neg \left(y \leq 4.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -2.89999999999999991e-9 or 4.4999999999999998e67 < y Initial program 6.2%
add-cube-cbrt6.2%
pow36.2%
*-commutative6.2%
*-commutative6.2%
fma-def6.2%
fma-def6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 63.6%
associate--l+63.6%
associate-/l*67.7%
associate-/r/67.7%
Simplified67.7%
if -2.89999999999999991e-9 < y < 4.4999999999999998e67Initial program 92.3%
Taylor expanded in t around inf 72.5%
Final simplification70.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6600.0) (not (<= y 4.3e+55))) (+ x (- (/ z y) (* x (/ a y)))) (/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6600.0) || !(y <= 4.3e+55)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-6600.0d0)) .or. (.not. (y <= 4.3d+55))) then
tmp = x + ((z / y) - (x * (a / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6600.0) || !(y <= 4.3e+55)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6600.0) or not (y <= 4.3e+55): tmp = x + ((z / y) - (x * (a / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6600.0) || !(y <= 4.3e+55)) tmp = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -6600.0) || ~((y <= 4.3e+55))) tmp = x + ((z / y) - (x * (a / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6600.0], N[Not[LessEqual[y, 4.3e+55]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6600 \lor \neg \left(y \leq 4.3 \cdot 10^{+55}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
\end{array}
\end{array}
if y < -6600 or 4.2999999999999999e55 < y Initial program 5.4%
add-cube-cbrt5.4%
pow35.4%
*-commutative5.4%
*-commutative5.4%
fma-def5.4%
fma-def5.4%
Applied egg-rr5.4%
Taylor expanded in y around inf 63.1%
associate--l+63.1%
associate-/l*67.2%
associate-/r/67.1%
Simplified67.1%
if -6600 < y < 4.2999999999999999e55Initial program 93.7%
Taylor expanded in x around 0 91.0%
Taylor expanded in i around inf 60.8%
Final simplification63.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* x (/ a y))))))
(if (<= y -2.9e-9)
t_1
(if (<= y -3.2e-90)
(/ (+ t (* y 230661.510616)) (* y (+ c (* y b))))
(if (<= y 4.8e-12) (/ t i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -3.2e-90) {
tmp = (t + (y * 230661.510616)) / (y * (c + (y * b)));
} else if (y <= 4.8e-12) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (x * (a / y)))
if (y <= (-2.9d-9)) then
tmp = t_1
else if (y <= (-3.2d-90)) then
tmp = (t + (y * 230661.510616d0)) / (y * (c + (y * b)))
else if (y <= 4.8d-12) then
tmp = t / i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (x * (a / y)));
double tmp;
if (y <= -2.9e-9) {
tmp = t_1;
} else if (y <= -3.2e-90) {
tmp = (t + (y * 230661.510616)) / (y * (c + (y * b)));
} else if (y <= 4.8e-12) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (x * (a / y))) tmp = 0 if y <= -2.9e-9: tmp = t_1 elif y <= -3.2e-90: tmp = (t + (y * 230661.510616)) / (y * (c + (y * b))) elif y <= 4.8e-12: tmp = t / i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))) tmp = 0.0 if (y <= -2.9e-9) tmp = t_1; elseif (y <= -3.2e-90) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * Float64(c + Float64(y * b)))); elseif (y <= 4.8e-12) tmp = Float64(t / i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (x * (a / y))); tmp = 0.0; if (y <= -2.9e-9) tmp = t_1; elseif (y <= -3.2e-90) tmp = (t + (y * 230661.510616)) / (y * (c + (y * b))); elseif (y <= 4.8e-12) tmp = t / i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-9], t$95$1, If[LessEqual[y, -3.2e-90], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-12], N[(t / i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-90}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.89999999999999991e-9 or 4.79999999999999974e-12 < y Initial program 12.4%
add-cube-cbrt12.3%
pow312.3%
*-commutative12.3%
*-commutative12.3%
fma-def12.3%
fma-def12.3%
Applied egg-rr12.3%
Taylor expanded in y around inf 55.8%
associate--l+55.8%
associate-/l*59.3%
associate-/r/59.3%
Simplified59.3%
if -2.89999999999999991e-9 < y < -3.20000000000000007e-90Initial program 99.1%
Taylor expanded in i around 0 72.1%
Taylor expanded in y around 0 53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in y around 0 44.3%
*-commutative44.3%
Simplified44.3%
if -3.20000000000000007e-90 < y < 4.79999999999999974e-12Initial program 99.9%
Taylor expanded in y around 0 69.3%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.3e+23) (not (<= y 7e-12))) (+ x (- (/ z y) (* x (/ a y)))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+23) || !(y <= 7e-12)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.3d+23)) .or. (.not. (y <= 7d-12))) then
tmp = x + ((z / y) - (x * (a / y)))
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+23) || !(y <= 7e-12)) {
tmp = x + ((z / y) - (x * (a / y)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.3e+23) or not (y <= 7e-12): tmp = x + ((z / y) - (x * (a / y))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.3e+23) || !(y <= 7e-12)) tmp = Float64(x + Float64(Float64(z / y) - Float64(x * Float64(a / y)))); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.3e+23) || ~((y <= 7e-12))) tmp = x + ((z / y) - (x * (a / y))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.3e+23], N[Not[LessEqual[y, 7e-12]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(x * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+23} \lor \neg \left(y \leq 7 \cdot 10^{-12}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -2.3e23 or 7.0000000000000001e-12 < y Initial program 9.9%
add-cube-cbrt9.8%
pow39.8%
*-commutative9.8%
*-commutative9.8%
fma-def9.8%
fma-def9.8%
Applied egg-rr9.8%
Taylor expanded in y around inf 57.3%
associate--l+57.3%
associate-/l*60.9%
associate-/r/60.9%
Simplified60.9%
if -2.3e23 < y < 7.0000000000000001e-12Initial program 99.7%
Taylor expanded in y around 0 60.6%
Final simplification60.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.4e+36) x (if (<= y 2.5e-12) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.4e+36) {
tmp = x;
} else if (y <= 2.5e-12) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2.4d+36)) then
tmp = x
else if (y <= 2.5d-12) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.4e+36) {
tmp = x;
} else if (y <= 2.5e-12) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.4e+36: tmp = x elif y <= 2.5e-12: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.4e+36) tmp = x; elseif (y <= 2.5e-12) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.4e+36) tmp = x; elseif (y <= 2.5e-12) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.4e+36], x, If[LessEqual[y, 2.5e-12], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.39999999999999992e36 or 2.49999999999999985e-12 < y Initial program 9.3%
Taylor expanded in y around inf 47.6%
if -2.39999999999999992e36 < y < 2.49999999999999985e-12Initial program 98.9%
Taylor expanded in y around 0 59.6%
Final simplification53.2%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 51.0%
Taylor expanded in y around inf 27.0%
Final simplification27.0%
herbie shell --seed 2023319
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))