
(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)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
INFINITY)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(- (+ x (/ z y)) (* a (/ x y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))) <= ((double) INFINITY)) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) <= Inf) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $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}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 92.2%
fma-define92.2%
fma-define92.2%
fma-define92.2%
fma-define92.2%
fma-define92.2%
fma-define92.2%
fma-define92.2%
Simplified92.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in y around inf 64.2%
associate-/l*67.3%
Simplified67.3%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c)))))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
t_1)
INFINITY)
(/
(+ t (fma y 230661.510616 (* y (* y (fma y (fma y x z) 27464.7644705)))))
t_1)
(- (+ x (/ z y)) (* a (/ x y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= ((double) INFINITY)) {
tmp = (t + fma(y, 230661.510616, (y * (y * fma(y, fma(y, x, z), 27464.7644705))))) / t_1;
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) 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 + fma(y, 230661.510616, Float64(y * Float64(y * fma(y, fma(y, x, z), 27464.7644705))))) / t_1); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t + N[(y * 230661.510616 + N[(y * N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t + \mathsf{fma}\left(y, 230661.510616, y \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right)\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 92.2%
*-commutative92.2%
distribute-rgt-in92.2%
Applied egg-rr92.2%
*-commutative92.2%
+-commutative92.2%
*-commutative92.2%
+-commutative92.2%
+-commutative92.2%
distribute-rgt-in92.2%
distribute-lft-in92.1%
fma-define92.2%
+-commutative92.2%
+-commutative92.2%
fma-define92.2%
*-commutative92.2%
fma-define92.2%
Applied egg-rr92.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in y around inf 64.2%
associate-/l*67.3%
Simplified67.3%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c)))))
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
t_1)
INFINITY)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (+ (* y (* x y)) (* y z)))))))
t_1)
(- (+ x (/ z y)) (* a (/ x y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= ((double) INFINITY)) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + ((y * (x * y)) + (y * z))))))) / t_1;
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + ((y * (x * y)) + (y * z))))))) / t_1;
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)) tmp = 0 if (((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= math.inf: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + ((y * (x * y)) + (y * z))))))) / t_1 else: tmp = (x + (z / y)) - (a * (x / y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Inf) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(Float64(y * Float64(x * y)) + Float64(y * z))))))) / t_1); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)); tmp = 0.0; if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / t_1) <= Inf) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + ((y * (x * y)) + (y * z))))))) / t_1; else tmp = (x + (z / y)) - (a * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + \left(y \cdot \left(x \cdot y\right) + y \cdot z\right)\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 92.2%
*-commutative92.2%
distribute-rgt-in92.2%
Applied egg-rr92.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in y around inf 64.2%
associate-/l*67.3%
Simplified67.3%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
(if (<= t_1 INFINITY) t_1 (- (+ x (/ z y)) (* a (/ x y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - (a * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x + (z / y)) - (a * (x / y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x + (z / y)) - (a * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 92.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in y around inf 64.2%
associate-/l*67.3%
Simplified67.3%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2
(/ (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616) t_1))
(t_3 (- (+ x (/ z y)) (* a (/ x y)))))
(if (<= y -5.2e+70)
t_3
(if (<= y -1.1e-61)
t_2
(if (<= y 8.2e-33)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y t_1)))
(if (<= y 1.26e+64) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1;
double t_3 = (x + (z / y)) - (a * (x / y));
double tmp;
if (y <= -5.2e+70) {
tmp = t_3;
} else if (y <= -1.1e-61) {
tmp = t_2;
} else if (y <= 8.2e-33) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 1.26e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0) / t_1
t_3 = (x + (z / y)) - (a * (x / y))
if (y <= (-5.2d+70)) then
tmp = t_3
else if (y <= (-1.1d-61)) then
tmp = t_2
else if (y <= 8.2d-33) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * t_1))
else if (y <= 1.26d+64) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1;
double t_3 = (x + (z / y)) - (a * (x / y));
double tmp;
if (y <= -5.2e+70) {
tmp = t_3;
} else if (y <= -1.1e-61) {
tmp = t_2;
} else if (y <= 8.2e-33) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 1.26e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1 t_3 = (x + (z / y)) - (a * (x / y)) tmp = 0 if y <= -5.2e+70: tmp = t_3 elif y <= -1.1e-61: tmp = t_2 elif y <= 8.2e-33: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)) elif y <= 1.26e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1) t_3 = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))) tmp = 0.0 if (y <= -5.2e+70) tmp = t_3; elseif (y <= -1.1e-61) tmp = t_2; elseif (y <= 8.2e-33) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * t_1))); elseif (y <= 1.26e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1; t_3 = (x + (z / y)) - (a * (x / y)); tmp = 0.0; if (y <= -5.2e+70) tmp = t_3; elseif (y <= -1.1e-61) tmp = t_2; elseif (y <= 8.2e-33) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)); elseif (y <= 1.26e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+70], t$95$3, If[LessEqual[y, -1.1e-61], t$95$2, If[LessEqual[y, 8.2e-33], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.26e+64], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{t\_1}\\
t_3 := \left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+70}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -5.2000000000000001e70 or 1.26e64 < y Initial program 1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
Simplified1.2%
Taylor expanded in y around inf 64.8%
associate-/l*67.8%
Simplified67.8%
if -5.2000000000000001e70 < y < -1.10000000000000004e-61 or 8.2e-33 < y < 1.26e64Initial program 73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
Simplified73.5%
Taylor expanded in i around 0 65.7%
Taylor expanded in t around 0 60.3%
if -1.10000000000000004e-61 < y < 8.2e-33Initial program 99.8%
Taylor expanded in y around 0 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2
(/ (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616) t_1))
(t_3 (- (+ x (/ z y)) (* a (/ x y)))))
(if (<= y -4.5e+70)
t_3
(if (<= y -1.1e-61)
t_2
(if (<= y 6.2e-41)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 7.5e+64) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1;
double t_3 = (x + (z / y)) - (a * (x / y));
double tmp;
if (y <= -4.5e+70) {
tmp = t_3;
} else if (y <= -1.1e-61) {
tmp = t_2;
} else if (y <= 6.2e-41) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 7.5e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0) / t_1
t_3 = (x + (z / y)) - (a * (x / y))
if (y <= (-4.5d+70)) then
tmp = t_3
else if (y <= (-1.1d-61)) then
tmp = t_2
else if (y <= 6.2d-41) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 7.5d+64) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1;
double t_3 = (x + (z / y)) - (a * (x / y));
double tmp;
if (y <= -4.5e+70) {
tmp = t_3;
} else if (y <= -1.1e-61) {
tmp = t_2;
} else if (y <= 6.2e-41) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 7.5e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1 t_3 = (x + (z / y)) - (a * (x / y)) tmp = 0 if y <= -4.5e+70: tmp = t_3 elif y <= -1.1e-61: tmp = t_2 elif y <= 6.2e-41: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 7.5e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1) t_3 = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))) tmp = 0.0 if (y <= -4.5e+70) tmp = t_3; elseif (y <= -1.1e-61) tmp = t_2; elseif (y <= 6.2e-41) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 7.5e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / t_1; t_3 = (x + (z / y)) - (a * (x / y)); tmp = 0.0; if (y <= -4.5e+70) tmp = t_3; elseif (y <= -1.1e-61) tmp = t_2; elseif (y <= 6.2e-41) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 7.5e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+70], t$95$3, If[LessEqual[y, -1.1e-61], t$95$2, If[LessEqual[y, 6.2e-41], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+64], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{t\_1}\\
t_3 := \left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+70}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -4.4999999999999999e70 or 7.5000000000000005e64 < y Initial program 1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
fma-define1.2%
Simplified1.2%
Taylor expanded in y around inf 64.8%
associate-/l*67.8%
Simplified67.8%
if -4.4999999999999999e70 < y < -1.10000000000000004e-61 or 6.20000000000000001e-41 < y < 7.5000000000000005e64Initial program 73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
fma-define73.5%
Simplified73.5%
Taylor expanded in i around 0 65.7%
Taylor expanded in t around 0 60.3%
if -1.10000000000000004e-61 < y < 6.20000000000000001e-41Initial program 99.8%
Taylor expanded in y around 0 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))
(t_2 (- (+ x (/ z y)) (* a (/ x y))))
(t_3 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -2.05e+26)
t_2
(if (<= y -2.9e-61)
(/ (+ t (* y t_1)) (* y (+ c (* y b))))
(if (<= y 2.3e-32)
(/ t (+ i (* y t_3)))
(if (<= y 1.75e+55) (/ t_1 t_3) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 230661.510616 + (y * (27464.7644705 + (y * z)));
double t_2 = (x + (z / y)) - (a * (x / y));
double t_3 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.05e+26) {
tmp = t_2;
} else if (y <= -2.9e-61) {
tmp = (t + (y * t_1)) / (y * (c + (y * b)));
} else if (y <= 2.3e-32) {
tmp = t / (i + (y * t_3));
} else if (y <= 1.75e+55) {
tmp = t_1 / t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = 230661.510616d0 + (y * (27464.7644705d0 + (y * z)))
t_2 = (x + (z / y)) - (a * (x / y))
t_3 = (y * ((y * (y + a)) + b)) + c
if (y <= (-2.05d+26)) then
tmp = t_2
else if (y <= (-2.9d-61)) then
tmp = (t + (y * t_1)) / (y * (c + (y * b)))
else if (y <= 2.3d-32) then
tmp = t / (i + (y * t_3))
else if (y <= 1.75d+55) then
tmp = t_1 / t_3
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 = 230661.510616 + (y * (27464.7644705 + (y * z)));
double t_2 = (x + (z / y)) - (a * (x / y));
double t_3 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.05e+26) {
tmp = t_2;
} else if (y <= -2.9e-61) {
tmp = (t + (y * t_1)) / (y * (c + (y * b)));
} else if (y <= 2.3e-32) {
tmp = t / (i + (y * t_3));
} else if (y <= 1.75e+55) {
tmp = t_1 / t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 230661.510616 + (y * (27464.7644705 + (y * z))) t_2 = (x + (z / y)) - (a * (x / y)) t_3 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -2.05e+26: tmp = t_2 elif y <= -2.9e-61: tmp = (t + (y * t_1)) / (y * (c + (y * b))) elif y <= 2.3e-32: tmp = t / (i + (y * t_3)) elif y <= 1.75e+55: tmp = t_1 / t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))) t_3 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -2.05e+26) tmp = t_2; elseif (y <= -2.9e-61) tmp = Float64(Float64(t + Float64(y * t_1)) / Float64(y * Float64(c + Float64(y * b)))); elseif (y <= 2.3e-32) tmp = Float64(t / Float64(i + Float64(y * t_3))); elseif (y <= 1.75e+55) tmp = Float64(t_1 / t_3); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 230661.510616 + (y * (27464.7644705 + (y * z))); t_2 = (x + (z / y)) - (a * (x / y)); t_3 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -2.05e+26) tmp = t_2; elseif (y <= -2.9e-61) tmp = (t + (y * t_1)) / (y * (c + (y * b))); elseif (y <= 2.3e-32) tmp = t / (i + (y * t_3)); elseif (y <= 1.75e+55) tmp = t_1 / t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -2.05e+26], t$95$2, If[LessEqual[y, -2.9e-61], N[(N[(t + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-32], N[(t / N[(i + N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+55], N[(t$95$1 / t$95$3), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\\
t_2 := \left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
t_3 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;\frac{t + y \cdot t\_1}{y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{t}{i + y \cdot t\_3}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+55}:\\
\;\;\;\;\frac{t\_1}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.04999999999999992e26 or 1.75000000000000005e55 < y Initial program 6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
Simplified6.8%
Taylor expanded in y around inf 61.6%
associate-/l*64.3%
Simplified64.3%
if -2.04999999999999992e26 < y < -2.8999999999999999e-61Initial program 87.0%
fma-define87.0%
fma-define87.0%
fma-define87.0%
fma-define87.0%
fma-define87.0%
fma-define87.0%
fma-define87.0%
Simplified87.0%
Taylor expanded in i around 0 74.5%
Taylor expanded in x around 0 68.2%
Taylor expanded in y around 0 61.7%
if -2.8999999999999999e-61 < y < 2.3000000000000001e-32Initial program 99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in t around inf 89.1%
if 2.3000000000000001e-32 < y < 1.75000000000000005e55Initial program 75.8%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
Simplified75.9%
Taylor expanded in i around 0 66.4%
Taylor expanded in x around 0 51.7%
Taylor expanded in t around 0 47.1%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (* a (/ x y))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c))
(t_3 (/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_2)))
(if (<= y -2.9e+26)
t_1
(if (<= y -3.8e-48)
t_3
(if (<= y 2.3e-32)
(/ t (+ i (* y t_2)))
(if (<= y 2.1e+55) t_3 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - (a * (x / y));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double t_3 = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
double tmp;
if (y <= -2.9e+26) {
tmp = t_1;
} else if (y <= -3.8e-48) {
tmp = t_3;
} else if (y <= 2.3e-32) {
tmp = t / (i + (y * t_2));
} else if (y <= 2.1e+55) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x + (z / y)) - (a * (x / y))
t_2 = (y * ((y * (y + a)) + b)) + c
t_3 = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_2
if (y <= (-2.9d+26)) then
tmp = t_1
else if (y <= (-3.8d-48)) then
tmp = t_3
else if (y <= 2.3d-32) then
tmp = t / (i + (y * t_2))
else if (y <= 2.1d+55) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - (a * (x / y));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double t_3 = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
double tmp;
if (y <= -2.9e+26) {
tmp = t_1;
} else if (y <= -3.8e-48) {
tmp = t_3;
} else if (y <= 2.3e-32) {
tmp = t / (i + (y * t_2));
} else if (y <= 2.1e+55) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - (a * (x / y)) t_2 = (y * ((y * (y + a)) + b)) + c t_3 = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2 tmp = 0 if y <= -2.9e+26: tmp = t_1 elif y <= -3.8e-48: tmp = t_3 elif y <= 2.3e-32: tmp = t / (i + (y * t_2)) elif y <= 2.1e+55: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_3 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_2) tmp = 0.0 if (y <= -2.9e+26) tmp = t_1; elseif (y <= -3.8e-48) tmp = t_3; elseif (y <= 2.3e-32) tmp = Float64(t / Float64(i + Float64(y * t_2))); elseif (y <= 2.1e+55) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + (z / y)) - (a * (x / y)); t_2 = (y * ((y * (y + a)) + b)) + c; t_3 = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2; tmp = 0.0; if (y <= -2.9e+26) tmp = t_1; elseif (y <= -3.8e-48) tmp = t_3; elseif (y <= 2.3e-32) tmp = t / (i + (y * t_2)); elseif (y <= 2.1e+55) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$3 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[y, -2.9e+26], t$95$1, If[LessEqual[y, -3.8e-48], t$95$3, If[LessEqual[y, 2.3e-32], N[(t / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+55], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_3 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_2}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-48}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{t}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+55}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.9e26 or 2.1000000000000001e55 < y Initial program 6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
Simplified6.8%
Taylor expanded in y around inf 61.6%
associate-/l*64.3%
Simplified64.3%
if -2.9e26 < y < -3.80000000000000002e-48 or 2.3000000000000001e-32 < y < 2.1000000000000001e55Initial program 78.1%
fma-define78.2%
fma-define78.2%
fma-define78.2%
fma-define78.2%
fma-define78.2%
fma-define78.2%
fma-define78.2%
Simplified78.2%
Taylor expanded in i around 0 69.0%
Taylor expanded in x around 0 56.5%
Taylor expanded in t around 0 50.2%
if -3.80000000000000002e-48 < y < 2.3000000000000001e-32Initial program 99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in t around inf 87.9%
Final simplification73.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.3e+69) (not (<= y 1.12e+55)))
(- (+ x (/ z y)) (* a (/ x y)))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) 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+69) || !(y <= 1.12e+55)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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+69)) .or. (.not. (y <= 1.12d+55))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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+69) || !(y <= 1.12e+55)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.3e+69) or not (y <= 1.12e+55): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.3e+69) || !(y <= 1.12e+55)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.3e+69) || ~((y <= 1.12e+55))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.3e+69], N[Not[LessEqual[y, 1.12e+55]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+69} \lor \neg \left(y \leq 1.12 \cdot 10^{+55}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -3.2999999999999999e69 or 1.12000000000000006e55 < y Initial program 2.2%
fma-define2.2%
fma-define2.2%
fma-define2.2%
fma-define2.2%
fma-define2.2%
fma-define2.2%
fma-define2.2%
Simplified2.2%
Taylor expanded in y around inf 64.2%
associate-/l*67.1%
Simplified67.1%
if -3.2999999999999999e69 < y < 1.12000000000000006e55Initial program 93.7%
Taylor expanded in x around 0 88.4%
Final simplification80.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (* a (/ x y))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -2.8e+26)
t_1
(if (<= y 2.35e-32)
(/ (+ t (* y 230661.510616)) (+ i (* y t_2)))
(if (<= y 1e+55)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_2)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - (a * (x / y));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.8e+26) {
tmp = t_1;
} else if (y <= 2.35e-32) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 1e+55) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (z / y)) - (a * (x / y))
t_2 = (y * ((y * (y + a)) + b)) + c
if (y <= (-2.8d+26)) then
tmp = t_1
else if (y <= 2.35d-32) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_2))
else if (y <= 1d+55) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - (a * (x / y));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -2.8e+26) {
tmp = t_1;
} else if (y <= 2.35e-32) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 1e+55) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - (a * (x / y)) t_2 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -2.8e+26: tmp = t_1 elif y <= 2.35e-32: tmp = (t + (y * 230661.510616)) / (i + (y * t_2)) elif y <= 1e+55: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -2.8e+26) tmp = t_1; elseif (y <= 2.35e-32) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_2))); elseif (y <= 1e+55) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + (z / y)) - (a * (x / y)); t_2 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -2.8e+26) tmp = t_1; elseif (y <= 2.35e-32) tmp = (t + (y * 230661.510616)) / (i + (y * t_2)); elseif (y <= 1e+55) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -2.8e+26], t$95$1, If[LessEqual[y, 2.35e-32], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+55], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-32}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 10^{+55}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8e26 or 1.00000000000000001e55 < y Initial program 6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
Simplified6.8%
Taylor expanded in y around inf 61.6%
associate-/l*64.3%
Simplified64.3%
if -2.8e26 < y < 2.3500000000000001e-32Initial program 98.3%
Taylor expanded in y around 0 90.3%
*-commutative90.3%
Simplified90.3%
if 2.3500000000000001e-32 < y < 1.00000000000000001e55Initial program 75.8%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
fma-define75.9%
Simplified75.9%
Taylor expanded in i around 0 66.4%
Taylor expanded in x around 0 51.7%
Taylor expanded in t around 0 47.1%
Final simplification76.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.4e+25) (not (<= y 6.6e+54))) (- (+ x (/ z y)) (* a (/ x y))) (/ t (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.4e+25) || !(y <= 6.6e+54)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-5.4d+25)) .or. (.not. (y <= 6.6d+54))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.4e+25) || !(y <= 6.6e+54)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.4e+25) or not (y <= 6.6e+54): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.4e+25) || !(y <= 6.6e+54)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(t / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.4e+25) || ~((y <= 6.6e+54))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.4e+25], N[Not[LessEqual[y, 6.6e+54]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+25} \lor \neg \left(y \leq 6.6 \cdot 10^{+54}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -5.4e25 or 6.6e54 < y Initial program 6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
fma-define6.8%
Simplified6.8%
Taylor expanded in y around inf 61.6%
associate-/l*64.3%
Simplified64.3%
if -5.4e25 < y < 6.6e54Initial program 95.3%
fma-define95.3%
fma-define95.3%
fma-define95.3%
fma-define95.3%
fma-define95.3%
fma-define95.4%
fma-define95.4%
Simplified95.4%
Taylor expanded in t around inf 73.3%
Final simplification69.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3e-6) (not (<= y 0.000105))) (- (+ x (/ z y)) (* a (/ x y))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3e-6) || !(y <= 0.000105)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-3d-6)) .or. (.not. (y <= 0.000105d0))) then
tmp = (x + (z / y)) - (a * (x / y))
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3e-6) || !(y <= 0.000105)) {
tmp = (x + (z / y)) - (a * (x / y));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3e-6) or not (y <= 0.000105): tmp = (x + (z / y)) - (a * (x / y)) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3e-6) || !(y <= 0.000105)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(a * Float64(x / y))); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3e-6) || ~((y <= 0.000105))) tmp = (x + (z / y)) - (a * (x / y)); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3e-6], N[Not[LessEqual[y, 0.000105]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-6} \lor \neg \left(y \leq 0.000105\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - a \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -3.0000000000000001e-6 or 1.05e-4 < y Initial program 14.3%
fma-define14.3%
fma-define14.3%
fma-define14.3%
fma-define14.3%
fma-define14.3%
fma-define14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in y around inf 53.6%
associate-/l*56.0%
Simplified56.0%
if -3.0000000000000001e-6 < y < 1.05e-4Initial program 99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around 0 58.1%
Final simplification57.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -9e-17) x (if (<= y 4.9e+61) (/ 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 <= -9e-17) {
tmp = x;
} else if (y <= 4.9e+61) {
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 <= (-9d-17)) then
tmp = x
else if (y <= 4.9d+61) 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 <= -9e-17) {
tmp = x;
} else if (y <= 4.9e+61) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -9e-17: tmp = x elif y <= 4.9e+61: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9e-17) tmp = x; elseif (y <= 4.9e+61) 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 <= -9e-17) tmp = x; elseif (y <= 4.9e+61) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9e-17], x, If[LessEqual[y, 4.9e+61], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.99999999999999957e-17 or 4.90000000000000025e61 < y Initial program 8.6%
fma-define8.6%
fma-define8.6%
fma-define8.6%
fma-define8.6%
fma-define8.6%
fma-define8.6%
fma-define8.6%
Simplified8.6%
Taylor expanded in y around inf 51.8%
if -8.99999999999999957e-17 < y < 4.90000000000000025e61Initial program 95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
Simplified95.2%
Taylor expanded in y around 0 52.6%
(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 58.7%
fma-define58.7%
fma-define58.7%
fma-define58.7%
fma-define58.7%
fma-define58.7%
fma-define58.7%
fma-define58.7%
Simplified58.7%
Taylor expanded in y around inf 24.0%
herbie shell --seed 2024186
(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)))