
(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 (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
t_1)
INFINITY)
(/
(+
t
(*
y
(+
230661.510616
(+ (* y (+ 27464.7644705 (* x (pow y 2.0)))) (* z (pow y 2.0))))))
t_1)
(+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= ((double) INFINITY)) {
tmp = (t + (y * (230661.510616 + ((y * (27464.7644705 + (x * pow(y, 2.0)))) + (z * pow(y, 2.0)))))) / t_1;
} else {
tmp = x + (z / y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t + (y * (230661.510616 + ((y * (27464.7644705 + (x * Math.pow(y, 2.0)))) + (z * Math.pow(y, 2.0)))))) / t_1;
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * (c + (y * (b + (y * (y + a)))))) tmp = 0 if (((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= math.inf: tmp = (t + (y * (230661.510616 + ((y * (27464.7644705 + (x * math.pow(y, 2.0)))) + (z * math.pow(y, 2.0)))))) / t_1 else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))) 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) <= Inf) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(Float64(y * Float64(27464.7644705 + Float64(x * (y ^ 2.0)))) + Float64(z * (y ^ 2.0)))))) / t_1); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * (c + (y * (b + (y * (y + a)))))); tmp = 0.0; if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Inf) tmp = (t + (y * (230661.510616 + ((y * (27464.7644705 + (x * (y ^ 2.0)))) + (z * (y ^ 2.0)))))) / t_1; else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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], Infinity], N[(N[(t + N[(y * N[(230661.510616 + N[(N[(y * N[(27464.7644705 + N[(x * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
\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 \infty:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + \left(y \cdot \left(27464.7644705 + x \cdot {y}^{2}\right) + z \cdot {y}^{2}\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{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)) < +inf.0Initial program 90.6%
Taylor expanded in z around 0 90.7%
if +inf.0 < (/.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 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around inf 0.1%
Taylor expanded in y around inf 0.7%
Taylor expanded in y around inf 78.4%
Final simplification86.5%
(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)
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 INFINITY) t_1 (+ x (/ z 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) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + (z / y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + (z / 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) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + (z / 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(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(z / 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) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + (z / 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[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(z / y), $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}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{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)) < +inf.0Initial program 90.6%
if +inf.0 < (/.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 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around inf 0.1%
Taylor expanded in y around inf 0.7%
Taylor expanded in y around inf 78.4%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ z y))))
(if (<= y -8.8e+57)
t_1
(if (<= y 4.1e-32)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 1.1e+66)
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ i (* y (+ c (* (* y y) (+ y a))))))
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);
double tmp;
if (y <= -8.8e+57) {
tmp = t_1;
} else if (y <= 4.1e-32) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 1.1e+66) {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + ((y * y) * (y + a)))));
} 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)
if (y <= (-8.8d+57)) then
tmp = t_1
else if (y <= 4.1d-32) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 1.1d+66) then
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + ((y * y) * (y + a)))))
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);
double tmp;
if (y <= -8.8e+57) {
tmp = t_1;
} else if (y <= 4.1e-32) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 1.1e+66) {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + ((y * y) * (y + a)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + (z / y) tmp = 0 if y <= -8.8e+57: tmp = t_1 elif y <= 4.1e-32: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 1.1e+66: tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + ((y * y) * (y + a))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(z / y)) tmp = 0.0 if (y <= -8.8e+57) tmp = t_1; elseif (y <= 4.1e-32) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); elseif (y <= 1.1e+66) 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(Float64(y * y) * Float64(y + a)))))); 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); tmp = 0.0; if (y <= -8.8e+57) tmp = t_1; elseif (y <= 4.1e-32) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 1.1e+66) tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + ((y * y) * (y + a))))); 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[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e+57], t$95$1, If[LessEqual[y, 4.1e-32], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+66], 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[(N[(y * y), $MachinePrecision] * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z}{y}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-32}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+66}:\\
\;\;\;\;\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 + \left(y \cdot y\right) \cdot \left(y + a\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.8000000000000003e57 or 1.0999999999999999e66 < y Initial program 2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
Simplified2.5%
Taylor expanded in z around inf 2.5%
Taylor expanded in y around inf 3.9%
Taylor expanded in y around inf 74.5%
if -8.8000000000000003e57 < y < 4.09999999999999975e-32Initial program 96.2%
Taylor expanded in x around 0 91.7%
if 4.09999999999999975e-32 < y < 1.0999999999999999e66Initial program 94.3%
fma-define94.3%
fma-define94.3%
fma-define94.4%
fma-define94.4%
fma-define94.3%
fma-define94.3%
fma-define94.3%
Simplified94.3%
Taylor expanded in b around 0 94.3%
unpow294.3%
Applied egg-rr94.3%
Final simplification85.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.1e+56) (not (<= y 9.2e+64)))
(+ x (/ z y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.1e+56) || !(y <= 9.2e+64)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-3.1d+56)) .or. (.not. (y <= 9.2d+64))) then
tmp = x + (z / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.1e+56) || !(y <= 9.2e+64)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.1e+56) or not (y <= 9.2e+64): tmp = x + (z / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.1e+56) || !(y <= 9.2e+64)) tmp = Float64(x + Float64(z / 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 * 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.1e+56) || ~((y <= 9.2e+64))) tmp = x + (z / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.1e+56], N[Not[LessEqual[y, 9.2e+64]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+56} \lor \neg \left(y \leq 9.2 \cdot 10^{+64}\right):\\
\;\;\;\;x + \frac{z}{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 \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -3.10000000000000005e56 or 9.2e64 < y Initial program 2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
Simplified2.5%
Taylor expanded in z around inf 2.5%
Taylor expanded in y around inf 3.9%
Taylor expanded in y around inf 74.5%
if -3.10000000000000005e56 < y < 9.2e64Initial program 96.0%
Taylor expanded in x around 0 89.1%
Final simplification83.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5.5e+44) (not (<= y 6.5e+62)))
(+ x (/ z 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 <= -5.5e+44) || !(y <= 6.5e+62)) {
tmp = x + (z / 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 <= (-5.5d+44)) .or. (.not. (y <= 6.5d+62))) then
tmp = x + (z / 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 <= -5.5e+44) || !(y <= 6.5e+62)) {
tmp = x + (z / 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 <= -5.5e+44) or not (y <= 6.5e+62): tmp = x + (z / 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 <= -5.5e+44) || !(y <= 6.5e+62)) tmp = Float64(x + Float64(z / 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 <= -5.5e+44) || ~((y <= 6.5e+62))) tmp = x + (z / 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, -5.5e+44], N[Not[LessEqual[y, 6.5e+62]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+44} \lor \neg \left(y \leq 6.5 \cdot 10^{+62}\right):\\
\;\;\;\;x + \frac{z}{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 < -5.5000000000000001e44 or 6.5000000000000003e62 < y Initial program 2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
Simplified2.5%
Taylor expanded in z around inf 2.5%
Taylor expanded in y around inf 3.9%
Taylor expanded in y around inf 74.5%
if -5.5000000000000001e44 < y < 6.5000000000000003e62Initial program 96.0%
Taylor expanded in x around 0 89.1%
add-cube-cbrt89.0%
pow389.0%
Applied egg-rr89.0%
Taylor expanded in y around 0 88.0%
Final simplification82.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a)))))) (t_2 (+ x (/ z y))))
(if (<= y -2.6e+72)
t_2
(if (<= y -0.00047)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_1)
(if (<= y 9e+28) (/ (+ t (* y 230661.510616)) (+ i (* y 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 = c + (y * (b + (y * (y + a))));
double t_2 = x + (z / y);
double tmp;
if (y <= -2.6e+72) {
tmp = t_2;
} else if (y <= -0.00047) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 9e+28) {
tmp = (t + (y * 230661.510616)) / (i + (y * 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 = c + (y * (b + (y * (y + a))))
t_2 = x + (z / y)
if (y <= (-2.6d+72)) then
tmp = t_2
else if (y <= (-0.00047d0)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_1
else if (y <= 9d+28) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * 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 = c + (y * (b + (y * (y + a))));
double t_2 = x + (z / y);
double tmp;
if (y <= -2.6e+72) {
tmp = t_2;
} else if (y <= -0.00047) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 9e+28) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) t_2 = x + (z / y) tmp = 0 if y <= -2.6e+72: tmp = t_2 elif y <= -0.00047: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1 elif y <= 9e+28: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(x + Float64(z / y)) tmp = 0.0 if (y <= -2.6e+72) tmp = t_2; elseif (y <= -0.00047) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_1); elseif (y <= 9e+28) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); t_2 = x + (z / y); tmp = 0.0; if (y <= -2.6e+72) tmp = t_2; elseif (y <= -0.00047) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1; elseif (y <= 9e+28) tmp = (t + (y * 230661.510616)) / (i + (y * 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[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+72], t$95$2, If[LessEqual[y, -0.00047], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 9e+28], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := x + \frac{z}{y}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+72}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -0.00047:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_1}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+28}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.59999999999999981e72 or 8.9999999999999994e28 < y Initial program 6.3%
fma-define6.3%
fma-define6.3%
fma-define6.3%
fma-define6.3%
fma-define6.3%
fma-define6.3%
fma-define6.3%
Simplified6.3%
Taylor expanded in z around inf 5.3%
Taylor expanded in y around inf 4.0%
Taylor expanded in y around inf 72.2%
if -2.59999999999999981e72 < y < -4.69999999999999986e-4Initial program 52.2%
Taylor expanded in x around 0 45.7%
Taylor expanded in t around 0 39.6%
Taylor expanded in i around 0 45.8%
if -4.69999999999999986e-4 < y < 8.9999999999999994e28Initial program 99.6%
Taylor expanded in y around 0 84.2%
*-commutative84.2%
Simplified84.2%
Final simplification77.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.1e+49) (not (<= y 6.4e+62)))
(+ x (/ z y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ 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 <= -4.1e+49) || !(y <= 6.4e+62)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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 <= (-4.1d+49)) .or. (.not. (y <= 6.4d+62))) then
tmp = x + (z / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (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 <= -4.1e+49) || !(y <= 6.4e+62)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -4.1e+49) or not (y <= 6.4e+62): tmp = x + (z / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -4.1e+49) || !(y <= 6.4e+62)) tmp = Float64(x + Float64(z / 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 * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -4.1e+49) || ~((y <= 6.4e+62))) tmp = x + (z / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4.1e+49], N[Not[LessEqual[y, 6.4e+62]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+49} \lor \neg \left(y \leq 6.4 \cdot 10^{+62}\right):\\
\;\;\;\;x + \frac{z}{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 b\right)}\\
\end{array}
\end{array}
if y < -4.1e49 or 6.39999999999999968e62 < y Initial program 2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
Simplified2.5%
Taylor expanded in z around inf 2.5%
Taylor expanded in y around inf 3.9%
Taylor expanded in y around inf 74.5%
if -4.1e49 < y < 6.39999999999999968e62Initial program 96.0%
Taylor expanded in x around 0 89.1%
Taylor expanded in y around 0 80.8%
Final simplification78.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5.5e+38) (not (<= y 6.4e+62)))
(+ x (/ z y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ 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 <= -5.5e+38) || !(y <= 6.4e+62)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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 <= (-5.5d+38)) .or. (.not. (y <= 6.4d+62))) then
tmp = x + (z / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (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 <= -5.5e+38) || !(y <= 6.4e+62)) {
tmp = x + (z / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.5e+38) or not (y <= 6.4e+62): tmp = x + (z / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.5e+38) || !(y <= 6.4e+62)) tmp = Float64(x + Float64(z / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / 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 <= -5.5e+38) || ~((y <= 6.4e+62))) tmp = x + (z / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.5e+38], N[Not[LessEqual[y, 6.4e+62]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+38} \lor \neg \left(y \leq 6.4 \cdot 10^{+62}\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -5.5000000000000003e38 or 6.39999999999999968e62 < y Initial program 2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
fma-define2.5%
Simplified2.5%
Taylor expanded in z around inf 2.5%
Taylor expanded in y around inf 3.9%
Taylor expanded in y around inf 74.5%
if -5.5000000000000003e38 < y < 6.39999999999999968e62Initial program 96.0%
Taylor expanded in x around 0 89.1%
Taylor expanded in y around 0 72.8%
Final simplification73.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6.5e+15) (not (<= y 3.8e+28))) (+ x (/ z y)) (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6.5e+15) || !(y <= 3.8e+28)) {
tmp = x + (z / y);
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-6.5d+15)) .or. (.not. (y <= 3.8d+28))) then
tmp = x + (z / y)
else
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6.5e+15) || !(y <= 3.8e+28)) {
tmp = x + (z / y);
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6.5e+15) or not (y <= 3.8e+28): tmp = x + (z / y) else: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6.5e+15) || !(y <= 3.8e+28)) tmp = Float64(x + Float64(z / y)); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -6.5e+15) || ~((y <= 3.8e+28))) tmp = x + (z / y); else tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6.5e+15], N[Not[LessEqual[y, 3.8e+28]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+15} \lor \neg \left(y \leq 3.8 \cdot 10^{+28}\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -6.5e15 or 3.7999999999999999e28 < y Initial program 10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
Simplified10.3%
Taylor expanded in z around inf 11.0%
Taylor expanded in y around inf 7.4%
Taylor expanded in y around inf 66.1%
if -6.5e15 < y < 3.7999999999999999e28Initial program 99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in t around inf 72.2%
Final simplification69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -8.2e+15) (not (<= y 4.6e+28))) (+ x (/ z 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 <= -8.2e+15) || !(y <= 4.6e+28)) {
tmp = x + (z / 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 <= (-8.2d+15)) .or. (.not. (y <= 4.6d+28))) then
tmp = x + (z / 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 <= -8.2e+15) || !(y <= 4.6e+28)) {
tmp = x + (z / 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 <= -8.2e+15) or not (y <= 4.6e+28): tmp = x + (z / 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 <= -8.2e+15) || !(y <= 4.6e+28)) tmp = Float64(x + Float64(z / 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 <= -8.2e+15) || ~((y <= 4.6e+28))) tmp = x + (z / 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, -8.2e+15], N[Not[LessEqual[y, 4.6e+28]], $MachinePrecision]], N[(x + N[(z / y), $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 -8.2 \cdot 10^{+15} \lor \neg \left(y \leq 4.6 \cdot 10^{+28}\right):\\
\;\;\;\;x + \frac{z}{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 < -8.2e15 or 4.59999999999999968e28 < y Initial program 10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
fma-define10.3%
Simplified10.3%
Taylor expanded in z around inf 11.0%
Taylor expanded in y around inf 7.4%
Taylor expanded in y around inf 66.1%
if -8.2e15 < y < 4.59999999999999968e28Initial program 99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in t around inf 72.2%
Taylor expanded in a around inf 72.2%
Final simplification69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -8e+15) (not (<= y 0.38))) (+ x (/ z 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 <= -8e+15) || !(y <= 0.38)) {
tmp = x + (z / 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 <= (-8d+15)) .or. (.not. (y <= 0.38d0))) then
tmp = x + (z / 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 <= -8e+15) || !(y <= 0.38)) {
tmp = x + (z / 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 <= -8e+15) or not (y <= 0.38): tmp = x + (z / 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 <= -8e+15) || !(y <= 0.38)) tmp = Float64(x + Float64(z / 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 <= -8e+15) || ~((y <= 0.38))) tmp = x + (z / 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, -8e+15], N[Not[LessEqual[y, 0.38]], $MachinePrecision]], N[(x + N[(z / y), $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 -8 \cdot 10^{+15} \lor \neg \left(y \leq 0.38\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -8e15 or 0.38 < y Initial program 16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
Simplified16.8%
Taylor expanded in z around inf 15.6%
Taylor expanded in y around inf 7.9%
Taylor expanded in y around inf 62.4%
if -8e15 < y < 0.38Initial program 99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in t around inf 75.5%
Taylor expanded in y around 0 73.2%
*-commutative73.2%
Simplified73.2%
Final simplification68.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.4e+15) (not (<= y 0.38))) (+ x (/ z y)) (/ 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 <= -5.4e+15) || !(y <= 0.38)) {
tmp = x + (z / y);
} else {
tmp = 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 <= (-5.4d+15)) .or. (.not. (y <= 0.38d0))) then
tmp = x + (z / y)
else
tmp = 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 <= -5.4e+15) || !(y <= 0.38)) {
tmp = x + (z / y);
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.4e+15) or not (y <= 0.38): tmp = x + (z / y) else: tmp = t / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.4e+15) || !(y <= 0.38)) tmp = Float64(x + Float64(z / y)); else tmp = Float64(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 <= -5.4e+15) || ~((y <= 0.38))) tmp = x + (z / y); else tmp = t / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.4e+15], N[Not[LessEqual[y, 0.38]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+15} \lor \neg \left(y \leq 0.38\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -5.4e15 or 0.38 < y Initial program 16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
Simplified16.8%
Taylor expanded in z around inf 15.6%
Taylor expanded in y around inf 7.9%
Taylor expanded in y around inf 62.4%
if -5.4e15 < y < 0.38Initial program 99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in t around inf 75.5%
Taylor expanded in y around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification64.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6.8e+15) (not (<= y 1.7e-25))) (+ x (/ z 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 <= -6.8e+15) || !(y <= 1.7e-25)) {
tmp = x + (z / 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 <= (-6.8d+15)) .or. (.not. (y <= 1.7d-25))) then
tmp = x + (z / 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 <= -6.8e+15) || !(y <= 1.7e-25)) {
tmp = x + (z / y);
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6.8e+15) or not (y <= 1.7e-25): tmp = x + (z / y) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6.8e+15) || !(y <= 1.7e-25)) tmp = Float64(x + Float64(z / 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 <= -6.8e+15) || ~((y <= 1.7e-25))) tmp = x + (z / y); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6.8e+15], N[Not[LessEqual[y, 1.7e-25]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+15} \lor \neg \left(y \leq 1.7 \cdot 10^{-25}\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -6.8e15 or 1.70000000000000001e-25 < y Initial program 19.4%
fma-define19.4%
fma-define19.4%
fma-define19.4%
fma-define19.4%
fma-define19.4%
fma-define19.4%
fma-define19.4%
Simplified19.4%
Taylor expanded in z around inf 18.2%
Taylor expanded in y around inf 10.1%
Taylor expanded in y around inf 60.6%
if -6.8e15 < y < 1.70000000000000001e-25Initial program 99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around 0 52.1%
Final simplification56.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.85e+65) x (if (<= y 1.7e-25) (/ 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 <= -1.85e+65) {
tmp = x;
} else if (y <= 1.7e-25) {
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 <= (-1.85d+65)) then
tmp = x
else if (y <= 1.7d-25) 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 <= -1.85e+65) {
tmp = x;
} else if (y <= 1.7e-25) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.85e+65: tmp = x elif y <= 1.7e-25: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.85e+65) tmp = x; elseif (y <= 1.7e-25) 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 <= -1.85e+65) tmp = x; elseif (y <= 1.7e-25) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.85e+65], x, If[LessEqual[y, 1.7e-25], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.84999999999999997e65 or 1.70000000000000001e-25 < y Initial program 16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
fma-define16.8%
Simplified16.8%
Taylor expanded in y around inf 49.7%
if -1.84999999999999997e65 < y < 1.70000000000000001e-25Initial program 95.0%
fma-define95.0%
fma-define95.0%
fma-define95.0%
fma-define95.0%
fma-define95.0%
fma-define95.0%
fma-define95.0%
Simplified95.0%
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 59.8%
fma-define59.8%
fma-define59.8%
fma-define59.8%
fma-define59.8%
fma-define59.8%
fma-define59.8%
fma-define59.8%
Simplified59.8%
Taylor expanded in y around inf 24.2%
herbie shell --seed 2024141
(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)))