
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma y (fma y (fma y (+ y a) b) c) i)))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(fma
230661.510616
(/ y t_1)
(+ (/ t t_1) (/ (pow y 2.0) (/ t_1 (fma y (fma x y z) 27464.7644705)))))
(+ 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 = fma(y, fma(y, fma(y, (y + a), b), c), 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(230661.510616, (y / t_1), ((t / t_1) + (pow(y, 2.0) / (t_1 / fma(y, fma(x, y, z), 27464.7644705)))));
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(y, fma(y, fma(y, Float64(y + a), b), c), i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(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 = fma(230661.510616, Float64(y / t_1), Float64(Float64(t / t_1) + Float64((y ^ 2.0) / Float64(t_1 / fma(y, fma(x, y, z), 27464.7644705))))); 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_] := Block[{t$95$1 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(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[(230661.510616 * N[(y / t$95$1), $MachinePrecision] + N[(N[(t / t$95$1), $MachinePrecision] + N[(N[Power[y, 2.0], $MachinePrecision] / N[(t$95$1 / N[(y * N[(x * y + z), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\mathbf{if}\;\frac{y \cdot \left(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:\\
\;\;\;\;\mathsf{fma}\left(230661.510616, \frac{y}{t\_1}, \frac{t}{t\_1} + \frac{{y}^{2}}{\frac{t\_1}{\mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right)}}\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)) < +inf.0Initial program 92.6%
*-commutative92.6%
distribute-rgt-in92.6%
*-commutative92.6%
*-commutative92.6%
fma-define92.6%
fma-define92.6%
Applied egg-rr92.6%
Taylor expanded in t around 0 92.4%
fma-define92.4%
+-commutative92.4%
fma-undefine92.4%
+-commutative92.4%
+-commutative92.4%
+-commutative92.4%
fma-undefine92.4%
fma-undefine92.4%
Simplified94.6%
if +inf.0 < (/.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.0%
Taylor expanded in y around inf 69.9%
associate--l+69.9%
associate-/l*78.6%
Simplified78.6%
Final simplification89.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
t_1)
INFINITY)
(/
(+
t
(+ (* y (* y (fma y (fma x y z) 27464.7644705))) (* y 230661.510616)))
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 tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= ((double) INFINITY)) {
tmp = (t + ((y * (y * fma(y, fma(x, y, z), 27464.7644705))) + (y * 230661.510616))) / 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) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Inf) tmp = Float64(Float64(t + Float64(Float64(y * Float64(y * fma(y, fma(x, y, z), 27464.7644705))) + Float64(y * 230661.510616))) / t_1); 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_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t + N[(N[(y * N[(y * N[(y * N[(x * y + z), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(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\\
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t + \left(y \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right)\right) + y \cdot 230661.510616\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;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)) < +inf.0Initial program 92.6%
*-commutative92.6%
distribute-rgt-in92.6%
*-commutative92.6%
*-commutative92.6%
fma-define92.6%
fma-define92.6%
Applied egg-rr92.6%
if +inf.0 < (/.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.0%
Taylor expanded in y around inf 69.9%
associate--l+69.9%
associate-/l*78.6%
Simplified78.6%
Final simplification88.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
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(if (<= (/ (+ t_2 t) t_1) INFINITY)
(+ (/ 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) <= ((double) INFINITY)) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
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 * (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) <= Double.POSITIVE_INFINITY) {
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) <= math.inf: 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) <= Inf) 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) <= Inf) 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], Infinity], 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 \infty:\\
\;\;\;\;\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)) < +inf.0Initial program 92.6%
Taylor expanded in t around 0 92.6%
if +inf.0 < (/.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.0%
Taylor expanded in y around inf 69.9%
associate--l+69.9%
associate-/l*78.6%
Simplified78.6%
Final simplification88.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) (/ 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 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
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) - (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 <= math.inf: 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 <= Inf) 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 <= Inf) 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, Infinity], 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 \infty:\\
\;\;\;\;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)) < +inf.0Initial program 92.6%
if +inf.0 < (/.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.0%
Taylor expanded in y around inf 69.9%
associate--l+69.9%
associate-/l*78.6%
Simplified78.6%
Final simplification88.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 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1.16e+23)
t_2
(if (<= y 0.006)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1)
(if (<= y 1.05e+56)
(/
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t_1)
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.16e+23) {
tmp = t_2;
} else if (y <= 0.006) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.05e+56) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-1.16d+23)) then
tmp = t_2
else if (y <= 0.006d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
else if (y <= 1.05d+56) then
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.16e+23) {
tmp = t_2;
} else if (y <= 0.006) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.05e+56) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1.16e+23: tmp = t_2 elif y <= 0.006: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 elif y <= 1.05e+56: tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -1.16e+23) tmp = t_2; elseif (y <= 0.006) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1); elseif (y <= 1.05e+56) tmp = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -1.16e+23) tmp = t_2; elseif (y <= 0.006) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; elseif (y <= 1.05e+56) tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.16e+23], t$95$2, If[LessEqual[y, 0.006], 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], If[LessEqual[y, 1.05e+56], 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], t$95$2]]]]]
\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 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1.16 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.006:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+56}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.16e23 or 1.05000000000000009e56 < y Initial program 5.6%
Taylor expanded in y around inf 65.9%
associate--l+65.9%
associate-/l*73.4%
Simplified73.4%
if -1.16e23 < y < 0.0060000000000000001Initial program 98.5%
Taylor expanded in x around 0 94.8%
if 0.0060000000000000001 < y < 1.05000000000000009e56Initial program 70.4%
Taylor expanded in t around 0 70.4%
Final simplification86.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1.16e+23)
t_2
(if (<= y 0.0058)
(/
(+ t (+ (* y 230661.510616) (* y (* y (+ 27464.7644705 (* y z))))))
t_1)
(if (<= y 1.52e+57)
(/
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t_1)
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.16e+23) {
tmp = t_2;
} else if (y <= 0.0058) {
tmp = (t + ((y * 230661.510616) + (y * (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.52e+57) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-1.16d+23)) then
tmp = t_2
else if (y <= 0.0058d0) then
tmp = (t + ((y * 230661.510616d0) + (y * (y * (27464.7644705d0 + (y * z)))))) / t_1
else if (y <= 1.52d+57) then
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.16e+23) {
tmp = t_2;
} else if (y <= 0.0058) {
tmp = (t + ((y * 230661.510616) + (y * (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.52e+57) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1.16e+23: tmp = t_2 elif y <= 0.0058: tmp = (t + ((y * 230661.510616) + (y * (y * (27464.7644705 + (y * z)))))) / t_1 elif y <= 1.52e+57: tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -1.16e+23) tmp = t_2; elseif (y <= 0.0058) tmp = Float64(Float64(t + Float64(Float64(y * 230661.510616) + Float64(y * Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1); elseif (y <= 1.52e+57) tmp = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -1.16e+23) tmp = t_2; elseif (y <= 0.0058) tmp = (t + ((y * 230661.510616) + (y * (y * (27464.7644705 + (y * z)))))) / t_1; elseif (y <= 1.52e+57) tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.16e+23], t$95$2, If[LessEqual[y, 0.0058], N[(N[(t + N[(N[(y * 230661.510616), $MachinePrecision] + N[(y * N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 1.52e+57], 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], t$95$2]]]]]
\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 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1.16 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.0058:\\
\;\;\;\;\frac{t + \left(y \cdot 230661.510616 + y \cdot \left(y \cdot \left(27464.7644705 + y \cdot z\right)\right)\right)}{t\_1}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+57}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.16e23 or 1.51999999999999998e57 < y Initial program 5.6%
Taylor expanded in y around inf 65.9%
associate--l+65.9%
associate-/l*73.4%
Simplified73.4%
if -1.16e23 < y < 0.0058Initial program 98.5%
*-commutative98.5%
distribute-rgt-in98.5%
*-commutative98.5%
*-commutative98.5%
fma-define98.5%
fma-define98.5%
Applied egg-rr98.5%
Taylor expanded in x around 0 94.8%
if 0.0058 < y < 1.51999999999999998e57Initial program 70.4%
Taylor expanded in t around 0 70.4%
Final simplification86.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.16e+23) (not (<= y 8.5e+65)))
(+ 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 <= -1.16e+23) || !(y <= 8.5e+65)) {
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 <= (-1.16d+23)) .or. (.not. (y <= 8.5d+65))) 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 <= -1.16e+23) || !(y <= 8.5e+65)) {
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 <= -1.16e+23) or not (y <= 8.5e+65): 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 <= -1.16e+23) || !(y <= 8.5e+65)) 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 <= -1.16e+23) || ~((y <= 8.5e+65))) 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, -1.16e+23], N[Not[LessEqual[y, 8.5e+65]], $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 -1.16 \cdot 10^{+23} \lor \neg \left(y \leq 8.5 \cdot 10^{+65}\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 < -1.16e23 or 8.50000000000000075e65 < y Initial program 5.7%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*74.2%
Simplified74.2%
if -1.16e23 < y < 8.50000000000000075e65Initial program 96.2%
Taylor expanded in x around 0 89.3%
Final simplification83.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.4e+22) (not (<= y 7.2e+64)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (+ (* y 230661.510616) (* y (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.4e+22) || !(y <= 7.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + ((y * 230661.510616) + (y * (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.4d+22)) .or. (.not. (y <= 7.2d+64))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + ((y * 230661.510616d0) + (y * (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.4e+22) || !(y <= 7.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + ((y * 230661.510616) + (y * (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.4e+22) or not (y <= 7.2e+64): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + ((y * 230661.510616) + (y * (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.4e+22) || !(y <= 7.2e+64)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(Float64(y * 230661.510616) + Float64(y * Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.4e+22) || ~((y <= 7.2e+64))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + ((y * 230661.510616) + (y * (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.4e+22], N[Not[LessEqual[y, 7.2e+64]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(N[(y * 230661.510616), $MachinePrecision] + N[(y * N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+22} \lor \neg \left(y \leq 7.2 \cdot 10^{+64}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + \left(y \cdot 230661.510616 + y \cdot \left(y \cdot 27464.7644705\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -2.4e22 or 7.20000000000000027e64 < y Initial program 5.7%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*74.2%
Simplified74.2%
if -2.4e22 < y < 7.20000000000000027e64Initial program 96.2%
*-commutative96.2%
distribute-rgt-in96.2%
*-commutative96.2%
*-commutative96.2%
fma-define96.2%
fma-define96.2%
Applied egg-rr96.2%
Taylor expanded in y around 0 84.0%
*-commutative84.0%
Simplified84.0%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.16e+23) (not (<= y 9.2e+64)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.16e+23) || !(y <= 9.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.16d+23)) .or. (.not. (y <= 9.2d+64))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.16e+23) || !(y <= 9.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.16e+23) or not (y <= 9.2e+64): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.16e+23) || !(y <= 9.2e+64)) 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(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.16e+23) || ~((y <= 9.2e+64))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.16e+23], N[Not[LessEqual[y, 9.2e+64]], $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[(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.16 \cdot 10^{+23} \lor \neg \left(y \leq 9.2 \cdot 10^{+64}\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)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.16e23 or 9.2e64 < y Initial program 5.7%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*74.2%
Simplified74.2%
if -1.16e23 < y < 9.2e64Initial program 96.2%
Taylor expanded in y around 0 84.0%
*-commutative84.0%
Simplified84.0%
Final simplification80.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -4.3e+21) (not (<= y 7.2e+64))) (+ 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 <= -4.3e+21) || !(y <= 7.2e+64)) {
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 <= (-4.3d+21)) .or. (.not. (y <= 7.2d+64))) 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 <= -4.3e+21) || !(y <= 7.2e+64)) {
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 <= -4.3e+21) or not (y <= 7.2e+64): 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 <= -4.3e+21) || !(y <= 7.2e+64)) 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 <= -4.3e+21) || ~((y <= 7.2e+64))) 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, -4.3e+21], N[Not[LessEqual[y, 7.2e+64]], $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 -4.3 \cdot 10^{+21} \lor \neg \left(y \leq 7.2 \cdot 10^{+64}\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 < -4.3e21 or 7.20000000000000027e64 < y Initial program 5.7%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*74.2%
Simplified74.2%
if -4.3e21 < y < 7.20000000000000027e64Initial program 96.2%
Taylor expanded in y around 0 82.9%
*-commutative82.9%
Simplified82.9%
Final simplification79.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -7.5e+22) (not (<= y 1e-14))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.5e+22) || !(y <= 1e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / 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 <= (-7.5d+22)) .or. (.not. (y <= 1d-14))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / 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 <= -7.5e+22) || !(y <= 1e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -7.5e+22) or not (y <= 1e-14): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -7.5e+22) || !(y <= 1e-14)) 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)))))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -7.5e+22) || ~((y <= 1e-14))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -7.5e+22], N[Not[LessEqual[y, 1e-14]], $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] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+22} \lor \neg \left(y \leq 10^{-14}\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}\\
\end{array}
\end{array}
if y < -7.5000000000000002e22 or 9.99999999999999999e-15 < y Initial program 15.3%
Taylor expanded in y around inf 57.7%
associate--l+57.7%
associate-/l*64.2%
Simplified64.2%
if -7.5000000000000002e22 < y < 9.99999999999999999e-15Initial program 98.5%
Taylor expanded in x around 0 94.6%
Taylor expanded in i around inf 66.2%
Final simplification65.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.3e+22) (not (<= y 7.2e+64))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ 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 <= -3.3e+22) || !(y <= 7.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-3.3d+22)) .or. (.not. (y <= 7.2d+64))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -3.3e+22) || !(y <= 7.2e+64)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= -3.3e+22) or not (y <= 7.2e+64): tmp = x + ((z / y) - (a / (y / x))) 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 <= -3.3e+22) || !(y <= 7.2e+64)) 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 * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.3e+22) || ~((y <= 7.2e+64))) tmp = x + ((z / y) - (a / (y / x))); 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, -3.3e+22], N[Not[LessEqual[y, 7.2e+64]], $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 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+22} \lor \neg \left(y \leq 7.2 \cdot 10^{+64}\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 c}\\
\end{array}
\end{array}
if y < -3.2999999999999998e22 or 7.20000000000000027e64 < y Initial program 5.7%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*74.2%
Simplified74.2%
if -3.2999999999999998e22 < y < 7.20000000000000027e64Initial program 96.2%
Taylor expanded in y around 0 84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y around 0 74.8%
*-commutative74.8%
Simplified74.8%
Final simplification74.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.86e+21) (not (<= y 1.05e-14))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.86e+21) || !(y <= 1.05e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.86d+21)) .or. (.not. (y <= 1.05d-14))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.86e+21) || !(y <= 1.05e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.86e+21) or not (y <= 1.05e-14): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.86e+21) || !(y <= 1.05e-14)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.86e+21) || ~((y <= 1.05e-14))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.86e+21], N[Not[LessEqual[y, 1.05e-14]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.86 \cdot 10^{+21} \lor \neg \left(y \leq 1.05 \cdot 10^{-14}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1.86e21 or 1.0499999999999999e-14 < y Initial program 15.3%
Taylor expanded in y around inf 57.7%
associate--l+57.7%
associate-/l*64.2%
Simplified64.2%
if -1.86e21 < y < 1.0499999999999999e-14Initial program 98.5%
Taylor expanded in y around 0 59.6%
Final simplification61.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6e+20) (not (<= y 1.05e-14))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6e+20) || !(y <= 1.05e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / 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 <= (-6d+20)) .or. (.not. (y <= 1.05d-14))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / 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 <= -6e+20) || !(y <= 1.05e-14)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6e+20) or not (y <= 1.05e-14): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6e+20) || !(y <= 1.05e-14)) 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)))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -6e+20) || ~((y <= 1.05e-14))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6e+20], N[Not[LessEqual[y, 1.05e-14]], $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] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+20} \lor \neg \left(y \leq 1.05 \cdot 10^{-14}\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}\\
\end{array}
\end{array}
if y < -6e20 or 1.0499999999999999e-14 < y Initial program 15.3%
Taylor expanded in y around inf 57.7%
associate--l+57.7%
associate-/l*64.2%
Simplified64.2%
if -6e20 < y < 1.0499999999999999e-14Initial program 98.5%
Taylor expanded in y around 0 89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in i around inf 64.4%
Final simplification64.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.15e+23) x (if (<= y 1.05e-14) (/ t i) (- x (/ 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 <= -2.15e+23) {
tmp = x;
} else if (y <= 1.05e-14) {
tmp = t / i;
} else {
tmp = x - (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) :: tmp
if (y <= (-2.15d+23)) then
tmp = x
else if (y <= 1.05d-14) then
tmp = t / i
else
tmp = x - (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 tmp;
if (y <= -2.15e+23) {
tmp = x;
} else if (y <= 1.05e-14) {
tmp = t / i;
} else {
tmp = x - (a / (y / x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.15e+23: tmp = x elif y <= 1.05e-14: tmp = t / i else: tmp = x - (a / (y / x)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.15e+23) tmp = x; elseif (y <= 1.05e-14) tmp = Float64(t / i); else tmp = Float64(x - Float64(a / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.15e+23) tmp = x; elseif (y <= 1.05e-14) tmp = t / i; else tmp = x - (a / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.15e+23], x, If[LessEqual[y, 1.05e-14], N[(t / i), $MachinePrecision], N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -2.1499999999999999e23Initial program 7.3%
Taylor expanded in y around inf 56.9%
if -2.1499999999999999e23 < y < 1.0499999999999999e-14Initial program 98.5%
Taylor expanded in y around 0 59.3%
if 1.0499999999999999e-14 < y Initial program 22.4%
Taylor expanded in x around inf 18.5%
Taylor expanded in y around inf 41.2%
mul-1-neg41.2%
unsub-neg41.2%
associate-/l*42.9%
Simplified42.9%
Final simplification55.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -4e+23) x (if (<= y 7.2e+64) (/ 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 <= -4e+23) {
tmp = x;
} else if (y <= 7.2e+64) {
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 <= (-4d+23)) then
tmp = x
else if (y <= 7.2d+64) 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 <= -4e+23) {
tmp = x;
} else if (y <= 7.2e+64) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4e+23: tmp = x elif y <= 7.2e+64: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4e+23) tmp = x; elseif (y <= 7.2e+64) 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 <= -4e+23) tmp = x; elseif (y <= 7.2e+64) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4e+23], x, If[LessEqual[y, 7.2e+64], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.9999999999999997e23 or 7.20000000000000027e64 < y Initial program 4.6%
Taylor expanded in y around inf 57.9%
if -3.9999999999999997e23 < y < 7.20000000000000027e64Initial program 96.2%
Taylor expanded in y around 0 54.2%
Final simplification55.5%
(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 64.0%
Taylor expanded in y around inf 22.7%
Final simplification22.7%
herbie shell --seed 2024036
(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)))