
(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 15 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 (fma y (fma y (fma y (+ y a) b) c) i)))
(if (<=
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
2e+295)
(+
(/ t t_1)
(+
(*
y
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* x (pow y 2.0))))) t_1))
(/ (* z (pow y 3.0)) t_1)))
(+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(y, fma(y, fma(y, (y + a), b), c), i);
double tmp;
if ((((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))) <= 2e+295) {
tmp = (t / t_1) + ((y * ((230661.510616 + (y * (27464.7644705 + (x * pow(y, 2.0))))) / t_1)) + ((z * pow(y, 3.0)) / t_1));
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, fma(y, fma(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) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) <= 2e+295) tmp = Float64(Float64(t / t_1) + Float64(Float64(y * Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(x * (y ^ 2.0))))) / t_1)) + Float64(Float64(z * (y ^ 3.0)) / t_1))); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $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] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+295], N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(y * N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(x * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\mathbf{if}\;\frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} \leq 2 \cdot 10^{+295}:\\
\;\;\;\;\frac{t}{t\_1} + \left(y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + x \cdot {y}^{2}\right)}{t\_1} + \frac{z \cdot {y}^{3}}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2e295Initial program 90.9%
Taylor expanded in z around 0 90.1%
+-commutative90.1%
+-commutative90.1%
+-commutative90.1%
+-commutative90.1%
fma-undefine90.1%
fma-undefine90.1%
fma-undefine90.1%
Simplified91.4%
if 2e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.3%
Taylor expanded in y around inf 70.1%
associate--l+70.1%
associate-/l*75.4%
Simplified75.4%
Final simplification85.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(t_2
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))))
(if (<= (/ (+ t_2 t) t_1) 2e+295)
(+ (/ t t_1) (/ t_2 t_1))
(+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))));
double tmp;
if (((t_2 + t) / t_1) <= 2e+295) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a * (x / 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) :: t_2
real(8) :: tmp
t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c))
t_2 = y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z)))))
if (((t_2 + t) / t_1) <= 2d+295) then
tmp = (t / t_1) + (t_2 / t_1)
else
tmp = x + ((z / y) - (a * (x / 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))));
double tmp;
if (((t_2 + t) / t_1) <= 2e+295) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)) t_2 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) tmp = 0 if ((t_2 + t) / t_1) <= 2e+295: tmp = (t / t_1) + (t_2 / t_1) else: tmp = x + ((z / y) - (a * (x / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) t_2 = Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) tmp = 0.0 if (Float64(Float64(t_2 + t) / t_1) <= 2e+295) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)); t_2 = y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))); tmp = 0.0; if (((t_2 + t) / t_1) <= 2e+295) tmp = (t / t_1) + (t_2 / t_1); else tmp = x + ((z / y) - (a * (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2 + t), $MachinePrecision] / t$95$1), $MachinePrecision], 2e+295], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
t_2 := y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)\\
\mathbf{if}\;\frac{t\_2 + t}{t\_1} \leq 2 \cdot 10^{+295}:\\
\;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2e295Initial program 90.9%
Taylor expanded in t around 0 90.9%
if 2e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.3%
Taylor expanded in y around inf 70.1%
associate--l+70.1%
associate-/l*75.4%
Simplified75.4%
Final simplification85.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
(if (<= t_1 2e+295) t_1 (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / 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 = ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
if (t_1 <= 2d+295) then
tmp = t_1
else
tmp = x + ((z / y) - (a * (x / 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 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= 2e+295) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) tmp = 0 if t_1 <= 2e+295: tmp = t_1 else: tmp = x + ((z / y) - (a * (x / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) tmp = 0.0 if (t_1 <= 2e+295) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); tmp = 0.0; if (t_1 <= 2e+295) tmp = t_1; else tmp = x + ((z / y) - (a * (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+295], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2e295Initial program 90.9%
if 2e295 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.3%
Taylor expanded in y around inf 70.1%
associate--l+70.1%
associate-/l*75.4%
Simplified75.4%
Final simplification85.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -8.4e+30)
t_2
(if (<= y 38000000.0)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y t_1)))
(if (<= y 4e+95)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_1)
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -8.4e+30) {
tmp = t_2;
} else if (y <= 38000000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-8.4d+30)) then
tmp = t_2
else if (y <= 38000000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * t_1))
else if (y <= 4d+95) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -8.4e+30) {
tmp = t_2;
} else if (y <= 38000000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -8.4e+30: tmp = t_2 elif y <= 38000000.0: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)) elif y <= 4e+95: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -8.4e+30) tmp = t_2; elseif (y <= 38000000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * t_1))); elseif (y <= 4e+95) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -8.4e+30) tmp = t_2; elseif (y <= 38000000.0) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)); elseif (y <= 4e+95) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.4e+30], t$95$2, If[LessEqual[y, 38000000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+95], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -8.4 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 38000000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+95}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -8.4000000000000001e30 or 4.00000000000000008e95 < y Initial program 1.4%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*76.7%
Simplified76.7%
if -8.4000000000000001e30 < y < 3.8e7Initial program 98.9%
Taylor expanded in x around 0 93.8%
if 3.8e7 < y < 4.00000000000000008e95Initial program 31.7%
Taylor expanded in t around 0 27.9%
Taylor expanded in i around 0 56.4%
Final simplification84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -6.6e+29)
t_2
(if (<= y 2.35e-6)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y t_1)))
(if (<= y 4e+95)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_1)
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -6.6e+29) {
tmp = t_2;
} else if (y <= 2.35e-6) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-6.6d+29)) then
tmp = t_2
else if (y <= 2.35d-6) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * t_1))
else if (y <= 4d+95) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -6.6e+29) {
tmp = t_2;
} else if (y <= 2.35e-6) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -6.6e+29: tmp = t_2 elif y <= 2.35e-6: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)) elif y <= 4e+95: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -6.6e+29) tmp = t_2; elseif (y <= 2.35e-6) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * t_1))); elseif (y <= 4e+95) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -6.6e+29) tmp = t_2; elseif (y <= 2.35e-6) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)); elseif (y <= 4e+95) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e+29], t$95$2, If[LessEqual[y, 2.35e-6], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+95], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-6}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+95}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.59999999999999968e29 or 4.00000000000000008e95 < y Initial program 1.4%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*76.7%
Simplified76.7%
if -6.59999999999999968e29 < y < 2.34999999999999995e-6Initial program 98.9%
Taylor expanded in y around 0 89.2%
*-commutative89.2%
Simplified89.2%
if 2.34999999999999995e-6 < y < 4.00000000000000008e95Initial program 47.0%
Taylor expanded in t around 0 37.9%
Taylor expanded in i around 0 56.9%
Final simplification80.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y)))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -2.8e+26)
t_1
(if (<= y 4e-9)
(/ (+ t (* y 230661.510616)) (+ i (* y t_2)))
(if (<= y 4e+95)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_2)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.8e+26) {
tmp = t_1;
} else if (y <= 4e-9) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
t_2 = (y * ((y * (y + a)) + b)) + c
if (y <= (-2.8d+26)) then
tmp = t_1
else if (y <= 4d-9) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_2))
else if (y <= 4d+95) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.8e+26) {
tmp = t_1;
} else if (y <= 4e-9) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 4e+95) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) t_2 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -2.8e+26: tmp = t_1 elif y <= 4e-9: tmp = (t + (y * 230661.510616)) / (i + (y * t_2)) elif y <= 4e+95: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -2.8e+26) tmp = t_1; elseif (y <= 4e-9) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_2))); elseif (y <= 4e+95) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); t_2 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -2.8e+26) tmp = t_1; elseif (y <= 4e-9) tmp = (t + (y * 230661.510616)) / (i + (y * t_2)); elseif (y <= 4e+95) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -2.8e+26], t$95$1, If[LessEqual[y, 4e-9], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+95], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-9}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+95}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8e26 or 4.00000000000000008e95 < y Initial program 1.4%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*76.7%
Simplified76.7%
if -2.8e26 < y < 4.00000000000000025e-9Initial program 98.9%
Taylor expanded in y around 0 87.7%
*-commutative87.7%
Simplified87.7%
if 4.00000000000000025e-9 < y < 4.00000000000000008e95Initial program 47.0%
Taylor expanded in t around 0 37.9%
Taylor expanded in i around 0 56.9%
Final simplification80.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(t_2 (/ t t_1))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -6.2e+27)
t_3
(if (<= y -2e-93)
t_2
(if (<= y -4.7e-138)
(/ (* y 230661.510616) t_1)
(if (<= y 8.5e+26) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = t / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -6.2e+27) {
tmp = t_3;
} else if (y <= -2e-93) {
tmp = t_2;
} else if (y <= -4.7e-138) {
tmp = (y * 230661.510616) / t_1;
} else if (y <= 8.5e+26) {
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 = i + (y * ((y * ((y * (y + a)) + b)) + c))
t_2 = t / t_1
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-6.2d+27)) then
tmp = t_3
else if (y <= (-2d-93)) then
tmp = t_2
else if (y <= (-4.7d-138)) then
tmp = (y * 230661.510616d0) / t_1
else if (y <= 8.5d+26) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = t / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -6.2e+27) {
tmp = t_3;
} else if (y <= -2e-93) {
tmp = t_2;
} else if (y <= -4.7e-138) {
tmp = (y * 230661.510616) / t_1;
} else if (y <= 8.5e+26) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)) t_2 = t / t_1 t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -6.2e+27: tmp = t_3 elif y <= -2e-93: tmp = t_2 elif y <= -4.7e-138: tmp = (y * 230661.510616) / t_1 elif y <= 8.5e+26: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) t_2 = Float64(t / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -6.2e+27) tmp = t_3; elseif (y <= -2e-93) tmp = t_2; elseif (y <= -4.7e-138) tmp = Float64(Float64(y * 230661.510616) / t_1); elseif (y <= 8.5e+26) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c)); t_2 = t / t_1; t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -6.2e+27) tmp = t_3; elseif (y <= -2e-93) tmp = t_2; elseif (y <= -4.7e-138) tmp = (y * 230661.510616) / t_1; elseif (y <= 8.5e+26) 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[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+27], t$95$3, If[LessEqual[y, -2e-93], t$95$2, If[LessEqual[y, -4.7e-138], N[(N[(y * 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 8.5e+26], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
t_2 := \frac{t}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+27}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-138}:\\
\;\;\;\;\frac{y \cdot 230661.510616}{t\_1}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -6.19999999999999992e27 or 8.5e26 < y Initial program 7.0%
Taylor expanded in y around inf 62.1%
associate--l+62.1%
associate-/l*66.6%
Simplified66.6%
if -6.19999999999999992e27 < y < -1.9999999999999998e-93 or -4.7000000000000001e-138 < y < 8.5e26Initial program 97.5%
Taylor expanded in t around inf 75.8%
if -1.9999999999999998e-93 < y < -4.7000000000000001e-138Initial program 99.1%
Taylor expanded in t around 0 99.1%
Taylor expanded in z around inf 86.9%
Taylor expanded in y around 0 72.2%
*-commutative72.2%
Simplified72.2%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(t_2 (/ t t_1))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.65e+26)
t_3
(if (<= y -1.76e-93)
t_2
(if (<= y -4.8e-138)
(/ (* y 230661.510616) t_1)
(if (<= y 2.7e+27) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = t / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.65e+26) {
tmp = t_3;
} else if (y <= -1.76e-93) {
tmp = t_2;
} else if (y <= -4.8e-138) {
tmp = (y * 230661.510616) / t_1;
} else if (y <= 2.7e+27) {
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 = i + (y * ((y * ((y * (y + a)) + b)) + c))
t_2 = t / t_1
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.65d+26)) then
tmp = t_3
else if (y <= (-1.76d-93)) then
tmp = t_2
else if (y <= (-4.8d-138)) then
tmp = (y * 230661.510616d0) / t_1
else if (y <= 2.7d+27) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = t / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.65e+26) {
tmp = t_3;
} else if (y <= -1.76e-93) {
tmp = t_2;
} else if (y <= -4.8e-138) {
tmp = (y * 230661.510616) / t_1;
} else if (y <= 2.7e+27) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)) t_2 = t / t_1 t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.65e+26: tmp = t_3 elif y <= -1.76e-93: tmp = t_2 elif y <= -4.8e-138: tmp = (y * 230661.510616) / t_1 elif y <= 2.7e+27: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) t_2 = Float64(t / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.65e+26) tmp = t_3; elseif (y <= -1.76e-93) tmp = t_2; elseif (y <= -4.8e-138) tmp = Float64(Float64(y * 230661.510616) / t_1); elseif (y <= 2.7e+27) 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 = i + (y * ((y * ((y * (y + a)) + b)) + c)); t_2 = t / t_1; t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.65e+26) tmp = t_3; elseif (y <= -1.76e-93) tmp = t_2; elseif (y <= -4.8e-138) tmp = (y * 230661.510616) / t_1; elseif (y <= 2.7e+27) 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[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+26], t$95$3, If[LessEqual[y, -1.76e-93], t$95$2, If[LessEqual[y, -4.8e-138], N[(N[(y * 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 2.7e+27], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
t_2 := \frac{t}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+26}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.76 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-138}:\\
\;\;\;\;\frac{y \cdot 230661.510616}{t\_1}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.64999999999999997e26 or 2.6999999999999997e27 < y Initial program 7.0%
Taylor expanded in y around inf 62.1%
associate--l+62.1%
associate-/l*66.6%
Simplified66.6%
if -1.64999999999999997e26 < y < -1.76000000000000001e-93 or -4.7999999999999998e-138 < y < 2.6999999999999997e27Initial program 97.5%
Taylor expanded in t around inf 75.8%
if -1.76000000000000001e-93 < y < -4.7999999999999998e-138Initial program 99.1%
Taylor expanded in t around 0 99.1%
Taylor expanded in y around 0 72.2%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.7e-16)
t_1
(if (<= y 9.2e-95)
(/ t i)
(if (<= y 1.25e+40)
(*
y
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.7e-16) {
tmp = t_1;
} else if (y <= 9.2e-95) {
tmp = t / i;
} else if (y <= 1.25e+40) {
tmp = y * ((230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / i);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.7d-16)) then
tmp = t_1
else if (y <= 9.2d-95) then
tmp = t / i
else if (y <= 1.25d+40) then
tmp = y * ((230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / i)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.7e-16) {
tmp = t_1;
} else if (y <= 9.2e-95) {
tmp = t / i;
} else if (y <= 1.25e+40) {
tmp = y * ((230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.7e-16: tmp = t_1 elif y <= 9.2e-95: tmp = t / i elif y <= 1.25e+40: tmp = y * ((230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / i) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.7e-16) tmp = t_1; elseif (y <= 9.2e-95) tmp = Float64(t / i); elseif (y <= 1.25e+40) tmp = Float64(y * Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2.7e-16) tmp = t_1; elseif (y <= 9.2e-95) tmp = t / i; elseif (y <= 1.25e+40) tmp = y * ((230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e-16], t$95$1, If[LessEqual[y, 9.2e-95], N[(t / i), $MachinePrecision], If[LessEqual[y, 1.25e+40], N[(y * N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-95}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+40}:\\
\;\;\;\;y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.69999999999999999e-16 or 1.25000000000000001e40 < y Initial program 11.8%
Taylor expanded in y around inf 60.1%
associate--l+60.1%
associate-/l*64.3%
Simplified64.3%
if -2.69999999999999999e-16 < y < 9.19999999999999997e-95Initial program 99.7%
Taylor expanded in y around 0 56.9%
if 9.19999999999999997e-95 < y < 1.25000000000000001e40Initial program 88.3%
Taylor expanded in t around 0 51.4%
Taylor expanded in i around inf 21.4%
associate-/l*25.1%
Simplified25.1%
Final simplification57.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -9.5e+28) (not (<= y 1.3e+41))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -9.5e+28) || !(y <= 1.3e+41)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-9.5d+28)) .or. (.not. (y <= 1.3d+41))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -9.5e+28) || !(y <= 1.3e+41)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -9.5e+28) or not (y <= 1.3e+41): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -9.5e+28) || !(y <= 1.3e+41)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -9.5e+28) || ~((y <= 1.3e+41))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -9.5e+28], N[Not[LessEqual[y, 1.3e+41]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+28} \lor \neg \left(y \leq 1.3 \cdot 10^{+41}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -9.49999999999999927e28 or 1.3e41 < y Initial program 4.5%
Taylor expanded in y around inf 64.3%
associate--l+64.3%
associate-/l*69.0%
Simplified69.0%
if -9.49999999999999927e28 < y < 1.3e41Initial program 97.0%
Taylor expanded in y around 0 81.8%
*-commutative81.8%
Simplified81.8%
Final simplification76.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.25e-14)
t_1
(if (<= y 0.14)
(/ t i)
(if (<= y 2e+45)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) c)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.25e-14) {
tmp = t_1;
} else if (y <= 0.14) {
tmp = t / i;
} else if (y <= 2e+45) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.25d-14)) then
tmp = t_1
else if (y <= 0.14d0) then
tmp = t / i
else if (y <= 2d+45) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.25e-14) {
tmp = t_1;
} else if (y <= 0.14) {
tmp = t / i;
} else if (y <= 2e+45) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.25e-14: tmp = t_1 elif y <= 0.14: tmp = t / i elif y <= 2e+45: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.25e-14) tmp = t_1; elseif (y <= 0.14) tmp = Float64(t / i); elseif (y <= 2e+45) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.25e-14) tmp = t_1; elseif (y <= 0.14) tmp = t / i; elseif (y <= 2e+45) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e-14], t$95$1, If[LessEqual[y, 0.14], N[(t / i), $MachinePrecision], If[LessEqual[y, 2e+45], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.14:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+45}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.25e-14 or 1.9999999999999999e45 < y Initial program 11.1%
Taylor expanded in y around inf 61.1%
associate--l+61.1%
associate-/l*65.4%
Simplified65.4%
if -1.25e-14 < y < 0.14000000000000001Initial program 99.6%
Taylor expanded in y around 0 50.3%
if 0.14000000000000001 < y < 1.9999999999999999e45Initial program 67.4%
Taylor expanded in t around 0 44.0%
Taylor expanded in c around inf 42.7%
Final simplification56.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.25e+27) (not (<= y 1.65e+26))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.25e+27) || !(y <= 1.65e+26)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.25d+27)) .or. (.not. (y <= 1.65d+26))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.25e+27) || !(y <= 1.65e+26)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.25e+27) or not (y <= 1.65e+26): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.25e+27) || !(y <= 1.65e+26)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.25e+27) || ~((y <= 1.65e+26))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.25e+27], N[Not[LessEqual[y, 1.65e+26]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+27} \lor \neg \left(y \leq 1.65 \cdot 10^{+26}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -1.24999999999999995e27 or 1.64999999999999997e26 < y Initial program 7.0%
Taylor expanded in y around inf 62.1%
associate--l+62.1%
associate-/l*66.6%
Simplified66.6%
if -1.24999999999999995e27 < y < 1.64999999999999997e26Initial program 97.6%
Taylor expanded in t around inf 71.1%
Final simplification69.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.6e-17) (not (<= y 1.15e+22))) (+ x (- (/ z y) (* a (/ x y)))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.6e-17) || !(y <= 1.15e+22)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.6d-17)) .or. (.not. (y <= 1.15d+22))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.6e-17) || !(y <= 1.15e+22)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.6e-17) or not (y <= 1.15e+22): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.6e-17) || !(y <= 1.15e+22)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.6e-17) || ~((y <= 1.15e+22))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.6e-17], N[Not[LessEqual[y, 1.15e+22]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-17} \lor \neg \left(y \leq 1.15 \cdot 10^{+22}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1.6000000000000001e-17 or 1.1500000000000001e22 < y Initial program 13.1%
Taylor expanded in y around inf 58.2%
associate--l+58.2%
associate-/l*62.3%
Simplified62.3%
if -1.6000000000000001e-17 < y < 1.1500000000000001e22Initial program 98.9%
Taylor expanded in y around 0 48.2%
Final simplification54.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -7e+31) x (if (<= y 86.0) (/ 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 <= -7e+31) {
tmp = x;
} else if (y <= 86.0) {
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 <= (-7d+31)) then
tmp = x
else if (y <= 86.0d0) 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 <= -7e+31) {
tmp = x;
} else if (y <= 86.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7e+31: tmp = x elif y <= 86.0: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7e+31) tmp = x; elseif (y <= 86.0) 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 <= -7e+31) tmp = x; elseif (y <= 86.0) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7e+31], x, If[LessEqual[y, 86.0], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+31}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 86:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7e31 or 86 < y Initial program 9.4%
Taylor expanded in y around inf 45.6%
if -7e31 < y < 86Initial program 98.3%
Taylor expanded in y around 0 47.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 58.3%
Taylor expanded in y around inf 22.4%
herbie shell --seed 2024103
(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)))