
(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 16 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 (or (<= y -1.15e+46) (not (<= y 2.8e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616)) t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+46) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.15d+46)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+46) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.15e+46) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.15e+46) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.15e+46) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.15e+46], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+46} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\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}\\
\end{array}
\end{array}
if y < -1.15e46 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -1.15e46 < y < 2.8e68Initial program 92.7%
Final simplification85.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.25e+43)
t_1
(if (<= y -9e-9)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 2.8e+68)
(/
(+
(* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
t)
(+ i (* y (+ c (* y b)))))
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 tmp;
if (y <= -2.25e+43) {
tmp = t_1;
} else if (y <= -9e-9) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 2.8e+68) {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.25d+43)) then
tmp = t_1
else if (y <= (-9d-9)) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 2.8d+68) then
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * b))))
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 tmp;
if (y <= -2.25e+43) {
tmp = t_1;
} else if (y <= -9e-9) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 2.8e+68) {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.25e+43: tmp = t_1 elif y <= -9e-9: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 2.8e+68: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.25e+43) tmp = t_1; elseif (y <= -9e-9) 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)); elseif (y <= 2.8e+68) tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); 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))); tmp = 0.0; if (y <= -2.25e+43) tmp = t_1; elseif (y <= -9e-9) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 2.8e+68) tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.25e+43], t$95$1, If[LessEqual[y, -9e-9], 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], If[LessEqual[y, 2.8e+68], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.25 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-9}:\\
\;\;\;\;\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}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.25e43 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -2.25e43 < y < -8.99999999999999953e-9Initial program 91.5%
Taylor expanded in x around 0 82.7%
if -8.99999999999999953e-9 < y < 2.8e68Initial program 92.9%
Taylor expanded in y around 0 92.9%
Taylor expanded in a around 0 88.0%
Final simplification82.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.05e+46) (not (<= y 2.8e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616)) t)
(+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.05e+46) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.05d+46)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.05e+46) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.05e+46) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.05e+46) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.05e+46) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.05e+46], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+46} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -1.05e46 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -1.05e46 < y < 2.8e68Initial program 92.7%
Taylor expanded in y around 0 92.1%
Final simplification85.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -7e+35) (not (<= y 2.8e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616)) t)
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7e+35) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-7d+35)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7e+35) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -7e+35) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -7e+35) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -7e+35) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -7e+35], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+35} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -7.0000000000000001e35 or 2.8e68 < y Initial program 1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
Simplified1.4%
Taylor expanded in y around inf 67.0%
associate--l+67.0%
associate-/l*74.4%
Simplified74.4%
if -7.0000000000000001e35 < y < 2.8e68Initial program 92.7%
Taylor expanded in y around 0 92.1%
Taylor expanded in a around 0 85.1%
Final simplification80.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y (+ c (* y (+ b (* y a))))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.35e+39)
t_2
(if (<= y -4.9e-141)
t_1
(if (<= y 1.9e-59)
(/ (+ t (* y 230661.510616)) (+ i (* y c)))
(if (<= y 2.8e+68) 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 = t / (i + (y * (c + (y * (b + (y * a))))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.35e+39) {
tmp = t_2;
} else if (y <= -4.9e-141) {
tmp = t_1;
} else if (y <= 1.9e-59) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else if (y <= 2.8e+68) {
tmp = 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 = t / (i + (y * (c + (y * (b + (y * a))))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.35d+39)) then
tmp = t_2
else if (y <= (-4.9d-141)) then
tmp = t_1
else if (y <= 1.9d-59) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
else if (y <= 2.8d+68) then
tmp = 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 = t / (i + (y * (c + (y * (b + (y * a))))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.35e+39) {
tmp = t_2;
} else if (y <= -4.9e-141) {
tmp = t_1;
} else if (y <= 1.9e-59) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else if (y <= 2.8e+68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * (c + (y * (b + (y * a)))))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.35e+39: tmp = t_2 elif y <= -4.9e-141: tmp = t_1 elif y <= 1.9e-59: tmp = (t + (y * 230661.510616)) / (i + (y * c)) elif y <= 2.8e+68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.35e+39) tmp = t_2; elseif (y <= -4.9e-141) tmp = t_1; elseif (y <= 1.9e-59) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); elseif (y <= 2.8e+68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * (c + (y * (b + (y * a)))))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2.35e+39) tmp = t_2; elseif (y <= -4.9e-141) tmp = t_1; elseif (y <= 1.9e-59) tmp = (t + (y * 230661.510616)) / (i + (y * c)); elseif (y <= 2.8e+68) tmp = 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[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.35e+39], t$95$2, If[LessEqual[y, -4.9e-141], t$95$1, If[LessEqual[y, 1.9e-59], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-59}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.35e39 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -2.35e39 < y < -4.90000000000000006e-141 or 1.89999999999999992e-59 < y < 2.8e68Initial program 84.2%
Taylor expanded in y around 0 82.8%
Taylor expanded in t around inf 47.2%
if -4.90000000000000006e-141 < y < 1.89999999999999992e-59Initial program 99.8%
Taylor expanded in y around 0 96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 86.0%
Final simplification71.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5e+41) (not (<= y 2.8e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ 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 <= -5e+41) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} 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 <= (-5d+41)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
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 <= -5e+41) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} 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 <= -5e+41) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) 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 <= -5e+41) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); 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 <= -5e+41) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); 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, -5e+41], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $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 -5 \cdot 10^{+41} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\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 < -5.00000000000000022e41 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -5.00000000000000022e41 < y < 2.8e68Initial program 92.7%
Taylor expanded in y around 0 76.3%
*-commutative76.3%
Simplified76.3%
Final simplification75.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -8.4e+36) (not (<= y 1.85e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -8.4e+36) || !(y <= 1.85e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-8.4d+36)) .or. (.not. (y <= 1.85d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -8.4e+36) || !(y <= 1.85e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -8.4e+36) or not (y <= 1.85e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -8.4e+36) || !(y <= 1.85e+68)) tmp = Float64(x + Float64(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(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -8.4e+36) || ~((y <= 1.85e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -8.4e+36], N[Not[LessEqual[y, 1.85e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{+36} \lor \neg \left(y \leq 1.85 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -8.40000000000000018e36 or 1.84999999999999999e68 < y Initial program 1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
Simplified1.5%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*73.7%
Simplified73.7%
if -8.40000000000000018e36 < y < 1.84999999999999999e68Initial program 93.3%
Taylor expanded in x around 0 84.1%
Taylor expanded in y around 0 76.8%
Final simplification75.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.45e+30)
t_1
(if (<= y -7.5e-25)
(/
(+
(* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
t)
i)
(if (<= y 2.8e+68)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
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 tmp;
if (y <= -1.45e+30) {
tmp = t_1;
} else if (y <= -7.5e-25) {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / i;
} else if (y <= 2.8e+68) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.45d+30)) then
tmp = t_1
else if (y <= (-7.5d-25)) then
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / i
else if (y <= 2.8d+68) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
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 tmp;
if (y <= -1.45e+30) {
tmp = t_1;
} else if (y <= -7.5e-25) {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / i;
} else if (y <= 2.8e+68) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.45e+30: tmp = t_1 elif y <= -7.5e-25: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / i elif y <= 2.8e+68: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.45e+30) tmp = t_1; elseif (y <= -7.5e-25) tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / i); elseif (y <= 2.8e+68) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); 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))); tmp = 0.0; if (y <= -1.45e+30) tmp = t_1; elseif (y <= -7.5e-25) tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / i; elseif (y <= 2.8e+68) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+30], t$95$1, If[LessEqual[y, -7.5e-25], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 2.8e+68], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.4499999999999999e30 or 2.8e68 < y Initial program 1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
fma-define1.5%
Simplified1.5%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*73.7%
Simplified73.7%
if -1.4499999999999999e30 < y < -7.49999999999999989e-25Initial program 99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in i around inf 49.4%
if -7.49999999999999989e-25 < y < 2.8e68Initial program 92.5%
Taylor expanded in y around 0 81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y around 0 77.6%
Final simplification74.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.6e+41) (not (<= y 2.8e+68))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.6e+41) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.6d+41)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.6e+41) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.6e+41) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.6e+41) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.6e+41) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.6e+41], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+41} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -2.6000000000000001e41 or 2.8e68 < y Initial program 0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
fma-define0.5%
Simplified0.5%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*75.0%
Simplified75.0%
if -2.6000000000000001e41 < y < 2.8e68Initial program 92.7%
Taylor expanded in y around 0 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around 0 75.6%
Final simplification75.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.88e+34) (not (<= y 2.8e+68))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.88e+34) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.88d+34)) .or. (.not. (y <= 2.8d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.88e+34) || !(y <= 2.8e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.88e+34) or not (y <= 2.8e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.88e+34) || !(y <= 2.8e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.88e+34) || ~((y <= 2.8e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.88e+34], N[Not[LessEqual[y, 2.8e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.88 \cdot 10^{+34} \lor \neg \left(y \leq 2.8 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.87999999999999992e34 or 2.8e68 < y Initial program 1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
fma-define1.4%
Simplified1.4%
Taylor expanded in y around inf 67.0%
associate--l+67.0%
associate-/l*74.4%
Simplified74.4%
if -1.87999999999999992e34 < y < 2.8e68Initial program 92.7%
Taylor expanded in y around 0 75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in y around 0 70.7%
Final simplification72.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -6.6e+119)
x
(if (<= y -3.6e-9)
(/ z y)
(if (<= y 5.4e-14) (/ (+ t (* y 230661.510616)) i) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -6.6e+119) {
tmp = x;
} else if (y <= -3.6e-9) {
tmp = z / y;
} else if (y <= 5.4e-14) {
tmp = (t + (y * 230661.510616)) / 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 <= (-6.6d+119)) then
tmp = x
else if (y <= (-3.6d-9)) then
tmp = z / y
else if (y <= 5.4d-14) then
tmp = (t + (y * 230661.510616d0)) / 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 <= -6.6e+119) {
tmp = x;
} else if (y <= -3.6e-9) {
tmp = z / y;
} else if (y <= 5.4e-14) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -6.6e+119: tmp = x elif y <= -3.6e-9: tmp = z / y elif y <= 5.4e-14: tmp = (t + (y * 230661.510616)) / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -6.6e+119) tmp = x; elseif (y <= -3.6e-9) tmp = Float64(z / y); elseif (y <= 5.4e-14) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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 <= -6.6e+119) tmp = x; elseif (y <= -3.6e-9) tmp = z / y; elseif (y <= 5.4e-14) tmp = (t + (y * 230661.510616)) / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -6.6e+119], x, If[LessEqual[y, -3.6e-9], N[(z / y), $MachinePrecision], If[LessEqual[y, 5.4e-14], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-9}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.6000000000000004e119 or 5.3999999999999997e-14 < y Initial program 7.2%
fma-define7.2%
fma-define7.2%
fma-define7.2%
fma-define7.2%
fma-define7.2%
fma-define7.2%
fma-define7.2%
Simplified7.2%
Taylor expanded in y around inf 55.3%
if -6.6000000000000004e119 < y < -3.6e-9Initial program 37.9%
Taylor expanded in x around 0 31.7%
Taylor expanded in y around inf 30.1%
if -3.6e-9 < y < 5.3999999999999997e-14Initial program 99.7%
Taylor expanded in y around 0 87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in i around inf 55.8%
Final simplification52.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.55e+34) (not (<= y 6.2e+19))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ 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 <= -1.55e+34) || !(y <= 6.2e+19)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (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 <= (-1.55d+34)) .or. (.not. (y <= 6.2d+19))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (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 <= -1.55e+34) || !(y <= 6.2e+19)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.55e+34) or not (y <= 6.2e+19): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.55e+34) || !(y <= 6.2e+19)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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 <= -1.55e+34) || ~((y <= 6.2e+19))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.55e+34], N[Not[LessEqual[y, 6.2e+19]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+34} \lor \neg \left(y \leq 6.2 \cdot 10^{+19}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.54999999999999989e34 or 6.2e19 < y Initial program 4.2%
fma-define4.2%
fma-define4.2%
fma-define4.2%
fma-define4.2%
fma-define4.2%
fma-define4.2%
fma-define4.2%
Simplified4.2%
Taylor expanded in y around inf 61.1%
associate--l+61.1%
associate-/l*67.8%
Simplified67.8%
if -1.54999999999999989e34 < y < 6.2e19Initial program 97.6%
Taylor expanded in y around 0 80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y around 0 66.7%
Final simplification67.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -0.00032) (not (<= y 7.5e+19))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -0.00032) || !(y <= 7.5e+19)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / 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 <= (-0.00032d0)) .or. (.not. (y <= 7.5d+19))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / 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 <= -0.00032) || !(y <= 7.5e+19)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -0.00032) or not (y <= 7.5e+19): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -0.00032) || !(y <= 7.5e+19)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -0.00032) || ~((y <= 7.5e+19))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -0.00032], N[Not[LessEqual[y, 7.5e+19]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00032 \lor \neg \left(y \leq 7.5 \cdot 10^{+19}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -3.20000000000000026e-4 or 7.5e19 < y Initial program 10.9%
fma-define10.9%
fma-define10.9%
fma-define10.9%
fma-define10.9%
fma-define10.9%
fma-define10.9%
fma-define10.9%
Simplified10.9%
Taylor expanded in y around inf 57.4%
associate--l+57.4%
associate-/l*63.5%
Simplified63.5%
if -3.20000000000000026e-4 < y < 7.5e19Initial program 98.2%
Taylor expanded in y around 0 83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in i around inf 52.9%
Final simplification58.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.15e+119) x (if (<= y -1.56e-9) (/ z y) (if (<= y 0.11) (/ 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 <= -3.15e+119) {
tmp = x;
} else if (y <= -1.56e-9) {
tmp = z / y;
} else if (y <= 0.11) {
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 <= (-3.15d+119)) then
tmp = x
else if (y <= (-1.56d-9)) then
tmp = z / y
else if (y <= 0.11d0) 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 <= -3.15e+119) {
tmp = x;
} else if (y <= -1.56e-9) {
tmp = z / y;
} else if (y <= 0.11) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.15e+119: tmp = x elif y <= -1.56e-9: tmp = z / y elif y <= 0.11: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.15e+119) tmp = x; elseif (y <= -1.56e-9) tmp = Float64(z / y); elseif (y <= 0.11) 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 <= -3.15e+119) tmp = x; elseif (y <= -1.56e-9) tmp = z / y; elseif (y <= 0.11) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.15e+119], x, If[LessEqual[y, -1.56e-9], N[(z / y), $MachinePrecision], If[LessEqual[y, 0.11], N[(t / i), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.15 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.56 \cdot 10^{-9}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 0.11:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.1499999999999999e119 or 0.110000000000000001 < y Initial program 4.5%
fma-define4.5%
fma-define4.5%
fma-define4.5%
fma-define4.5%
fma-define4.5%
fma-define4.5%
fma-define4.5%
Simplified4.5%
Taylor expanded in y around inf 56.9%
if -3.1499999999999999e119 < y < -1.56e-9Initial program 37.9%
Taylor expanded in x around 0 31.7%
Taylor expanded in y around inf 30.1%
if -1.56e-9 < y < 0.110000000000000001Initial program 99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around 0 47.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -4e+25) x (if (<= y 0.062) (/ 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+25) {
tmp = x;
} else if (y <= 0.062) {
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+25)) then
tmp = x
else if (y <= 0.062d0) 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+25) {
tmp = x;
} else if (y <= 0.062) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4e+25: tmp = x elif y <= 0.062: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4e+25) tmp = x; elseif (y <= 0.062) 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+25) tmp = x; elseif (y <= 0.062) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4e+25], x, If[LessEqual[y, 0.062], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+25}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.062:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.00000000000000036e25 or 0.062 < y Initial program 5.7%
fma-define5.7%
fma-define5.7%
fma-define5.7%
fma-define5.7%
fma-define5.7%
fma-define5.7%
fma-define5.7%
Simplified5.7%
Taylor expanded in y around inf 50.1%
if -4.00000000000000036e25 < y < 0.062Initial program 99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around 0 45.2%
(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 54.5%
fma-define54.5%
fma-define54.6%
fma-define54.6%
fma-define54.6%
fma-define54.5%
fma-define54.5%
fma-define54.5%
Simplified54.5%
Taylor expanded in y around inf 25.9%
herbie shell --seed 2024181
(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)))