
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))) (if (<= t_1 5e+298) 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 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 5e+298) {
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 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
if (t_1 <= 5d+298) 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 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 5e+298) {
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 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= 5e+298: 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(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 5e+298) 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 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= 5e+298) 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[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+298], 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(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;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)) < 5.0000000000000003e298Initial program 99.0%
if 5.0000000000000003e298 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 68.8%
associate-+l+68.8%
associate-*l*76.4%
Simplified76.4%
Taylor expanded in t around -inf 82.5%
associate-*r*82.5%
mul-1-neg82.5%
distribute-lft-out82.5%
+-commutative82.5%
+-commutative82.5%
associate-*r*84.4%
distribute-rgt-in98.2%
Simplified98.2%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* 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 = ((x + (y * z)) + (t * a)) + ((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 = ((x + (y * z)) + (t * a)) + ((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 = ((x + (y * z)) + (t * a)) + ((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(x + Float64(y * z)) + Float64(t * a)) + 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 = ((x + (y * z)) + (t * a)) + ((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[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $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(\left(x + y \cdot z\right) + t \cdot a\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.0%
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*15.4%
Simplified15.4%
Taylor expanded in z around inf 84.6%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-166) (not (<= z 1.02e-77))) (+ (+ x (* y z)) (* z (* a (+ b (/ t z))))) (+ x (+ (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-166) || !(z <= 1.02e-77)) {
tmp = (x + (y * z)) + (z * (a * (b + (t / z))));
} else {
tmp = x + ((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 ((z <= (-4.8d-166)) .or. (.not. (z <= 1.02d-77))) then
tmp = (x + (y * z)) + (z * (a * (b + (t / z))))
else
tmp = x + ((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 ((z <= -4.8e-166) || !(z <= 1.02e-77)) {
tmp = (x + (y * z)) + (z * (a * (b + (t / z))));
} else {
tmp = x + ((y * z) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-166) or not (z <= 1.02e-77): tmp = (x + (y * z)) + (z * (a * (b + (t / z)))) else: tmp = x + ((y * z) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e-166) || !(z <= 1.02e-77)) tmp = Float64(Float64(x + Float64(y * z)) + Float64(z * Float64(a * Float64(b + Float64(t / z))))); else tmp = Float64(x + 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 ((z <= -4.8e-166) || ~((z <= 1.02e-77))) tmp = (x + (y * z)) + (z * (a * (b + (t / z)))); else tmp = x + ((y * z) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e-166], N[Not[LessEqual[z, 1.02e-77]], $MachinePrecision]], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-166} \lor \neg \left(z \leq 1.02 \cdot 10^{-77}\right):\\
\;\;\;\;\left(x + y \cdot z\right) + z \cdot \left(a \cdot \left(b + \frac{t}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\
\end{array}
\end{array}
if z < -4.7999999999999997e-166 or 1.02e-77 < z Initial program 90.0%
associate-+l+90.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in z around inf 91.1%
associate-/l*91.6%
distribute-lft-out93.3%
Simplified93.3%
if -4.7999999999999997e-166 < z < 1.02e-77Initial program 99.9%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in b around 0 97.3%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.2e+31)
(+ x (* a (+ t (* z b))))
(if (<= a 5.4e+107)
(+ x (+ (* y z) (* t a)))
(+ x (* (* z a) (+ b (/ t z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.2e+31) {
tmp = x + (a * (t + (z * b)));
} else if (a <= 5.4e+107) {
tmp = x + ((y * z) + (t * a));
} else {
tmp = x + ((z * a) * (b + (t / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.2d+31)) then
tmp = x + (a * (t + (z * b)))
else if (a <= 5.4d+107) then
tmp = x + ((y * z) + (t * a))
else
tmp = x + ((z * a) * (b + (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.2e+31) {
tmp = x + (a * (t + (z * b)));
} else if (a <= 5.4e+107) {
tmp = x + ((y * z) + (t * a));
} else {
tmp = x + ((z * a) * (b + (t / z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.2e+31: tmp = x + (a * (t + (z * b))) elif a <= 5.4e+107: tmp = x + ((y * z) + (t * a)) else: tmp = x + ((z * a) * (b + (t / z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.2e+31) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); elseif (a <= 5.4e+107) tmp = Float64(x + Float64(Float64(y * z) + Float64(t * a))); else tmp = Float64(x + Float64(Float64(z * a) * Float64(b + Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.2e+31) tmp = x + (a * (t + (z * b))); elseif (a <= 5.4e+107) tmp = x + ((y * z) + (t * a)); else tmp = x + ((z * a) * (b + (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.2e+31], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e+107], N[(x + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * a), $MachinePrecision] * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+31}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{+107}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot a\right) \cdot \left(b + \frac{t}{z}\right)\\
\end{array}
\end{array}
if a < -1.19999999999999991e31Initial program 87.7%
associate-+l+87.7%
+-commutative87.7%
fma-define87.7%
associate-*l*92.0%
*-commutative92.0%
*-commutative92.0%
distribute-rgt-out93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in y around 0 98.3%
if -1.19999999999999991e31 < a < 5.4000000000000003e107Initial program 97.4%
associate-+l+97.4%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in b around 0 91.7%
if 5.4000000000000003e107 < a Initial program 82.8%
associate-+l+82.8%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around inf 69.3%
associate-/l*74.9%
distribute-lft-out86.4%
Simplified86.4%
Taylor expanded in y around 0 97.2%
*-commutative97.2%
*-commutative97.2%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z 5e-20)
(+ t_1 (+ (* a (* z b)) (* t a)))
(+ t_1 (* z (* a (+ b (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= 5e-20) {
tmp = t_1 + ((a * (z * b)) + (t * a));
} else {
tmp = t_1 + (z * (a * (b + (t / z))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if (z <= 5d-20) then
tmp = t_1 + ((a * (z * b)) + (t * a))
else
tmp = t_1 + (z * (a * (b + (t / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= 5e-20) {
tmp = t_1 + ((a * (z * b)) + (t * a));
} else {
tmp = t_1 + (z * (a * (b + (t / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= 5e-20: tmp = t_1 + ((a * (z * b)) + (t * a)) else: tmp = t_1 + (z * (a * (b + (t / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= 5e-20) tmp = Float64(t_1 + Float64(Float64(a * Float64(z * b)) + Float64(t * a))); else tmp = Float64(t_1 + Float64(z * Float64(a * Float64(b + Float64(t / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= 5e-20) tmp = t_1 + ((a * (z * b)) + (t * a)); else tmp = t_1 + (z * (a * (b + (t / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 5e-20], N[(t$95$1 + N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(z * N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq 5 \cdot 10^{-20}:\\
\;\;\;\;t\_1 + \left(a \cdot \left(z \cdot b\right) + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + z \cdot \left(a \cdot \left(b + \frac{t}{z}\right)\right)\\
\end{array}
\end{array}
if z < 4.9999999999999999e-20Initial program 95.5%
associate-+l+95.5%
associate-*l*95.9%
Simplified95.9%
if 4.9999999999999999e-20 < z Initial program 84.2%
associate-+l+84.2%
associate-*l*82.8%
Simplified82.8%
Taylor expanded in z around inf 89.4%
associate-/l*92.9%
distribute-lft-out94.7%
Simplified94.7%
Final simplification95.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -9.6e+30) (not (<= a 6.6e+126))) (+ x (* a (+ t (* z b)))) (+ x (+ (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -9.6e+30) || !(a <= 6.6e+126)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((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 ((a <= (-9.6d+30)) .or. (.not. (a <= 6.6d+126))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((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 ((a <= -9.6e+30) || !(a <= 6.6e+126)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((y * z) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -9.6e+30) or not (a <= 6.6e+126): tmp = x + (a * (t + (z * b))) else: tmp = x + ((y * z) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -9.6e+30) || !(a <= 6.6e+126)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + 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 ((a <= -9.6e+30) || ~((a <= 6.6e+126))) tmp = x + (a * (t + (z * b))); else tmp = x + ((y * z) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -9.6e+30], N[Not[LessEqual[a, 6.6e+126]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{+30} \lor \neg \left(a \leq 6.6 \cdot 10^{+126}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot z + t \cdot a\right)\\
\end{array}
\end{array}
if a < -9.5999999999999997e30 or 6.60000000000000026e126 < a Initial program 85.7%
associate-+l+85.7%
+-commutative85.7%
fma-define85.7%
associate-*l*90.6%
*-commutative90.6%
*-commutative90.6%
distribute-rgt-out94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in y around 0 98.8%
if -9.5999999999999997e30 < a < 6.60000000000000026e126Initial program 97.4%
associate-+l+97.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in b around 0 91.8%
Final simplification94.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.2e-25) (not (<= a 3.1e-102))) (+ 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.2e-25) || !(a <= 3.1e-102)) {
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.2d-25)) .or. (.not. (a <= 3.1d-102))) 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.2e-25) || !(a <= 3.1e-102)) {
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.2e-25) or not (a <= 3.1e-102): 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.2e-25) || !(a <= 3.1e-102)) 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.2e-25) || ~((a <= 3.1e-102))) 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.2e-25], N[Not[LessEqual[a, 3.1e-102]], $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.2 \cdot 10^{-25} \lor \neg \left(a \leq 3.1 \cdot 10^{-102}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -7.1999999999999998e-25 or 3.10000000000000013e-102 < a Initial program 89.2%
associate-+l+89.2%
+-commutative89.2%
fma-define89.2%
associate-*l*93.8%
*-commutative93.8%
*-commutative93.8%
distribute-rgt-out96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 91.7%
if -7.1999999999999998e-25 < a < 3.10000000000000013e-102Initial program 98.1%
associate-+l+98.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in a around 0 85.0%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -9.6e+30) (not (<= a 1.25e-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 <= -9.6e+30) || !(a <= 1.25e-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 <= (-9.6d+30)) .or. (.not. (a <= 1.25d-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 <= -9.6e+30) || !(a <= 1.25e-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 <= -9.6e+30) or not (a <= 1.25e-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 <= -9.6e+30) || !(a <= 1.25e-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 <= -9.6e+30) || ~((a <= 1.25e-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, -9.6e+30], N[Not[LessEqual[a, 1.25e-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 -9.6 \cdot 10^{+30} \lor \neg \left(a \leq 1.25 \cdot 10^{-17}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -9.5999999999999997e30 or 1.25e-17 < a Initial program 87.7%
associate-+l+87.7%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in a around inf 83.5%
if -9.5999999999999997e30 < a < 1.25e-17Initial program 97.7%
associate-+l+97.8%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 80.1%
Final simplification81.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.1e-49) (not (<= t 5.5e-13))) (+ x (* t a)) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.1e-49) || !(t <= 5.5e-13)) {
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 ((t <= (-1.1d-49)) .or. (.not. (t <= 5.5d-13))) 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 ((t <= -1.1e-49) || !(t <= 5.5e-13)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.1e-49) or not (t <= 5.5e-13): tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.1e-49) || !(t <= 5.5e-13)) 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 ((t <= -1.1e-49) || ~((t <= 5.5e-13))) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.1e-49], N[Not[LessEqual[t, 5.5e-13]], $MachinePrecision]], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-49} \lor \neg \left(t \leq 5.5 \cdot 10^{-13}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if t < -1.09999999999999995e-49 or 5.49999999999999979e-13 < t Initial program 91.3%
associate-+l+91.3%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in z around 0 73.8%
+-commutative73.8%
Simplified73.8%
if -1.09999999999999995e-49 < t < 5.49999999999999979e-13Initial program 95.4%
associate-+l+95.4%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in a around 0 66.6%
Final simplification70.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.95e+37) (* z (* a b)) (if (<= a 3.35e+74) (+ x (* y z)) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.95e+37) {
tmp = z * (a * b);
} else if (a <= 3.35e+74) {
tmp = x + (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 <= (-1.95d+37)) then
tmp = z * (a * b)
else if (a <= 3.35d+74) then
tmp = x + (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 <= -1.95e+37) {
tmp = z * (a * b);
} else if (a <= 3.35e+74) {
tmp = x + (y * z);
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.95e+37: tmp = z * (a * b) elif a <= 3.35e+74: tmp = x + (y * z) else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.95e+37) tmp = Float64(z * Float64(a * b)); elseif (a <= 3.35e+74) tmp = Float64(x + 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 <= -1.95e+37) tmp = z * (a * b); elseif (a <= 3.35e+74) tmp = x + (y * z); else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.95e+37], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.35e+74], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+37}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 3.35 \cdot 10^{+74}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -1.9499999999999999e37Initial program 86.7%
associate-+l+86.7%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in z around inf 60.2%
Taylor expanded in y around 0 58.4%
if -1.9499999999999999e37 < a < 3.35e74Initial program 98.0%
associate-+l+98.0%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around 0 75.8%
if 3.35e74 < a Initial program 83.3%
associate-+l+83.3%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in t around inf 52.1%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.2e-23) (not (<= a 6.5e-36))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.2e-23) || !(a <= 6.5e-36)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.2d-23)) .or. (.not. (a <= 6.5d-36))) then
tmp = t * a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.2e-23) || !(a <= 6.5e-36)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.2e-23) or not (a <= 6.5e-36): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.2e-23) || !(a <= 6.5e-36)) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.2e-23) || ~((a <= 6.5e-36))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.2e-23], N[Not[LessEqual[a, 6.5e-36]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-23} \lor \neg \left(a \leq 6.5 \cdot 10^{-36}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.1999999999999999e-23 or 6.50000000000000012e-36 < a Initial program 88.2%
associate-+l+88.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in t around inf 42.7%
if -2.1999999999999999e-23 < a < 6.50000000000000012e-36Initial program 98.3%
associate-+l+98.3%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in x around inf 51.2%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.26e+18) (* z (* a b)) (if (<= a 6.5e-36) x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.26e+18) {
tmp = z * (a * b);
} else if (a <= 6.5e-36) {
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 (a <= (-2.26d+18)) then
tmp = z * (a * b)
else if (a <= 6.5d-36) 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 (a <= -2.26e+18) {
tmp = z * (a * b);
} else if (a <= 6.5e-36) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.26e+18: tmp = z * (a * b) elif a <= 6.5e-36: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.26e+18) tmp = Float64(z * Float64(a * b)); elseif (a <= 6.5e-36) 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 (a <= -2.26e+18) tmp = z * (a * b); elseif (a <= 6.5e-36) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.26e+18], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-36], x, N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.26 \cdot 10^{+18}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -2.26e18Initial program 86.7%
associate-+l+86.7%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around inf 60.1%
Taylor expanded in y around 0 55.5%
if -2.26e18 < a < 6.50000000000000012e-36Initial program 98.4%
associate-+l+98.4%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in x around inf 49.7%
if 6.50000000000000012e-36 < a Initial program 88.3%
associate-+l+88.3%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in t around inf 47.1%
Final simplification50.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.85e+17) (* a (* z b)) (if (<= a 3e-36) x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.85e+17) {
tmp = a * (z * b);
} else if (a <= 3e-36) {
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 (a <= (-1.85d+17)) then
tmp = a * (z * b)
else if (a <= 3d-36) 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 (a <= -1.85e+17) {
tmp = a * (z * b);
} else if (a <= 3e-36) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.85e+17: tmp = a * (z * b) elif a <= 3e-36: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.85e+17) tmp = Float64(a * Float64(z * b)); elseif (a <= 3e-36) 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 (a <= -1.85e+17) tmp = a * (z * b); elseif (a <= 3e-36) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.85e+17], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-36], x, N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -1.85e17Initial program 86.7%
associate-+l+86.7%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around inf 60.1%
Taylor expanded in y around inf 51.6%
Taylor expanded in y around 0 54.1%
*-commutative54.1%
Simplified54.1%
if -1.85e17 < a < 3.0000000000000002e-36Initial program 98.4%
associate-+l+98.4%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in x around inf 49.7%
if 3.0000000000000002e-36 < a Initial program 88.3%
associate-+l+88.3%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in t around inf 47.1%
Final simplification50.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 93.0%
associate-+l+93.0%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in x around inf 31.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 2024116
(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)))