
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z y))))
(if (<= z 7.4e-51)
(+ (+ t_1 (* t a)) (* (* z a) b))
(+ t_1 (* z (* a (+ b (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (z <= 7.4e-51) {
tmp = (t_1 + (t * a)) + ((z * a) * b);
} else {
tmp = t_1 + (z * (a * (b + (t / z))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x + (z * y)
if (z <= 7.4d-51) then
tmp = (t_1 + (t * a)) + ((z * a) * b)
else
tmp = t_1 + (z * (a * (b + (t / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (z <= 7.4e-51) {
tmp = (t_1 + (t * a)) + ((z * a) * b);
} else {
tmp = t_1 + (z * (a * (b + (t / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * y) tmp = 0 if z <= 7.4e-51: tmp = (t_1 + (t * a)) + ((z * a) * b) else: tmp = t_1 + (z * (a * (b + (t / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * y)) tmp = 0.0 if (z <= 7.4e-51) tmp = Float64(Float64(t_1 + Float64(t * a)) + Float64(Float64(z * a) * b)); else tmp = Float64(t_1 + Float64(z * Float64(a * Float64(b + Float64(t / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * y); tmp = 0.0; if (z <= 7.4e-51) tmp = (t_1 + (t * a)) + ((z * a) * b); else tmp = t_1 + (z * (a * (b + (t / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 7.4e-51], N[(N[(t$95$1 + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(z * N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;z \leq 7.4 \cdot 10^{-51}:\\
\;\;\;\;\left(t\_1 + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1 + z \cdot \left(a \cdot \left(b + \frac{t}{z}\right)\right)\\
\end{array}
\end{array}
if z < 7.39999999999999946e-51Initial program 98.3%
if 7.39999999999999946e-51 < z Initial program 87.6%
associate-+l+87.6%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in z around inf 97.0%
associate-/l*97.0%
distribute-lft-out97.0%
Simplified97.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* a b))))
(if (<= y -3.7e-53)
(* z y)
(if (<= y -3.4e-144)
(* t a)
(if (<= y -2.9e-285)
t_1
(if (<= y 1.12e-293)
(* t a)
(if (<= y 3.9e-149)
t_1
(if (<= y 4.5e-32) (* t a) (if (<= y 4e+66) x (* z y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a * b);
double tmp;
if (y <= -3.7e-53) {
tmp = z * y;
} else if (y <= -3.4e-144) {
tmp = t * a;
} else if (y <= -2.9e-285) {
tmp = t_1;
} else if (y <= 1.12e-293) {
tmp = t * a;
} else if (y <= 3.9e-149) {
tmp = t_1;
} else if (y <= 4.5e-32) {
tmp = t * a;
} else if (y <= 4e+66) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = z * (a * b)
if (y <= (-3.7d-53)) then
tmp = z * y
else if (y <= (-3.4d-144)) then
tmp = t * a
else if (y <= (-2.9d-285)) then
tmp = t_1
else if (y <= 1.12d-293) then
tmp = t * a
else if (y <= 3.9d-149) then
tmp = t_1
else if (y <= 4.5d-32) then
tmp = t * a
else if (y <= 4d+66) then
tmp = x
else
tmp = 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 t_1 = z * (a * b);
double tmp;
if (y <= -3.7e-53) {
tmp = z * y;
} else if (y <= -3.4e-144) {
tmp = t * a;
} else if (y <= -2.9e-285) {
tmp = t_1;
} else if (y <= 1.12e-293) {
tmp = t * a;
} else if (y <= 3.9e-149) {
tmp = t_1;
} else if (y <= 4.5e-32) {
tmp = t * a;
} else if (y <= 4e+66) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a * b) tmp = 0 if y <= -3.7e-53: tmp = z * y elif y <= -3.4e-144: tmp = t * a elif y <= -2.9e-285: tmp = t_1 elif y <= 1.12e-293: tmp = t * a elif y <= 3.9e-149: tmp = t_1 elif y <= 4.5e-32: tmp = t * a elif y <= 4e+66: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a * b)) tmp = 0.0 if (y <= -3.7e-53) tmp = Float64(z * y); elseif (y <= -3.4e-144) tmp = Float64(t * a); elseif (y <= -2.9e-285) tmp = t_1; elseif (y <= 1.12e-293) tmp = Float64(t * a); elseif (y <= 3.9e-149) tmp = t_1; elseif (y <= 4.5e-32) tmp = Float64(t * a); elseif (y <= 4e+66) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (a * b); tmp = 0.0; if (y <= -3.7e-53) tmp = z * y; elseif (y <= -3.4e-144) tmp = t * a; elseif (y <= -2.9e-285) tmp = t_1; elseif (y <= 1.12e-293) tmp = t * a; elseif (y <= 3.9e-149) tmp = t_1; elseif (y <= 4.5e-32) tmp = t * a; elseif (y <= 4e+66) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e-53], N[(z * y), $MachinePrecision], If[LessEqual[y, -3.4e-144], N[(t * a), $MachinePrecision], If[LessEqual[y, -2.9e-285], t$95$1, If[LessEqual[y, 1.12e-293], N[(t * a), $MachinePrecision], If[LessEqual[y, 3.9e-149], t$95$1, If[LessEqual[y, 4.5e-32], N[(t * a), $MachinePrecision], If[LessEqual[y, 4e+66], x, N[(z * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-53}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-144}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-285}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-293}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-32}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+66}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -3.69999999999999982e-53 or 3.99999999999999978e66 < y Initial program 94.4%
associate-+l+94.4%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in y around inf 50.3%
*-commutative50.3%
Simplified50.3%
if -3.69999999999999982e-53 < y < -3.40000000000000017e-144 or -2.9e-285 < y < 1.11999999999999996e-293 or 3.9000000000000002e-149 < y < 4.50000000000000005e-32Initial program 94.2%
associate-+l+94.2%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in t around inf 55.9%
if -3.40000000000000017e-144 < y < -2.9e-285 or 1.11999999999999996e-293 < y < 3.9000000000000002e-149Initial program 98.3%
associate-+l+98.3%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in z around inf 52.3%
Taylor expanded in y around 0 52.3%
if 4.50000000000000005e-32 < y < 3.99999999999999978e66Initial program 96.2%
associate-+l+96.2%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around inf 37.8%
Final simplification50.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.25e-124) (not (<= z 8.5e-117))) (+ (+ x (* z y)) (* z (* a (+ b (/ t z))))) (+ x (+ (* z y) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.25e-124) || !(z <= 8.5e-117)) {
tmp = (x + (z * y)) + (z * (a * (b + (t / z))));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1.25d-124)) .or. (.not. (z <= 8.5d-117))) then
tmp = (x + (z * y)) + (z * (a * (b + (t / z))))
else
tmp = x + ((z * y) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.25e-124) || !(z <= 8.5e-117)) {
tmp = (x + (z * y)) + (z * (a * (b + (t / z))));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.25e-124) or not (z <= 8.5e-117): tmp = (x + (z * y)) + (z * (a * (b + (t / z)))) else: tmp = x + ((z * y) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.25e-124) || !(z <= 8.5e-117)) tmp = Float64(Float64(x + Float64(z * y)) + Float64(z * Float64(a * Float64(b + Float64(t / z))))); else tmp = Float64(x + Float64(Float64(z * y) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.25e-124) || ~((z <= 8.5e-117))) tmp = (x + (z * y)) + (z * (a * (b + (t / z)))); else tmp = x + ((z * y) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.25e-124], N[Not[LessEqual[z, 8.5e-117]], $MachinePrecision]], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-124} \lor \neg \left(z \leq 8.5 \cdot 10^{-117}\right):\\
\;\;\;\;\left(x + z \cdot y\right) + z \cdot \left(a \cdot \left(b + \frac{t}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot y + t \cdot a\right)\\
\end{array}
\end{array}
if z < -1.2500000000000001e-124 or 8.49999999999999981e-117 < z Initial program 93.4%
associate-+l+93.4%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in z around inf 94.0%
associate-/l*94.0%
distribute-lft-out94.0%
Simplified94.0%
if -1.2500000000000001e-124 < z < 8.49999999999999981e-117Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in b around 0 97.6%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1.08e+90)
t_1
(if (<= z -1.9e-29)
(* a (+ t (* z b)))
(if (<= z 1.28e-28) (+ x (* t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.08e+90) {
tmp = t_1;
} else if (z <= -1.9e-29) {
tmp = a * (t + (z * b));
} else if (z <= 1.28e-28) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-1.08d+90)) then
tmp = t_1
else if (z <= (-1.9d-29)) then
tmp = a * (t + (z * b))
else if (z <= 1.28d-28) then
tmp = x + (t * a)
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 t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.08e+90) {
tmp = t_1;
} else if (z <= -1.9e-29) {
tmp = a * (t + (z * b));
} else if (z <= 1.28e-28) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1.08e+90: tmp = t_1 elif z <= -1.9e-29: tmp = a * (t + (z * b)) elif z <= 1.28e-28: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1.08e+90) tmp = t_1; elseif (z <= -1.9e-29) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (z <= 1.28e-28) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1.08e+90) tmp = t_1; elseif (z <= -1.9e-29) tmp = a * (t + (z * b)); elseif (z <= 1.28e-28) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e+90], t$95$1, If[LessEqual[z, -1.9e-29], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.28e-28], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-29}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-28}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.08e90 or 1.28e-28 < z Initial program 90.1%
associate-+l+90.1%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in z around inf 80.2%
if -1.08e90 < z < -1.89999999999999988e-29Initial program 96.6%
associate-+l+96.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in a around inf 78.1%
if -1.89999999999999988e-29 < z < 1.28e-28Initial program 99.9%
associate-+l+99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 74.4%
+-commutative74.4%
Simplified74.4%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -85000000000.0) (not (<= y 4.5e+66))) (+ x (+ (* z y) (* t a))) (+ x (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -85000000000.0) || !(y <= 4.5e+66)) {
tmp = x + ((z * y) + (t * a));
} else {
tmp = x + ((t * a) + (a * (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((y <= (-85000000000.0d0)) .or. (.not. (y <= 4.5d+66))) then
tmp = x + ((z * y) + (t * a))
else
tmp = x + ((t * a) + (a * (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -85000000000.0) || !(y <= 4.5e+66)) {
tmp = x + ((z * y) + (t * a));
} else {
tmp = x + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -85000000000.0) or not (y <= 4.5e+66): tmp = x + ((z * y) + (t * a)) else: tmp = x + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -85000000000.0) || !(y <= 4.5e+66)) tmp = Float64(x + Float64(Float64(z * y) + Float64(t * a))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -85000000000.0) || ~((y <= 4.5e+66))) tmp = x + ((z * y) + (t * a)); else tmp = x + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -85000000000.0], N[Not[LessEqual[y, 4.5e+66]], $MachinePrecision]], N[(x + N[(N[(z * y), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -85000000000 \lor \neg \left(y \leq 4.5 \cdot 10^{+66}\right):\\
\;\;\;\;x + \left(z \cdot y + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if y < -8.5e10 or 4.4999999999999998e66 < y Initial program 94.7%
associate-+l+94.7%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in b around 0 91.3%
if -8.5e10 < y < 4.4999999999999998e66Initial program 96.0%
associate-+l+96.0%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around 0 91.3%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z y))))
(if (<= z -2e-17)
(+ t_1 (* z (* a (+ b (/ t z)))))
(+ t_1 (+ (* t a) (* a (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (z <= -2e-17) {
tmp = t_1 + (z * (a * (b + (t / z))));
} else {
tmp = t_1 + ((t * a) + (a * (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x + (z * y)
if (z <= (-2d-17)) then
tmp = t_1 + (z * (a * (b + (t / z))))
else
tmp = t_1 + ((t * a) + (a * (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (z <= -2e-17) {
tmp = t_1 + (z * (a * (b + (t / z))));
} else {
tmp = t_1 + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * y) tmp = 0 if z <= -2e-17: tmp = t_1 + (z * (a * (b + (t / z)))) else: tmp = t_1 + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * y)) tmp = 0.0 if (z <= -2e-17) tmp = Float64(t_1 + Float64(z * Float64(a * Float64(b + Float64(t / z))))); else tmp = Float64(t_1 + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * y); tmp = 0.0; if (z <= -2e-17) tmp = t_1 + (z * (a * (b + (t / z)))); else tmp = t_1 + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-17], N[(t$95$1 + N[(z * N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;z \leq -2 \cdot 10^{-17}:\\
\;\;\;\;t\_1 + z \cdot \left(a \cdot \left(b + \frac{t}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -2.00000000000000014e-17Initial program 95.6%
associate-+l+95.6%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in z around inf 98.5%
associate-/l*98.4%
distribute-lft-out98.4%
Simplified98.4%
if -2.00000000000000014e-17 < z Initial program 95.4%
associate-+l+95.4%
associate-*l*96.9%
Simplified96.9%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.6e+14) (not (<= b 2.65e-79))) (+ x (* z (+ y (* a b)))) (+ x (+ (* z y) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.6e+14) || !(b <= 2.65e-79)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((b <= (-3.6d+14)) .or. (.not. (b <= 2.65d-79))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + ((z * y) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.6e+14) || !(b <= 2.65e-79)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.6e+14) or not (b <= 2.65e-79): tmp = x + (z * (y + (a * b))) else: tmp = x + ((z * y) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.6e+14) || !(b <= 2.65e-79)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(Float64(z * y) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.6e+14) || ~((b <= 2.65e-79))) tmp = x + (z * (y + (a * b))); else tmp = x + ((z * y) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.6e+14], N[Not[LessEqual[b, 2.65e-79]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+14} \lor \neg \left(b \leq 2.65 \cdot 10^{-79}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot y + t \cdot a\right)\\
\end{array}
\end{array}
if b < -3.6e14 or 2.6499999999999999e-79 < b Initial program 97.7%
associate-+l+97.7%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in t around 0 79.0%
+-commutative79.0%
+-commutative79.0%
associate-*r*81.8%
distribute-rgt-in83.3%
Simplified83.3%
if -3.6e14 < b < 2.6499999999999999e-79Initial program 92.9%
associate-+l+92.9%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around 0 95.8%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.8e+109) (not (<= z 9e+169))) (* z (+ y (* a b))) (+ x (+ (* z y) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8e+109) || !(z <= 9e+169)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-5.8d+109)) .or. (.not. (z <= 9d+169))) then
tmp = z * (y + (a * b))
else
tmp = x + ((z * y) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8e+109) || !(z <= 9e+169)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((z * y) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.8e+109) or not (z <= 9e+169): tmp = z * (y + (a * b)) else: tmp = x + ((z * y) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.8e+109) || !(z <= 9e+169)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(Float64(z * y) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.8e+109) || ~((z <= 9e+169))) tmp = z * (y + (a * b)); else tmp = x + ((z * y) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.8e+109], N[Not[LessEqual[z, 9e+169]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+109} \lor \neg \left(z \leq 9 \cdot 10^{+169}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot y + t \cdot a\right)\\
\end{array}
\end{array}
if z < -5.8e109 or 8.9999999999999999e169 < z Initial program 88.6%
associate-+l+88.6%
associate-*l*83.0%
Simplified83.0%
Taylor expanded in z around inf 87.5%
if -5.8e109 < z < 8.9999999999999999e169Initial program 97.9%
associate-+l+97.9%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in b around 0 83.3%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z y) (* t a))))
(if (<= b -1.1e+14)
(+ (* (* z a) b) t_1)
(if (<= b 2.55e-79) (+ x t_1) (+ x (* z (+ y (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * y) + (t * a);
double tmp;
if (b <= -1.1e+14) {
tmp = ((z * a) * b) + t_1;
} else if (b <= 2.55e-79) {
tmp = x + t_1;
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (z * y) + (t * a)
if (b <= (-1.1d+14)) then
tmp = ((z * a) * b) + t_1
else if (b <= 2.55d-79) then
tmp = x + t_1
else
tmp = x + (z * (y + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * y) + (t * a);
double tmp;
if (b <= -1.1e+14) {
tmp = ((z * a) * b) + t_1;
} else if (b <= 2.55e-79) {
tmp = x + t_1;
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * y) + (t * a) tmp = 0 if b <= -1.1e+14: tmp = ((z * a) * b) + t_1 elif b <= 2.55e-79: tmp = x + t_1 else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * y) + Float64(t * a)) tmp = 0.0 if (b <= -1.1e+14) tmp = Float64(Float64(Float64(z * a) * b) + t_1); elseif (b <= 2.55e-79) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * y) + (t * a); tmp = 0.0; if (b <= -1.1e+14) tmp = ((z * a) * b) + t_1; elseif (b <= 2.55e-79) tmp = x + t_1; else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+14], N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 2.55e-79], N[(x + t$95$1), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y + t \cdot a\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+14}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b + t\_1\\
\mathbf{elif}\;b \leq 2.55 \cdot 10^{-79}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if b < -1.1e14Initial program 98.0%
Taylor expanded in x around 0 87.0%
if -1.1e14 < b < 2.55e-79Initial program 92.9%
associate-+l+92.9%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around 0 95.8%
if 2.55e-79 < b Initial program 97.5%
associate-+l+97.5%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in t around 0 81.7%
+-commutative81.7%
+-commutative81.7%
associate-*r*86.2%
distribute-rgt-in87.4%
Simplified87.4%
Final simplification91.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.4e+24) (* t a) (if (<= a -5.8e-214) x (if (<= a 4e-20) (* z y) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.4e+24) {
tmp = t * a;
} else if (a <= -5.8e-214) {
tmp = x;
} else if (a <= 4e-20) {
tmp = z * y;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (a <= (-6.4d+24)) then
tmp = t * a
else if (a <= (-5.8d-214)) then
tmp = x
else if (a <= 4d-20) then
tmp = z * y
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.4e+24) {
tmp = t * a;
} else if (a <= -5.8e-214) {
tmp = x;
} else if (a <= 4e-20) {
tmp = z * y;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.4e+24: tmp = t * a elif a <= -5.8e-214: tmp = x elif a <= 4e-20: tmp = z * y else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.4e+24) tmp = Float64(t * a); elseif (a <= -5.8e-214) tmp = x; elseif (a <= 4e-20) tmp = Float64(z * y); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.4e+24) tmp = t * a; elseif (a <= -5.8e-214) tmp = x; elseif (a <= 4e-20) tmp = z * y; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.4e+24], N[(t * a), $MachinePrecision], If[LessEqual[a, -5.8e-214], x, If[LessEqual[a, 4e-20], N[(z * y), $MachinePrecision], N[(t * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{+24}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-214}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-20}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -6.3999999999999995e24 or 3.99999999999999978e-20 < a Initial program 90.8%
associate-+l+90.8%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in t around inf 42.7%
if -6.3999999999999995e24 < a < -5.7999999999999997e-214Initial program 100.0%
associate-+l+100.0%
associate-*l*96.0%
Simplified96.0%
Taylor expanded in x around inf 46.4%
if -5.7999999999999997e-214 < a < 3.99999999999999978e-20Initial program 100.0%
associate-+l+100.0%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in y around inf 45.7%
*-commutative45.7%
Simplified45.7%
Final simplification44.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5.3e-48) (not (<= a 1.9e-92))) (* a (+ t (* z b))) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5.3e-48) || !(a <= 1.9e-92)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a <= (-5.3d-48)) .or. (.not. (a <= 1.9d-92))) then
tmp = a * (t + (z * b))
else
tmp = x + (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 tmp;
if ((a <= -5.3e-48) || !(a <= 1.9e-92)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5.3e-48) or not (a <= 1.9e-92): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5.3e-48) || !(a <= 1.9e-92)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -5.3e-48) || ~((a <= 1.9e-92))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5.3e-48], N[Not[LessEqual[a, 1.9e-92]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.3 \cdot 10^{-48} \lor \neg \left(a \leq 1.9 \cdot 10^{-92}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -5.3e-48 or 1.9e-92 < a Initial program 92.5%
associate-+l+92.5%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around inf 71.6%
if -5.3e-48 < a < 1.9e-92Initial program 100.0%
associate-+l+100.0%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in a around 0 81.9%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.45e+109) (* z (* a b)) (if (<= z 1.26e-79) (+ x (* t a)) (+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.45e+109) {
tmp = z * (a * b);
} else if (z <= 1.26e-79) {
tmp = x + (t * a);
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-3.45d+109)) then
tmp = z * (a * b)
else if (z <= 1.26d-79) then
tmp = x + (t * a)
else
tmp = x + (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 tmp;
if (z <= -3.45e+109) {
tmp = z * (a * b);
} else if (z <= 1.26e-79) {
tmp = x + (t * a);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.45e+109: tmp = z * (a * b) elif z <= 1.26e-79: tmp = x + (t * a) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.45e+109) tmp = Float64(z * Float64(a * b)); elseif (z <= 1.26e-79) tmp = Float64(x + Float64(t * a)); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.45e+109) tmp = z * (a * b); elseif (z <= 1.26e-79) tmp = x + (t * a); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.45e+109], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.26e-79], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{+109}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-79}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if z < -3.44999999999999995e109Initial program 94.4%
associate-+l+94.4%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in z around inf 87.2%
Taylor expanded in y around 0 57.2%
if -3.44999999999999995e109 < z < 1.25999999999999993e-79Initial program 99.2%
associate-+l+99.2%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 72.4%
+-commutative72.4%
Simplified72.4%
if 1.25999999999999993e-79 < z Initial program 89.3%
associate-+l+89.3%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 62.2%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.2e+24) (* t a) (if (<= a 1.3e+176) (+ x (* z y)) (* z (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.2e+24) {
tmp = t * a;
} else if (a <= 1.3e+176) {
tmp = x + (z * y);
} else {
tmp = z * (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (a <= (-7.2d+24)) then
tmp = t * a
else if (a <= 1.3d+176) then
tmp = x + (z * y)
else
tmp = z * (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.2e+24) {
tmp = t * a;
} else if (a <= 1.3e+176) {
tmp = x + (z * y);
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.2e+24: tmp = t * a elif a <= 1.3e+176: tmp = x + (z * y) else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.2e+24) tmp = Float64(t * a); elseif (a <= 1.3e+176) tmp = Float64(x + Float64(z * y)); else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.2e+24) tmp = t * a; elseif (a <= 1.3e+176) tmp = x + (z * y); else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.2e+24], N[(t * a), $MachinePrecision], If[LessEqual[a, 1.3e+176], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+176}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -7.19999999999999966e24Initial program 92.2%
associate-+l+92.2%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around inf 49.5%
if -7.19999999999999966e24 < a < 1.29999999999999995e176Initial program 98.2%
associate-+l+98.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in a around 0 66.5%
if 1.29999999999999995e176 < a Initial program 83.9%
associate-+l+83.9%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in z around inf 60.0%
Taylor expanded in y around 0 51.9%
Final simplification61.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.8e+24) (not (<= a 0.085))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.8e+24) || !(a <= 0.085)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((a <= (-4.8d+24)) .or. (.not. (a <= 0.085d0))) then
tmp = t * a
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 tmp;
if ((a <= -4.8e+24) || !(a <= 0.085)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.8e+24) or not (a <= 0.085): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.8e+24) || !(a <= 0.085)) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.8e+24) || ~((a <= 0.085))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.8e+24], N[Not[LessEqual[a, 0.085]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+24} \lor \neg \left(a \leq 0.085\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.8000000000000001e24 or 0.0850000000000000061 < a Initial program 90.5%
associate-+l+90.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in t around inf 43.2%
if -4.8000000000000001e24 < a < 0.0850000000000000061Initial program 100.0%
associate-+l+100.0%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in x around inf 35.9%
Final simplification39.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.4%
associate-+l+95.4%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in x around inf 25.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
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 t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))