
(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 14 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
(if (<=
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))
INFINITY)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(- (+ 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 tmp;
if ((((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * (c + (y * ((y * (y + a)) + b)))))) <= ((double) INFINITY)) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (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(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))) <= Inf) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\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 91.4%
fma-define91.4%
fma-define91.4%
fma-define91.4%
fma-define91.4%
fma-define91.4%
fma-define91.4%
fma-define91.4%
Simplified91.4%
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%
Taylor expanded in y around inf 81.2%
Final simplification88.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 (+ c (* y (+ (* y (+ y a)) b))))))))
(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 * (c + (y * ((y * (y + a)) + b)))));
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 * (c + (y * ((y * (y + a)) + b)))));
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 * (c + (y * ((y * (y + a)) + b))))) 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(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * 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 * (c + (y * ((y * (y + a)) + b))))); 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[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\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 91.4%
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%
Taylor expanded in y around inf 81.2%
Final simplification88.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (+ t (* y 230661.510616)) i))
(t_2 (+ c (* y (+ (* y (+ y a)) b))))
(t_3 (/ (/ t y) t_2))
(t_4 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.66e+49)
t_4
(if (<= y -5.6e-36)
t_3
(if (<= y 4.8e-142)
t_1
(if (<= y 4.2e-102)
(/ t (* y t_2))
(if (<= y 7.2e-42) t_1 (if (<= y 6e+59) t_3 t_4))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / i;
double t_2 = c + (y * ((y * (y + a)) + b));
double t_3 = (t / y) / t_2;
double t_4 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.66e+49) {
tmp = t_4;
} else if (y <= -5.6e-36) {
tmp = t_3;
} else if (y <= 4.8e-142) {
tmp = t_1;
} else if (y <= 4.2e-102) {
tmp = t / (y * t_2);
} else if (y <= 7.2e-42) {
tmp = t_1;
} else if (y <= 6e+59) {
tmp = t_3;
} else {
tmp = t_4;
}
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) :: t_4
real(8) :: tmp
t_1 = (t + (y * 230661.510616d0)) / i
t_2 = c + (y * ((y * (y + a)) + b))
t_3 = (t / y) / t_2
t_4 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.66d+49)) then
tmp = t_4
else if (y <= (-5.6d-36)) then
tmp = t_3
else if (y <= 4.8d-142) then
tmp = t_1
else if (y <= 4.2d-102) then
tmp = t / (y * t_2)
else if (y <= 7.2d-42) then
tmp = t_1
else if (y <= 6d+59) then
tmp = t_3
else
tmp = t_4
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 = (t + (y * 230661.510616)) / i;
double t_2 = c + (y * ((y * (y + a)) + b));
double t_3 = (t / y) / t_2;
double t_4 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.66e+49) {
tmp = t_4;
} else if (y <= -5.6e-36) {
tmp = t_3;
} else if (y <= 4.8e-142) {
tmp = t_1;
} else if (y <= 4.2e-102) {
tmp = t / (y * t_2);
} else if (y <= 7.2e-42) {
tmp = t_1;
} else if (y <= 6e+59) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * 230661.510616)) / i t_2 = c + (y * ((y * (y + a)) + b)) t_3 = (t / y) / t_2 t_4 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.66e+49: tmp = t_4 elif y <= -5.6e-36: tmp = t_3 elif y <= 4.8e-142: tmp = t_1 elif y <= 4.2e-102: tmp = t / (y * t_2) elif y <= 7.2e-42: tmp = t_1 elif y <= 6e+59: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * 230661.510616)) / i) t_2 = Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b))) t_3 = Float64(Float64(t / y) / t_2) t_4 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.66e+49) tmp = t_4; elseif (y <= -5.6e-36) tmp = t_3; elseif (y <= 4.8e-142) tmp = t_1; elseif (y <= 4.2e-102) tmp = Float64(t / Float64(y * t_2)); elseif (y <= 7.2e-42) tmp = t_1; elseif (y <= 6e+59) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * 230661.510616)) / i; t_2 = c + (y * ((y * (y + a)) + b)); t_3 = (t / y) / t_2; t_4 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.66e+49) tmp = t_4; elseif (y <= -5.6e-36) tmp = t_3; elseif (y <= 4.8e-142) tmp = t_1; elseif (y <= 4.2e-102) tmp = t / (y * t_2); elseif (y <= 7.2e-42) tmp = t_1; elseif (y <= 6e+59) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t / y), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.66e+49], t$95$4, If[LessEqual[y, -5.6e-36], t$95$3, If[LessEqual[y, 4.8e-142], t$95$1, If[LessEqual[y, 4.2e-102], N[(t / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-42], t$95$1, If[LessEqual[y, 6e+59], t$95$3, t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot 230661.510616}{i}\\
t_2 := c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\\
t_3 := \frac{\frac{t}{y}}{t\_2}\\
t_4 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.66 \cdot 10^{+49}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-36}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-102}:\\
\;\;\;\;\frac{t}{y \cdot t\_2}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+59}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y < -1.65999999999999999e49 or 6.0000000000000001e59 < y Initial program 5.8%
Taylor expanded in y around inf 74.8%
if -1.65999999999999999e49 < y < -5.6000000000000002e-36 or 7.2000000000000004e-42 < y < 6.0000000000000001e59Initial program 80.2%
Taylor expanded in i around 0 67.6%
Taylor expanded in t around inf 35.5%
associate-/r*37.6%
+-commutative37.6%
fma-undefine37.6%
+-commutative37.6%
+-commutative37.6%
fma-undefine37.6%
Simplified37.6%
Taylor expanded in c around 0 37.6%
if -5.6000000000000002e-36 < y < 4.79999999999999976e-142 or 4.2e-102 < y < 7.2000000000000004e-42Initial program 99.8%
Taylor expanded in y around 0 55.0%
fma-define55.0%
associate-*r/55.0%
metadata-eval55.0%
associate-/l*59.0%
Simplified59.0%
Taylor expanded in i around inf 66.7%
*-commutative66.7%
Simplified66.7%
if 4.79999999999999976e-142 < y < 4.2e-102Initial program 99.9%
Taylor expanded in i around 0 67.5%
Taylor expanded in t around inf 67.7%
Final simplification64.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (+ t (* y 230661.510616)) i))
(t_2 (- (+ x (/ z y)) (/ (* x a) y)))
(t_3 (* y (+ (* y (+ y a)) b)))
(t_4 (/ t (* y (+ c t_3)))))
(if (<= y -1.25e+50)
t_2
(if (<= y -5e-31)
t_4
(if (<= y 4.8e-142)
t_1
(if (<= y 2.55e-102)
t_4
(if (<= y 1.04e-41) t_1 (if (<= y 6e+59) (/ (/ t y) t_3) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / i;
double t_2 = (x + (z / y)) - ((x * a) / y);
double t_3 = y * ((y * (y + a)) + b);
double t_4 = t / (y * (c + t_3));
double tmp;
if (y <= -1.25e+50) {
tmp = t_2;
} else if (y <= -5e-31) {
tmp = t_4;
} else if (y <= 4.8e-142) {
tmp = t_1;
} else if (y <= 2.55e-102) {
tmp = t_4;
} else if (y <= 1.04e-41) {
tmp = t_1;
} else if (y <= 6e+59) {
tmp = (t / y) / t_3;
} 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (t + (y * 230661.510616d0)) / i
t_2 = (x + (z / y)) - ((x * a) / y)
t_3 = y * ((y * (y + a)) + b)
t_4 = t / (y * (c + t_3))
if (y <= (-1.25d+50)) then
tmp = t_2
else if (y <= (-5d-31)) then
tmp = t_4
else if (y <= 4.8d-142) then
tmp = t_1
else if (y <= 2.55d-102) then
tmp = t_4
else if (y <= 1.04d-41) then
tmp = t_1
else if (y <= 6d+59) then
tmp = (t / y) / t_3
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 = (t + (y * 230661.510616)) / i;
double t_2 = (x + (z / y)) - ((x * a) / y);
double t_3 = y * ((y * (y + a)) + b);
double t_4 = t / (y * (c + t_3));
double tmp;
if (y <= -1.25e+50) {
tmp = t_2;
} else if (y <= -5e-31) {
tmp = t_4;
} else if (y <= 4.8e-142) {
tmp = t_1;
} else if (y <= 2.55e-102) {
tmp = t_4;
} else if (y <= 1.04e-41) {
tmp = t_1;
} else if (y <= 6e+59) {
tmp = (t / y) / t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * 230661.510616)) / i t_2 = (x + (z / y)) - ((x * a) / y) t_3 = y * ((y * (y + a)) + b) t_4 = t / (y * (c + t_3)) tmp = 0 if y <= -1.25e+50: tmp = t_2 elif y <= -5e-31: tmp = t_4 elif y <= 4.8e-142: tmp = t_1 elif y <= 2.55e-102: tmp = t_4 elif y <= 1.04e-41: tmp = t_1 elif y <= 6e+59: tmp = (t / y) / t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * 230661.510616)) / i) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) t_3 = Float64(y * Float64(Float64(y * Float64(y + a)) + b)) t_4 = Float64(t / Float64(y * Float64(c + t_3))) tmp = 0.0 if (y <= -1.25e+50) tmp = t_2; elseif (y <= -5e-31) tmp = t_4; elseif (y <= 4.8e-142) tmp = t_1; elseif (y <= 2.55e-102) tmp = t_4; elseif (y <= 1.04e-41) tmp = t_1; elseif (y <= 6e+59) tmp = Float64(Float64(t / y) / t_3); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * 230661.510616)) / i; t_2 = (x + (z / y)) - ((x * a) / y); t_3 = y * ((y * (y + a)) + b); t_4 = t / (y * (c + t_3)); tmp = 0.0; if (y <= -1.25e+50) tmp = t_2; elseif (y <= -5e-31) tmp = t_4; elseif (y <= 4.8e-142) tmp = t_1; elseif (y <= 2.55e-102) tmp = t_4; elseif (y <= 1.04e-41) tmp = t_1; elseif (y <= 6e+59) tmp = (t / y) / t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t / N[(y * N[(c + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+50], t$95$2, If[LessEqual[y, -5e-31], t$95$4, If[LessEqual[y, 4.8e-142], t$95$1, If[LessEqual[y, 2.55e-102], t$95$4, If[LessEqual[y, 1.04e-41], t$95$1, If[LessEqual[y, 6e+59], N[(N[(t / y), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot 230661.510616}{i}\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
t_3 := y \cdot \left(y \cdot \left(y + a\right) + b\right)\\
t_4 := \frac{t}{y \cdot \left(c + t\_3\right)}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-31}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq 1.04 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+59}:\\
\;\;\;\;\frac{\frac{t}{y}}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.25e50 or 6.0000000000000001e59 < y Initial program 5.8%
Taylor expanded in y around inf 74.8%
if -1.25e50 < y < -5e-31 or 4.79999999999999976e-142 < y < 2.55e-102Initial program 92.3%
Taylor expanded in i around 0 69.3%
Taylor expanded in t around inf 46.6%
if -5e-31 < y < 4.79999999999999976e-142 or 2.55e-102 < y < 1.04e-41Initial program 99.8%
Taylor expanded in y around 0 55.0%
fma-define55.0%
associate-*r/55.0%
metadata-eval55.0%
associate-/l*59.0%
Simplified59.0%
Taylor expanded in i around inf 66.7%
*-commutative66.7%
Simplified66.7%
if 1.04e-41 < y < 6.0000000000000001e59Initial program 69.0%
Taylor expanded in i around 0 63.8%
Taylor expanded in t around inf 36.4%
associate-/r*41.2%
+-commutative41.2%
fma-undefine41.2%
+-commutative41.2%
+-commutative41.2%
fma-undefine41.2%
Simplified41.2%
Taylor expanded in c around 0 39.8%
Final simplification64.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y)))
(t_2 (+ c (* y (+ (* y (+ y a)) b)))))
(if (<= y -2.22e+49)
t_1
(if (<= y 6.1e+49)
(/ (+ t (* y 230661.510616)) (+ i (* y t_2)))
(if (<= y 4.1e+76)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_2)
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 t_2 = c + (y * ((y * (y + a)) + b));
double tmp;
if (y <= -2.22e+49) {
tmp = t_1;
} else if (y <= 6.1e+49) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 4.1e+76) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x + (z / y)) - ((x * a) / y)
t_2 = c + (y * ((y * (y + a)) + b))
if (y <= (-2.22d+49)) then
tmp = t_1
else if (y <= 6.1d+49) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_2))
else if (y <= 4.1d+76) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_2
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 t_2 = c + (y * ((y * (y + a)) + b));
double tmp;
if (y <= -2.22e+49) {
tmp = t_1;
} else if (y <= 6.1e+49) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 4.1e+76) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - ((x * a) / y) t_2 = c + (y * ((y * (y + a)) + b)) tmp = 0 if y <= -2.22e+49: tmp = t_1 elif y <= 6.1e+49: tmp = (t + (y * 230661.510616)) / (i + (y * t_2)) elif y <= 4.1e+76: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) t_2 = Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b))) tmp = 0.0 if (y <= -2.22e+49) tmp = t_1; elseif (y <= 6.1e+49) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_2))); elseif (y <= 4.1e+76) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_2); 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); t_2 = c + (y * ((y * (y + a)) + b)); tmp = 0.0; if (y <= -2.22e+49) tmp = t_1; elseif (y <= 6.1e+49) tmp = (t + (y * 230661.510616)) / (i + (y * t_2)); elseif (y <= 4.1e+76) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.22e+49], t$95$1, If[LessEqual[y, 6.1e+49], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+76], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
t_2 := c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\\
\mathbf{if}\;y \leq -2.22 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.1 \cdot 10^{+49}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+76}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.21999999999999995e49 or 4.0999999999999998e76 < y Initial program 2.5%
Taylor expanded in y around inf 79.1%
if -2.21999999999999995e49 < y < 6.09999999999999963e49Initial program 95.4%
Taylor expanded in y around 0 82.3%
*-commutative82.3%
Simplified82.3%
if 6.09999999999999963e49 < y < 4.0999999999999998e76Initial program 40.5%
Taylor expanded in i around 0 29.5%
Taylor expanded in t around 0 65.5%
Final simplification80.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5.9e+51) (not (<= y 1.52e+68)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.9e+51) || !(y <= 1.52e+68)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
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 <= (-5.9d+51)) .or. (.not. (y <= 1.52d+68))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * ((y * (y + a)) + b)))))
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 <= -5.9e+51) || !(y <= 1.52e+68)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.9e+51) or not (y <= 1.52e+68): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * ((y * (y + a)) + b))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.9e+51) || !(y <= 1.52e+68)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.9e+51) || ~((y <= 1.52e+68))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * ((y * (y + a)) + b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.9e+51], N[Not[LessEqual[y, 1.52e+68]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 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 * N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9 \cdot 10^{+51} \lor \neg \left(y \leq 1.52 \cdot 10^{+68}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\end{array}
if y < -5.89999999999999983e51 or 1.52000000000000008e68 < y Initial program 2.6%
Taylor expanded in y around inf 77.9%
if -5.89999999999999983e51 < y < 1.52000000000000008e68Initial program 93.9%
Taylor expanded in x around 0 88.0%
Final simplification84.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.55e+49) (not (<= y 1.52e+68)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -4.55e+49) || !(y <= 1.52e+68)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
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 <= (-4.55d+49)) .or. (.not. (y <= 1.52d+68))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * ((y * (y + a)) + b)))))
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 <= -4.55e+49) || !(y <= 1.52e+68)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -4.55e+49) or not (y <= 1.52e+68): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * ((y * (y + a)) + b))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -4.55e+49) || !(y <= 1.52e+68)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -4.55e+49) || ~((y <= 1.52e+68))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * ((y * (y + a)) + b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4.55e+49], N[Not[LessEqual[y, 1.52e+68]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.55 \cdot 10^{+49} \lor \neg \left(y \leq 1.52 \cdot 10^{+68}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\end{array}
if y < -4.54999999999999993e49 or 1.52000000000000008e68 < y Initial program 2.6%
Taylor expanded in y around inf 77.9%
if -4.54999999999999993e49 < y < 1.52000000000000008e68Initial program 93.9%
Taylor expanded in y around 0 80.7%
*-commutative80.7%
Simplified80.7%
Final simplification79.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (/ t y) (* y (+ (* y (+ y a)) b))))
(t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.32e+49)
t_2
(if (<= y -2.5e-35)
t_1
(if (<= y 8.6e-42)
(/ (+ t (* y 230661.510616)) i)
(if (<= y 6e+59) 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 = (t / y) / (y * ((y * (y + a)) + b));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.32e+49) {
tmp = t_2;
} else if (y <= -2.5e-35) {
tmp = t_1;
} else if (y <= 8.6e-42) {
tmp = (t + (y * 230661.510616)) / i;
} else if (y <= 6e+59) {
tmp = 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 = (t / y) / (y * ((y * (y + a)) + b))
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.32d+49)) then
tmp = t_2
else if (y <= (-2.5d-35)) then
tmp = t_1
else if (y <= 8.6d-42) then
tmp = (t + (y * 230661.510616d0)) / i
else if (y <= 6d+59) then
tmp = 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 = (t / y) / (y * ((y * (y + a)) + b));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.32e+49) {
tmp = t_2;
} else if (y <= -2.5e-35) {
tmp = t_1;
} else if (y <= 8.6e-42) {
tmp = (t + (y * 230661.510616)) / i;
} else if (y <= 6e+59) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t / y) / (y * ((y * (y + a)) + b)) t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.32e+49: tmp = t_2 elif y <= -2.5e-35: tmp = t_1 elif y <= 8.6e-42: tmp = (t + (y * 230661.510616)) / i elif y <= 6e+59: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t / y) / Float64(y * Float64(Float64(y * Float64(y + a)) + b))) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.32e+49) tmp = t_2; elseif (y <= -2.5e-35) tmp = t_1; elseif (y <= 8.6e-42) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); elseif (y <= 6e+59) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t / y) / (y * ((y * (y + a)) + b)); t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.32e+49) tmp = t_2; elseif (y <= -2.5e-35) tmp = t_1; elseif (y <= 8.6e-42) tmp = (t + (y * 230661.510616)) / i; elseif (y <= 6e+59) tmp = 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[(t / y), $MachinePrecision] / N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.32e+49], t$95$2, If[LessEqual[y, -2.5e-35], t$95$1, If[LessEqual[y, 8.6e-42], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 6e+59], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{t}{y}}{y \cdot \left(y \cdot \left(y + a\right) + b\right)}\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-42}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.32000000000000009e49 or 6.0000000000000001e59 < y Initial program 5.8%
Taylor expanded in y around inf 74.8%
if -1.32000000000000009e49 < y < -2.49999999999999982e-35 or 8.6000000000000002e-42 < y < 6.0000000000000001e59Initial program 80.2%
Taylor expanded in i around 0 67.6%
Taylor expanded in t around inf 35.5%
associate-/r*37.6%
+-commutative37.6%
fma-undefine37.6%
+-commutative37.6%
+-commutative37.6%
fma-undefine37.6%
Simplified37.6%
Taylor expanded in c around 0 34.7%
if -2.49999999999999982e-35 < y < 8.6000000000000002e-42Initial program 99.8%
Taylor expanded in y around 0 52.3%
fma-define52.3%
associate-*r/52.4%
metadata-eval52.4%
associate-/l*55.8%
Simplified55.8%
Taylor expanded in i around inf 63.4%
*-commutative63.4%
Simplified63.4%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.1e+49) (not (<= y 2.05e+52))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.1e+49) || !(y <= 2.05e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
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 <= (-1.1d+49)) .or. (.not. (y <= 2.05d+52))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * ((y * (y + a)) + b)))))
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 <= -1.1e+49) || !(y <= 2.05e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.1e+49) or not (y <= 2.05e+52): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * ((y * (y + a)) + b))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.1e+49) || !(y <= 2.05e+52)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.1e+49) || ~((y <= 2.05e+52))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * ((y * (y + a)) + b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.1e+49], N[Not[LessEqual[y, 2.05e+52]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+49} \lor \neg \left(y \leq 2.05 \cdot 10^{+52}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\end{array}
if y < -1.1e49 or 2.05e52 < y Initial program 5.8%
Taylor expanded in y around inf 74.1%
if -1.1e49 < y < 2.05e52Initial program 94.9%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
Final simplification79.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.2e+49) (not (<= y 2.6e+52))) (- (+ x (/ z y)) (/ (* x a) y)) (/ t (+ i (* y (+ c (* y (+ (* y (+ y a)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.2e+49) || !(y <= 2.6e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = t / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
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 <= (-5.2d+49)) .or. (.not. (y <= 2.6d+52))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = t / (i + (y * (c + (y * ((y * (y + a)) + b)))))
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 <= -5.2e+49) || !(y <= 2.6e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = t / (i + (y * (c + (y * ((y * (y + a)) + b)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.2e+49) or not (y <= 2.6e+52): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = t / (i + (y * (c + (y * ((y * (y + a)) + b))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.2e+49) || !(y <= 2.6e+52)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(Float64(y * Float64(y + a)) + b)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.2e+49) || ~((y <= 2.6e+52))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = t / (i + (y * (c + (y * ((y * (y + a)) + b))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.2e+49], N[Not[LessEqual[y, 2.6e+52]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+49} \lor \neg \left(y \leq 2.6 \cdot 10^{+52}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(y \cdot \left(y + a\right) + b\right)\right)}\\
\end{array}
\end{array}
if y < -5.19999999999999977e49 or 2.6e52 < y Initial program 5.8%
Taylor expanded in y around inf 74.1%
if -5.19999999999999977e49 < y < 2.6e52Initial program 94.9%
Taylor expanded in t around inf 68.3%
Final simplification70.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -8.6e+35) (not (<= y 1.6e+52))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -8.6e+35) || !(y <= 1.6e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / 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 <= (-8.6d+35)) .or. (.not. (y <= 1.6d+52))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / 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 <= -8.6e+35) || !(y <= 1.6e+52)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -8.6e+35) or not (y <= 1.6e+52): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -8.6e+35) || !(y <= 1.6e+52)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -8.6e+35) || ~((y <= 1.6e+52))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -8.6e+35], N[Not[LessEqual[y, 1.6e+52]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+35} \lor \neg \left(y \leq 1.6 \cdot 10^{+52}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -8.5999999999999995e35 or 1.6e52 < y Initial program 7.6%
Taylor expanded in y around inf 71.8%
if -8.5999999999999995e35 < y < 1.6e52Initial program 95.4%
Taylor expanded in y around 0 40.1%
fma-define40.1%
associate-*r/40.1%
metadata-eval40.1%
associate-/l*42.7%
Simplified42.7%
Taylor expanded in i around inf 48.5%
*-commutative48.5%
Simplified48.5%
Final simplification57.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.4e+41) x (if (<= y 1.18e+20) (/ (+ t (* y 230661.510616)) 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+41) {
tmp = x;
} else if (y <= 1.18e+20) {
tmp = (t + (y * 230661.510616)) / 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+41)) then
tmp = x
else if (y <= 1.18d+20) then
tmp = (t + (y * 230661.510616d0)) / 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+41) {
tmp = x;
} else if (y <= 1.18e+20) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.4e+41: tmp = x elif y <= 1.18e+20: tmp = (t + (y * 230661.510616)) / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.4e+41) tmp = x; elseif (y <= 1.18e+20) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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+41) tmp = x; elseif (y <= 1.18e+20) tmp = (t + (y * 230661.510616)) / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.4e+41], x, If[LessEqual[y, 1.18e+20], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+41}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+20}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.4000000000000002e41 or 1.18e20 < y Initial program 10.1%
Taylor expanded in y around inf 52.3%
if -2.4000000000000002e41 < y < 1.18e20Initial program 98.4%
Taylor expanded in y around 0 42.1%
fma-define42.1%
associate-*r/42.1%
metadata-eval42.1%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in i around inf 50.9%
*-commutative50.9%
Simplified50.9%
Final simplification51.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.4e+36) x (if (<= y 6.8e+20) (/ 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 <= 6.8e+20) {
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 <= 6.8d+20) 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 <= 6.8e+20) {
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 <= 6.8e+20: 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 <= 6.8e+20) 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 <= 6.8e+20) 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, 6.8e+20], 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 6.8 \cdot 10^{+20}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.39999999999999992e36 or 6.8e20 < y Initial program 10.1%
Taylor expanded in y around inf 52.3%
if -2.39999999999999992e36 < y < 6.8e20Initial program 98.4%
Taylor expanded in y around 0 43.6%
Final simplification47.1%
(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 62.5%
Taylor expanded in y around inf 23.6%
Final simplification23.6%
herbie shell --seed 2024039
(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)))