
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1.32e+36)
(/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c)
(if (<= z 1e-23)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.32e+36) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else if (z <= 1e-23) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.32e+36) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c); elseif (z <= 1e-23) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.32e+36], N[(N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1e-23], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+36}:\\
\;\;\;\;\frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 10^{-23}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\
\end{array}
\end{array}
if z < -1.3200000000000001e36Initial program 53.7%
associate-/r*67.0%
Simplified85.0%
fma-udef85.0%
Applied egg-rr85.0%
if -1.3200000000000001e36 < z < 9.9999999999999996e-24Initial program 94.9%
if 9.9999999999999996e-24 < z Initial program 78.2%
associate-/r*82.6%
Simplified96.8%
Final simplification93.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y c) (/ x z)))) (t_2 (* -4.0 (/ a (/ c t)))))
(if (<= y -2.6e-66)
t_1
(if (<= y -3.9e-253)
(/ (/ b z) c)
(if (<= y 6.4e-114)
t_2
(if (<= y 5e-42)
(/ b (* z c))
(if (<= y 1.9e+62)
t_2
(if (or (<= y 6.6e+113) (not (<= y 1.85e+158)))
t_1
(* -4.0 (/ (* t a) c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / c) * (x / z));
double t_2 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.6e-66) {
tmp = t_1;
} else if (y <= -3.9e-253) {
tmp = (b / z) / c;
} else if (y <= 6.4e-114) {
tmp = t_2;
} else if (y <= 5e-42) {
tmp = b / (z * c);
} else if (y <= 1.9e+62) {
tmp = t_2;
} else if ((y <= 6.6e+113) || !(y <= 1.85e+158)) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * ((y / c) * (x / z))
t_2 = (-4.0d0) * (a / (c / t))
if (y <= (-2.6d-66)) then
tmp = t_1
else if (y <= (-3.9d-253)) then
tmp = (b / z) / c
else if (y <= 6.4d-114) then
tmp = t_2
else if (y <= 5d-42) then
tmp = b / (z * c)
else if (y <= 1.9d+62) then
tmp = t_2
else if ((y <= 6.6d+113) .or. (.not. (y <= 1.85d+158))) then
tmp = t_1
else
tmp = (-4.0d0) * ((t * a) / 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 t_1 = 9.0 * ((y / c) * (x / z));
double t_2 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.6e-66) {
tmp = t_1;
} else if (y <= -3.9e-253) {
tmp = (b / z) / c;
} else if (y <= 6.4e-114) {
tmp = t_2;
} else if (y <= 5e-42) {
tmp = b / (z * c);
} else if (y <= 1.9e+62) {
tmp = t_2;
} else if ((y <= 6.6e+113) || !(y <= 1.85e+158)) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 9.0 * ((y / c) * (x / z)) t_2 = -4.0 * (a / (c / t)) tmp = 0 if y <= -2.6e-66: tmp = t_1 elif y <= -3.9e-253: tmp = (b / z) / c elif y <= 6.4e-114: tmp = t_2 elif y <= 5e-42: tmp = b / (z * c) elif y <= 1.9e+62: tmp = t_2 elif (y <= 6.6e+113) or not (y <= 1.85e+158): tmp = t_1 else: tmp = -4.0 * ((t * a) / c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) t_2 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (y <= -2.6e-66) tmp = t_1; elseif (y <= -3.9e-253) tmp = Float64(Float64(b / z) / c); elseif (y <= 6.4e-114) tmp = t_2; elseif (y <= 5e-42) tmp = Float64(b / Float64(z * c)); elseif (y <= 1.9e+62) tmp = t_2; elseif ((y <= 6.6e+113) || !(y <= 1.85e+158)) tmp = t_1; else tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 9.0 * ((y / c) * (x / z)); t_2 = -4.0 * (a / (c / t)); tmp = 0.0; if (y <= -2.6e-66) tmp = t_1; elseif (y <= -3.9e-253) tmp = (b / z) / c; elseif (y <= 6.4e-114) tmp = t_2; elseif (y <= 5e-42) tmp = b / (z * c); elseif (y <= 1.9e+62) tmp = t_2; elseif ((y <= 6.6e+113) || ~((y <= 1.85e+158))) tmp = t_1; else tmp = -4.0 * ((t * a) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e-66], t$95$1, If[LessEqual[y, -3.9e-253], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 6.4e-114], t$95$2, If[LessEqual[y, 5e-42], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+62], t$95$2, If[Or[LessEqual[y, 6.6e+113], N[Not[LessEqual[y, 1.85e+158]], $MachinePrecision]], t$95$1, N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
t_2 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-253}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-114}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-42}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+113} \lor \neg \left(y \leq 1.85 \cdot 10^{+158}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if y < -2.5999999999999999e-66 or 1.89999999999999992e62 < y < 6.6000000000000006e113 or 1.85000000000000005e158 < y Initial program 81.2%
associate-*l*81.2%
associate-*l*78.9%
Simplified78.9%
div-inv78.9%
associate-+l-78.9%
associate-*r*78.9%
associate-*r*81.1%
associate-+l-81.1%
+-commutative81.1%
associate-*r*81.2%
*-commutative81.2%
*-commutative81.2%
Applied egg-rr81.2%
Taylor expanded in x around inf 46.8%
times-frac53.4%
Simplified53.4%
if -2.5999999999999999e-66 < y < -3.8999999999999999e-253Initial program 90.0%
associate-/r*87.0%
Simplified91.1%
Taylor expanded in x around 0 82.6%
Taylor expanded in b around inf 60.3%
if -3.8999999999999999e-253 < y < 6.4000000000000003e-114 or 5.00000000000000003e-42 < y < 1.89999999999999992e62Initial program 79.5%
associate-/r*82.2%
Simplified93.5%
Taylor expanded in t around inf 60.7%
associate-/l*60.7%
Simplified60.7%
if 6.4000000000000003e-114 < y < 5.00000000000000003e-42Initial program 84.9%
associate-/r*92.3%
Simplified99.9%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 6.6000000000000006e113 < y < 1.85000000000000005e158Initial program 60.7%
associate-/r*70.8%
Simplified89.7%
Taylor expanded in t around inf 71.2%
Final simplification57.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= y -2.05e-109)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= y -1.6e-251)
(/ (/ b z) c)
(if (<= y 4.3e-113)
t_1
(if (<= y 4.5e-42)
(/ b (* z c))
(if (<= y 3.7e+62)
t_1
(if (or (<= y 4.8e+114) (not (<= y 7.4e+157)))
(* 9.0 (* (/ y c) (/ x z)))
(* -4.0 (/ (* t a) c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.05e-109) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= -1.6e-251) {
tmp = (b / z) / c;
} else if (y <= 4.3e-113) {
tmp = t_1;
} else if (y <= 4.5e-42) {
tmp = b / (z * c);
} else if (y <= 3.7e+62) {
tmp = t_1;
} else if ((y <= 4.8e+114) || !(y <= 7.4e+157)) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a / (c / t))
if (y <= (-2.05d-109)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (y <= (-1.6d-251)) then
tmp = (b / z) / c
else if (y <= 4.3d-113) then
tmp = t_1
else if (y <= 4.5d-42) then
tmp = b / (z * c)
else if (y <= 3.7d+62) then
tmp = t_1
else if ((y <= 4.8d+114) .or. (.not. (y <= 7.4d+157))) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = (-4.0d0) * ((t * a) / 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 t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.05e-109) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= -1.6e-251) {
tmp = (b / z) / c;
} else if (y <= 4.3e-113) {
tmp = t_1;
} else if (y <= 4.5e-42) {
tmp = b / (z * c);
} else if (y <= 3.7e+62) {
tmp = t_1;
} else if ((y <= 4.8e+114) || !(y <= 7.4e+157)) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = -4.0 * ((t * a) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if y <= -2.05e-109: tmp = 9.0 * ((x / c) * (y / z)) elif y <= -1.6e-251: tmp = (b / z) / c elif y <= 4.3e-113: tmp = t_1 elif y <= 4.5e-42: tmp = b / (z * c) elif y <= 3.7e+62: tmp = t_1 elif (y <= 4.8e+114) or not (y <= 7.4e+157): tmp = 9.0 * ((y / c) * (x / z)) else: tmp = -4.0 * ((t * a) / c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (y <= -2.05e-109) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (y <= -1.6e-251) tmp = Float64(Float64(b / z) / c); elseif (y <= 4.3e-113) tmp = t_1; elseif (y <= 4.5e-42) tmp = Float64(b / Float64(z * c)); elseif (y <= 3.7e+62) tmp = t_1; elseif ((y <= 4.8e+114) || !(y <= 7.4e+157)) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (a / (c / t)); tmp = 0.0; if (y <= -2.05e-109) tmp = 9.0 * ((x / c) * (y / z)); elseif (y <= -1.6e-251) tmp = (b / z) / c; elseif (y <= 4.3e-113) tmp = t_1; elseif (y <= 4.5e-42) tmp = b / (z * c); elseif (y <= 3.7e+62) tmp = t_1; elseif ((y <= 4.8e+114) || ~((y <= 7.4e+157))) tmp = 9.0 * ((y / c) * (x / z)); else tmp = -4.0 * ((t * a) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e-109], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-251], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 4.3e-113], t$95$1, If[LessEqual[y, 4.5e-42], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+62], t$95$1, If[Or[LessEqual[y, 4.8e+114], N[Not[LessEqual[y, 7.4e+157]], $MachinePrecision]], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{-109}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-251}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+114} \lor \neg \left(y \leq 7.4 \cdot 10^{+157}\right):\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\end{array}
\end{array}
if y < -2.0500000000000001e-109Initial program 80.7%
associate-/r*76.5%
Simplified82.3%
Taylor expanded in x around inf 39.1%
*-commutative39.1%
times-frac42.3%
Simplified42.3%
if -2.0500000000000001e-109 < y < -1.59999999999999991e-251Initial program 90.6%
associate-/r*86.6%
Simplified87.9%
Taylor expanded in x around 0 80.3%
Taylor expanded in b around inf 57.6%
if -1.59999999999999991e-251 < y < 4.3e-113 or 4.5e-42 < y < 3.70000000000000014e62Initial program 79.5%
associate-/r*82.2%
Simplified93.5%
Taylor expanded in t around inf 60.7%
associate-/l*60.7%
Simplified60.7%
if 4.3e-113 < y < 4.5e-42Initial program 84.9%
associate-/r*92.3%
Simplified99.9%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 3.70000000000000014e62 < y < 4.8e114 or 7.3999999999999997e157 < y Initial program 83.4%
associate-*l*83.5%
associate-*l*81.4%
Simplified81.4%
div-inv81.4%
associate-+l-81.4%
associate-*r*81.3%
associate-*r*83.3%
associate-+l-83.3%
+-commutative83.3%
associate-*r*83.4%
*-commutative83.4%
*-commutative83.4%
Applied egg-rr83.4%
Taylor expanded in x around inf 54.9%
times-frac61.1%
Simplified61.1%
if 4.8e114 < y < 7.3999999999999997e157Initial program 60.7%
associate-/r*70.8%
Simplified89.7%
Taylor expanded in t around inf 71.2%
Final simplification54.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= y -2.45e-109)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= y -6e-253)
(/ (/ b z) c)
(if (<= y 1.3e-113)
t_1
(if (<= y 6.2e-43)
(/ b (* z c))
(if (<= y 4.3e+61)
t_1
(if (<= y 5.5e+115)
(* 9.0 (/ y (/ (* z c) x)))
(if (<= y 7.4e+157)
(* -4.0 (/ (* t a) c))
(* 9.0 (* (/ y c) (/ x z))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.45e-109) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= -6e-253) {
tmp = (b / z) / c;
} else if (y <= 1.3e-113) {
tmp = t_1;
} else if (y <= 6.2e-43) {
tmp = b / (z * c);
} else if (y <= 4.3e+61) {
tmp = t_1;
} else if (y <= 5.5e+115) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (y <= 7.4e+157) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a / (c / t))
if (y <= (-2.45d-109)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (y <= (-6d-253)) then
tmp = (b / z) / c
else if (y <= 1.3d-113) then
tmp = t_1
else if (y <= 6.2d-43) then
tmp = b / (z * c)
else if (y <= 4.3d+61) then
tmp = t_1
else if (y <= 5.5d+115) then
tmp = 9.0d0 * (y / ((z * c) / x))
else if (y <= 7.4d+157) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = 9.0d0 * ((y / c) * (x / z))
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 t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.45e-109) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (y <= -6e-253) {
tmp = (b / z) / c;
} else if (y <= 1.3e-113) {
tmp = t_1;
} else if (y <= 6.2e-43) {
tmp = b / (z * c);
} else if (y <= 4.3e+61) {
tmp = t_1;
} else if (y <= 5.5e+115) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (y <= 7.4e+157) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if y <= -2.45e-109: tmp = 9.0 * ((x / c) * (y / z)) elif y <= -6e-253: tmp = (b / z) / c elif y <= 1.3e-113: tmp = t_1 elif y <= 6.2e-43: tmp = b / (z * c) elif y <= 4.3e+61: tmp = t_1 elif y <= 5.5e+115: tmp = 9.0 * (y / ((z * c) / x)) elif y <= 7.4e+157: tmp = -4.0 * ((t * a) / c) else: tmp = 9.0 * ((y / c) * (x / z)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (y <= -2.45e-109) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (y <= -6e-253) tmp = Float64(Float64(b / z) / c); elseif (y <= 1.3e-113) tmp = t_1; elseif (y <= 6.2e-43) tmp = Float64(b / Float64(z * c)); elseif (y <= 4.3e+61) tmp = t_1; elseif (y <= 5.5e+115) tmp = Float64(9.0 * Float64(y / Float64(Float64(z * c) / x))); elseif (y <= 7.4e+157) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (a / (c / t)); tmp = 0.0; if (y <= -2.45e-109) tmp = 9.0 * ((x / c) * (y / z)); elseif (y <= -6e-253) tmp = (b / z) / c; elseif (y <= 1.3e-113) tmp = t_1; elseif (y <= 6.2e-43) tmp = b / (z * c); elseif (y <= 4.3e+61) tmp = t_1; elseif (y <= 5.5e+115) tmp = 9.0 * (y / ((z * c) / x)); elseif (y <= 7.4e+157) tmp = -4.0 * ((t * a) / c); else tmp = 9.0 * ((y / c) * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.45e-109], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e-253], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 1.3e-113], t$95$1, If[LessEqual[y, 6.2e-43], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+61], t$95$1, If[LessEqual[y, 5.5e+115], N[(9.0 * N[(y / N[(N[(z * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.4e+157], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{-109}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-253}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-43}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+115}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+157}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < -2.44999999999999999e-109Initial program 80.7%
associate-/r*76.5%
Simplified82.3%
Taylor expanded in x around inf 39.1%
*-commutative39.1%
times-frac42.3%
Simplified42.3%
if -2.44999999999999999e-109 < y < -6.0000000000000004e-253Initial program 90.6%
associate-/r*86.6%
Simplified87.9%
Taylor expanded in x around 0 80.3%
Taylor expanded in b around inf 57.6%
if -6.0000000000000004e-253 < y < 1.3e-113 or 6.1999999999999999e-43 < y < 4.3000000000000001e61Initial program 79.5%
associate-/r*82.2%
Simplified93.5%
Taylor expanded in t around inf 60.7%
associate-/l*60.7%
Simplified60.7%
if 1.3e-113 < y < 6.1999999999999999e-43Initial program 84.9%
associate-/r*92.3%
Simplified99.9%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 4.3000000000000001e61 < y < 5.5e115Initial program 99.9%
associate-/r*91.5%
Simplified91.6%
Taylor expanded in x around inf 46.9%
associate-/l*46.9%
*-commutative46.9%
Simplified46.9%
if 5.5e115 < y < 7.3999999999999997e157Initial program 60.7%
associate-/r*70.8%
Simplified89.7%
Taylor expanded in t around inf 71.2%
if 7.3999999999999997e157 < y Initial program 78.4%
associate-*l*78.4%
associate-*l*75.7%
Simplified75.7%
div-inv75.7%
associate-+l-75.7%
associate-*r*75.6%
associate-*r*78.3%
associate-+l-78.3%
+-commutative78.3%
associate-*r*78.4%
*-commutative78.4%
*-commutative78.4%
Applied egg-rr78.4%
Taylor expanded in x around inf 57.3%
times-frac65.5%
Simplified65.5%
Final simplification54.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= y -2.6e-109)
(* 9.0 (/ (* y (/ x c)) z))
(if (<= y -5.6e-252)
(/ (/ b z) c)
(if (<= y 6.4e-112)
t_1
(if (<= y 5.5e-43)
(/ b (* z c))
(if (<= y 1.8e+61)
t_1
(if (<= y 3.5e+114)
(* 9.0 (/ y (/ (* z c) x)))
(if (<= y 2.1e+158)
(* -4.0 (/ (* t a) c))
(* 9.0 (* (/ y c) (/ x z))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.6e-109) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (y <= -5.6e-252) {
tmp = (b / z) / c;
} else if (y <= 6.4e-112) {
tmp = t_1;
} else if (y <= 5.5e-43) {
tmp = b / (z * c);
} else if (y <= 1.8e+61) {
tmp = t_1;
} else if (y <= 3.5e+114) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (y <= 2.1e+158) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a / (c / t))
if (y <= (-2.6d-109)) then
tmp = 9.0d0 * ((y * (x / c)) / z)
else if (y <= (-5.6d-252)) then
tmp = (b / z) / c
else if (y <= 6.4d-112) then
tmp = t_1
else if (y <= 5.5d-43) then
tmp = b / (z * c)
else if (y <= 1.8d+61) then
tmp = t_1
else if (y <= 3.5d+114) then
tmp = 9.0d0 * (y / ((z * c) / x))
else if (y <= 2.1d+158) then
tmp = (-4.0d0) * ((t * a) / c)
else
tmp = 9.0d0 * ((y / c) * (x / z))
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 t_1 = -4.0 * (a / (c / t));
double tmp;
if (y <= -2.6e-109) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (y <= -5.6e-252) {
tmp = (b / z) / c;
} else if (y <= 6.4e-112) {
tmp = t_1;
} else if (y <= 5.5e-43) {
tmp = b / (z * c);
} else if (y <= 1.8e+61) {
tmp = t_1;
} else if (y <= 3.5e+114) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (y <= 2.1e+158) {
tmp = -4.0 * ((t * a) / c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if y <= -2.6e-109: tmp = 9.0 * ((y * (x / c)) / z) elif y <= -5.6e-252: tmp = (b / z) / c elif y <= 6.4e-112: tmp = t_1 elif y <= 5.5e-43: tmp = b / (z * c) elif y <= 1.8e+61: tmp = t_1 elif y <= 3.5e+114: tmp = 9.0 * (y / ((z * c) / x)) elif y <= 2.1e+158: tmp = -4.0 * ((t * a) / c) else: tmp = 9.0 * ((y / c) * (x / z)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (y <= -2.6e-109) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c)) / z)); elseif (y <= -5.6e-252) tmp = Float64(Float64(b / z) / c); elseif (y <= 6.4e-112) tmp = t_1; elseif (y <= 5.5e-43) tmp = Float64(b / Float64(z * c)); elseif (y <= 1.8e+61) tmp = t_1; elseif (y <= 3.5e+114) tmp = Float64(9.0 * Float64(y / Float64(Float64(z * c) / x))); elseif (y <= 2.1e+158) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * (a / (c / t)); tmp = 0.0; if (y <= -2.6e-109) tmp = 9.0 * ((y * (x / c)) / z); elseif (y <= -5.6e-252) tmp = (b / z) / c; elseif (y <= 6.4e-112) tmp = t_1; elseif (y <= 5.5e-43) tmp = b / (z * c); elseif (y <= 1.8e+61) tmp = t_1; elseif (y <= 3.5e+114) tmp = 9.0 * (y / ((z * c) / x)); elseif (y <= 2.1e+158) tmp = -4.0 * ((t * a) / c); else tmp = 9.0 * ((y / c) * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e-109], N[(9.0 * N[(N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.6e-252], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 6.4e-112], t$95$1, If[LessEqual[y, 5.5e-43], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+61], t$95$1, If[LessEqual[y, 3.5e+114], N[(9.0 * N[(y / N[(N[(z * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+158], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{-109}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-252}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+114}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+158}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if y < -2.5999999999999998e-109Initial program 80.7%
associate-/r*76.5%
Simplified82.3%
Taylor expanded in x around inf 39.1%
*-commutative39.1%
times-frac42.3%
Simplified42.3%
associate-*l/43.5%
Applied egg-rr43.5%
if -2.5999999999999998e-109 < y < -5.60000000000000036e-252Initial program 90.6%
associate-/r*86.6%
Simplified87.9%
Taylor expanded in x around 0 80.3%
Taylor expanded in b around inf 57.6%
if -5.60000000000000036e-252 < y < 6.39999999999999986e-112 or 5.50000000000000013e-43 < y < 1.80000000000000005e61Initial program 79.5%
associate-/r*82.2%
Simplified93.5%
Taylor expanded in t around inf 60.7%
associate-/l*60.7%
Simplified60.7%
if 6.39999999999999986e-112 < y < 5.50000000000000013e-43Initial program 84.9%
associate-/r*92.3%
Simplified99.9%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 1.80000000000000005e61 < y < 3.5000000000000001e114Initial program 99.9%
associate-/r*91.5%
Simplified91.6%
Taylor expanded in x around inf 46.9%
associate-/l*46.9%
*-commutative46.9%
Simplified46.9%
if 3.5000000000000001e114 < y < 2.0999999999999999e158Initial program 60.7%
associate-/r*70.8%
Simplified89.7%
Taylor expanded in t around inf 71.2%
if 2.0999999999999999e158 < y Initial program 78.4%
associate-*l*78.4%
associate-*l*75.7%
Simplified75.7%
div-inv75.7%
associate-+l-75.7%
associate-*r*75.6%
associate-*r*78.3%
associate-+l-78.3%
+-commutative78.3%
associate-*r*78.4%
*-commutative78.4%
*-commutative78.4%
Applied egg-rr78.4%
Taylor expanded in x around inf 57.3%
times-frac65.5%
Simplified65.5%
Final simplification54.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y))))
(if (or (<= z -1.35e+36) (not (<= z 3e-36)))
(/ (+ (/ (+ t_1 b) z) (* t (* a -4.0))) c)
(/ (+ b (- t_1 (* (* z 4.0) (* t a)))) (* z c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -1.35e+36) || !(z <= 3e-36)) {
tmp = (((t_1 + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: tmp
t_1 = x * (9.0d0 * y)
if ((z <= (-1.35d+36)) .or. (.not. (z <= 3d-36))) then
tmp = (((t_1 + b) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + (t_1 - ((z * 4.0d0) * (t * a)))) / (z * 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 t_1 = x * (9.0 * y);
double tmp;
if ((z <= -1.35e+36) || !(z <= 3e-36)) {
tmp = (((t_1 + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x * (9.0 * y) tmp = 0 if (z <= -1.35e+36) or not (z <= 3e-36): tmp = (((t_1 + b) / z) + (t * (a * -4.0))) / c else: tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) tmp = 0.0 if ((z <= -1.35e+36) || !(z <= 3e-36)) tmp = Float64(Float64(Float64(Float64(t_1 + b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x * (9.0 * y); tmp = 0.0; if ((z <= -1.35e+36) || ~((z <= 3e-36))) tmp = (((t_1 + b) / z) + (t * (a * -4.0))) / c; else tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.35e+36], N[Not[LessEqual[z, 3e-36]], $MachinePrecision]], N[(N[(N[(N[(t$95$1 + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+36} \lor \neg \left(z \leq 3 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{\frac{t_1 + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.35e36 or 3.0000000000000002e-36 < z Initial program 66.7%
associate-/r*75.1%
Simplified89.8%
fma-udef89.8%
Applied egg-rr89.8%
if -1.35e36 < z < 3.0000000000000002e-36Initial program 95.4%
associate-*l*95.4%
associate-*l*91.0%
Simplified91.0%
Final simplification90.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3e+36) (not (<= z 1.4e-35))) (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3e+36) || !(z <= 1.4e-35)) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if ((z <= (-3d+36)) .or. (.not. (z <= 1.4d-35))) then
tmp = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * 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 tmp;
if ((z <= -3e+36) || !(z <= 1.4e-35)) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3e+36) or not (z <= 1.4e-35): tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c else: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3e+36) || !(z <= 1.4e-35)) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -3e+36) || ~((z <= 1.4e-35))) tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c; else tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3e+36], N[Not[LessEqual[z, 1.4e-35]], $MachinePrecision]], N[(N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+36} \lor \neg \left(z \leq 1.4 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -3e36 or 1.4e-35 < z Initial program 66.7%
associate-/r*75.1%
Simplified89.8%
fma-udef89.8%
Applied egg-rr89.8%
if -3e36 < z < 1.4e-35Initial program 95.4%
Final simplification92.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c))
(t_2 (/ (+ b (* 9.0 (* x y))) (* z c))))
(if (<= y -2.45e-154)
t_2
(if (<= y 1.8e+61)
t_1
(if (<= y 4e+114)
t_2
(if (<= y 4.5e+158) t_1 (/ (+ (/ b z) (* 9.0 (/ y (/ z x)))) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double t_2 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (y <= -2.45e-154) {
tmp = t_2;
} else if (y <= 1.8e+61) {
tmp = t_1;
} else if (y <= 4e+114) {
tmp = t_2;
} else if (y <= 4.5e+158) {
tmp = t_1;
} else {
tmp = ((b / z) + (9.0 * (y / (z / x)))) / c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
t_2 = (b + (9.0d0 * (x * y))) / (z * c)
if (y <= (-2.45d-154)) then
tmp = t_2
else if (y <= 1.8d+61) then
tmp = t_1
else if (y <= 4d+114) then
tmp = t_2
else if (y <= 4.5d+158) then
tmp = t_1
else
tmp = ((b / z) + (9.0d0 * (y / (z / x)))) / 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 t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double t_2 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (y <= -2.45e-154) {
tmp = t_2;
} else if (y <= 1.8e+61) {
tmp = t_1;
} else if (y <= 4e+114) {
tmp = t_2;
} else if (y <= 4.5e+158) {
tmp = t_1;
} else {
tmp = ((b / z) + (9.0 * (y / (z / x)))) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c t_2 = (b + (9.0 * (x * y))) / (z * c) tmp = 0 if y <= -2.45e-154: tmp = t_2 elif y <= 1.8e+61: tmp = t_1 elif y <= 4e+114: tmp = t_2 elif y <= 4.5e+158: tmp = t_1 else: tmp = ((b / z) + (9.0 * (y / (z / x)))) / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) t_2 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) tmp = 0.0 if (y <= -2.45e-154) tmp = t_2; elseif (y <= 1.8e+61) tmp = t_1; elseif (y <= 4e+114) tmp = t_2; elseif (y <= 4.5e+158) tmp = t_1; else tmp = Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(y / Float64(z / x)))) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; t_2 = (b + (9.0 * (x * y))) / (z * c); tmp = 0.0; if (y <= -2.45e-154) tmp = t_2; elseif (y <= 1.8e+61) tmp = t_1; elseif (y <= 4e+114) tmp = t_2; elseif (y <= 4.5e+158) tmp = t_1; else tmp = ((b / z) + (9.0 * (y / (z / x)))) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.45e-154], t$95$2, If[LessEqual[y, 1.8e+61], t$95$1, If[LessEqual[y, 4e+114], t$95$2, If[LessEqual[y, 4.5e+158], t$95$1, N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{-154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+114}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\
\end{array}
\end{array}
if y < -2.44999999999999998e-154 or 1.80000000000000005e61 < y < 4e114Initial program 83.5%
associate-/r*78.4%
Simplified83.3%
Taylor expanded in z around 0 61.3%
if -2.44999999999999998e-154 < y < 1.80000000000000005e61 or 4e114 < y < 4.50000000000000046e158Initial program 79.9%
associate-/r*83.5%
Simplified92.9%
Taylor expanded in x around 0 84.9%
if 4.50000000000000046e158 < y Initial program 78.4%
associate-/r*78.5%
Simplified81.6%
Taylor expanded in t around 0 73.2%
associate-/l*76.0%
Simplified76.0%
Final simplification73.6%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= z -1.9e+69)
(and (not (<= z -5e-20)) (or (<= z -3.3e-93) (not (<= z 2.7e-50)))))
(/ (+ (* t (* a -4.0)) (/ b z)) c)
(/ (+ b (* 9.0 (* x y))) (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.9e+69) || (!(z <= -5e-20) && ((z <= -3.3e-93) || !(z <= 2.7e-50)))) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if ((z <= (-1.9d+69)) .or. (.not. (z <= (-5d-20))) .and. (z <= (-3.3d-93)) .or. (.not. (z <= 2.7d-50))) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * 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 tmp;
if ((z <= -1.9e+69) || (!(z <= -5e-20) && ((z <= -3.3e-93) || !(z <= 2.7e-50)))) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.9e+69) or (not (z <= -5e-20) and ((z <= -3.3e-93) or not (z <= 2.7e-50))): tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.9e+69) || (!(z <= -5e-20) && ((z <= -3.3e-93) || !(z <= 2.7e-50)))) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -1.9e+69) || (~((z <= -5e-20)) && ((z <= -3.3e-93) || ~((z <= 2.7e-50))))) tmp = ((t * (a * -4.0)) + (b / z)) / c; else tmp = (b + (9.0 * (x * y))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.9e+69], And[N[Not[LessEqual[z, -5e-20]], $MachinePrecision], Or[LessEqual[z, -3.3e-93], N[Not[LessEqual[z, 2.7e-50]], $MachinePrecision]]]], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+69} \lor \neg \left(z \leq -5 \cdot 10^{-20}\right) \land \left(z \leq -3.3 \cdot 10^{-93} \lor \neg \left(z \leq 2.7 \cdot 10^{-50}\right)\right):\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.90000000000000014e69 or -4.9999999999999999e-20 < z < -3.3000000000000001e-93 or 2.7e-50 < z Initial program 70.6%
associate-/r*77.7%
Simplified90.6%
Taylor expanded in x around 0 80.5%
if -1.90000000000000014e69 < z < -4.9999999999999999e-20 or -3.3000000000000001e-93 < z < 2.7e-50Initial program 93.4%
associate-/r*84.1%
Simplified83.3%
Taylor expanded in z around 0 82.0%
Final simplification81.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c))
(t_2 (+ b (* 9.0 (* x y))))
(t_3 (/ t_2 (* z c))))
(if (<= y -1.1e-153)
t_3
(if (<= y 7.2e+61)
t_1
(if (<= y 2.9e+115) t_3 (if (<= y 1.9e+158) t_1 (/ (/ t_2 z) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double t_2 = b + (9.0 * (x * y));
double t_3 = t_2 / (z * c);
double tmp;
if (y <= -1.1e-153) {
tmp = t_3;
} else if (y <= 7.2e+61) {
tmp = t_1;
} else if (y <= 2.9e+115) {
tmp = t_3;
} else if (y <= 1.9e+158) {
tmp = t_1;
} else {
tmp = (t_2 / z) / c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
t_2 = b + (9.0d0 * (x * y))
t_3 = t_2 / (z * c)
if (y <= (-1.1d-153)) then
tmp = t_3
else if (y <= 7.2d+61) then
tmp = t_1
else if (y <= 2.9d+115) then
tmp = t_3
else if (y <= 1.9d+158) then
tmp = t_1
else
tmp = (t_2 / z) / 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 t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double t_2 = b + (9.0 * (x * y));
double t_3 = t_2 / (z * c);
double tmp;
if (y <= -1.1e-153) {
tmp = t_3;
} else if (y <= 7.2e+61) {
tmp = t_1;
} else if (y <= 2.9e+115) {
tmp = t_3;
} else if (y <= 1.9e+158) {
tmp = t_1;
} else {
tmp = (t_2 / z) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c t_2 = b + (9.0 * (x * y)) t_3 = t_2 / (z * c) tmp = 0 if y <= -1.1e-153: tmp = t_3 elif y <= 7.2e+61: tmp = t_1 elif y <= 2.9e+115: tmp = t_3 elif y <= 1.9e+158: tmp = t_1 else: tmp = (t_2 / z) / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) t_2 = Float64(b + Float64(9.0 * Float64(x * y))) t_3 = Float64(t_2 / Float64(z * c)) tmp = 0.0 if (y <= -1.1e-153) tmp = t_3; elseif (y <= 7.2e+61) tmp = t_1; elseif (y <= 2.9e+115) tmp = t_3; elseif (y <= 1.9e+158) tmp = t_1; else tmp = Float64(Float64(t_2 / z) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; t_2 = b + (9.0 * (x * y)); t_3 = t_2 / (z * c); tmp = 0.0; if (y <= -1.1e-153) tmp = t_3; elseif (y <= 7.2e+61) tmp = t_1; elseif (y <= 2.9e+115) tmp = t_3; elseif (y <= 1.9e+158) tmp = t_1; else tmp = (t_2 / z) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$2 = N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e-153], t$95$3, If[LessEqual[y, 7.2e+61], t$95$1, If[LessEqual[y, 2.9e+115], t$95$3, If[LessEqual[y, 1.9e+158], t$95$1, N[(N[(t$95$2 / z), $MachinePrecision] / c), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
t_2 := b + 9 \cdot \left(x \cdot y\right)\\
t_3 := \frac{t_2}{z \cdot c}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-153}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+115}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_2}{z}}{c}\\
\end{array}
\end{array}
if y < -1.1e-153 or 7.20000000000000021e61 < y < 2.90000000000000005e115Initial program 83.5%
associate-/r*78.4%
Simplified83.3%
Taylor expanded in z around 0 61.3%
if -1.1e-153 < y < 7.20000000000000021e61 or 2.90000000000000005e115 < y < 1.8999999999999999e158Initial program 79.9%
associate-/r*83.5%
Simplified92.9%
Taylor expanded in x around 0 84.9%
if 1.8999999999999999e158 < y Initial program 78.4%
associate-/r*78.5%
Simplified73.3%
fma-udef73.3%
Applied egg-rr73.3%
Taylor expanded in z around 0 76.1%
Final simplification73.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* 9.0 (* x y))) (* z c)))
(t_2 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -2.3e+69)
t_2
(if (<= z -6e-20)
t_1
(if (<= z -1.85e-93)
(+ (/ (* -4.0 (* t a)) c) (/ b (* z c)))
(if (<= z 2.45e-48) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (x * y))) / (z * c);
double t_2 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.3e+69) {
tmp = t_2;
} else if (z <= -6e-20) {
tmp = t_1;
} else if (z <= -1.85e-93) {
tmp = ((-4.0 * (t * a)) / c) + (b / (z * c));
} else if (z <= 2.45e-48) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b + (9.0d0 * (x * y))) / (z * c)
t_2 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-2.3d+69)) then
tmp = t_2
else if (z <= (-6d-20)) then
tmp = t_1
else if (z <= (-1.85d-93)) then
tmp = (((-4.0d0) * (t * a)) / c) + (b / (z * c))
else if (z <= 2.45d-48) 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 t_1 = (b + (9.0 * (x * y))) / (z * c);
double t_2 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.3e+69) {
tmp = t_2;
} else if (z <= -6e-20) {
tmp = t_1;
} else if (z <= -1.85e-93) {
tmp = ((-4.0 * (t * a)) / c) + (b / (z * c));
} else if (z <= 2.45e-48) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b + (9.0 * (x * y))) / (z * c) t_2 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -2.3e+69: tmp = t_2 elif z <= -6e-20: tmp = t_1 elif z <= -1.85e-93: tmp = ((-4.0 * (t * a)) / c) + (b / (z * c)) elif z <= 2.45e-48: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) t_2 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -2.3e+69) tmp = t_2; elseif (z <= -6e-20) tmp = t_1; elseif (z <= -1.85e-93) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) / c) + Float64(b / Float64(z * c))); elseif (z <= 2.45e-48) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b + (9.0 * (x * y))) / (z * c); t_2 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -2.3e+69) tmp = t_2; elseif (z <= -6e-20) tmp = t_1; elseif (z <= -1.85e-93) tmp = ((-4.0 * (t * a)) / c) + (b / (z * c)); elseif (z <= 2.45e-48) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -2.3e+69], t$95$2, If[LessEqual[z, -6e-20], t$95$1, If[LessEqual[z, -1.85e-93], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-48], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
t_2 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-93}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c} + \frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.30000000000000017e69 or 2.4500000000000001e-48 < z Initial program 67.3%
associate-/r*75.9%
Simplified90.3%
Taylor expanded in x around 0 79.9%
if -2.30000000000000017e69 < z < -6.00000000000000057e-20 or -1.85000000000000001e-93 < z < 2.4500000000000001e-48Initial program 93.4%
associate-/r*84.1%
Simplified83.3%
Taylor expanded in z around 0 82.0%
if -6.00000000000000057e-20 < z < -1.85000000000000001e-93Initial program 99.8%
associate-/r*92.9%
Simplified93.0%
Taylor expanded in x around 0 86.2%
Taylor expanded in b around 0 93.0%
associate-*r/93.0%
Simplified93.0%
Final simplification81.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* 9.0 (* x y))) (* z c)))
(t_2 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -2.5e+69)
t_2
(if (<= z -5e-20)
t_1
(if (<= z -3.8e-132)
(/ (- b (* 4.0 (* a (* z t)))) (* z c))
(if (<= z 4.2e-54) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (x * y))) / (z * c);
double t_2 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.5e+69) {
tmp = t_2;
} else if (z <= -5e-20) {
tmp = t_1;
} else if (z <= -3.8e-132) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 4.2e-54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b + (9.0d0 * (x * y))) / (z * c)
t_2 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-2.5d+69)) then
tmp = t_2
else if (z <= (-5d-20)) then
tmp = t_1
else if (z <= (-3.8d-132)) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (z * c)
else if (z <= 4.2d-54) 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 t_1 = (b + (9.0 * (x * y))) / (z * c);
double t_2 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.5e+69) {
tmp = t_2;
} else if (z <= -5e-20) {
tmp = t_1;
} else if (z <= -3.8e-132) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 4.2e-54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b + (9.0 * (x * y))) / (z * c) t_2 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -2.5e+69: tmp = t_2 elif z <= -5e-20: tmp = t_1 elif z <= -3.8e-132: tmp = (b - (4.0 * (a * (z * t)))) / (z * c) elif z <= 4.2e-54: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) t_2 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -2.5e+69) tmp = t_2; elseif (z <= -5e-20) tmp = t_1; elseif (z <= -3.8e-132) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif (z <= 4.2e-54) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b + (9.0 * (x * y))) / (z * c); t_2 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -2.5e+69) tmp = t_2; elseif (z <= -5e-20) tmp = t_1; elseif (z <= -3.8e-132) tmp = (b - (4.0 * (a * (z * t)))) / (z * c); elseif (z <= 4.2e-54) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -2.5e+69], t$95$2, If[LessEqual[z, -5e-20], t$95$1, If[LessEqual[z, -3.8e-132], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-54], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
t_2 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.50000000000000018e69 or 4.2e-54 < z Initial program 67.3%
associate-/r*75.9%
Simplified90.3%
Taylor expanded in x around 0 79.9%
if -2.50000000000000018e69 < z < -4.9999999999999999e-20 or -3.7999999999999997e-132 < z < 4.2e-54Initial program 93.0%
associate-/r*83.9%
Simplified83.1%
Taylor expanded in z around 0 82.6%
if -4.9999999999999999e-20 < z < -3.7999999999999997e-132Initial program 99.7%
associate-*l*99.8%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in x around 0 90.6%
Final simplification82.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= y 1.3e+213) (/ (+ (/ (+ (* x (* 9.0 y)) b) z) (* t (* a -4.0))) c) (* 9.0 (/ x (* c (/ z y))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= 1.3e+213) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = 9.0 * (x / (c * (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if (y <= 1.3d+213) then
tmp = ((((x * (9.0d0 * y)) + b) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = 9.0d0 * (x / (c * (z / y)))
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 tmp;
if (y <= 1.3e+213) {
tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = 9.0 * (x / (c * (z / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= 1.3e+213: tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c else: tmp = 9.0 * (x / (c * (z / y))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= 1.3e+213) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(9.0 * Float64(x / Float64(c * Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= 1.3e+213) tmp = ((((x * (9.0 * y)) + b) / z) + (t * (a * -4.0))) / c; else tmp = 9.0 * (x / (c * (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, 1.3e+213], N[(N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(x / N[(c * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{+213}:\\
\;\;\;\;\frac{\frac{x \cdot \left(9 \cdot y\right) + b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x}{c \cdot \frac{z}{y}}\\
\end{array}
\end{array}
if y < 1.29999999999999999e213Initial program 82.1%
associate-/r*81.8%
Simplified88.0%
fma-udef88.0%
Applied egg-rr88.0%
if 1.29999999999999999e213 < y Initial program 71.0%
associate-/r*66.7%
Simplified72.0%
Taylor expanded in x around inf 61.4%
*-commutative61.4%
times-frac61.9%
Simplified61.9%
clear-num61.9%
frac-times66.5%
*-un-lft-identity66.5%
Applied egg-rr66.5%
Final simplification86.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.25e+70)
(* -4.0 (/ (* t a) c))
(if (<= z 2.5e+110)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (/ a (/ c t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.25e+70) {
tmp = -4.0 * ((t * a) / c);
} else if (z <= 2.5e+110) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if (z <= (-2.25d+70)) then
tmp = (-4.0d0) * ((t * a) / c)
else if (z <= 2.5d+110) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
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 tmp;
if (z <= -2.25e+70) {
tmp = -4.0 * ((t * a) / c);
} else if (z <= 2.5e+110) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.25e+70: tmp = -4.0 * ((t * a) / c) elif z <= 2.5e+110: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (a / (c / t)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.25e+70) tmp = Float64(-4.0 * Float64(Float64(t * a) / c)); elseif (z <= 2.5e+110) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -2.25e+70) tmp = -4.0 * ((t * a) / c); elseif (z <= 2.5e+110) tmp = (b + (9.0 * (x * y))) / (z * c); else tmp = -4.0 * (a / (c / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.25e+70], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+110], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+70}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -2.25e70Initial program 54.0%
associate-/r*68.7%
Simplified86.9%
Taylor expanded in t around inf 70.9%
if -2.25e70 < z < 2.49999999999999989e110Initial program 92.3%
associate-/r*85.8%
Simplified86.1%
Taylor expanded in z around 0 74.2%
if 2.49999999999999989e110 < z Initial program 66.6%
associate-/r*72.8%
Simplified96.8%
Taylor expanded in t around inf 65.4%
associate-/l*65.4%
Simplified65.4%
Final simplification72.4%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -2.7e+77) (/ b (* z c)) (if (<= b 6.7e-43) (* -4.0 (* t (/ a c))) (/ (/ b z) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.7e+77) {
tmp = b / (z * c);
} else if (b <= 6.7e-43) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / z) / c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if (b <= (-2.7d+77)) then
tmp = b / (z * c)
else if (b <= 6.7d-43) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = (b / z) / 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 tmp;
if (b <= -2.7e+77) {
tmp = b / (z * c);
} else if (b <= 6.7e-43) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / z) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -2.7e+77: tmp = b / (z * c) elif b <= 6.7e-43: tmp = -4.0 * (t * (a / c)) else: tmp = (b / z) / c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -2.7e+77) tmp = Float64(b / Float64(z * c)); elseif (b <= 6.7e-43) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(Float64(b / z) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -2.7e+77) tmp = b / (z * c); elseif (b <= 6.7e-43) tmp = -4.0 * (t * (a / c)); else tmp = (b / z) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.7e+77], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.7e-43], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 6.7 \cdot 10^{-43}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -2.6999999999999998e77Initial program 76.8%
associate-/r*70.5%
Simplified81.7%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
if -2.6999999999999998e77 < b < 6.6999999999999998e-43Initial program 81.9%
associate-/r*82.7%
Simplified89.2%
Taylor expanded in t around inf 49.5%
associate-/l*51.8%
associate-/r/49.6%
Simplified49.6%
if 6.6999999999999998e-43 < b Initial program 83.6%
associate-/r*85.3%
Simplified89.4%
Taylor expanded in x around 0 79.9%
Taylor expanded in b around inf 59.7%
Final simplification52.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -6.6e+78) (/ b (* z c)) (if (<= b 4.4e+52) (* -4.0 (/ a (/ c t))) (/ (/ b z) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -6.6e+78) {
tmp = b / (z * c);
} else if (b <= 4.4e+52) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / z) / c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: tmp
if (b <= (-6.6d+78)) then
tmp = b / (z * c)
else if (b <= 4.4d+52) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = (b / z) / 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 tmp;
if (b <= -6.6e+78) {
tmp = b / (z * c);
} else if (b <= 4.4e+52) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / z) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -6.6e+78: tmp = b / (z * c) elif b <= 4.4e+52: tmp = -4.0 * (a / (c / t)) else: tmp = (b / z) / c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -6.6e+78) tmp = Float64(b / Float64(z * c)); elseif (b <= 4.4e+52) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(Float64(b / z) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -6.6e+78) tmp = b / (z * c); elseif (b <= 4.4e+52) tmp = -4.0 * (a / (c / t)); else tmp = (b / z) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -6.6e+78], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e+52], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+78}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+52}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -6.6e78Initial program 76.8%
associate-/r*70.5%
Simplified81.7%
Taylor expanded in b around inf 51.4%
*-commutative51.4%
Simplified51.4%
if -6.6e78 < b < 4.4e52Initial program 83.0%
associate-/r*83.1%
Simplified89.0%
Taylor expanded in t around inf 48.4%
associate-/l*50.4%
Simplified50.4%
if 4.4e52 < b Initial program 81.3%
associate-/r*84.9%
Simplified90.0%
Taylor expanded in x around 0 84.8%
Taylor expanded in b around inf 66.5%
Final simplification54.2%
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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
code = b / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
def code(x, y, z, t, a, b, c): return b / (z * c)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 81.2%
associate-/r*80.6%
Simplified87.6%
Taylor expanded in b around inf 36.1%
*-commutative36.1%
Simplified36.1%
Final simplification36.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - 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 t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2023215
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))