
(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 (+ (+ (* t a) (+ x (* y z))) (* (* z a) b))))
(if (<= t_1 INFINITY)
t_1
(* x (+ (* b (/ (+ (* a (+ z (/ t b))) (* z (/ y b))) x)) 1.0)))))
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 = x * ((b * (((a * (z + (t / b))) + (z * (y / b))) / x)) + 1.0);
}
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 = x * ((b * (((a * (z + (t / b))) + (z * (y / b))) / x)) + 1.0);
}
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 = x * ((b * (((a * (z + (t / b))) + (z * (y / b))) / x)) + 1.0) 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(x * Float64(Float64(b * Float64(Float64(Float64(a * Float64(z + Float64(t / b))) + Float64(z * Float64(y / b))) / x)) + 1.0)); 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 = x * ((b * (((a * (z + (t / b))) + (z * (y / b))) / x)) + 1.0); 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[(x * N[(N[(b * N[(N[(N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + 1.0), $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}:\\
\;\;\;\;x \cdot \left(b \cdot \frac{a \cdot \left(z + \frac{t}{b}\right) + z \cdot \frac{y}{b}}{x} + 1\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.4%
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*9.1%
Simplified9.1%
Taylor expanded in b around inf 36.4%
Taylor expanded in x around inf 36.4%
associate-/l*36.4%
associate-+r+36.4%
associate-*r/36.4%
distribute-lft-in72.7%
*-commutative72.7%
associate-/l*100.0%
Simplified100.0%
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 1e+305) t_1 (* t (+ a (/ (+ x (* z (+ y (* a b)))) t))))))
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 <= 1e+305) {
tmp = t_1;
} else {
tmp = t * (a + ((x + (z * (y + (a * b)))) / t));
}
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 = ((t * a) + (x + (y * z))) + ((z * a) * b)
if (t_1 <= 1d+305) then
tmp = t_1
else
tmp = t * (a + ((x + (z * (y + (a * b)))) / t))
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 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= 1e+305) {
tmp = t_1;
} else {
tmp = t * (a + ((x + (z * (y + (a * b)))) / t));
}
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 <= 1e+305: tmp = t_1 else: tmp = t * (a + ((x + (z * (y + (a * b)))) / t)) 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 <= 1e+305) tmp = t_1; else tmp = Float64(t * Float64(a + Float64(Float64(x + Float64(z * Float64(y + Float64(a * b)))) / t))); 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 <= 1e+305) tmp = t_1; else tmp = t * (a + ((x + (z * (y + (a * b)))) / t)); 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, 1e+305], t$95$1, N[(t * N[(a + N[(N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $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 10^{+305}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a + \frac{x + z \cdot \left(y + a \cdot b\right)}{t}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 9.9999999999999994e304Initial program 99.0%
if 9.9999999999999994e304 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 71.9%
associate-+l+71.9%
associate-*l*78.3%
Simplified78.3%
Taylor expanded in t around -inf 82.6%
associate-*r*82.6%
mul-1-neg82.6%
distribute-lft-out82.6%
associate-*r*82.6%
distribute-rgt-in93.5%
+-commutative93.5%
Simplified93.5%
Final simplification98.0%
(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 (/ t b)) (* 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 + (t / b)) * (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 + (t / b)) * (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 + (t / b)) * (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(Float64(z + Float64(t / b)) * 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 + (t / b)) * (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[(N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision] * N[(a * b), $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}:\\
\;\;\;\;\left(z + \frac{t}{b}\right) \cdot \left(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.4%
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*9.1%
Simplified9.1%
Taylor expanded in b around inf 36.4%
Taylor expanded in a around inf 81.8%
associate-*r*81.8%
Simplified81.8%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -6.8e+236)
(* a (* z b))
(if (or (<= a -1.15e+39) (not (<= a 9.5e-74)))
(+ x (* t a))
(+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.8e+236) {
tmp = a * (z * b);
} else if ((a <= -1.15e+39) || !(a <= 9.5e-74)) {
tmp = x + (t * a);
} 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 <= (-6.8d+236)) then
tmp = a * (z * b)
else if ((a <= (-1.15d+39)) .or. (.not. (a <= 9.5d-74))) then
tmp = x + (t * a)
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 <= -6.8e+236) {
tmp = a * (z * b);
} else if ((a <= -1.15e+39) || !(a <= 9.5e-74)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.8e+236: tmp = a * (z * b) elif (a <= -1.15e+39) or not (a <= 9.5e-74): tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.8e+236) tmp = Float64(a * Float64(z * b)); elseif ((a <= -1.15e+39) || !(a <= 9.5e-74)) tmp = Float64(x + Float64(t * a)); 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 <= -6.8e+236) tmp = a * (z * b); elseif ((a <= -1.15e+39) || ~((a <= 9.5e-74))) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.8e+236], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.15e+39], N[Not[LessEqual[a, 9.5e-74]], $MachinePrecision]], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+236}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{+39} \lor \neg \left(a \leq 9.5 \cdot 10^{-74}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -6.80000000000000014e236Initial program 87.2%
associate-+l+87.2%
+-commutative87.2%
fma-define87.2%
associate-*l*93.2%
*-commutative93.2%
*-commutative93.2%
distribute-rgt-out93.2%
remove-double-neg93.2%
*-commutative93.2%
distribute-lft-neg-out93.2%
sub-neg93.2%
sub-neg93.2%
distribute-lft-neg-out93.2%
*-commutative93.2%
remove-double-neg93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in y around 0 99.9%
Taylor expanded in z around inf 67.4%
if -6.80000000000000014e236 < a < -1.15000000000000006e39 or 9.5000000000000007e-74 < a Initial program 90.8%
associate-+l+90.8%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in z around 0 63.0%
if -1.15000000000000006e39 < a < 9.5000000000000007e-74Initial program 97.7%
associate-+l+97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in b around 0 89.8%
Taylor expanded in a around 0 78.5%
*-commutative78.5%
Simplified78.5%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.35e+62) (+ x (* z (+ y (* a b)))) (+ (+ (* t a) (* a (* z b))) (+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.35e+62) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((t * a) + (a * (z * b))) + (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 <= (-1.35d+62)) then
tmp = x + (z * (y + (a * b)))
else
tmp = ((t * a) + (a * (z * b))) + (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 <= -1.35e+62) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((t * a) + (a * (z * b))) + (x + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.35e+62: tmp = x + (z * (y + (a * b))) else: tmp = ((t * a) + (a * (z * b))) + (x + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.35e+62) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(Float64(t * a) + Float64(a * Float64(z * b))) + Float64(x + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.35e+62) tmp = x + (z * (y + (a * b))); else tmp = ((t * a) + (a * (z * b))) + (x + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.35e+62], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+62}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + a \cdot \left(z \cdot b\right)\right) + \left(x + y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.35e62Initial program 88.8%
associate-+l+88.8%
associate-*l*79.9%
Simplified79.9%
Taylor expanded in t around 0 78.3%
associate-*r*90.7%
distribute-rgt-in94.5%
+-commutative94.5%
Simplified94.5%
if -1.35e62 < z Initial program 95.6%
associate-+l+95.6%
associate-*l*95.1%
Simplified95.1%
Final simplification94.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7e+34) (not (<= a 5.8e-15))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+34) || !(a <= 5.8e-15)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (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 <= (-7d+34)) .or. (.not. (a <= 5.8d-15))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((t * a) + (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 <= -7e+34) || !(a <= 5.8e-15)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e+34) or not (a <= 5.8e-15): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e+34) || !(a <= 5.8e-15)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7e+34) || ~((a <= 5.8e-15))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+34], N[Not[LessEqual[a, 5.8e-15]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+34} \lor \neg \left(a \leq 5.8 \cdot 10^{-15}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if a < -6.99999999999999996e34 or 5.80000000000000037e-15 < a Initial program 89.9%
associate-+l+89.9%
+-commutative89.9%
fma-define89.9%
associate-*l*93.2%
*-commutative93.2%
*-commutative93.2%
distribute-rgt-out97.4%
remove-double-neg97.4%
*-commutative97.4%
distribute-lft-neg-out97.4%
sub-neg97.4%
sub-neg97.4%
distribute-lft-neg-out97.4%
*-commutative97.4%
remove-double-neg97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around 0 96.0%
if -6.99999999999999996e34 < a < 5.80000000000000037e-15Initial program 97.8%
associate-+l+97.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in b around 0 90.9%
Final simplification93.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.3e+33) (not (<= a 1e-73))) (+ x (* a (+ t (* z b)))) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.3e+33) || !(a <= 1e-73)) {
tmp = x + (a * (t + (z * b)));
} 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) :: tmp
if ((a <= (-4.3d+33)) .or. (.not. (a <= 1d-73))) then
tmp = x + (a * (t + (z * b)))
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 tmp;
if ((a <= -4.3e+33) || !(a <= 1e-73)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.3e+33) or not (a <= 1e-73): tmp = x + (a * (t + (z * b))) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.3e+33) || !(a <= 1e-73)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); 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) tmp = 0.0; if ((a <= -4.3e+33) || ~((a <= 1e-73))) tmp = x + (a * (t + (z * b))); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.3e+33], N[Not[LessEqual[a, 1e-73]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.3 \cdot 10^{+33} \lor \neg \left(a \leq 10^{-73}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if a < -4.30000000000000028e33 or 9.99999999999999997e-74 < a Initial program 90.4%
associate-+l+90.4%
+-commutative90.4%
fma-define90.4%
associate-*l*93.5%
*-commutative93.5%
*-commutative93.5%
distribute-rgt-out97.5%
remove-double-neg97.5%
*-commutative97.5%
distribute-lft-neg-out97.5%
sub-neg97.5%
sub-neg97.5%
distribute-lft-neg-out97.5%
*-commutative97.5%
remove-double-neg97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 95.2%
if -4.30000000000000028e33 < a < 9.99999999999999997e-74Initial program 97.7%
associate-+l+97.7%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in t around 0 79.0%
associate-*r*87.1%
distribute-rgt-in88.6%
+-commutative88.6%
Simplified88.6%
Final simplification91.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.4e-34) (not (<= a 2.9e-74))) (+ x (* 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 <= -7.4e-34) || !(a <= 2.9e-74)) {
tmp = x + (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 <= (-7.4d-34)) .or. (.not. (a <= 2.9d-74))) then
tmp = x + (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 <= -7.4e-34) || !(a <= 2.9e-74)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.4e-34) or not (a <= 2.9e-74): tmp = x + (a * (t + (z * b))) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.4e-34) || !(a <= 2.9e-74)) tmp = Float64(x + 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 <= -7.4e-34) || ~((a <= 2.9e-74))) tmp = x + (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, -7.4e-34], N[Not[LessEqual[a, 2.9e-74]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{-34} \lor \neg \left(a \leq 2.9 \cdot 10^{-74}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -7.39999999999999976e-34 or 2.9e-74 < a Initial program 91.6%
associate-+l+91.6%
+-commutative91.6%
fma-define91.6%
associate-*l*94.3%
*-commutative94.3%
*-commutative94.3%
distribute-rgt-out97.8%
remove-double-neg97.8%
*-commutative97.8%
distribute-lft-neg-out97.8%
sub-neg97.8%
sub-neg97.8%
distribute-lft-neg-out97.8%
*-commutative97.8%
remove-double-neg97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 91.8%
if -7.39999999999999976e-34 < a < 2.9e-74Initial program 97.4%
associate-+l+97.4%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in b around 0 92.9%
Taylor expanded in a around 0 83.3%
*-commutative83.3%
Simplified83.3%
Final simplification88.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.45e-10) (not (<= a 2.8e-17))) (* 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 <= -3.45e-10) || !(a <= 2.8e-17)) {
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 <= (-3.45d-10)) .or. (.not. (a <= 2.8d-17))) 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 <= -3.45e-10) || !(a <= 2.8e-17)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.45e-10) or not (a <= 2.8e-17): 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 <= -3.45e-10) || !(a <= 2.8e-17)) 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 <= -3.45e-10) || ~((a <= 2.8e-17))) 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, -3.45e-10], N[Not[LessEqual[a, 2.8e-17]], $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 -3.45 \cdot 10^{-10} \lor \neg \left(a \leq 2.8 \cdot 10^{-17}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -3.44999999999999998e-10 or 2.7999999999999999e-17 < a Initial program 90.7%
associate-+l+90.7%
+-commutative90.7%
fma-define90.7%
associate-*l*93.6%
*-commutative93.6%
*-commutative93.6%
distribute-rgt-out97.6%
remove-double-neg97.6%
*-commutative97.6%
distribute-lft-neg-out97.6%
sub-neg97.6%
sub-neg97.6%
distribute-lft-neg-out97.6%
*-commutative97.6%
remove-double-neg97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in y around 0 93.3%
Taylor expanded in x around 0 81.6%
if -3.44999999999999998e-10 < a < 2.7999999999999999e-17Initial program 97.7%
associate-+l+97.7%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in b around 0 92.5%
Taylor expanded in a around 0 80.9%
*-commutative80.9%
Simplified80.9%
Final simplification81.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.2e-30) (* y z) (if (<= z 3.3e+84) (+ x (* t a)) (* (* z a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.2e-30) {
tmp = y * z;
} else if (z <= 3.3e+84) {
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 <= (-8.2d-30)) then
tmp = y * z
else if (z <= 3.3d+84) 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 <= -8.2e-30) {
tmp = y * z;
} else if (z <= 3.3e+84) {
tmp = x + (t * a);
} else {
tmp = (z * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.2e-30: tmp = y * z elif z <= 3.3e+84: tmp = x + (t * a) else: tmp = (z * a) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.2e-30) tmp = Float64(y * z); elseif (z <= 3.3e+84) 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 <= -8.2e-30) tmp = y * z; elseif (z <= 3.3e+84) tmp = x + (t * a); else tmp = (z * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.2e-30], N[(y * z), $MachinePrecision], If[LessEqual[z, 3.3e+84], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-30}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -8.2000000000000007e-30Initial program 91.3%
associate-+l+91.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in b around inf 74.6%
Taylor expanded in x around inf 73.1%
associate-/l*73.1%
associate-+r+73.1%
associate-*r/73.0%
distribute-lft-in77.4%
*-commutative77.4%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -8.2000000000000007e-30 < z < 3.30000000000000017e84Initial program 97.9%
associate-+l+97.9%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in z around 0 70.8%
if 3.30000000000000017e84 < z Initial program 84.8%
associate-+l+84.8%
+-commutative84.8%
fma-define84.8%
associate-*l*82.1%
*-commutative82.1%
*-commutative82.1%
distribute-rgt-out84.7%
remove-double-neg84.7%
*-commutative84.7%
distribute-lft-neg-out84.7%
sub-neg84.7%
sub-neg84.7%
distribute-lft-neg-out84.7%
*-commutative84.7%
remove-double-neg84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y around 0 68.0%
Taylor expanded in z around inf 46.5%
associate-*r*46.6%
*-commutative46.6%
associate-*r*50.7%
Simplified50.7%
Final simplification62.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5.6e+38) (not (<= a 1.7e-69))) (* t a) (* y z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5.6e+38) || !(a <= 1.7e-69)) {
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 ((a <= (-5.6d+38)) .or. (.not. (a <= 1.7d-69))) 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 ((a <= -5.6e+38) || !(a <= 1.7e-69)) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5.6e+38) or not (a <= 1.7e-69): tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5.6e+38) || !(a <= 1.7e-69)) 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 ((a <= -5.6e+38) || ~((a <= 1.7e-69))) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5.6e+38], N[Not[LessEqual[a, 1.7e-69]], $MachinePrecision]], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+38} \lor \neg \left(a \leq 1.7 \cdot 10^{-69}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if a < -5.6e38 or 1.70000000000000004e-69 < a Initial program 90.3%
associate-+l+90.3%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in z around 0 59.4%
Taylor expanded in x around 0 46.5%
if -5.6e38 < a < 1.70000000000000004e-69Initial program 97.8%
associate-+l+97.8%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in b around inf 88.6%
Taylor expanded in x around inf 80.8%
associate-/l*74.2%
associate-+r+74.2%
associate-*r/71.9%
distribute-lft-in71.9%
*-commutative71.9%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in y around inf 45.8%
*-commutative45.8%
Simplified45.8%
Final simplification46.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6e-8) (* (* z a) b) (if (<= a 4.5e-70) (* y z) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6e-8) {
tmp = (z * a) * b;
} else if (a <= 4.5e-70) {
tmp = y * z;
} 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 <= (-6d-8)) then
tmp = (z * a) * b
else if (a <= 4.5d-70) then
tmp = y * z
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 <= -6e-8) {
tmp = (z * a) * b;
} else if (a <= 4.5e-70) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6e-8: tmp = (z * a) * b elif a <= 4.5e-70: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6e-8) tmp = Float64(Float64(z * a) * b); elseif (a <= 4.5e-70) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6e-8) tmp = (z * a) * b; elseif (a <= 4.5e-70) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6e-8], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 4.5e-70], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-8}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-70}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -5.99999999999999946e-8Initial program 94.2%
associate-+l+94.2%
+-commutative94.2%
fma-define94.2%
associate-*l*96.9%
*-commutative96.9%
*-commutative96.9%
distribute-rgt-out96.9%
remove-double-neg96.9%
*-commutative96.9%
distribute-lft-neg-out96.9%
sub-neg96.9%
sub-neg96.9%
distribute-lft-neg-out96.9%
*-commutative96.9%
remove-double-neg96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in y around 0 91.4%
Taylor expanded in z around inf 46.2%
associate-*r*40.5%
*-commutative40.5%
associate-*r*48.7%
Simplified48.7%
if -5.99999999999999946e-8 < a < 4.50000000000000022e-70Initial program 97.6%
associate-+l+97.6%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in b around inf 87.7%
Taylor expanded in x around inf 80.8%
associate-/l*73.7%
associate-+r+73.7%
associate-*r/71.2%
distribute-lft-in71.2%
*-commutative71.2%
associate-/l*69.7%
Simplified69.7%
Taylor expanded in y around inf 46.2%
*-commutative46.2%
Simplified46.2%
if 4.50000000000000022e-70 < a Initial program 87.9%
associate-+l+87.9%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in z around 0 65.8%
Taylor expanded in x around 0 49.7%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.7e+33) (* a (* z b)) (if (<= a 3.6e-69) (* y z) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.7e+33) {
tmp = a * (z * b);
} else if (a <= 3.6e-69) {
tmp = y * z;
} 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 <= (-3.7d+33)) then
tmp = a * (z * b)
else if (a <= 3.6d-69) then
tmp = y * z
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 <= -3.7e+33) {
tmp = a * (z * b);
} else if (a <= 3.6e-69) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.7e+33: tmp = a * (z * b) elif a <= 3.6e-69: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.7e+33) tmp = Float64(a * Float64(z * b)); elseif (a <= 3.6e-69) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.7e+33) tmp = a * (z * b); elseif (a <= 3.6e-69) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.7e+33], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-69], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+33}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-69}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -3.6999999999999999e33Initial program 93.2%
associate-+l+93.2%
+-commutative93.2%
fma-define93.2%
associate-*l*96.4%
*-commutative96.4%
*-commutative96.4%
distribute-rgt-out96.4%
remove-double-neg96.4%
*-commutative96.4%
distribute-lft-neg-out96.4%
sub-neg96.4%
sub-neg96.4%
distribute-lft-neg-out96.4%
*-commutative96.4%
remove-double-neg96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in y around 0 96.7%
Taylor expanded in z around inf 47.7%
if -3.6999999999999999e33 < a < 3.60000000000000018e-69Initial program 97.7%
associate-+l+97.7%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in b around inf 88.5%
Taylor expanded in x around inf 81.4%
associate-/l*74.7%
associate-+r+74.7%
associate-*r/72.5%
distribute-lft-in72.5%
*-commutative72.5%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in y around inf 46.1%
*-commutative46.1%
Simplified46.1%
if 3.60000000000000018e-69 < a Initial program 87.9%
associate-+l+87.9%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in z around 0 65.8%
Taylor expanded in x around 0 49.7%
Final simplification47.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.5e+95) x (if (<= x 4.3e+120) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.5e+95) {
tmp = x;
} else if (x <= 4.3e+120) {
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 <= (-4.5d+95)) then
tmp = x
else if (x <= 4.3d+120) 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 <= -4.5e+95) {
tmp = x;
} else if (x <= 4.3e+120) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.5e+95: tmp = x elif x <= 4.3e+120: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.5e+95) tmp = x; elseif (x <= 4.3e+120) 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 <= -4.5e+95) tmp = x; elseif (x <= 4.3e+120) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.5e+95], x, If[LessEqual[x, 4.3e+120], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+95}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+120}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.50000000000000017e95 or 4.3000000000000002e120 < x Initial program 93.3%
associate-+l+93.3%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in z around 0 73.6%
Taylor expanded in x around inf 60.6%
if -4.50000000000000017e95 < x < 4.3000000000000002e120Initial program 94.5%
associate-+l+94.5%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in z around 0 43.8%
Taylor expanded in x around 0 34.8%
Final simplification42.2%
(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 94.2%
associate-+l+94.2%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in z around 0 52.5%
Taylor expanded in x around inf 24.9%
(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 2024170
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))