
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (<=
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
t_1)
2e+248)
(/
(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))
(+ (/ t t_1) (+ x (- (/ z y) (/ a (/ y x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / t_1) <= 2e+248) {
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 = (t / t_1) + (x + ((z / y) - (a / (y / x))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + 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) / t_1) <= 2e+248) 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(t / t_1) + Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, 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] / t$95$1), $MachinePrecision], 2e+248], 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[(t / t$95$1), $MachinePrecision] + N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
\mathbf{if}\;\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{t_1} \leq 2 \cdot 10^{+248}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{t}{t_1} + \left(x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2.00000000000000009e248Initial program 91.7%
fma-def91.7%
fma-def91.7%
fma-def91.7%
fma-def91.7%
fma-def91.7%
fma-def91.7%
fma-def91.7%
Simplified91.7%
if 2.00000000000000009e248 < (/.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 3.7%
Taylor expanded in t around 0 3.7%
Taylor expanded in y around inf 71.8%
associate--l+71.8%
associate-/l*79.5%
Simplified79.5%
Final simplification86.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2 (/ t t_1))
(t_3
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))))
(if (<= (/ (+ t_3 t) t_1) 2e+248)
(+ t_2 (/ t_3 t_1))
(+ t_2 (+ x (- (/ z y) (/ a (/ y x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = t / t_1;
double t_3 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))));
double tmp;
if (((t_3 + t) / t_1) <= 2e+248) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_2 + (x + ((z / y) - (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = t / t_1
t_3 = y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z)))))
if (((t_3 + t) / t_1) <= 2d+248) then
tmp = t_2 + (t_3 / t_1)
else
tmp = t_2 + (x + ((z / y) - (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 t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = t / t_1;
double t_3 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))));
double tmp;
if (((t_3 + t) / t_1) <= 2e+248) {
tmp = t_2 + (t_3 / t_1);
} else {
tmp = t_2 + (x + ((z / y) - (a / (y / x))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = t / t_1 t_3 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) tmp = 0 if ((t_3 + t) / t_1) <= 2e+248: tmp = t_2 + (t_3 / t_1) else: tmp = t_2 + (x + ((z / y) - (a / (y / x)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(t / t_1) t_3 = Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) tmp = 0.0 if (Float64(Float64(t_3 + t) / t_1) <= 2e+248) tmp = Float64(t_2 + Float64(t_3 / t_1)); else tmp = Float64(t_2 + Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = t / t_1; t_3 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))); tmp = 0.0; if (((t_3 + t) / t_1) <= 2e+248) tmp = t_2 + (t_3 / t_1); else tmp = t_2 + (x + ((z / y) - (a / (y / x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(t / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$3 + t), $MachinePrecision] / t$95$1), $MachinePrecision], 2e+248], N[(t$95$2 + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := \frac{t}{t_1}\\
t_3 := y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)\\
\mathbf{if}\;\frac{t_3 + t}{t_1} \leq 2 \cdot 10^{+248}:\\
\;\;\;\;t_2 + \frac{t_3}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2.00000000000000009e248Initial program 91.7%
Taylor expanded in t around 0 91.7%
if 2.00000000000000009e248 < (/.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 3.7%
Taylor expanded in t around 0 3.7%
Taylor expanded in y around inf 71.8%
associate--l+71.8%
associate-/l*79.5%
Simplified79.5%
Final simplification86.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
t_1)))
(if (<= t_2 2e+248) t_2 (+ (/ t t_1) (+ x (- (/ z y) (/ a (/ y x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / t_1;
double tmp;
if (t_2 <= 2e+248) {
tmp = t_2;
} else {
tmp = (t / t_1) + (x + ((z / y) - (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z)))))) + t) / t_1
if (t_2 <= 2d+248) then
tmp = t_2
else
tmp = (t / t_1) + (x + ((z / y) - (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 t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / t_1;
double tmp;
if (t_2 <= 2e+248) {
tmp = t_2;
} else {
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / t_1 tmp = 0 if t_2 <= 2e+248: tmp = t_2 else: tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / t_1) tmp = 0.0 if (t_2 <= 2e+248) tmp = t_2; else tmp = Float64(Float64(t / t_1) + Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / t_1; tmp = 0.0; if (t_2 <= 2e+248) tmp = t_2; else tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = 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] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, 2e+248], t$95$2, N[(N[(t / t$95$1), $MachinePrecision] + N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{t_1}\\
\mathbf{if}\;t_2 \leq 2 \cdot 10^{+248}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{t_1} + \left(x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2.00000000000000009e248Initial program 91.7%
if 2.00000000000000009e248 < (/.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 3.7%
Taylor expanded in t around 0 3.7%
Taylor expanded in y around inf 71.8%
associate--l+71.8%
associate-/l*79.5%
Simplified79.5%
Final simplification86.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.55e+111)
x
(if (<= y -2.3e+15)
(/ (+ (* x y) z) a)
(if (<= y -1.95e+15)
x
(if (<= y 1.9e+39)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) 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 <= -1.55e+111) {
tmp = x;
} else if (y <= -2.3e+15) {
tmp = ((x * y) + z) / a;
} else if (y <= -1.95e+15) {
tmp = x;
} else if (y <= 1.9e+39) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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.55d+111)) then
tmp = x
else if (y <= (-2.3d+15)) then
tmp = ((x * y) + z) / a
else if (y <= (-1.95d+15)) then
tmp = x
else if (y <= 1.9d+39) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else
tmp = (x + (z / y)) - ((x * a) / y)
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.55e+111) {
tmp = x;
} else if (y <= -2.3e+15) {
tmp = ((x * y) + z) / a;
} else if (y <= -1.95e+15) {
tmp = x;
} else if (y <= 1.9e+39) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.55e+111: tmp = x elif y <= -2.3e+15: tmp = ((x * y) + z) / a elif y <= -1.95e+15: tmp = x elif y <= 1.9e+39: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 (y <= -1.55e+111) tmp = x; elseif (y <= -2.3e+15) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= -1.95e+15) tmp = x; elseif (y <= 1.9e+39) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); 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) tmp = 0.0; if (y <= -1.55e+111) tmp = x; elseif (y <= -2.3e+15) tmp = ((x * y) + z) / a; elseif (y <= -1.95e+15) tmp = x; elseif (y <= 1.9e+39) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.55e+111], x, If[LessEqual[y, -2.3e+15], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -1.95e+15], x, If[LessEqual[y, 1.9e+39], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + 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}\;y \leq -1.55 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+39}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -1.55e111 or -2.3e15 < y < -1.95e15Initial program 1.9%
Taylor expanded in y around inf 80.8%
if -1.55e111 < y < -2.3e15Initial program 28.6%
Taylor expanded in a around inf 0.2%
Taylor expanded in y around -inf 24.1%
+-commutative24.1%
mul-1-neg24.1%
unsub-neg24.1%
Simplified30.6%
Taylor expanded in a around inf 31.7%
sub-neg31.7%
mul-1-neg31.7%
remove-double-neg31.7%
*-commutative31.7%
Simplified31.7%
if -1.95e15 < y < 1.8999999999999999e39Initial program 98.9%
Taylor expanded in y around 0 88.9%
*-commutative88.9%
Simplified88.9%
if 1.8999999999999999e39 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification78.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (or (<= y -6.5e+55) (not (<= y 1.2e+36)))
(+ (/ t t_1) (+ x (- (/ z y) (/ a (/ y x)))))
(/ (+ t (* y (+ 230661.510616 (* z (* y y))))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((y <= -6.5e+55) || !(y <= 1.2e+36)) {
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
if ((y <= (-6.5d+55)) .or. (.not. (y <= 1.2d+36))) then
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))))
else
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / 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 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((y <= -6.5e+55) || !(y <= 1.2e+36)) {
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i tmp = 0 if (y <= -6.5e+55) or not (y <= 1.2e+36): tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))) else: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) tmp = 0.0 if ((y <= -6.5e+55) || !(y <= 1.2e+36)) tmp = Float64(Float64(t / t_1) + Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x))))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; tmp = 0.0; if ((y <= -6.5e+55) || ~((y <= 1.2e+36))) tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))); else tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, If[Or[LessEqual[y, -6.5e+55], N[Not[LessEqual[y, 1.2e+36]], $MachinePrecision]], N[(N[(t / t$95$1), $MachinePrecision] + N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+55} \lor \neg \left(y \leq 1.2 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{t}{t_1} + \left(x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{t_1}\\
\end{array}
\end{array}
if y < -6.50000000000000027e55 or 1.19999999999999996e36 < y Initial program 2.1%
Taylor expanded in t around 0 2.1%
Taylor expanded in y around inf 68.4%
associate--l+68.4%
associate-/l*75.7%
Simplified75.7%
if -6.50000000000000027e55 < y < 1.19999999999999996e36Initial program 96.8%
Taylor expanded in z around inf 90.5%
*-commutative90.5%
unpow290.5%
Simplified90.5%
Final simplification83.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (or (<= y -2.6e+56) (not (<= y 1.65e+38)))
(+ (/ t t_1) (+ x (- (/ z y) (/ a (/ y x)))))
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((y <= -2.6e+56) || !(y <= 1.65e+38)) {
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
if ((y <= (-2.6d+56)) .or. (.not. (y <= 1.65d+38))) then
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / 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 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((y <= -2.6e+56) || !(y <= 1.65e+38)) {
tmp = (t / t_1) + (x + ((z / y) - (a / (y / x))));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i tmp = 0 if (y <= -2.6e+56) or not (y <= 1.65e+38): tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) tmp = 0.0 if ((y <= -2.6e+56) || !(y <= 1.65e+38)) tmp = Float64(Float64(t / t_1) + 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)))))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; tmp = 0.0; if ((y <= -2.6e+56) || ~((y <= 1.65e+38))) tmp = (t / t_1) + (x + ((z / y) - (a / (y / x)))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, If[Or[LessEqual[y, -2.6e+56], N[Not[LessEqual[y, 1.65e+38]], $MachinePrecision]], N[(N[(t / t$95$1), $MachinePrecision] + N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $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] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+56} \lor \neg \left(y \leq 1.65 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{t}{t_1} + \left(x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t_1}\\
\end{array}
\end{array}
if y < -2.60000000000000011e56 or 1.65e38 < y Initial program 2.1%
Taylor expanded in t around 0 2.1%
Taylor expanded in y around inf 68.4%
associate--l+68.4%
associate-/l*75.7%
Simplified75.7%
if -2.60000000000000011e56 < y < 1.65e38Initial program 96.8%
Taylor expanded in x around 0 92.7%
Final simplification84.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.45e+60)
x
(if (<= y 2.8e+45)
(/
(+ t (* y (+ 230661.510616 (* z (* y y)))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) 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 <= -2.45e+60) {
tmp = x;
} else if (y <= 2.8e+45) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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.45d+60)) then
tmp = x
else if (y <= 2.8d+45) then
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else
tmp = (x + (z / y)) - ((x * a) / y)
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.45e+60) {
tmp = x;
} else if (y <= 2.8e+45) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.45e+60: tmp = x elif y <= 2.8e+45: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 (y <= -2.45e+60) tmp = x; elseif (y <= 2.8e+45) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); 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) tmp = 0.0; if (y <= -2.45e+60) tmp = x; elseif (y <= 2.8e+45) tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.45e+60], x, If[LessEqual[y, 2.8e+45], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + 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}\;y \leq -2.45 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -2.4500000000000001e60Initial program 0.2%
Taylor expanded in y around inf 71.2%
if -2.4500000000000001e60 < y < 2.7999999999999999e45Initial program 96.2%
Taylor expanded in z around inf 89.9%
*-commutative89.9%
unpow289.9%
Simplified89.9%
if 2.7999999999999999e45 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification80.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (* y (+ 230661.510616 (* z (* y y)))))))
(if (<= y -4.4e+109)
x
(if (<= y -2.6e+15)
(/ (+ (* x y) z) a)
(if (<= y -450000.0)
x
(if (<= y -1.4e-84)
(/ t_1 (+ i (* b (* y y))))
(if (<= y -1.4e-186)
(/ t (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 4.2e+33)
(/ t_1 (+ i (* y c)))
(- (+ 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 = t + (y * (230661.510616 + (z * (y * y))));
double tmp;
if (y <= -4.4e+109) {
tmp = x;
} else if (y <= -2.6e+15) {
tmp = ((x * y) + z) / a;
} else if (y <= -450000.0) {
tmp = x;
} else if (y <= -1.4e-84) {
tmp = t_1 / (i + (b * (y * y)));
} else if (y <= -1.4e-186) {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 4.2e+33) {
tmp = t_1 / (i + (y * c));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = t + (y * (230661.510616d0 + (z * (y * y))))
if (y <= (-4.4d+109)) then
tmp = x
else if (y <= (-2.6d+15)) then
tmp = ((x * y) + z) / a
else if (y <= (-450000.0d0)) then
tmp = x
else if (y <= (-1.4d-84)) then
tmp = t_1 / (i + (b * (y * y)))
else if (y <= (-1.4d-186)) then
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 4.2d+33) then
tmp = t_1 / (i + (y * c))
else
tmp = (x + (z / y)) - ((x * a) / y)
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 + (z * (y * y))));
double tmp;
if (y <= -4.4e+109) {
tmp = x;
} else if (y <= -2.6e+15) {
tmp = ((x * y) + z) / a;
} else if (y <= -450000.0) {
tmp = x;
} else if (y <= -1.4e-84) {
tmp = t_1 / (i + (b * (y * y)));
} else if (y <= -1.4e-186) {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 4.2e+33) {
tmp = t_1 / (i + (y * c));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t + (y * (230661.510616 + (z * (y * y)))) tmp = 0 if y <= -4.4e+109: tmp = x elif y <= -2.6e+15: tmp = ((x * y) + z) / a elif y <= -450000.0: tmp = x elif y <= -1.4e-84: tmp = t_1 / (i + (b * (y * y))) elif y <= -1.4e-186: tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 4.2e+33: tmp = t_1 / (i + (y * c)) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) tmp = 0.0 if (y <= -4.4e+109) tmp = x; elseif (y <= -2.6e+15) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= -450000.0) tmp = x; elseif (y <= -1.4e-84) tmp = Float64(t_1 / Float64(i + Float64(b * Float64(y * y)))); elseif (y <= -1.4e-186) tmp = Float64(t / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 4.2e+33) tmp = Float64(t_1 / Float64(i + Float64(y * c))); 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 = t + (y * (230661.510616 + (z * (y * y)))); tmp = 0.0; if (y <= -4.4e+109) tmp = x; elseif (y <= -2.6e+15) tmp = ((x * y) + z) / a; elseif (y <= -450000.0) tmp = x; elseif (y <= -1.4e-84) tmp = t_1 / (i + (b * (y * y))); elseif (y <= -1.4e-186) tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 4.2e+33) tmp = t_1 / (i + (y * c)); 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[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+109], x, If[LessEqual[y, -2.6e+15], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -450000.0], x, If[LessEqual[y, -1.4e-84], N[(t$95$1 / N[(i + N[(b * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-186], N[(t / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+33], N[(t$95$1 / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq -450000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{t_1}{i + b \cdot \left(y \cdot y\right)}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-186}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{t_1}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -4.3999999999999998e109 or -2.6e15 < y < -4.5e5Initial program 3.7%
Taylor expanded in y around inf 79.4%
if -4.3999999999999998e109 < y < -2.6e15Initial program 28.6%
Taylor expanded in a around inf 0.2%
Taylor expanded in y around -inf 24.1%
+-commutative24.1%
mul-1-neg24.1%
unsub-neg24.1%
Simplified30.6%
Taylor expanded in a around inf 31.7%
sub-neg31.7%
mul-1-neg31.7%
remove-double-neg31.7%
*-commutative31.7%
Simplified31.7%
if -4.5e5 < y < -1.39999999999999991e-84Initial program 99.2%
Taylor expanded in z around inf 88.7%
*-commutative88.7%
unpow288.7%
Simplified88.7%
Taylor expanded in b around inf 70.7%
unpow270.7%
Simplified70.7%
if -1.39999999999999991e-84 < y < -1.39999999999999992e-186Initial program 99.6%
Taylor expanded in t around inf 90.4%
if -1.39999999999999992e-186 < y < 4.2000000000000001e33Initial program 98.6%
Taylor expanded in z around inf 95.1%
*-commutative95.1%
unpow295.1%
Simplified95.1%
Taylor expanded in y around 0 85.9%
*-commutative85.9%
Simplified85.9%
if 4.2000000000000001e33 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification76.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -7.8e+108)
x
(if (<= y -2.15e-10)
(/ (+ (* x y) z) a)
(if (<= y 1.2e+40)
(/
(+ t (* y 230661.510616))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) 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 <= -7.8e+108) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 1.2e+40) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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 <= (-7.8d+108)) then
tmp = x
else if (y <= (-2.15d-10)) then
tmp = ((x * y) + z) / a
else if (y <= 1.2d+40) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else
tmp = (x + (z / y)) - ((x * a) / y)
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 <= -7.8e+108) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 1.2e+40) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.8e+108: tmp = x elif y <= -2.15e-10: tmp = ((x * y) + z) / a elif y <= 1.2e+40: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 (y <= -7.8e+108) tmp = x; elseif (y <= -2.15e-10) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 1.2e+40) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); 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) tmp = 0.0; if (y <= -7.8e+108) tmp = x; elseif (y <= -2.15e-10) tmp = ((x * y) + z) / a; elseif (y <= 1.2e+40) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.8e+108], x, If[LessEqual[y, -2.15e-10], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.2e+40], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + 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}\;y \leq -7.8 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -7.79999999999999969e108Initial program 0.0%
Taylor expanded in y around inf 80.4%
if -7.79999999999999969e108 < y < -2.15000000000000007e-10Initial program 46.2%
Taylor expanded in a around inf 0.3%
Taylor expanded in y around -inf 18.5%
+-commutative18.5%
mul-1-neg18.5%
unsub-neg18.5%
Simplified23.4%
Taylor expanded in a around inf 29.3%
sub-neg29.3%
mul-1-neg29.3%
remove-double-neg29.3%
*-commutative29.3%
Simplified29.3%
if -2.15000000000000007e-10 < y < 1.2e40Initial program 98.9%
Taylor expanded in y around 0 90.1%
*-commutative90.1%
Simplified90.1%
if 1.2e40 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification78.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.05e+111)
x
(if (<= y -2.15e-10)
(/ (+ (* x y) z) a)
(if (<= y 3.8e+31)
(/ t (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) 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 <= -1.05e+111) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 3.8e+31) {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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.05d+111)) then
tmp = x
else if (y <= (-2.15d-10)) then
tmp = ((x * y) + z) / a
else if (y <= 3.8d+31) then
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else
tmp = (x + (z / y)) - ((x * a) / y)
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.05e+111) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 3.8e+31) {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.05e+111: tmp = x elif y <= -2.15e-10: tmp = ((x * y) + z) / a elif y <= 3.8e+31: tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 (y <= -1.05e+111) tmp = x; elseif (y <= -2.15e-10) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 3.8e+31) tmp = Float64(t / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); 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) tmp = 0.0; if (y <= -1.05e+111) tmp = x; elseif (y <= -2.15e-10) tmp = ((x * y) + z) / a; elseif (y <= 3.8e+31) tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.05e+111], x, If[LessEqual[y, -2.15e-10], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3.8e+31], N[(t / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + 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}\;y \leq -1.05 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -1.04999999999999997e111Initial program 0.0%
Taylor expanded in y around inf 80.4%
if -1.04999999999999997e111 < y < -2.15000000000000007e-10Initial program 46.2%
Taylor expanded in a around inf 0.3%
Taylor expanded in y around -inf 18.5%
+-commutative18.5%
mul-1-neg18.5%
unsub-neg18.5%
Simplified23.4%
Taylor expanded in a around inf 29.3%
sub-neg29.3%
mul-1-neg29.3%
remove-double-neg29.3%
*-commutative29.3%
Simplified29.3%
if -2.15000000000000007e-10 < y < 3.8000000000000001e31Initial program 98.9%
Taylor expanded in t around inf 79.7%
if 3.8000000000000001e31 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification73.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -3.6e+109)
x
(if (<= y -2.15e-10)
(/ (+ (* x y) z) a)
(if (<= y 3.5e+35)
(/ (+ t (* y (+ 230661.510616 (* z (* y y))))) (+ i (* y c)))
(- (+ 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 <= -3.6e+109) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 3.5e+35) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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.6d+109)) then
tmp = x
else if (y <= (-2.15d-10)) then
tmp = ((x * y) + z) / a
else if (y <= 3.5d+35) then
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / (i + (y * c))
else
tmp = (x + (z / y)) - ((x * a) / y)
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.6e+109) {
tmp = x;
} else if (y <= -2.15e-10) {
tmp = ((x * y) + z) / a;
} else if (y <= 3.5e+35) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.6e+109: tmp = x elif y <= -2.15e-10: tmp = ((x * y) + z) / a elif y <= 3.5e+35: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c)) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.6e+109) tmp = x; elseif (y <= -2.15e-10) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 3.5e+35) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(i + Float64(y * c))); 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) tmp = 0.0; if (y <= -3.6e+109) tmp = x; elseif (y <= -2.15e-10) tmp = ((x * y) + z) / a; elseif (y <= 3.5e+35) tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c)); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.6e+109], x, If[LessEqual[y, -2.15e-10], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3.5e+35], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $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}\;y \leq -3.6 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -3.6e109Initial program 0.0%
Taylor expanded in y around inf 80.4%
if -3.6e109 < y < -2.15000000000000007e-10Initial program 46.2%
Taylor expanded in a around inf 0.3%
Taylor expanded in y around -inf 18.5%
+-commutative18.5%
mul-1-neg18.5%
unsub-neg18.5%
Simplified23.4%
Taylor expanded in a around inf 29.3%
sub-neg29.3%
mul-1-neg29.3%
remove-double-neg29.3%
*-commutative29.3%
Simplified29.3%
if -2.15000000000000007e-10 < y < 3.5000000000000001e35Initial program 98.9%
Taylor expanded in z around inf 96.4%
*-commutative96.4%
unpow296.4%
Simplified96.4%
Taylor expanded in y around 0 82.3%
*-commutative82.3%
Simplified82.3%
if 3.5000000000000001e35 < y Initial program 4.0%
Taylor expanded in y around inf 66.9%
Final simplification74.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -5.8e+108)
x
(if (<= y -5.6e-45)
(/ (+ (* x y) z) a)
(if (<= y 5.6e-5)
(+ (/ t (+ i (* y c))) (* 230661.510616 (/ 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 <= -5.8e+108) {
tmp = x;
} else if (y <= -5.6e-45) {
tmp = ((x * y) + z) / a;
} else if (y <= 5.6e-5) {
tmp = (t / (i + (y * c))) + (230661.510616 * (y / i));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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+108)) then
tmp = x
else if (y <= (-5.6d-45)) then
tmp = ((x * y) + z) / a
else if (y <= 5.6d-5) then
tmp = (t / (i + (y * c))) + (230661.510616d0 * (y / i))
else
tmp = (x + (z / y)) - ((x * a) / y)
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+108) {
tmp = x;
} else if (y <= -5.6e-45) {
tmp = ((x * y) + z) / a;
} else if (y <= 5.6e-5) {
tmp = (t / (i + (y * c))) + (230661.510616 * (y / i));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.8e+108: tmp = x elif y <= -5.6e-45: tmp = ((x * y) + z) / a elif y <= 5.6e-5: tmp = (t / (i + (y * c))) + (230661.510616 * (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 (y <= -5.8e+108) tmp = x; elseif (y <= -5.6e-45) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 5.6e-5) tmp = Float64(Float64(t / Float64(i + Float64(y * c))) + Float64(230661.510616 * Float64(y / i))); 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) tmp = 0.0; if (y <= -5.8e+108) tmp = x; elseif (y <= -5.6e-45) tmp = ((x * y) + z) / a; elseif (y <= 5.6e-5) tmp = (t / (i + (y * c))) + (230661.510616 * (y / i)); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.8e+108], x, If[LessEqual[y, -5.6e-45], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 5.6e-5], N[(N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(230661.510616 * N[(y / i), $MachinePrecision]), $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}\;y \leq -5.8 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{i + y \cdot c} + 230661.510616 \cdot \frac{y}{i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -5.80000000000000015e108Initial program 0.0%
Taylor expanded in y around inf 80.4%
if -5.80000000000000015e108 < y < -5.6000000000000003e-45Initial program 58.4%
Taylor expanded in a around inf 8.0%
Taylor expanded in y around -inf 19.1%
+-commutative19.1%
mul-1-neg19.1%
unsub-neg19.1%
Simplified22.8%
Taylor expanded in a around inf 27.3%
sub-neg27.3%
mul-1-neg27.3%
remove-double-neg27.3%
*-commutative27.3%
Simplified27.3%
if -5.6000000000000003e-45 < y < 5.59999999999999992e-5Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 79.0%
Taylor expanded in y around 0 76.2%
*-commutative76.2%
Simplified76.2%
if 5.59999999999999992e-5 < y Initial program 12.6%
Taylor expanded in y around inf 60.4%
Final simplification68.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.1e+111)
x
(if (<= y -1.5e-43)
(/ (+ (* x y) z) a)
(if (<= y 4.9e-5)
(/ (+ t (* y 230661.510616)) 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 <= -1.1e+111) {
tmp = x;
} else if (y <= -1.5e-43) {
tmp = ((x * y) + z) / a;
} else if (y <= 4.9e-5) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
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+111)) then
tmp = x
else if (y <= (-1.5d-43)) then
tmp = ((x * y) + z) / a
else if (y <= 4.9d-5) then
tmp = (t + (y * 230661.510616d0)) / i
else
tmp = (x + (z / y)) - ((x * a) / y)
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+111) {
tmp = x;
} else if (y <= -1.5e-43) {
tmp = ((x * y) + z) / a;
} else if (y <= 4.9e-5) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.1e+111: tmp = x elif y <= -1.5e-43: tmp = ((x * y) + z) / a elif y <= 4.9e-5: tmp = (t + (y * 230661.510616)) / 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 (y <= -1.1e+111) tmp = x; elseif (y <= -1.5e-43) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 4.9e-5) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); 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) tmp = 0.0; if (y <= -1.1e+111) tmp = x; elseif (y <= -1.5e-43) tmp = ((x * y) + z) / a; elseif (y <= 4.9e-5) tmp = (t + (y * 230661.510616)) / i; else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.1e+111], x, If[LessEqual[y, -1.5e-43], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 4.9e-5], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $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}\;y \leq -1.1 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e111Initial program 0.0%
Taylor expanded in y around inf 80.4%
if -1.09999999999999999e111 < y < -1.50000000000000002e-43Initial program 58.4%
Taylor expanded in a around inf 8.0%
Taylor expanded in y around -inf 19.1%
+-commutative19.1%
mul-1-neg19.1%
unsub-neg19.1%
Simplified22.8%
Taylor expanded in a around inf 27.3%
sub-neg27.3%
mul-1-neg27.3%
remove-double-neg27.3%
*-commutative27.3%
Simplified27.3%
if -1.50000000000000002e-43 < y < 4.9e-5Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 79.0%
Taylor expanded in i around inf 64.4%
Taylor expanded in i around 0 64.5%
*-commutative64.5%
Simplified64.5%
if 4.9e-5 < y Initial program 12.6%
Taylor expanded in y around inf 60.4%
Final simplification62.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -4.5e+108)
x
(if (<= y -1.5e-43)
(/ (+ (* x y) z) a)
(if (<= y 1.45e-5) (/ (+ 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 <= -4.5e+108) {
tmp = x;
} else if (y <= -1.5e-43) {
tmp = ((x * y) + z) / a;
} else if (y <= 1.45e-5) {
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 <= (-4.5d+108)) then
tmp = x
else if (y <= (-1.5d-43)) then
tmp = ((x * y) + z) / a
else if (y <= 1.45d-5) 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 <= -4.5e+108) {
tmp = x;
} else if (y <= -1.5e-43) {
tmp = ((x * y) + z) / a;
} else if (y <= 1.45e-5) {
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 <= -4.5e+108: tmp = x elif y <= -1.5e-43: tmp = ((x * y) + z) / a elif y <= 1.45e-5: 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 <= -4.5e+108) tmp = x; elseif (y <= -1.5e-43) tmp = Float64(Float64(Float64(x * y) + z) / a); elseif (y <= 1.45e-5) 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 <= -4.5e+108) tmp = x; elseif (y <= -1.5e-43) tmp = ((x * y) + z) / a; elseif (y <= 1.45e-5) 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, -4.5e+108], x, If[LessEqual[y, -1.5e-43], N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.45e-5], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{x \cdot y + z}{a}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-5}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.5e108 or 1.45e-5 < y Initial program 7.1%
Taylor expanded in y around inf 61.2%
if -4.5e108 < y < -1.50000000000000002e-43Initial program 58.4%
Taylor expanded in a around inf 8.0%
Taylor expanded in y around -inf 19.1%
+-commutative19.1%
mul-1-neg19.1%
unsub-neg19.1%
Simplified22.8%
Taylor expanded in a around inf 27.3%
sub-neg27.3%
mul-1-neg27.3%
remove-double-neg27.3%
*-commutative27.3%
Simplified27.3%
if -1.50000000000000002e-43 < y < 1.45e-5Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 79.0%
Taylor expanded in i around inf 64.4%
Taylor expanded in i around 0 64.5%
*-commutative64.5%
Simplified64.5%
Final simplification59.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -960.0) x (if (<= y 6e-5) (/ (+ 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 <= -960.0) {
tmp = x;
} else if (y <= 6e-5) {
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 <= (-960.0d0)) then
tmp = x
else if (y <= 6d-5) 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 <= -960.0) {
tmp = x;
} else if (y <= 6e-5) {
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 <= -960.0: tmp = x elif y <= 6e-5: 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 <= -960.0) tmp = x; elseif (y <= 6e-5) 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 <= -960.0) tmp = x; elseif (y <= 6e-5) 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, -960.0], x, If[LessEqual[y, 6e-5], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -960:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -960 or 6.00000000000000015e-5 < y Initial program 10.9%
Taylor expanded in y around inf 54.6%
if -960 < y < 6.00000000000000015e-5Initial program 99.6%
Taylor expanded in t around 0 99.6%
Taylor expanded in y around 0 74.3%
Taylor expanded in i around inf 60.7%
Taylor expanded in i around 0 60.8%
*-commutative60.8%
Simplified60.8%
Final simplification57.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -520.0) x (if (<= y 1.9e-5) (/ 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 <= -520.0) {
tmp = x;
} else if (y <= 1.9e-5) {
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 <= (-520.0d0)) then
tmp = x
else if (y <= 1.9d-5) 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 <= -520.0) {
tmp = x;
} else if (y <= 1.9e-5) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -520.0: tmp = x elif y <= 1.9e-5: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -520.0) tmp = x; elseif (y <= 1.9e-5) 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 <= -520.0) tmp = x; elseif (y <= 1.9e-5) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -520.0], x, If[LessEqual[y, 1.9e-5], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -520:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -520 or 1.9000000000000001e-5 < y Initial program 10.9%
Taylor expanded in y around inf 54.6%
if -520 < y < 1.9000000000000001e-5Initial program 99.6%
Taylor expanded in y around 0 55.4%
Final simplification55.0%
(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 53.2%
Taylor expanded in y around inf 30.2%
Final simplification30.2%
herbie shell --seed 2023293
(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)))