
(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 12 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
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(- (+ x (/ z y)) (/ (* x a) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
function code(x, y, z, t, 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) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := 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] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{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 89.6%
fma-define89.6%
fma-define89.6%
fma-define89.6%
fma-define89.6%
fma-define89.6%
fma-define89.6%
fma-define89.6%
Simplified89.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%
Taylor expanded in y around inf 67.8%
Final simplification81.3%
(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 INFINITY) t_1 (- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((x * a) / 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) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((x * a) / 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 <= math.inf: tmp = t_1 else: tmp = (x + (z / y)) - ((x * a) / 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 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((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 <= Inf) tmp = t_1; else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(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, Infinity], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / 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}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{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 89.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%
Taylor expanded in y around inf 67.8%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1))
(t_3 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.55e+39)
t_3
(if (<= y 1.65e-80)
t_2
(if (<= y 1.6e-6)
(/
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t_1)
(if (<= y 3e+64) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
double t_3 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.55e+39) {
tmp = t_3;
} else if (y <= 1.65e-80) {
tmp = t_2;
} else if (y <= 1.6e-6) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else if (y <= 3e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
t_3 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.55d+39)) then
tmp = t_3
else if (y <= 1.65d-80) then
tmp = t_2
else if (y <= 1.6d-6) then
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) / t_1
else if (y <= 3d+64) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
double t_3 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.55e+39) {
tmp = t_3;
} else if (y <= 1.65e-80) {
tmp = t_2;
} else if (y <= 1.6e-6) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else if (y <= 3e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 t_3 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.55e+39: tmp = t_3 elif y <= 1.65e-80: tmp = t_2 elif y <= 1.6e-6: tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1 elif y <= 3e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1) t_3 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.55e+39) tmp = t_3; elseif (y <= 1.65e-80) tmp = t_2; elseif (y <= 1.6e-6) tmp = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1); elseif (y <= 3e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; t_3 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.55e+39) tmp = t_3; elseif (y <= 1.65e-80) tmp = t_2; elseif (y <= 1.6e-6) tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1; elseif (y <= 3e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+39], t$95$3, If[LessEqual[y, 1.65e-80], t$95$2, If[LessEqual[y, 1.6e-6], 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$95$1), $MachinePrecision], If[LessEqual[y, 3e+64], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := \frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\
t_3 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+39}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{t\_1}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.5500000000000001e39 or 3.0000000000000002e64 < y Initial program 3.3%
Taylor expanded in y around inf 66.0%
if -1.5500000000000001e39 < y < 1.65e-80 or 1.5999999999999999e-6 < y < 3.0000000000000002e64Initial program 92.7%
Taylor expanded in x around 0 88.5%
if 1.65e-80 < y < 1.5999999999999999e-6Initial program 99.5%
Taylor expanded in t around 0 90.8%
Final simplification79.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.75e+39) (not (<= y 6.6e+65)))
(- (+ x (/ z y)) (/ (* x a) 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 <= -1.75e+39) || !(y <= 6.6e+65)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-1.75d+39)) .or. (.not. (y <= 6.6d+65))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -1.75e+39) || !(y <= 6.6e+65)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -1.75e+39) or not (y <= 6.6e+65): tmp = (x + (z / y)) - ((x * a) / 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 <= -1.75e+39) || !(y <= 6.6e+65)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -1.75e+39) || ~((y <= 6.6e+65))) tmp = (x + (z / y)) - ((x * a) / 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, -1.75e+39], N[Not[LessEqual[y, 6.6e+65]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / 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[(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.75 \cdot 10^{+39} \lor \neg \left(y \leq 6.6 \cdot 10^{+65}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{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 < -1.7500000000000001e39 or 6.60000000000000046e65 < y Initial program 3.3%
Taylor expanded in y around inf 66.0%
if -1.7500000000000001e39 < y < 6.60000000000000046e65Initial program 93.2%
Taylor expanded in x around 0 85.5%
Final simplification77.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.8e+36) (not (<= y 2.2e+62)))
(- (+ x (/ z y)) (/ (* x a) 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.8e+36) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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.8d+36)) .or. (.not. (y <= 2.2d+62))) then
tmp = (x + (z / y)) - ((x * a) / 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.8e+36) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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.8e+36) or not (y <= 2.2e+62): tmp = (x + (z / y)) - ((x * a) / 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.8e+36) || !(y <= 2.2e+62)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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.8e+36) || ~((y <= 2.2e+62))) tmp = (x + (z / y)) - ((x * a) / 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.8e+36], N[Not[LessEqual[y, 2.2e+62]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / 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.8 \cdot 10^{+36} \lor \neg \left(y \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{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.79999999999999985e36 or 2.20000000000000015e62 < y Initial program 3.3%
Taylor expanded in y around inf 66.0%
if -4.79999999999999985e36 < y < 2.20000000000000015e62Initial program 93.2%
Taylor expanded in x around 0 85.5%
Taylor expanded in y around 0 80.4%
Final simplification74.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.35e+51)
t_1
(if (<= y -8.8e-29)
(* y (+ (/ z b) (/ (* x y) b)))
(if (<= y -1.3e-43) (/ z y) (if (<= y 2.2e+62) (/ t i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.35e+51) {
tmp = t_1;
} else if (y <= -8.8e-29) {
tmp = y * ((z / b) + ((x * y) / b));
} else if (y <= -1.3e-43) {
tmp = z / y;
} else if (y <= 2.2e+62) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.35d+51)) then
tmp = t_1
else if (y <= (-8.8d-29)) then
tmp = y * ((z / b) + ((x * y) / b))
else if (y <= (-1.3d-43)) then
tmp = z / y
else if (y <= 2.2d+62) then
tmp = t / i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.35e+51) {
tmp = t_1;
} else if (y <= -8.8e-29) {
tmp = y * ((z / b) + ((x * y) / b));
} else if (y <= -1.3e-43) {
tmp = z / y;
} else if (y <= 2.2e+62) {
tmp = t / i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.35e+51: tmp = t_1 elif y <= -8.8e-29: tmp = y * ((z / b) + ((x * y) / b)) elif y <= -1.3e-43: tmp = z / y elif y <= 2.2e+62: tmp = t / i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.35e+51) tmp = t_1; elseif (y <= -8.8e-29) tmp = Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))); elseif (y <= -1.3e-43) tmp = Float64(z / y); elseif (y <= 2.2e+62) tmp = Float64(t / i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.35e+51) tmp = t_1; elseif (y <= -8.8e-29) tmp = y * ((z / b) + ((x * y) / b)); elseif (y <= -1.3e-43) tmp = z / y; elseif (y <= 2.2e+62) tmp = t / i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+51], t$95$1, If[LessEqual[y, -8.8e-29], N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.3e-43], N[(z / y), $MachinePrecision], If[LessEqual[y, 2.2e+62], N[(t / i), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right)\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-43}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.34999999999999996e51 or 2.20000000000000015e62 < y Initial program 3.3%
Taylor expanded in y around inf 67.3%
if -1.34999999999999996e51 < y < -8.79999999999999961e-29Initial program 71.3%
Taylor expanded in b around inf 25.4%
Taylor expanded in y around inf 26.1%
associate-/r*26.1%
Simplified26.1%
Taylor expanded in y around 0 26.0%
if -8.79999999999999961e-29 < y < -1.3e-43Initial program 98.4%
Taylor expanded in x around 0 37.6%
Taylor expanded in y around inf 37.1%
if -1.3e-43 < y < 2.20000000000000015e62Initial program 94.6%
Taylor expanded in y around 0 53.1%
Final simplification56.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.2e+51) (not (<= y 2.2e+62))) (- (+ x (/ z y)) (/ (* x a) 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 <= -2.2e+51) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-2.2d+51)) .or. (.not. (y <= 2.2d+62))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -2.2e+51) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -2.2e+51) or not (y <= 2.2e+62): tmp = (x + (z / y)) - ((x * a) / 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 <= -2.2e+51) || !(y <= 2.2e+62)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -2.2e+51) || ~((y <= 2.2e+62))) tmp = (x + (z / y)) - ((x * a) / 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, -2.2e+51], N[Not[LessEqual[y, 2.2e+62]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 -2.2 \cdot 10^{+51} \lor \neg \left(y \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{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 < -2.19999999999999992e51 or 2.20000000000000015e62 < y Initial program 3.3%
Taylor expanded in y around inf 67.3%
if -2.19999999999999992e51 < y < 2.20000000000000015e62Initial program 92.0%
Taylor expanded in y around 0 74.6%
*-commutative74.6%
Simplified74.6%
Final simplification71.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.6e+52) (not (<= y 2.2e+62)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.6e+52) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.6d+52)) .or. (.not. (y <= 2.2d+62))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.6e+52) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.6e+52) or not (y <= 2.2e+62): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.6e+52) || !(y <= 2.2e+62)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.6e+52) || ~((y <= 2.2e+62))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.6e+52], N[Not[LessEqual[y, 2.2e+62]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+52} \lor \neg \left(y \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.6e52 or 2.20000000000000015e62 < y Initial program 3.4%
Taylor expanded in y around inf 67.8%
if -2.6e52 < y < 2.20000000000000015e62Initial program 91.4%
Taylor expanded in x around 0 83.8%
Taylor expanded in y around 0 78.9%
Taylor expanded in z around 0 72.9%
Final simplification70.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.15e+52) (not (<= y 2.2e+62))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ 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 <= -2.15e+52) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (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 <= (-2.15d+52)) .or. (.not. (y <= 2.2d+62))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (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 <= -2.15e+52) || !(y <= 2.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.15e+52) or not (y <= 2.2e+62): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.15e+52) || !(y <= 2.2e+62)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / 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 <= -2.15e+52) || ~((y <= 2.2e+62))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.15e+52], N[Not[LessEqual[y, 2.2e+62]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+52} \lor \neg \left(y \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -2.15e52 or 2.20000000000000015e62 < y Initial program 3.4%
Taylor expanded in y around inf 67.8%
if -2.15e52 < y < 2.20000000000000015e62Initial program 91.4%
Taylor expanded in y around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y around 0 66.8%
Final simplification67.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.1e+50) (not (<= y 3.2e+62))) (- (+ x (/ z y)) (/ (* x a) 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 <= -2.1e+50) || !(y <= 3.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-2.1d+50)) .or. (.not. (y <= 3.2d+62))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -2.1e+50) || !(y <= 3.2e+62)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -2.1e+50) or not (y <= 3.2e+62): tmp = (x + (z / y)) - ((x * a) / 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 <= -2.1e+50) || !(y <= 3.2e+62)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -2.1e+50) || ~((y <= 3.2e+62))) tmp = (x + (z / y)) - ((x * a) / 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, -2.1e+50], N[Not[LessEqual[y, 3.2e+62]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / 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 -2.1 \cdot 10^{+50} \lor \neg \left(y \leq 3.2 \cdot 10^{+62}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.1e50 or 3.19999999999999984e62 < y Initial program 3.3%
Taylor expanded in y around inf 67.3%
if -2.1e50 < y < 3.19999999999999984e62Initial program 92.0%
Taylor expanded in x around 0 84.4%
Taylor expanded in y around 0 79.4%
Taylor expanded in t around inf 62.5%
Final simplification64.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.15e-20) x (if (<= y 2.2e+62) (/ 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.15e-20) {
tmp = x;
} else if (y <= 2.2e+62) {
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.15d-20)) then
tmp = x
else if (y <= 2.2d+62) 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.15e-20) {
tmp = x;
} else if (y <= 2.2e+62) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.15e-20: tmp = x elif y <= 2.2e+62: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.15e-20) tmp = x; elseif (y <= 2.2e+62) 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.15e-20) tmp = x; elseif (y <= 2.2e+62) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.15e-20], x, If[LessEqual[y, 2.2e+62], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.15e-20 or 2.20000000000000015e62 < y Initial program 12.1%
Taylor expanded in y around inf 45.4%
if -1.15e-20 < y < 2.20000000000000015e62Initial program 94.7%
Taylor expanded in y around 0 51.7%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 55.6%
Taylor expanded in y around inf 23.2%
herbie shell --seed 2024087
(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)))