
(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 13 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 (+ b (* y (+ y a))))
(t_2 (pow t_1 2.0))
(t_3 (* y t_1))
(t_4 (+ x (- (/ z y) (/ a (/ y x)))))
(t_5 (+ c t_3))
(t_6 (pow t_5 2.0))
(t_7 (* y (+ z (* y x))))
(t_8
(-
(+
(/ t (* y t_5))
(-
(+ (* 230661.510616 (/ 1.0 t_3)) (/ (+ 27464.7644705 t_7) t_1))
(*
c
(+
(* 230661.510616 (/ 1.0 (* (pow y 2.0) t_2)))
(+
(* 27464.7644705 (/ 1.0 (* y t_2)))
(+ (/ z t_2) (/ (* y x) t_2)))))))
(*
i
(+
(* 230661.510616 (/ 1.0 (* y t_6)))
(+
(* 27464.7644705 (/ 1.0 t_6))
(+ (/ t (* t_6 (pow y 2.0))) (/ t_7 t_6))))))))
(if (<= y -1.15e+117)
t_4
(if (<= y -6.6e+36)
t_8
(if (<= y 1.1e+25)
(/
(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))
(if (<= y 3.8e+107) t_8 t_4))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b + (y * (y + a));
double t_2 = pow(t_1, 2.0);
double t_3 = y * t_1;
double t_4 = x + ((z / y) - (a / (y / x)));
double t_5 = c + t_3;
double t_6 = pow(t_5, 2.0);
double t_7 = y * (z + (y * x));
double t_8 = ((t / (y * t_5)) + (((230661.510616 * (1.0 / t_3)) + ((27464.7644705 + t_7) / t_1)) - (c * ((230661.510616 * (1.0 / (pow(y, 2.0) * t_2))) + ((27464.7644705 * (1.0 / (y * t_2))) + ((z / t_2) + ((y * x) / t_2))))))) - (i * ((230661.510616 * (1.0 / (y * t_6))) + ((27464.7644705 * (1.0 / t_6)) + ((t / (t_6 * pow(y, 2.0))) + (t_7 / t_6)))));
double tmp;
if (y <= -1.15e+117) {
tmp = t_4;
} else if (y <= -6.6e+36) {
tmp = t_8;
} else if (y <= 1.1e+25) {
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 if (y <= 3.8e+107) {
tmp = t_8;
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b + Float64(y * Float64(y + a))) t_2 = t_1 ^ 2.0 t_3 = Float64(y * t_1) t_4 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) t_5 = Float64(c + t_3) t_6 = t_5 ^ 2.0 t_7 = Float64(y * Float64(z + Float64(y * x))) t_8 = Float64(Float64(Float64(t / Float64(y * t_5)) + Float64(Float64(Float64(230661.510616 * Float64(1.0 / t_3)) + Float64(Float64(27464.7644705 + t_7) / t_1)) - Float64(c * Float64(Float64(230661.510616 * Float64(1.0 / Float64((y ^ 2.0) * t_2))) + Float64(Float64(27464.7644705 * Float64(1.0 / Float64(y * t_2))) + Float64(Float64(z / t_2) + Float64(Float64(y * x) / t_2))))))) - Float64(i * Float64(Float64(230661.510616 * Float64(1.0 / Float64(y * t_6))) + Float64(Float64(27464.7644705 * Float64(1.0 / t_6)) + Float64(Float64(t / Float64(t_6 * (y ^ 2.0))) + Float64(t_7 / t_6)))))) tmp = 0.0 if (y <= -1.15e+117) tmp = t_4; elseif (y <= -6.6e+36) tmp = t_8; elseif (y <= 1.1e+25) 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)); elseif (y <= 3.8e+107) tmp = t_8; else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(c + t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[Power[t$95$5, 2.0], $MachinePrecision]}, Block[{t$95$7 = N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(N[(t / N[(y * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(230661.510616 * N[(1.0 / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 + t$95$7), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(230661.510616 * N[(1.0 / N[(N[Power[y, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 * N[(1.0 / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / t$95$2), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(N[(230661.510616 * N[(1.0 / N[(y * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 * N[(1.0 / t$95$6), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(t$95$6 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 / t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+117], t$95$4, If[LessEqual[y, -6.6e+36], t$95$8, If[LessEqual[y, 1.1e+25], 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], If[LessEqual[y, 3.8e+107], t$95$8, t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b + y \cdot \left(y + a\right)\\
t_2 := {t\_1}^{2}\\
t_3 := y \cdot t\_1\\
t_4 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
t_5 := c + t\_3\\
t_6 := {t\_5}^{2}\\
t_7 := y \cdot \left(z + y \cdot x\right)\\
t_8 := \left(\frac{t}{y \cdot t\_5} + \left(\left(230661.510616 \cdot \frac{1}{t\_3} + \frac{27464.7644705 + t\_7}{t\_1}\right) - c \cdot \left(230661.510616 \cdot \frac{1}{{y}^{2} \cdot t\_2} + \left(27464.7644705 \cdot \frac{1}{y \cdot t\_2} + \left(\frac{z}{t\_2} + \frac{y \cdot x}{t\_2}\right)\right)\right)\right)\right) - i \cdot \left(230661.510616 \cdot \frac{1}{y \cdot t\_6} + \left(27464.7644705 \cdot \frac{1}{t\_6} + \left(\frac{t}{t\_6 \cdot {y}^{2}} + \frac{t\_7}{t\_6}\right)\right)\right)\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+117}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{+36}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+25}:\\
\;\;\;\;\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{elif}\;y \leq 3.8 \cdot 10^{+107}:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y < -1.14999999999999994e117 or 3.7999999999999998e107 < y Initial program 0.1%
Taylor expanded in y around inf 82.4%
associate--l+82.4%
associate-/l*88.2%
Simplified88.2%
if -1.14999999999999994e117 < y < -6.5999999999999997e36 or 1.1e25 < y < 3.7999999999999998e107Initial program 25.2%
Taylor expanded in i around 0 40.4%
Taylor expanded in c around 0 67.0%
if -6.5999999999999997e36 < y < 1.1e25Initial program 96.1%
fma-def96.1%
fma-def96.1%
fma-def96.1%
fma-def96.1%
fma-def96.1%
fma-def96.1%
fma-def96.1%
Simplified96.1%
Final simplification88.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.05e+60) (not (<= y 2.7e+50)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(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))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.05e+60) || !(y <= 2.7e+50)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
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);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.05e+60) || !(y <= 2.7e+50)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else 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)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.05e+60], N[Not[LessEqual[y, 2.7e+50]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+60} \lor \neg \left(y \leq 2.7 \cdot 10^{+50}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if y < -1.0500000000000001e60 or 2.7e50 < y Initial program 4.5%
Taylor expanded in y around inf 70.3%
associate--l+70.3%
associate-/l*74.5%
Simplified74.5%
if -1.0500000000000001e60 < y < 2.7e50Initial program 90.5%
fma-def90.5%
fma-def90.5%
fma-def90.5%
fma-def90.5%
fma-def90.5%
fma-def90.5%
fma-def90.5%
Simplified90.5%
Final simplification83.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
(t_2
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))) t_1))
(t_3 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1.08e+74)
t_3
(if (<= y -1.4e-40)
t_2
(if (<= y 5e-12)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 2.1e+99) 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 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.08e+74) {
tmp = t_3;
} else if (y <= -1.4e-40) {
tmp = t_2;
} else if (y <= 5e-12) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.1e+99) {
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 = c + (y * (b + (y * (y + a))))
t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
t_3 = x + ((z / y) - (a / (y / x)))
if (y <= (-1.08d+74)) then
tmp = t_3
else if (y <= (-1.4d-40)) then
tmp = t_2
else if (y <= 5d-12) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 2.1d+99) 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 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.08e+74) {
tmp = t_3;
} else if (y <= -1.4e-40) {
tmp = t_2;
} else if (y <= 5e-12) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.1e+99) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1 t_3 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1.08e+74: tmp = t_3 elif y <= -1.4e-40: tmp = t_2 elif y <= 5e-12: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 2.1e+99: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -1.08e+74) tmp = t_3; elseif (y <= -1.4e-40) tmp = t_2; elseif (y <= 5e-12) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 2.1e+99) 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 = c + (y * (b + (y * (y + a)))); t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1; t_3 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -1.08e+74) tmp = t_3; elseif (y <= -1.4e-40) tmp = t_2; elseif (y <= 5e-12) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 2.1e+99) 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[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.08e+74], t$95$3, If[LessEqual[y, -1.4e-40], t$95$2, If[LessEqual[y, 5e-12], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+99], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1.08 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-12}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.08e74 or 2.1000000000000001e99 < y Initial program 1.4%
Taylor expanded in y around inf 79.0%
associate--l+79.0%
associate-/l*84.2%
Simplified84.2%
if -1.08e74 < y < -1.4e-40 or 4.9999999999999997e-12 < y < 2.1000000000000001e99Initial program 46.3%
Taylor expanded in t around 0 40.6%
Taylor expanded in i around 0 47.7%
if -1.4e-40 < y < 4.9999999999999997e-12Initial program 99.8%
Taylor expanded in y around 0 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification81.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.2e+59) (not (<= y 4e+51)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -4.2e+59) || !(y <= 4e+51)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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.2d+59)) .or. (.not. (y <= 4d+51))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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.2e+59) || !(y <= 4e+51)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -4.2e+59) or not (y <= 4e+51): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -4.2e+59) || !(y <= 4e+51)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -4.2e+59) || ~((y <= 4e+51))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4.2e+59], N[Not[LessEqual[y, 4e+51]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+59} \lor \neg \left(y \leq 4 \cdot 10^{+51}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -4.19999999999999968e59 or 4e51 < y Initial program 4.5%
Taylor expanded in y around inf 70.3%
associate--l+70.3%
associate-/l*74.5%
Simplified74.5%
if -4.19999999999999968e59 < y < 4e51Initial program 90.5%
Final simplification83.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.4e+59) (not (<= y 8.5e+50)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.4e+59) || !(y <= 8.5e+50)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-3.4d+59)) .or. (.not. (y <= 8.5d+50))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -3.4e+59) || !(y <= 8.5e+50)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.4e+59) or not (y <= 8.5e+50): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.4e+59) || !(y <= 8.5e+50)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.4e+59) || ~((y <= 8.5e+50))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.4e+59], N[Not[LessEqual[y, 8.5e+50]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $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] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+59} \lor \neg \left(y \leq 8.5 \cdot 10^{+50}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\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(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -3.40000000000000006e59 or 8.49999999999999961e50 < y Initial program 4.5%
Taylor expanded in y around inf 70.3%
associate--l+70.3%
associate-/l*74.5%
Simplified74.5%
if -3.40000000000000006e59 < y < 8.49999999999999961e50Initial program 90.5%
Taylor expanded in x around 0 83.1%
Final simplification79.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.7e+30) (not (<= y 6e-5))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.7e+30) || !(y <= 6e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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.7d+30)) .or. (.not. (y <= 6d-5))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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.7e+30) || !(y <= 6e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.7e+30) or not (y <= 6e-5): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.7e+30) || !(y <= 6e-5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.7e+30) || ~((y <= 6e-5))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.7e+30], N[Not[LessEqual[y, 6e-5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+30} \lor \neg \left(y \leq 6 \cdot 10^{-5}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -2.6999999999999999e30 or 6.00000000000000015e-5 < y Initial program 13.6%
Taylor expanded in y around inf 61.3%
associate--l+61.3%
associate-/l*64.8%
Simplified64.8%
if -2.6999999999999999e30 < y < 6.00000000000000015e-5Initial program 97.4%
Taylor expanded in y around 0 89.1%
*-commutative89.1%
Simplified89.1%
Final simplification76.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.3e+31) (not (<= y 6e-5)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.3e+31) || !(y <= 6e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * 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.3d+31)) .or. (.not. (y <= 6d-5))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * 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.3e+31) || !(y <= 6e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.3e+31) or not (y <= 6e-5): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.3e+31) || !(y <= 6e-5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.3e+31) || ~((y <= 6e-5))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.3e+31], N[Not[LessEqual[y, 6e-5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+31} \lor \neg \left(y \leq 6 \cdot 10^{-5}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.3e31 or 6.00000000000000015e-5 < y Initial program 13.6%
Taylor expanded in y around inf 61.3%
associate--l+61.3%
associate-/l*64.8%
Simplified64.8%
if -1.3e31 < y < 6.00000000000000015e-5Initial program 97.4%
Taylor expanded in y around 0 89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y around 0 85.9%
Final simplification74.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.8e+31) (not (<= y 5.7e-5))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.8e+31) || !(y <= 5.7e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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.8d+31)) .or. (.not. (y <= 5.7d-5))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
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.8e+31) || !(y <= 5.7e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.8e+31) or not (y <= 5.7e-5): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.8e+31) || !(y <= 5.7e-5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.8e+31) || ~((y <= 5.7e-5))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.8e+31], N[Not[LessEqual[y, 5.7e-5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+31} \lor \neg \left(y \leq 5.7 \cdot 10^{-5}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -2.80000000000000017e31 or 5.7000000000000003e-5 < y Initial program 13.6%
Taylor expanded in y around inf 61.3%
associate--l+61.3%
associate-/l*64.8%
Simplified64.8%
if -2.80000000000000017e31 < y < 5.7000000000000003e-5Initial program 97.4%
Taylor expanded in t around inf 75.1%
Final simplification69.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.5e+30) (not (<= y 4.5))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.5e+30) || !(y <= 4.5)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-1.5d+30)) .or. (.not. (y <= 4.5d0))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -1.5e+30) || !(y <= 4.5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.5e+30) or not (y <= 4.5): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.5e+30) || !(y <= 4.5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -1.5e+30) || ~((y <= 4.5))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.5e+30], N[Not[LessEqual[y, 4.5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+30} \lor \neg \left(y \leq 4.5\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1.49999999999999989e30 or 4.5 < y Initial program 13.0%
Taylor expanded in y around inf 61.7%
associate--l+61.7%
associate-/l*65.2%
Simplified65.2%
if -1.49999999999999989e30 < y < 4.5Initial program 97.4%
Taylor expanded in y around 0 55.8%
Final simplification60.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.8e+29) (not (<= y 1.95))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.8e+29) || !(y <= 1.95)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / 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 <= (-5.8d+29)) .or. (.not. (y <= 1.95d0))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / 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 <= -5.8e+29) || !(y <= 1.95)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.8e+29) or not (y <= 1.95): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.8e+29) || !(y <= 1.95)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.8e+29) || ~((y <= 1.95))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.8e+29], N[Not[LessEqual[y, 1.95]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+29} \lor \neg \left(y \leq 1.95\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i}\\
\end{array}
\end{array}
if y < -5.7999999999999999e29 or 1.94999999999999996 < y Initial program 13.0%
Taylor expanded in y around inf 61.7%
associate--l+61.7%
associate-/l*65.2%
Simplified65.2%
if -5.7999999999999999e29 < y < 1.94999999999999996Initial program 97.4%
Taylor expanded in y around 0 88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in i around inf 58.8%
Final simplification62.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -9.5e+14) x (if (<= y 4.2e+51) (/ t i) (- x (/ a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -9.5e+14) {
tmp = x;
} else if (y <= 4.2e+51) {
tmp = t / i;
} else {
tmp = x - (a / (y / 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 <= (-9.5d+14)) then
tmp = x
else if (y <= 4.2d+51) then
tmp = t / i
else
tmp = x - (a / (y / 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 <= -9.5e+14) {
tmp = x;
} else if (y <= 4.2e+51) {
tmp = t / i;
} else {
tmp = x - (a / (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -9.5e+14: tmp = x elif y <= 4.2e+51: tmp = t / i else: tmp = x - (a / (y / x)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9.5e+14) tmp = x; elseif (y <= 4.2e+51) tmp = Float64(t / i); else tmp = Float64(x - Float64(a / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -9.5e+14) tmp = x; elseif (y <= 4.2e+51) tmp = t / i; else tmp = x - (a / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9.5e+14], x, If[LessEqual[y, 4.2e+51], N[(t / i), $MachinePrecision], N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -9.5e14Initial program 11.5%
Taylor expanded in y around inf 48.0%
if -9.5e14 < y < 4.2000000000000002e51Initial program 95.3%
Taylor expanded in y around 0 52.5%
if 4.2000000000000002e51 < y Initial program 7.8%
Taylor expanded in x around inf 6.4%
Taylor expanded in y around inf 55.6%
mul-1-neg55.6%
associate-/l*58.7%
Simplified58.7%
Final simplification52.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -9.6e+14) x (if (<= y 9.2e-43) (/ 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 <= -9.6e+14) {
tmp = x;
} else if (y <= 9.2e-43) {
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 <= (-9.6d+14)) then
tmp = x
else if (y <= 9.2d-43) 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 <= -9.6e+14) {
tmp = x;
} else if (y <= 9.2e-43) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -9.6e+14: tmp = x elif y <= 9.2e-43: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9.6e+14) tmp = x; elseif (y <= 9.2e-43) 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 <= -9.6e+14) tmp = x; elseif (y <= 9.2e-43) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9.6e+14], x, If[LessEqual[y, 9.2e-43], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-43}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.6e14 or 9.1999999999999995e-43 < y Initial program 19.3%
Taylor expanded in y around inf 45.9%
if -9.6e14 < y < 9.1999999999999995e-43Initial program 98.9%
Taylor expanded in y around 0 62.2%
Final simplification52.7%
(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 52.9%
Taylor expanded in y around inf 28.1%
Final simplification28.1%
herbie shell --seed 2024031
(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)))