
(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 17 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 (if (<= (+ (+ (* t a) (+ x (* y z))) (* (* z a) b)) INFINITY) (fma (* z a) b (fma a t (fma z y x))) (* z (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((t * a) + (x + (y * z))) + ((z * a) * b)) <= ((double) INFINITY)) {
tmp = fma((z * a), b, fma(a, t, fma(z, y, x)));
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b)) <= Inf) tmp = fma(Float64(z * a), b, fma(a, t, fma(z, y, x))); else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(z * a), $MachinePrecision] * b + N[(a * t + N[(z * y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z \cdot a, b, \mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 98.8%
associate-+l+98.8%
associate-*l*96.9%
Simplified96.9%
associate-+r+96.9%
+-commutative96.9%
associate-*r*98.8%
fma-def98.8%
+-commutative98.8%
*-commutative98.8%
fma-def98.8%
+-commutative98.8%
*-commutative98.8%
fma-def98.8%
Applied egg-rr98.8%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*11.1%
Simplified11.1%
Taylor expanded in z around inf 88.9%
Final simplification98.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* t a) (+ x (* y z))) (* (* z a) b)))) (if (<= t_1 INFINITY) t_1 (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 98.8%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*11.1%
Simplified11.1%
Taylor expanded in z around inf 88.9%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -41000000000.0)
(and (not (<= z -2.05e-60))
(or (<= z -5.4e-95)
(and (not (<= z 1.5e-55))
(or (<= z 9.2e+34) (not (<= z 2.35e+67)))))))
(* z (+ y (* a b)))
(+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -41000000000.0) || (!(z <= -2.05e-60) && ((z <= -5.4e-95) || (!(z <= 1.5e-55) && ((z <= 9.2e+34) || !(z <= 2.35e+67)))))) {
tmp = z * (y + (a * b));
} else {
tmp = x + (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 <= (-41000000000.0d0)) .or. (.not. (z <= (-2.05d-60))) .and. (z <= (-5.4d-95)) .or. (.not. (z <= 1.5d-55)) .and. (z <= 9.2d+34) .or. (.not. (z <= 2.35d+67))) then
tmp = z * (y + (a * b))
else
tmp = x + (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 <= -41000000000.0) || (!(z <= -2.05e-60) && ((z <= -5.4e-95) || (!(z <= 1.5e-55) && ((z <= 9.2e+34) || !(z <= 2.35e+67)))))) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -41000000000.0) or (not (z <= -2.05e-60) and ((z <= -5.4e-95) or (not (z <= 1.5e-55) and ((z <= 9.2e+34) or not (z <= 2.35e+67))))): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -41000000000.0) || (!(z <= -2.05e-60) && ((z <= -5.4e-95) || (!(z <= 1.5e-55) && ((z <= 9.2e+34) || !(z <= 2.35e+67)))))) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -41000000000.0) || (~((z <= -2.05e-60)) && ((z <= -5.4e-95) || (~((z <= 1.5e-55)) && ((z <= 9.2e+34) || ~((z <= 2.35e+67))))))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -41000000000.0], And[N[Not[LessEqual[z, -2.05e-60]], $MachinePrecision], Or[LessEqual[z, -5.4e-95], And[N[Not[LessEqual[z, 1.5e-55]], $MachinePrecision], Or[LessEqual[z, 9.2e+34], N[Not[LessEqual[z, 2.35e+67]], $MachinePrecision]]]]]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -41000000000 \lor \neg \left(z \leq -2.05 \cdot 10^{-60}\right) \land \left(z \leq -5.4 \cdot 10^{-95} \lor \neg \left(z \leq 1.5 \cdot 10^{-55}\right) \land \left(z \leq 9.2 \cdot 10^{+34} \lor \neg \left(z \leq 2.35 \cdot 10^{+67}\right)\right)\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -4.1e10 or -2.05000000000000006e-60 < z < -5.4e-95 or 1.50000000000000008e-55 < z < 9.1999999999999993e34 or 2.35000000000000009e67 < z Initial program 91.1%
associate-+l+91.1%
associate-*l*89.1%
Simplified89.1%
Taylor expanded in z around inf 78.3%
if -4.1e10 < z < -2.05000000000000006e-60 or -5.4e-95 < z < 1.50000000000000008e-55 or 9.1999999999999993e34 < z < 2.35000000000000009e67Initial program 99.9%
associate-+l+99.9%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in z around 0 84.4%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a b))))))
(if (<= z -380000000000.0)
t_1
(if (<= z 1.52e-57)
(+ x (* a (+ t (* z b))))
(if (<= z 5e+42)
(+ (* (* z a) b) (+ (* y z) (* t a)))
(if (<= z 1.15e+112) (+ (* y z) (+ x (* t a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * b)));
double tmp;
if (z <= -380000000000.0) {
tmp = t_1;
} else if (z <= 1.52e-57) {
tmp = x + (a * (t + (z * b)));
} else if (z <= 5e+42) {
tmp = ((z * a) * b) + ((y * z) + (t * a));
} else if (z <= 1.15e+112) {
tmp = (y * z) + (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 = x + (z * (y + (a * b)))
if (z <= (-380000000000.0d0)) then
tmp = t_1
else if (z <= 1.52d-57) then
tmp = x + (a * (t + (z * b)))
else if (z <= 5d+42) then
tmp = ((z * a) * b) + ((y * z) + (t * a))
else if (z <= 1.15d+112) then
tmp = (y * z) + (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 = x + (z * (y + (a * b)));
double tmp;
if (z <= -380000000000.0) {
tmp = t_1;
} else if (z <= 1.52e-57) {
tmp = x + (a * (t + (z * b)));
} else if (z <= 5e+42) {
tmp = ((z * a) * b) + ((y * z) + (t * a));
} else if (z <= 1.15e+112) {
tmp = (y * z) + (x + (t * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * b))) tmp = 0 if z <= -380000000000.0: tmp = t_1 elif z <= 1.52e-57: tmp = x + (a * (t + (z * b))) elif z <= 5e+42: tmp = ((z * a) * b) + ((y * z) + (t * a)) elif z <= 1.15e+112: tmp = (y * z) + (x + (t * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * b)))) tmp = 0.0 if (z <= -380000000000.0) tmp = t_1; elseif (z <= 1.52e-57) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); elseif (z <= 5e+42) tmp = Float64(Float64(Float64(z * a) * b) + Float64(Float64(y * z) + Float64(t * a))); elseif (z <= 1.15e+112) tmp = Float64(Float64(y * z) + 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 = x + (z * (y + (a * b))); tmp = 0.0; if (z <= -380000000000.0) tmp = t_1; elseif (z <= 1.52e-57) tmp = x + (a * (t + (z * b))); elseif (z <= 5e+42) tmp = ((z * a) * b) + ((y * z) + (t * a)); elseif (z <= 1.15e+112) tmp = (y * z) + (x + (t * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -380000000000.0], t$95$1, If[LessEqual[z, 1.52e-57], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+42], N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+112], N[(N[(y * z), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -380000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-57}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+42}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b + \left(y \cdot z + t \cdot a\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+112}:\\
\;\;\;\;y \cdot z + \left(x + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.8e11 or 1.15e112 < z Initial program 88.1%
+-commutative88.1%
+-commutative88.1%
associate-+l+88.1%
associate-+r+88.1%
*-commutative88.1%
associate-*l*91.1%
*-commutative91.1%
distribute-lft-out95.5%
fma-def95.5%
fma-def95.5%
+-commutative95.5%
fma-def95.5%
Simplified95.5%
Taylor expanded in t around 0 92.4%
if -3.8e11 < z < 1.5199999999999999e-57Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
distribute-lft-out99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around 0 91.9%
if 1.5199999999999999e-57 < z < 5.00000000000000007e42Initial program 99.9%
Taylor expanded in x around 0 93.6%
if 5.00000000000000007e42 < z < 1.15e112Initial program 95.2%
associate-+l+95.2%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in b around 0 91.2%
Final simplification92.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.2e+93) (not (<= z 2e+111))) (+ x (* z (+ y (* a b)))) (+ (+ (* a (* z b)) (* t a)) (+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.2e+93) || !(z <= 2e+111)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((a * (z * b)) + (t * a)) + (x + (y * 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) :: tmp
if ((z <= (-9.2d+93)) .or. (.not. (z <= 2d+111))) then
tmp = x + (z * (y + (a * b)))
else
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z))
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 <= -9.2e+93) || !(z <= 2e+111)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.2e+93) or not (z <= 2e+111): tmp = x + (z * (y + (a * b))) else: tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.2e+93) || !(z <= 2e+111)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(Float64(a * Float64(z * b)) + Float64(t * a)) + Float64(x + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.2e+93) || ~((z <= 2e+111))) tmp = x + (z * (y + (a * b))); else tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.2e+93], N[Not[LessEqual[z, 2e+111]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+93} \lor \neg \left(z \leq 2 \cdot 10^{+111}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot b\right) + t \cdot a\right) + \left(x + y \cdot z\right)\\
\end{array}
\end{array}
if z < -9.2000000000000006e93 or 1.99999999999999991e111 < z Initial program 86.1%
+-commutative86.1%
+-commutative86.1%
associate-+l+86.1%
associate-+r+86.1%
*-commutative86.1%
associate-*l*89.6%
*-commutative89.6%
distribute-lft-out94.7%
fma-def94.8%
fma-def94.8%
+-commutative94.8%
fma-def94.8%
Simplified94.8%
Taylor expanded in t around 0 93.7%
if -9.2000000000000006e93 < z < 1.99999999999999991e111Initial program 99.4%
associate-+l+99.4%
associate-*l*99.4%
Simplified99.4%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -9.4e-27)
(and (not (<= a 2.45e-42))
(or (<= a 5400000.0) (not (<= a 1.2e+70)))))
(* a (+ t (* z b)))
(+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -9.4e-27) || (!(a <= 2.45e-42) && ((a <= 5400000.0) || !(a <= 1.2e+70)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * 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) :: tmp
if ((a <= (-9.4d-27)) .or. (.not. (a <= 2.45d-42)) .and. (a <= 5400000.0d0) .or. (.not. (a <= 1.2d+70))) then
tmp = a * (t + (z * b))
else
tmp = x + (y * z)
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 <= -9.4e-27) || (!(a <= 2.45e-42) && ((a <= 5400000.0) || !(a <= 1.2e+70)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -9.4e-27) or (not (a <= 2.45e-42) and ((a <= 5400000.0) or not (a <= 1.2e+70))): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -9.4e-27) || (!(a <= 2.45e-42) && ((a <= 5400000.0) || !(a <= 1.2e+70)))) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -9.4e-27) || (~((a <= 2.45e-42)) && ((a <= 5400000.0) || ~((a <= 1.2e+70))))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -9.4e-27], And[N[Not[LessEqual[a, 2.45e-42]], $MachinePrecision], Or[LessEqual[a, 5400000.0], N[Not[LessEqual[a, 1.2e+70]], $MachinePrecision]]]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.4 \cdot 10^{-27} \lor \neg \left(a \leq 2.45 \cdot 10^{-42}\right) \land \left(a \leq 5400000 \lor \neg \left(a \leq 1.2 \cdot 10^{+70}\right)\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -9.40000000000000065e-27 or 2.45e-42 < a < 5.4e6 or 1.19999999999999993e70 < a Initial program 92.1%
associate-+l+92.1%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around inf 82.7%
if -9.40000000000000065e-27 < a < 2.45e-42 or 5.4e6 < a < 1.19999999999999993e70Initial program 99.1%
associate-+l+99.1%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in a around 0 76.7%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))) (t_2 (* a (+ t (* z b)))))
(if (<= a -1.72e-38)
t_2
(if (<= a 1.4e-61)
t_1
(if (<= a 50000000.0)
(+ (* y z) (* t a))
(if (<= a 6.6e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = a * (t + (z * b));
double tmp;
if (a <= -1.72e-38) {
tmp = t_2;
} else if (a <= 1.4e-61) {
tmp = t_1;
} else if (a <= 50000000.0) {
tmp = (y * z) + (t * a);
} else if (a <= 6.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x + (y * z)
t_2 = a * (t + (z * b))
if (a <= (-1.72d-38)) then
tmp = t_2
else if (a <= 1.4d-61) then
tmp = t_1
else if (a <= 50000000.0d0) then
tmp = (y * z) + (t * a)
else if (a <= 6.6d+69) 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 t_1 = x + (y * z);
double t_2 = a * (t + (z * b));
double tmp;
if (a <= -1.72e-38) {
tmp = t_2;
} else if (a <= 1.4e-61) {
tmp = t_1;
} else if (a <= 50000000.0) {
tmp = (y * z) + (t * a);
} else if (a <= 6.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) t_2 = a * (t + (z * b)) tmp = 0 if a <= -1.72e-38: tmp = t_2 elif a <= 1.4e-61: tmp = t_1 elif a <= 50000000.0: tmp = (y * z) + (t * a) elif a <= 6.6e+69: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) t_2 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (a <= -1.72e-38) tmp = t_2; elseif (a <= 1.4e-61) tmp = t_1; elseif (a <= 50000000.0) tmp = Float64(Float64(y * z) + Float64(t * a)); elseif (a <= 6.6e+69) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); t_2 = a * (t + (z * b)); tmp = 0.0; if (a <= -1.72e-38) tmp = t_2; elseif (a <= 1.4e-61) tmp = t_1; elseif (a <= 50000000.0) tmp = (y * z) + (t * a); elseif (a <= 6.6e+69) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.72e-38], t$95$2, If[LessEqual[a, 1.4e-61], t$95$1, If[LessEqual[a, 50000000.0], N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;a \leq -1.72 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 50000000:\\
\;\;\;\;y \cdot z + t \cdot a\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.72e-38 or 6.5999999999999997e69 < a Initial program 91.5%
associate-+l+91.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 83.2%
if -1.72e-38 < a < 1.4000000000000001e-61 or 5e7 < a < 6.5999999999999997e69Initial program 99.1%
associate-+l+99.1%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in a around 0 77.7%
if 1.4000000000000001e-61 < a < 5e7Initial program 99.9%
associate-+l+99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in b around 0 83.6%
Taylor expanded in x around 0 72.9%
Final simplification80.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.5e+77)
(* t a)
(if (<= t -4.5e-268)
(* y z)
(if (<= t 1.1e-291)
x
(if (<= t 1.7e-106) (* a (* z b)) (if (<= t 2.2e+121) x (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.5e+77) {
tmp = t * a;
} else if (t <= -4.5e-268) {
tmp = y * z;
} else if (t <= 1.1e-291) {
tmp = x;
} else if (t <= 1.7e-106) {
tmp = a * (z * b);
} else if (t <= 2.2e+121) {
tmp = x;
} 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 (t <= (-2.5d+77)) then
tmp = t * a
else if (t <= (-4.5d-268)) then
tmp = y * z
else if (t <= 1.1d-291) then
tmp = x
else if (t <= 1.7d-106) then
tmp = a * (z * b)
else if (t <= 2.2d+121) then
tmp = x
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 (t <= -2.5e+77) {
tmp = t * a;
} else if (t <= -4.5e-268) {
tmp = y * z;
} else if (t <= 1.1e-291) {
tmp = x;
} else if (t <= 1.7e-106) {
tmp = a * (z * b);
} else if (t <= 2.2e+121) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.5e+77: tmp = t * a elif t <= -4.5e-268: tmp = y * z elif t <= 1.1e-291: tmp = x elif t <= 1.7e-106: tmp = a * (z * b) elif t <= 2.2e+121: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.5e+77) tmp = Float64(t * a); elseif (t <= -4.5e-268) tmp = Float64(y * z); elseif (t <= 1.1e-291) tmp = x; elseif (t <= 1.7e-106) tmp = Float64(a * Float64(z * b)); elseif (t <= 2.2e+121) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.5e+77) tmp = t * a; elseif (t <= -4.5e-268) tmp = y * z; elseif (t <= 1.1e-291) tmp = x; elseif (t <= 1.7e-106) tmp = a * (z * b); elseif (t <= 2.2e+121) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.5e+77], N[(t * a), $MachinePrecision], If[LessEqual[t, -4.5e-268], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.1e-291], x, If[LessEqual[t, 1.7e-106], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+121], x, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+77}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-268}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-106}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -2.50000000000000002e77 or 2.20000000000000001e121 < t Initial program 94.1%
associate-+l+94.1%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in t around inf 63.5%
if -2.50000000000000002e77 < t < -4.5000000000000001e-268Initial program 95.9%
associate-+l+95.9%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in y around inf 37.5%
*-commutative37.5%
Simplified37.5%
if -4.5000000000000001e-268 < t < 1.10000000000000001e-291 or 1.69999999999999991e-106 < t < 2.20000000000000001e121Initial program 97.9%
associate-+l+97.9%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in x around inf 44.2%
if 1.10000000000000001e-291 < t < 1.69999999999999991e-106Initial program 93.7%
associate-+l+93.7%
associate-*l*99.9%
Simplified99.9%
associate-+r+99.9%
+-commutative99.9%
associate-*r*93.7%
fma-def93.7%
+-commutative93.7%
*-commutative93.7%
fma-def93.7%
+-commutative93.7%
*-commutative93.7%
fma-def93.7%
Applied egg-rr93.7%
Taylor expanded in b around inf 49.6%
*-commutative49.6%
Simplified49.6%
Final simplification50.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7.5e+129)
(* t a)
(if (<= t -6e-176)
(* (* z a) b)
(if (<= t 7.8e-292)
x
(if (<= t 6.5e-96) (* a (* z b)) (if (<= t 2.8e+120) x (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e+129) {
tmp = t * a;
} else if (t <= -6e-176) {
tmp = (z * a) * b;
} else if (t <= 7.8e-292) {
tmp = x;
} else if (t <= 6.5e-96) {
tmp = a * (z * b);
} else if (t <= 2.8e+120) {
tmp = x;
} 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 (t <= (-7.5d+129)) then
tmp = t * a
else if (t <= (-6d-176)) then
tmp = (z * a) * b
else if (t <= 7.8d-292) then
tmp = x
else if (t <= 6.5d-96) then
tmp = a * (z * b)
else if (t <= 2.8d+120) then
tmp = x
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 (t <= -7.5e+129) {
tmp = t * a;
} else if (t <= -6e-176) {
tmp = (z * a) * b;
} else if (t <= 7.8e-292) {
tmp = x;
} else if (t <= 6.5e-96) {
tmp = a * (z * b);
} else if (t <= 2.8e+120) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e+129: tmp = t * a elif t <= -6e-176: tmp = (z * a) * b elif t <= 7.8e-292: tmp = x elif t <= 6.5e-96: tmp = a * (z * b) elif t <= 2.8e+120: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e+129) tmp = Float64(t * a); elseif (t <= -6e-176) tmp = Float64(Float64(z * a) * b); elseif (t <= 7.8e-292) tmp = x; elseif (t <= 6.5e-96) tmp = Float64(a * Float64(z * b)); elseif (t <= 2.8e+120) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.5e+129) tmp = t * a; elseif (t <= -6e-176) tmp = (z * a) * b; elseif (t <= 7.8e-292) tmp = x; elseif (t <= 6.5e-96) tmp = a * (z * b); elseif (t <= 2.8e+120) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e+129], N[(t * a), $MachinePrecision], If[LessEqual[t, -6e-176], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 7.8e-292], x, If[LessEqual[t, 6.5e-96], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+120], x, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+129}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-176}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-292}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-96}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -7.4999999999999998e129 or 2.8000000000000001e120 < t Initial program 94.6%
associate-+l+94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in t around inf 65.6%
if -7.4999999999999998e129 < t < -6e-176Initial program 95.1%
associate-+l+95.1%
associate-*l*90.7%
Simplified90.7%
associate-+r+90.7%
+-commutative90.7%
associate-*r*95.1%
fma-def95.1%
+-commutative95.1%
*-commutative95.1%
fma-def95.1%
+-commutative95.1%
*-commutative95.1%
fma-def95.1%
Applied egg-rr95.1%
Taylor expanded in b around inf 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in b around 0 38.0%
associate-*r*39.1%
*-commutative39.1%
associate-*r*40.6%
Simplified40.6%
if -6e-176 < t < 7.8e-292 or 6.50000000000000001e-96 < t < 2.8000000000000001e120Initial program 97.1%
associate-+l+97.1%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in x around inf 40.8%
if 7.8e-292 < t < 6.50000000000000001e-96Initial program 93.7%
associate-+l+93.7%
associate-*l*99.9%
Simplified99.9%
associate-+r+99.9%
+-commutative99.9%
associate-*r*93.7%
fma-def93.7%
+-commutative93.7%
*-commutative93.7%
fma-def93.7%
+-commutative93.7%
*-commutative93.7%
fma-def93.7%
Applied egg-rr93.7%
Taylor expanded in b around inf 49.6%
*-commutative49.6%
Simplified49.6%
Final simplification50.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* t a))) (t_2 (+ x (* y z))))
(if (<= z -2700000000000.0)
t_2
(if (<= z -1.35e-59)
t_1
(if (<= z -9.5e-115) t_2 (if (<= z 2.2e+115) t_1 (* (* z a) b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t * a);
double t_2 = x + (y * z);
double tmp;
if (z <= -2700000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-59) {
tmp = t_1;
} else if (z <= -9.5e-115) {
tmp = t_2;
} else if (z <= 2.2e+115) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t * a)
t_2 = x + (y * z)
if (z <= (-2700000000000.0d0)) then
tmp = t_2
else if (z <= (-1.35d-59)) then
tmp = t_1
else if (z <= (-9.5d-115)) then
tmp = t_2
else if (z <= 2.2d+115) then
tmp = t_1
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 t_1 = x + (t * a);
double t_2 = x + (y * z);
double tmp;
if (z <= -2700000000000.0) {
tmp = t_2;
} else if (z <= -1.35e-59) {
tmp = t_1;
} else if (z <= -9.5e-115) {
tmp = t_2;
} else if (z <= 2.2e+115) {
tmp = t_1;
} else {
tmp = (z * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t * a) t_2 = x + (y * z) tmp = 0 if z <= -2700000000000.0: tmp = t_2 elif z <= -1.35e-59: tmp = t_1 elif z <= -9.5e-115: tmp = t_2 elif z <= 2.2e+115: tmp = t_1 else: tmp = (z * a) * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t * a)) t_2 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -2700000000000.0) tmp = t_2; elseif (z <= -1.35e-59) tmp = t_1; elseif (z <= -9.5e-115) tmp = t_2; elseif (z <= 2.2e+115) tmp = t_1; else tmp = Float64(Float64(z * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t * a); t_2 = x + (y * z); tmp = 0.0; if (z <= -2700000000000.0) tmp = t_2; elseif (z <= -1.35e-59) tmp = t_1; elseif (z <= -9.5e-115) tmp = t_2; elseif (z <= 2.2e+115) tmp = t_1; else tmp = (z * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2700000000000.0], t$95$2, If[LessEqual[z, -1.35e-59], t$95$1, If[LessEqual[z, -9.5e-115], t$95$2, If[LessEqual[z, 2.2e+115], t$95$1, N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot a\\
t_2 := x + y \cdot z\\
\mathbf{if}\;z \leq -2700000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+115}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -2.7e12 or -1.3499999999999999e-59 < z < -9.4999999999999996e-115Initial program 92.1%
associate-+l+92.1%
associate-*l*86.1%
Simplified86.1%
Taylor expanded in a around 0 61.6%
if -2.7e12 < z < -1.3499999999999999e-59 or -9.4999999999999996e-115 < z < 2.2e115Initial program 99.3%
associate-+l+99.3%
associate-*l*99.3%
Simplified99.3%
Taylor expanded in z around 0 74.9%
if 2.2e115 < z Initial program 84.1%
associate-+l+84.1%
associate-*l*84.0%
Simplified84.0%
associate-+r+84.0%
+-commutative84.0%
associate-*r*84.1%
fma-def84.1%
+-commutative84.1%
*-commutative84.1%
fma-def84.1%
+-commutative84.1%
*-commutative84.1%
fma-def84.1%
Applied egg-rr84.1%
Taylor expanded in b around inf 50.3%
*-commutative50.3%
Simplified50.3%
Taylor expanded in b around 0 50.3%
associate-*r*52.8%
*-commutative52.8%
associate-*r*55.7%
Simplified55.7%
Final simplification68.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.2e+38) (not (<= a 6.6e+69))) (+ x (* a (+ t (* z b)))) (+ (* y z) (+ x (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.2e+38) || !(a <= 6.6e+69)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (y * z) + (x + (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 <= (-7.2d+38)) .or. (.not. (a <= 6.6d+69))) then
tmp = x + (a * (t + (z * b)))
else
tmp = (y * z) + (x + (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 <= -7.2e+38) || !(a <= 6.6e+69)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (y * z) + (x + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.2e+38) or not (a <= 6.6e+69): tmp = x + (a * (t + (z * b))) else: tmp = (y * z) + (x + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.2e+38) || !(a <= 6.6e+69)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(y * z) + Float64(x + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7.2e+38) || ~((a <= 6.6e+69))) tmp = x + (a * (t + (z * b))); else tmp = (y * z) + (x + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.2e+38], N[Not[LessEqual[a, 6.6e+69]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+38} \lor \neg \left(a \leq 6.6 \cdot 10^{+69}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot z + \left(x + t \cdot a\right)\\
\end{array}
\end{array}
if a < -7.19999999999999938e38 or 6.5999999999999997e69 < a Initial program 90.2%
associate-+l+90.2%
+-commutative90.2%
*-commutative90.2%
associate-*l*93.7%
distribute-lft-out96.4%
fma-def97.3%
+-commutative97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in y around 0 92.4%
if -7.19999999999999938e38 < a < 6.5999999999999997e69Initial program 99.3%
associate-+l+99.3%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in b around 0 86.7%
Final simplification89.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3600000000000.0) (not (<= z 1.8e+57))) (+ x (* z (+ y (* a b)))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3600000000000.0) || !(z <= 1.8e+57)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (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 ((z <= (-3600000000000.0d0)) .or. (.not. (z <= 1.8d+57))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + (a * (t + (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 ((z <= -3600000000000.0) || !(z <= 1.8e+57)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3600000000000.0) or not (z <= 1.8e+57): tmp = x + (z * (y + (a * b))) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3600000000000.0) || !(z <= 1.8e+57)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3600000000000.0) || ~((z <= 1.8e+57))) tmp = x + (z * (y + (a * b))); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3600000000000.0], N[Not[LessEqual[z, 1.8e+57]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000000 \lor \neg \left(z \leq 1.8 \cdot 10^{+57}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -3.6e12 or 1.8000000000000001e57 < z Initial program 88.7%
+-commutative88.7%
+-commutative88.7%
associate-+l+88.7%
associate-+r+88.7%
*-commutative88.7%
associate-*l*92.3%
*-commutative92.3%
distribute-lft-out96.1%
fma-def96.1%
fma-def96.1%
+-commutative96.1%
fma-def96.1%
Simplified96.1%
Taylor expanded in t around 0 90.6%
if -3.6e12 < z < 1.8000000000000001e57Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.3%
distribute-lft-out99.3%
fma-def99.3%
+-commutative99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in y around 0 89.1%
Final simplification89.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.5e+158) (+ x (* y z)) (if (<= y 1.65e+72) (+ x (* a (+ t (* z b)))) (+ (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.5e+158) {
tmp = x + (y * z);
} else if (y <= 1.65e+72) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (y * z) + (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 (y <= (-2.5d+158)) then
tmp = x + (y * z)
else if (y <= 1.65d+72) then
tmp = x + (a * (t + (z * b)))
else
tmp = (y * z) + (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 (y <= -2.5e+158) {
tmp = x + (y * z);
} else if (y <= 1.65e+72) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (y * z) + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.5e+158: tmp = x + (y * z) elif y <= 1.65e+72: tmp = x + (a * (t + (z * b))) else: tmp = (y * z) + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.5e+158) tmp = Float64(x + Float64(y * z)); elseif (y <= 1.65e+72) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(y * z) + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.5e+158) tmp = x + (y * z); elseif (y <= 1.65e+72) tmp = x + (a * (t + (z * b))); else tmp = (y * z) + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.5e+158], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+72], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+158}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+72}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot z + t \cdot a\\
\end{array}
\end{array}
if y < -2.4999999999999998e158Initial program 94.0%
associate-+l+94.0%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in a around 0 82.9%
if -2.4999999999999998e158 < y < 1.65e72Initial program 95.6%
associate-+l+95.6%
+-commutative95.6%
*-commutative95.6%
associate-*l*94.1%
distribute-lft-out95.2%
fma-def95.2%
+-commutative95.2%
fma-def95.2%
Simplified95.2%
Taylor expanded in y around 0 87.1%
if 1.65e72 < y Initial program 95.2%
associate-+l+95.2%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in b around 0 85.9%
Taylor expanded in x around 0 77.0%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2800000000000.0) (* y z) (if (<= z 1.7e+117) (+ x (* t a)) (* (* z a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2800000000000.0) {
tmp = y * z;
} else if (z <= 1.7e+117) {
tmp = x + (t * a);
} 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 (z <= (-2800000000000.0d0)) then
tmp = y * z
else if (z <= 1.7d+117) then
tmp = x + (t * a)
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 (z <= -2800000000000.0) {
tmp = y * z;
} else if (z <= 1.7e+117) {
tmp = x + (t * a);
} else {
tmp = (z * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2800000000000.0: tmp = y * z elif z <= 1.7e+117: tmp = x + (t * a) else: tmp = (z * a) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2800000000000.0) tmp = Float64(y * z); elseif (z <= 1.7e+117) tmp = Float64(x + Float64(t * a)); else tmp = Float64(Float64(z * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2800000000000.0) tmp = y * z; elseif (z <= 1.7e+117) tmp = x + (t * a); else tmp = (z * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2800000000000.0], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.7e+117], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2800000000000:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+117}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -2.8e12Initial program 90.8%
associate-+l+90.8%
associate-*l*83.8%
Simplified83.8%
Taylor expanded in y around inf 49.7%
*-commutative49.7%
Simplified49.7%
if -2.8e12 < z < 1.7e117Initial program 99.3%
associate-+l+99.3%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in z around 0 72.1%
if 1.7e117 < z Initial program 84.1%
associate-+l+84.1%
associate-*l*84.0%
Simplified84.0%
associate-+r+84.0%
+-commutative84.0%
associate-*r*84.1%
fma-def84.1%
+-commutative84.1%
*-commutative84.1%
fma-def84.1%
+-commutative84.1%
*-commutative84.1%
fma-def84.1%
Applied egg-rr84.1%
Taylor expanded in b around inf 50.3%
*-commutative50.3%
Simplified50.3%
Taylor expanded in b around 0 50.3%
associate-*r*52.8%
*-commutative52.8%
associate-*r*55.7%
Simplified55.7%
Final simplification65.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9.5e+120) x (if (<= x 2.8e+119) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.5e+120) {
tmp = x;
} else if (x <= 2.8e+119) {
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 (x <= (-9.5d+120)) then
tmp = x
else if (x <= 2.8d+119) 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 (x <= -9.5e+120) {
tmp = x;
} else if (x <= 2.8e+119) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.5e+120: tmp = x elif x <= 2.8e+119: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.5e+120) tmp = x; elseif (x <= 2.8e+119) 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 (x <= -9.5e+120) tmp = x; elseif (x <= 2.8e+119) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.5e+120], x, If[LessEqual[x, 2.8e+119], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+119}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.5e120 or 2.80000000000000013e119 < x Initial program 97.3%
associate-+l+97.3%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 58.4%
if -9.5e120 < x < 2.80000000000000013e119Initial program 94.5%
associate-+l+94.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in t around inf 40.6%
Final simplification45.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.2e+73) (* y z) (if (<= y 6.2e+62) (* t a) (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.2e+73) {
tmp = y * z;
} else if (y <= 6.2e+62) {
tmp = t * a;
} else {
tmp = y * 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) :: tmp
if (y <= (-2.2d+73)) then
tmp = y * z
else if (y <= 6.2d+62) then
tmp = t * a
else
tmp = y * z
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 <= -2.2e+73) {
tmp = y * z;
} else if (y <= 6.2e+62) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.2e+73: tmp = y * z elif y <= 6.2e+62: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.2e+73) tmp = Float64(y * z); elseif (y <= 6.2e+62) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.2e+73) tmp = y * z; elseif (y <= 6.2e+62) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.2e+73], N[(y * z), $MachinePrecision], If[LessEqual[y, 6.2e+62], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+73}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+62}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -2.2e73 or 6.20000000000000029e62 < y Initial program 95.7%
associate-+l+95.7%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
if -2.2e73 < y < 6.20000000000000029e62Initial program 95.1%
associate-+l+95.1%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in t around inf 41.3%
Final simplification46.6%
(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.3%
associate-+l+95.3%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around inf 22.4%
Final simplification22.4%
(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 2023240
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(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)))