
(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 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
t_1)
1e+262)
(/
(+
t
(+ (* y (* y (fma y (fma x y z) 27464.7644705))) (* y 230661.510616)))
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 * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= 1e+262) {
tmp = (t + ((y * (y * fma(y, fma(x, y, z), 27464.7644705))) + (y * 230661.510616))) / 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(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= 1e+262) tmp = Float64(Float64(t + Float64(Float64(y * Float64(y * fma(y, fma(x, y, z), 27464.7644705))) + Float64(y * 230661.510616))) / t_1); else tmp = Float64(Float64(x + 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[(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[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / t$95$1), $MachinePrecision], 1e+262], N[(N[(t + N[(N[(y * N[(y * N[(y * N[(x * y + z), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $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(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{t\_1} \leq 10^{+262}:\\
\;\;\;\;\frac{t + \left(y \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right)\right) + y \cdot 230661.510616\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\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)) < 1e262Initial program 96.2%
*-commutative96.2%
distribute-rgt-in96.2%
*-commutative96.2%
*-commutative96.2%
fma-define96.2%
fma-define96.2%
Applied egg-rr96.2%
if 1e262 < (/.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.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 66.7%
associate-/l*73.4%
Simplified73.4%
Final simplification86.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 1e+262) 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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 1e+262) {
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 * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
if (t_1 <= 1d+262) 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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 1e+262) {
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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= 1e+262: 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(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= 1e+262) tmp = t_1; else tmp = Float64(Float64(x + 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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= 1e+262) 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[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / 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[t$95$1, 1e+262], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq 10^{+262}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\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)) < 1e262Initial program 96.2%
if 1e262 < (/.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.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 66.7%
associate-/l*73.4%
Simplified73.4%
Final simplification86.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.2e+61) (not (<= y 9.6e+58)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)) t)
(+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 9.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+61)) .or. (.not. (y <= 9.6d+58))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 9.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 9.6e+58): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 9.6e+58)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 9.6e+58))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 9.6e+58]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 9.6 \cdot 10^{+58}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 9.5999999999999999e58 < y Initial program 1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 68.7%
associate-/l*74.7%
Simplified74.7%
if -1.1999999999999999e61 < y < 9.5999999999999999e58Initial program 94.9%
Taylor expanded in y around 0 92.1%
Final simplification84.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.02e+62) (not (<= y 6.2e+58)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.02e+62) || !(y <= 6.2e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.02d+62)) .or. (.not. (y <= 6.2d+58))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.02e+62) || !(y <= 6.2e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.02e+62) or not (y <= 6.2e+58): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.02e+62) || !(y <= 6.2e+58)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.02e+62) || ~((y <= 6.2e+58))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.02e+62], N[Not[LessEqual[y, 6.2e+58]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.02 \cdot 10^{+62} \lor \neg \left(y \leq 6.2 \cdot 10^{+58}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -2.0200000000000001e62 or 6.1999999999999998e58 < y Initial program 1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 68.7%
associate-/l*74.7%
Simplified74.7%
if -2.0200000000000001e62 < y < 6.1999999999999998e58Initial program 94.9%
Taylor expanded in x around 0 87.7%
Final simplification82.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.2e+61) (not (<= y 5.6e+58)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 5.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+61)) .or. (.not. (y <= 5.6d+58))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 5.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 5.6e+58): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 5.6e+58)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 5.6e+58))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 5.6e+58]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 5.6 \cdot 10^{+58}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 5.5999999999999996e58 < y Initial program 1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 68.7%
associate-/l*74.7%
Simplified74.7%
if -1.1999999999999999e61 < y < 5.5999999999999996e58Initial program 94.9%
Taylor expanded in y around 0 92.1%
Taylor expanded in x around 0 84.9%
Final simplification80.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.2e+61) (not (<= y 6.6e+58)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 6.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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.2d+61)) .or. (.not. (y <= 6.6d+58))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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.2e+61) || !(y <= 6.6e+58)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 6.6e+58): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 6.6e+58)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else 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)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 6.6e+58))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 6.6e+58]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 6.6 \cdot 10^{+58}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 6.59999999999999966e58 < y Initial program 1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
fma-define1.0%
Simplified1.0%
Taylor expanded in y around inf 68.7%
associate-/l*74.7%
Simplified74.7%
if -1.1999999999999999e61 < y < 6.59999999999999966e58Initial program 94.9%
Taylor expanded in y around 0 76.9%
*-commutative76.9%
Simplified76.9%
Final simplification76.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.3e+56) (not (<= y 6.2e+38)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)) t)
(+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.3e+56) || !(y <= 6.2e+38)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * 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 <= (-3.3d+56)) .or. (.not. (y <= 6.2d+38))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * 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 <= -3.3e+56) || !(y <= 6.2e+38)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.3e+56) or not (y <= 6.2e+38): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.3e+56) || !(y <= 6.2e+38)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.3e+56) || ~((y <= 6.2e+38))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.3e+56], N[Not[LessEqual[y, 6.2e+38]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+56} \lor \neg \left(y \leq 6.2 \cdot 10^{+38}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -3.30000000000000002e56 or 6.20000000000000035e38 < y Initial program 3.4%
fma-define3.4%
fma-define3.4%
fma-define3.4%
fma-define3.4%
fma-define3.4%
fma-define3.4%
fma-define3.4%
Simplified3.4%
Taylor expanded in y around inf 66.7%
associate-/l*72.4%
Simplified72.4%
if -3.30000000000000002e56 < y < 6.20000000000000035e38Initial program 96.2%
Taylor expanded in y around 0 94.0%
Taylor expanded in y around 0 78.7%
*-commutative78.7%
Simplified78.7%
Final simplification75.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.7e+66) (not (<= y 1.42e+21))) (- (+ x (/ z y)) (* a (/ x y))) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.7e+66) || !(y <= 1.42e+21)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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.7d+66)) .or. (.not. (y <= 1.42d+21))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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.7e+66) || !(y <= 1.42e+21)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.7e+66) or not (y <= 1.42e+21): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.7e+66) || !(y <= 1.42e+21)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.7e+66) || ~((y <= 1.42e+21))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.7e+66], N[Not[LessEqual[y, 1.42e+21]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+66} \lor \neg \left(y \leq 1.42 \cdot 10^{+21}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.70000000000000015e66 or 1.42e21 < y Initial program 5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
Simplified5.8%
Taylor expanded in y around inf 65.9%
associate-/l*71.6%
Simplified71.6%
if -1.70000000000000015e66 < y < 1.42e21Initial program 96.1%
Taylor expanded in y around 0 78.6%
*-commutative78.6%
Simplified78.6%
Final simplification75.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.2e+63) (not (<= y 2.9e+22))) (- (+ x (/ z y)) (* a (/ x y))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.2e+63) || !(y <= 2.9e+22)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-3.2d+63)) .or. (.not. (y <= 2.9d+22))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.2e+63) || !(y <= 2.9e+22)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.2e+63) or not (y <= 2.9e+22): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.2e+63) || !(y <= 2.9e+22)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.2e+63) || ~((y <= 2.9e+22))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.2e+63], N[Not[LessEqual[y, 2.9e+22]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+63} \lor \neg \left(y \leq 2.9 \cdot 10^{+22}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -3.20000000000000011e63 or 2.9e22 < y Initial program 5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
Simplified5.8%
Taylor expanded in y around inf 65.9%
associate-/l*71.6%
Simplified71.6%
if -3.20000000000000011e63 < y < 2.9e22Initial program 96.1%
Taylor expanded in y around 0 93.9%
Taylor expanded in y around 0 77.1%
*-commutative78.6%
Simplified77.1%
Final simplification74.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+61) (not (<= y 205000000.0))) (- (+ x (/ z y)) (* a (/ x y))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 205000000.0)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+61)) .or. (.not. (y <= 205000000.0d0))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 205000000.0)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 205000000.0): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 205000000.0)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 205000000.0))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 205000000.0]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 205000000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 2.05e8 < y Initial program 8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
Simplified8.1%
Taylor expanded in y around inf 64.1%
associate-/l*69.5%
Simplified69.5%
if -1.1999999999999999e61 < y < 2.05e8Initial program 97.4%
Taylor expanded in y around 0 81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y around 0 75.7%
Taylor expanded in y around 0 75.7%
Final simplification72.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+61) (not (<= y 3.6e+24))) (- (+ x (/ z y)) (* a (/ x y))) (/ t (+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 3.6e+24)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+61)) .or. (.not. (y <= 3.6d+24))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = t / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 3.6e+24)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 3.6e+24): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = t / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 3.6e+24)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 3.6e+24))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = t / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 3.6e+24]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 3.6 \cdot 10^{+24}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 3.59999999999999983e24 < y Initial program 5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
fma-define5.8%
Simplified5.8%
Taylor expanded in y around inf 65.9%
associate-/l*71.6%
Simplified71.6%
if -1.1999999999999999e61 < y < 3.59999999999999983e24Initial program 96.1%
Taylor expanded in y around 0 93.9%
Taylor expanded in t around inf 64.3%
Final simplification67.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+61) (not (<= y 15500000.0))) (- (+ x (/ z y)) (* a (/ x y))) (/ t (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 15500000.0)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+61)) .or. (.not. (y <= 15500000.0d0))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = t / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+61) || !(y <= 15500000.0)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+61) or not (y <= 15500000.0): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+61) || !(y <= 15500000.0)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+61) || ~((y <= 15500000.0))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+61], N[Not[LessEqual[y, 15500000.0]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 15500000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 1.55e7 < y Initial program 8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
fma-define8.1%
Simplified8.1%
Taylor expanded in y around inf 64.1%
associate-/l*69.5%
Simplified69.5%
if -1.1999999999999999e61 < y < 1.55e7Initial program 97.4%
Taylor expanded in y around 0 81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y around 0 75.7%
Taylor expanded in t around inf 63.6%
Final simplification66.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+61) (not (<= y 0.0215))) (- (+ 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.2e+61) || !(y <= 0.0215)) {
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.2d+61)) .or. (.not. (y <= 0.0215d0))) 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.2e+61) || !(y <= 0.0215)) {
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.2e+61) or not (y <= 0.0215): 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.2e+61) || !(y <= 0.0215)) tmp = Float64(Float64(x + 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.2e+61) || ~((y <= 0.0215))) 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.2e+61], N[Not[LessEqual[y, 0.0215]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+61} \lor \neg \left(y \leq 0.0215\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1.1999999999999999e61 or 0.021499999999999998 < y Initial program 8.8%
fma-define8.8%
fma-define8.8%
fma-define8.8%
fma-define8.8%
fma-define8.8%
fma-define8.8%
fma-define8.8%
Simplified8.8%
Taylor expanded in y around inf 63.6%
associate-/l*69.0%
Simplified69.0%
if -1.1999999999999999e61 < y < 0.021499999999999998Initial program 97.4%
fma-define97.4%
fma-define97.4%
fma-define97.4%
fma-define97.4%
fma-define97.4%
fma-define97.4%
fma-define97.4%
Simplified97.4%
Taylor expanded in y around 0 49.3%
Final simplification59.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -7.5e+55) x (if (<= y 4e+16) (/ 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 <= -7.5e+55) {
tmp = x;
} else if (y <= 4e+16) {
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 <= (-7.5d+55)) then
tmp = x
else if (y <= 4d+16) 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 <= -7.5e+55) {
tmp = x;
} else if (y <= 4e+16) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.5e+55: tmp = x elif y <= 4e+16: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.5e+55) tmp = x; elseif (y <= 4e+16) 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 <= -7.5e+55) tmp = x; elseif (y <= 4e+16) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.5e+55], x, If[LessEqual[y, 4e+16], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+16}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.50000000000000014e55 or 4e16 < y Initial program 6.6%
fma-define6.6%
fma-define6.6%
fma-define6.6%
fma-define6.6%
fma-define6.6%
fma-define6.6%
fma-define6.6%
Simplified6.6%
Taylor expanded in y around inf 54.8%
if -7.50000000000000014e55 < y < 4e16Initial program 96.8%
fma-define96.8%
fma-define96.8%
fma-define96.8%
fma-define96.8%
fma-define96.8%
fma-define96.8%
fma-define96.8%
Simplified96.8%
Taylor expanded in y around 0 48.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.8%
fma-define53.8%
fma-define53.8%
fma-define53.8%
fma-define53.8%
fma-define53.8%
fma-define53.8%
fma-define53.8%
Simplified53.8%
Taylor expanded in y around inf 28.0%
herbie shell --seed 2024185
(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)))