
(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 14 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))
5e+275)
(/
(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) (/ a (/ y x))))))
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)) <= 5e+275) {
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) - (a / (y / x)));
}
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)) <= 5e+275) 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(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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], 5e+275], 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $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 5 \cdot 10^{+275}:\\
\;\;\;\;\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}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.0000000000000003e275Initial program 90.6%
fma-def90.6%
fma-def90.6%
fma-def90.6%
fma-def90.6%
fma-def90.6%
fma-def90.6%
fma-def90.6%
Simplified90.6%
if 5.0000000000000003e275 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.4%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*77.8%
Simplified77.8%
Final simplification85.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(if (<= (/ (+ t_2 t) t_1) 5e+275)
(+ (/ t t_1) (/ t_2 t_1))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= 5e+275) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)
if (((t_2 + t) / t_1) <= 5d+275) then
tmp = (t / t_1) + (t_2 / t_1)
else
tmp = x + ((z / y) - (a / (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= 5e+275) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) tmp = 0 if ((t_2 + t) / t_1) <= 5e+275: tmp = (t / t_1) + (t_2 / t_1) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) tmp = 0.0 if (Float64(Float64(t_2 + t) / t_1) <= 5e+275) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616); tmp = 0.0; if (((t_2 + t) / t_1) <= 5e+275) tmp = (t / t_1) + (t_2 / t_1); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 + t), $MachinePrecision] / t$95$1), $MachinePrecision], 5e+275], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\
\mathbf{if}\;\frac{t_2 + t}{t_1} \leq 5 \cdot 10^{+275}:\\
\;\;\;\;\frac{t}{t_1} + \frac{t_2}{t_1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.0000000000000003e275Initial program 90.6%
Taylor expanded in t around 0 90.6%
if 5.0000000000000003e275 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.4%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*77.8%
Simplified77.8%
Final simplification85.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)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 5e+275) t_1 (+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 5e+275) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
if (t_1 <= 5d+275) then
tmp = t_1
else
tmp = x + ((z / y) - (a / (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 5e+275) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
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 <= 5e+275: tmp = t_1 else: tmp = x + ((z / y) - (a / (y / x))) 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 <= 5e+275) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= 5e+275) tmp = t_1; else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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, 5e+275], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+275}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.0000000000000003e275Initial program 90.6%
if 5.0000000000000003e275 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.4%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*77.8%
Simplified77.8%
Final simplification85.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.4e+64) (not (<= y 9.5e+67)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ 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 <= -4.4e+64) || !(y <= 9.5e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-4.4d+64)) .or. (.not. (y <= 9.5d+67))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -4.4e+64) || !(y <= 9.5e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= -4.4e+64) or not (y <= 9.5e+67): tmp = x + ((z / y) - (a / (y / x))) 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 <= -4.4e+64) || !(y <= 9.5e+67)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / 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 <= -4.4e+64) || ~((y <= 9.5e+67))) tmp = x + ((z / y) - (a / (y / x))); 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, -4.4e+64], N[Not[LessEqual[y, 9.5e+67]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -4.4 \cdot 10^{+64} \lor \neg \left(y \leq 9.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\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 < -4.40000000000000004e64 or 9.5000000000000002e67 < y Initial program 0.3%
Taylor expanded in y around inf 77.0%
associate--l+77.0%
associate-/l*81.1%
Simplified81.1%
if -4.40000000000000004e64 < y < 9.5000000000000002e67Initial program 88.3%
Taylor expanded in x around 0 81.3%
Final simplification81.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -380000000.0) (not (<= y 1.1e+51)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ 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 <= -380000000.0) || !(y <= 1.1e+51)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-380000000.0d0)) .or. (.not. (y <= 1.1d+51))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -380000000.0) || !(y <= 1.1e+51)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= -380000000.0) or not (y <= 1.1e+51): tmp = x + ((z / y) - (a / (y / x))) 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 <= -380000000.0) || !(y <= 1.1e+51)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / 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 <= -380000000.0) || ~((y <= 1.1e+51))) tmp = x + ((z / y) - (a / (y / x))); 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, -380000000.0], N[Not[LessEqual[y, 1.1e+51]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -380000000 \lor \neg \left(y \leq 1.1 \cdot 10^{+51}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\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 < -3.8e8 or 1.09999999999999996e51 < y Initial program 6.7%
Taylor expanded in y around inf 67.4%
associate--l+67.4%
associate-/l*70.8%
Simplified70.8%
if -3.8e8 < y < 1.09999999999999996e51Initial program 95.6%
Taylor expanded in x around 0 89.7%
Taylor expanded in y around 0 85.2%
*-commutative79.4%
Simplified85.2%
Final simplification78.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -380000000.0) (not (<= y 3.9e+67))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ 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 <= -380000000.0) || !(y <= 3.9e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-380000000.0d0)) .or. (.not. (y <= 3.9d+67))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -380000000.0) || !(y <= 3.9e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= -380000000.0) or not (y <= 3.9e+67): tmp = x + ((z / y) - (a / (y / x))) 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 <= -380000000.0) || !(y <= 3.9e+67)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -380000000.0) || ~((y <= 3.9e+67))) tmp = x + ((z / y) - (a / (y / x))); 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, -380000000.0], N[Not[LessEqual[y, 3.9e+67]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -380000000 \lor \neg \left(y \leq 3.9 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\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 < -3.8e8 or 3.90000000000000007e67 < y Initial program 6.0%
Taylor expanded in y around inf 70.2%
associate--l+70.2%
associate-/l*73.8%
Simplified73.8%
if -3.8e8 < y < 3.90000000000000007e67Initial program 92.5%
Taylor expanded in y around 0 79.5%
*-commutative79.5%
Simplified79.5%
Final simplification77.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -380000000.0) (not (<= y 5.8e+59)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ 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 <= -380000000.0) || !(y <= 5.8e+59)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-380000000.0d0)) .or. (.not. (y <= 5.8d+59))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -380000000.0) || !(y <= 5.8e+59)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= -380000000.0) or not (y <= 5.8e+59): tmp = x + ((z / y) - (a / (y / x))) 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 <= -380000000.0) || !(y <= 5.8e+59)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -380000000.0) || ~((y <= 5.8e+59))) tmp = x + ((z / y) - (a / (y / x))); 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, -380000000.0], N[Not[LessEqual[y, 5.8e+59]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $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 -380000000 \lor \neg \left(y \leq 5.8 \cdot 10^{+59}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\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 < -3.8e8 or 5.79999999999999981e59 < y Initial program 6.8%
Taylor expanded in y around inf 68.5%
associate--l+68.5%
associate-/l*72.0%
Simplified72.0%
if -3.8e8 < y < 5.79999999999999981e59Initial program 94.3%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in y around 0 78.3%
*-commutative78.3%
Simplified78.3%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -245000000.0) (not (<= y 3.9e+67))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t (+ (* 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 <= -245000000.0) || !(y <= 3.9e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / ((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 <= (-245000000.0d0)) .or. (.not. (y <= 3.9d+67))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = t / ((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 <= -245000000.0) || !(y <= 3.9e+67)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -245000000.0) or not (y <= 3.9e+67): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / ((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 <= -245000000.0) || !(y <= 3.9e+67)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(t / 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 <= -245000000.0) || ~((y <= 3.9e+67))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / ((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, -245000000.0], N[Not[LessEqual[y, 3.9e+67]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -245000000 \lor \neg \left(y \leq 3.9 \cdot 10^{+67}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -2.45e8 or 3.90000000000000007e67 < y Initial program 6.0%
Taylor expanded in y around inf 70.2%
associate--l+70.2%
associate-/l*73.8%
Simplified73.8%
if -2.45e8 < y < 3.90000000000000007e67Initial program 92.5%
Taylor expanded in t around inf 65.4%
Final simplification69.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -61000000.0) (not (<= y 5.8e+59))) (+ x (- (/ z y) (/ a (/ y x)))) (/ 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 <= -61000000.0) || !(y <= 5.8e+59)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-61000000.0d0)) .or. (.not. (y <= 5.8d+59))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -61000000.0) || !(y <= 5.8e+59)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -61000000.0) or not (y <= 5.8e+59): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -61000000.0) || !(y <= 5.8e+59)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -61000000.0) || ~((y <= 5.8e+59))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -61000000.0], N[Not[LessEqual[y, 5.8e+59]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -61000000 \lor \neg \left(y \leq 5.8 \cdot 10^{+59}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -6.1e7 or 5.79999999999999981e59 < y Initial program 6.8%
Taylor expanded in y around inf 68.5%
associate--l+68.5%
associate-/l*72.0%
Simplified72.0%
if -6.1e7 < y < 5.79999999999999981e59Initial program 94.3%
fma-def94.3%
fma-def94.3%
fma-def94.3%
fma-def94.3%
fma-def94.3%
fma-def94.3%
fma-def94.3%
Simplified94.3%
Taylor expanded in y around 0 66.5%
Taylor expanded in y around 0 61.1%
*-commutative61.1%
Simplified61.1%
Final simplification66.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.2e-28) x (if (<= y 2.1e-61) (/ t i) (if (<= y 2.85e+35) (/ t (* y c)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.2e-28) {
tmp = x;
} else if (y <= 2.1e-61) {
tmp = t / i;
} else if (y <= 2.85e+35) {
tmp = t / (y * c);
} 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 <= (-2.2d-28)) then
tmp = x
else if (y <= 2.1d-61) then
tmp = t / i
else if (y <= 2.85d+35) then
tmp = t / (y * c)
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 <= -2.2e-28) {
tmp = x;
} else if (y <= 2.1e-61) {
tmp = t / i;
} else if (y <= 2.85e+35) {
tmp = t / (y * c);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.2e-28: tmp = x elif y <= 2.1e-61: tmp = t / i elif y <= 2.85e+35: tmp = t / (y * c) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.2e-28) tmp = x; elseif (y <= 2.1e-61) tmp = Float64(t / i); elseif (y <= 2.85e+35) tmp = Float64(t / Float64(y * c)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.2e-28) tmp = x; elseif (y <= 2.1e-61) tmp = t / i; elseif (y <= 2.85e+35) tmp = t / (y * c); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.2e-28], x, If[LessEqual[y, 2.1e-61], N[(t / i), $MachinePrecision], If[LessEqual[y, 2.85e+35], N[(t / N[(y * c), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-61}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.19999999999999996e-28 or 2.84999999999999997e35 < y Initial program 11.1%
Taylor expanded in y around inf 52.7%
if -2.19999999999999996e-28 < y < 2.0999999999999999e-61Initial program 99.8%
Taylor expanded in y around 0 60.9%
if 2.0999999999999999e-61 < y < 2.84999999999999997e35Initial program 84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
Simplified84.6%
Taylor expanded in y around 0 38.3%
Taylor expanded in c around inf 27.2%
*-commutative27.2%
Simplified27.2%
Final simplification53.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.2e-28) x (if (<= y 1.15e-58) (/ t i) (if (<= y 1.28e+36) (/ (/ t c) y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.2e-28) {
tmp = x;
} else if (y <= 1.15e-58) {
tmp = t / i;
} else if (y <= 1.28e+36) {
tmp = (t / c) / y;
} 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 <= (-2.2d-28)) then
tmp = x
else if (y <= 1.15d-58) then
tmp = t / i
else if (y <= 1.28d+36) then
tmp = (t / c) / y
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 <= -2.2e-28) {
tmp = x;
} else if (y <= 1.15e-58) {
tmp = t / i;
} else if (y <= 1.28e+36) {
tmp = (t / c) / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.2e-28: tmp = x elif y <= 1.15e-58: tmp = t / i elif y <= 1.28e+36: tmp = (t / c) / y else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.2e-28) tmp = x; elseif (y <= 1.15e-58) tmp = Float64(t / i); elseif (y <= 1.28e+36) tmp = Float64(Float64(t / c) / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.2e-28) tmp = x; elseif (y <= 1.15e-58) tmp = t / i; elseif (y <= 1.28e+36) tmp = (t / c) / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.2e-28], x, If[LessEqual[y, 1.15e-58], N[(t / i), $MachinePrecision], If[LessEqual[y, 1.28e+36], N[(N[(t / c), $MachinePrecision] / y), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+36}:\\
\;\;\;\;\frac{\frac{t}{c}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.19999999999999996e-28 or 1.27999999999999993e36 < y Initial program 11.1%
Taylor expanded in y around inf 52.7%
if -2.19999999999999996e-28 < y < 1.1499999999999999e-58Initial program 99.8%
Taylor expanded in y around 0 60.9%
if 1.1499999999999999e-58 < y < 1.27999999999999993e36Initial program 84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
fma-def84.6%
Simplified84.6%
Taylor expanded in y around 0 38.3%
Taylor expanded in c around inf 27.2%
associate-/r*27.3%
Simplified27.3%
Final simplification53.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -380000000.0) x (if (<= y 5.8e+67) (/ t (+ i (* y c))) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -380000000.0) {
tmp = x;
} else if (y <= 5.8e+67) {
tmp = t / (i + (y * c));
} 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 <= (-380000000.0d0)) then
tmp = x
else if (y <= 5.8d+67) then
tmp = t / (i + (y * c))
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 <= -380000000.0) {
tmp = x;
} else if (y <= 5.8e+67) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -380000000.0: tmp = x elif y <= 5.8e+67: tmp = t / (i + (y * c)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -380000000.0) tmp = x; elseif (y <= 5.8e+67) tmp = Float64(t / Float64(i + Float64(y * c))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -380000000.0) tmp = x; elseif (y <= 5.8e+67) tmp = t / (i + (y * c)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -380000000.0], x, If[LessEqual[y, 5.8e+67], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -380000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.8e8 or 5.80000000000000047e67 < y Initial program 6.0%
Taylor expanded in y around inf 58.8%
if -3.8e8 < y < 5.80000000000000047e67Initial program 92.5%
fma-def92.5%
fma-def92.5%
fma-def92.5%
fma-def92.5%
fma-def92.5%
fma-def92.5%
fma-def92.5%
Simplified92.5%
Taylor expanded in y around 0 65.4%
Taylor expanded in y around 0 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification59.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -8.2e-29) x (if (<= y 1.22e+23) (/ 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 <= -8.2e-29) {
tmp = x;
} else if (y <= 1.22e+23) {
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 <= (-8.2d-29)) then
tmp = x
else if (y <= 1.22d+23) 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 <= -8.2e-29) {
tmp = x;
} else if (y <= 1.22e+23) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8.2e-29: tmp = x elif y <= 1.22e+23: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8.2e-29) tmp = x; elseif (y <= 1.22e+23) 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 <= -8.2e-29) tmp = x; elseif (y <= 1.22e+23) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8.2e-29], x, If[LessEqual[y, 1.22e+23], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.1999999999999996e-29 or 1.22e23 < y Initial program 12.4%
Taylor expanded in y around inf 51.6%
if -8.1999999999999996e-29 < y < 1.22e23Initial program 99.0%
Taylor expanded in y around 0 52.4%
Final simplification52.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 55.0%
Taylor expanded in y around inf 27.9%
Final simplification27.9%
herbie shell --seed 2023320
(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)))