
(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 12 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 INFINITY) t_1 (+ (* y z) (* t a)))))
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 = (y * z) + (t * a);
}
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 = (y * z) + (t * a);
}
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 = (y * z) + (t * a) 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(Float64(y * z) + Float64(t * a)); 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 = (y * z) + (t * a); 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[(N[(y * z), $MachinePrecision] + N[(t * a), $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}:\\
\;\;\;\;y \cdot z + t \cdot a\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 99.6%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
Taylor expanded in x around 0 0.0%
Taylor expanded in b around 0 75.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -8.2e+173)
(* t a)
(if (<= t -1.95e-29)
t_1
(if (<= t -7.2e-134)
x
(if (<= t 5.5e-299) t_1 (if (<= t 9.5e-39) x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -8.2e+173) {
tmp = t * a;
} else if (t <= -1.95e-29) {
tmp = t_1;
} else if (t <= -7.2e-134) {
tmp = x;
} else if (t <= 5.5e-299) {
tmp = t_1;
} else if (t <= 9.5e-39) {
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) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (t <= (-8.2d+173)) then
tmp = t * a
else if (t <= (-1.95d-29)) then
tmp = t_1
else if (t <= (-7.2d-134)) then
tmp = x
else if (t <= 5.5d-299) then
tmp = t_1
else if (t <= 9.5d-39) 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 t_1 = a * (z * b);
double tmp;
if (t <= -8.2e+173) {
tmp = t * a;
} else if (t <= -1.95e-29) {
tmp = t_1;
} else if (t <= -7.2e-134) {
tmp = x;
} else if (t <= 5.5e-299) {
tmp = t_1;
} else if (t <= 9.5e-39) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if t <= -8.2e+173: tmp = t * a elif t <= -1.95e-29: tmp = t_1 elif t <= -7.2e-134: tmp = x elif t <= 5.5e-299: tmp = t_1 elif t <= 9.5e-39: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (t <= -8.2e+173) tmp = Float64(t * a); elseif (t <= -1.95e-29) tmp = t_1; elseif (t <= -7.2e-134) tmp = x; elseif (t <= 5.5e-299) tmp = t_1; elseif (t <= 9.5e-39) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (t <= -8.2e+173) tmp = t * a; elseif (t <= -1.95e-29) tmp = t_1; elseif (t <= -7.2e-134) tmp = x; elseif (t <= 5.5e-299) tmp = t_1; elseif (t <= 9.5e-39) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e+173], N[(t * a), $MachinePrecision], If[LessEqual[t, -1.95e-29], t$95$1, If[LessEqual[t, -7.2e-134], x, If[LessEqual[t, 5.5e-299], t$95$1, If[LessEqual[t, 9.5e-39], x, N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{+173}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-134}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -8.19999999999999951e173 or 9.4999999999999999e-39 < t Initial program 90.4%
Taylor expanded in x around 0 75.3%
Taylor expanded in a around inf 69.4%
Taylor expanded in t around inf 60.8%
if -8.19999999999999951e173 < t < -1.9499999999999999e-29 or -7.1999999999999998e-134 < t < 5.5e-299Initial program 93.6%
Taylor expanded in x around 0 80.3%
Taylor expanded in a around inf 64.6%
Taylor expanded in t around 0 45.9%
if -1.9499999999999999e-29 < t < -7.1999999999999998e-134 or 5.5e-299 < t < 9.4999999999999999e-39Initial program 97.4%
associate-+l+97.4%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in x around inf 47.3%
Final simplification53.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* t a))) (t_2 (* z (+ y (* a b)))))
(if (<= z -7800.0)
t_2
(if (<= z 2.4e-143)
t_1
(if (<= z 2.8e-94) (* a (+ t (* z b))) (if (<= z 3e+57) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t * a);
double t_2 = z * (y + (a * b));
double tmp;
if (z <= -7800.0) {
tmp = t_2;
} else if (z <= 2.4e-143) {
tmp = t_1;
} else if (z <= 2.8e-94) {
tmp = a * (t + (z * b));
} else if (z <= 3e+57) {
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 + (t * a)
t_2 = z * (y + (a * b))
if (z <= (-7800.0d0)) then
tmp = t_2
else if (z <= 2.4d-143) then
tmp = t_1
else if (z <= 2.8d-94) then
tmp = a * (t + (z * b))
else if (z <= 3d+57) 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 + (t * a);
double t_2 = z * (y + (a * b));
double tmp;
if (z <= -7800.0) {
tmp = t_2;
} else if (z <= 2.4e-143) {
tmp = t_1;
} else if (z <= 2.8e-94) {
tmp = a * (t + (z * b));
} else if (z <= 3e+57) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t * a) t_2 = z * (y + (a * b)) tmp = 0 if z <= -7800.0: tmp = t_2 elif z <= 2.4e-143: tmp = t_1 elif z <= 2.8e-94: tmp = a * (t + (z * b)) elif z <= 3e+57: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t * a)) t_2 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -7800.0) tmp = t_2; elseif (z <= 2.4e-143) tmp = t_1; elseif (z <= 2.8e-94) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (z <= 3e+57) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t * a); t_2 = z * (y + (a * b)); tmp = 0.0; if (z <= -7800.0) tmp = t_2; elseif (z <= 2.4e-143) tmp = t_1; elseif (z <= 2.8e-94) tmp = a * (t + (z * b)); elseif (z <= 3e+57) 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[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7800.0], t$95$2, If[LessEqual[z, 2.4e-143], t$95$1, If[LessEqual[z, 2.8e-94], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+57], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot a\\
t_2 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -7800:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-94}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7800 or 3e57 < z Initial program 88.2%
associate-+l+88.2%
associate-*l*80.8%
Simplified80.8%
Taylor expanded in z around inf 80.1%
if -7800 < z < 2.3999999999999999e-143 or 2.7999999999999998e-94 < z < 3e57Initial program 97.2%
associate-+l+97.2%
associate-*l*98.6%
Simplified98.6%
Taylor expanded in z around 0 83.3%
+-commutative83.3%
Simplified83.3%
if 2.3999999999999999e-143 < z < 2.7999999999999998e-94Initial program 89.8%
Taylor expanded in x around 0 88.7%
Taylor expanded in a around inf 88.8%
Final simplification82.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.65e+34)
(* t a)
(if (<= a 5.8e-24)
(+ x (* y z))
(if (or (<= a 1.76e+222) (not (<= a 1.45e+237))) (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.65e+34) {
tmp = t * a;
} else if (a <= 5.8e-24) {
tmp = x + (y * z);
} else if ((a <= 1.76e+222) || !(a <= 1.45e+237)) {
tmp = t * a;
} else {
tmp = a * (z * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.65d+34)) then
tmp = t * a
else if (a <= 5.8d-24) then
tmp = x + (y * z)
else if ((a <= 1.76d+222) .or. (.not. (a <= 1.45d+237))) then
tmp = t * a
else
tmp = a * (z * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.65e+34) {
tmp = t * a;
} else if (a <= 5.8e-24) {
tmp = x + (y * z);
} else if ((a <= 1.76e+222) || !(a <= 1.45e+237)) {
tmp = t * a;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.65e+34: tmp = t * a elif a <= 5.8e-24: tmp = x + (y * z) elif (a <= 1.76e+222) or not (a <= 1.45e+237): tmp = t * a else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.65e+34) tmp = Float64(t * a); elseif (a <= 5.8e-24) tmp = Float64(x + Float64(y * z)); elseif ((a <= 1.76e+222) || !(a <= 1.45e+237)) tmp = Float64(t * a); else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.65e+34) tmp = t * a; elseif (a <= 5.8e-24) tmp = x + (y * z); elseif ((a <= 1.76e+222) || ~((a <= 1.45e+237))) tmp = t * a; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.65e+34], N[(t * a), $MachinePrecision], If[LessEqual[a, 5.8e-24], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1.76e+222], N[Not[LessEqual[a, 1.45e+237]], $MachinePrecision]], N[(t * a), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+34}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-24}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;a \leq 1.76 \cdot 10^{+222} \lor \neg \left(a \leq 1.45 \cdot 10^{+237}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if a < -1.64999999999999994e34 or 5.7999999999999997e-24 < a < 1.76e222 or 1.45000000000000005e237 < a Initial program 88.4%
Taylor expanded in x around 0 78.4%
Taylor expanded in a around inf 81.7%
Taylor expanded in t around inf 55.2%
if -1.64999999999999994e34 < a < 5.7999999999999997e-24Initial program 98.5%
associate-+l+98.5%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in a around 0 66.5%
if 1.76e222 < a < 1.45000000000000005e237Initial program 83.1%
Taylor expanded in x around 0 81.2%
Taylor expanded in a around inf 97.8%
Taylor expanded in t around 0 97.8%
Final simplification61.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e+146) (not (<= z 5.1e+74))) (+ x (* z (+ y (* a b)))) (+ (+ x (* y z)) (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e+146) || !(z <= 5.1e+74)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.1d+146)) .or. (.not. (z <= 5.1d+74))) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e+146) || !(z <= 5.1e+74)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.1e+146) or not (z <= 5.1e+74): tmp = x + (z * (y + (a * b))) else: tmp = (x + (y * z)) + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.1e+146) || !(z <= 5.1e+74)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.1e+146) || ~((z <= 5.1e+74))) tmp = x + (z * (y + (a * b))); else tmp = (x + (y * z)) + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e+146], N[Not[LessEqual[z, 5.1e+74]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+146} \lor \neg \left(z \leq 5.1 \cdot 10^{+74}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -2.1000000000000001e146 or 5.1000000000000004e74 < z Initial program 86.8%
associate-+l+86.8%
associate-*l*76.8%
Simplified76.8%
Taylor expanded in t around 0 75.5%
+-commutative75.5%
+-commutative75.5%
associate-*r*89.4%
distribute-rgt-in94.7%
Simplified94.7%
if -2.1000000000000001e146 < z < 5.1000000000000004e74Initial program 96.1%
associate-+l+96.1%
associate-*l*97.2%
Simplified97.2%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -5.3e+57)
(* t a)
(if (<= t -3.5e+15)
(* y z)
(if (or (<= t -1.7e-25) (not (<= t 9.5e-39))) (* t a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.3e+57) {
tmp = t * a;
} else if (t <= -3.5e+15) {
tmp = y * z;
} else if ((t <= -1.7e-25) || !(t <= 9.5e-39)) {
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 (t <= (-5.3d+57)) then
tmp = t * a
else if (t <= (-3.5d+15)) then
tmp = y * z
else if ((t <= (-1.7d-25)) .or. (.not. (t <= 9.5d-39))) 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 (t <= -5.3e+57) {
tmp = t * a;
} else if (t <= -3.5e+15) {
tmp = y * z;
} else if ((t <= -1.7e-25) || !(t <= 9.5e-39)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.3e+57: tmp = t * a elif t <= -3.5e+15: tmp = y * z elif (t <= -1.7e-25) or not (t <= 9.5e-39): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.3e+57) tmp = Float64(t * a); elseif (t <= -3.5e+15) tmp = Float64(y * z); elseif ((t <= -1.7e-25) || !(t <= 9.5e-39)) 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 (t <= -5.3e+57) tmp = t * a; elseif (t <= -3.5e+15) tmp = y * z; elseif ((t <= -1.7e-25) || ~((t <= 9.5e-39))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.3e+57], N[(t * a), $MachinePrecision], If[LessEqual[t, -3.5e+15], N[(y * z), $MachinePrecision], If[Or[LessEqual[t, -1.7e-25], N[Not[LessEqual[t, 9.5e-39]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{+57}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{+15}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-25} \lor \neg \left(t \leq 9.5 \cdot 10^{-39}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.29999999999999986e57 or -3.5e15 < t < -1.70000000000000001e-25 or 9.4999999999999999e-39 < t Initial program 89.7%
Taylor expanded in x around 0 75.6%
Taylor expanded in a around inf 69.4%
Taylor expanded in t around inf 56.5%
if -5.29999999999999986e57 < t < -3.5e15Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
Simplified68.2%
if -1.70000000000000001e-25 < t < 9.4999999999999999e-39Initial program 97.2%
associate-+l+97.2%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 38.8%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))))
(if (<= a -3.85e+93)
t_1
(if (<= a -6e-164) (+ x (* t a)) (if (<= a 5.6e-67) (+ x (* y z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -3.85e+93) {
tmp = t_1;
} else if (a <= -6e-164) {
tmp = x + (t * a);
} else if (a <= 5.6e-67) {
tmp = x + (y * z);
} 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 = a * (t + (z * b))
if (a <= (-3.85d+93)) then
tmp = t_1
else if (a <= (-6d-164)) then
tmp = x + (t * a)
else if (a <= 5.6d-67) then
tmp = x + (y * z)
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 = a * (t + (z * b));
double tmp;
if (a <= -3.85e+93) {
tmp = t_1;
} else if (a <= -6e-164) {
tmp = x + (t * a);
} else if (a <= 5.6e-67) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) tmp = 0 if a <= -3.85e+93: tmp = t_1 elif a <= -6e-164: tmp = x + (t * a) elif a <= 5.6e-67: tmp = x + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (a <= -3.85e+93) tmp = t_1; elseif (a <= -6e-164) tmp = Float64(x + Float64(t * a)); elseif (a <= 5.6e-67) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); tmp = 0.0; if (a <= -3.85e+93) tmp = t_1; elseif (a <= -6e-164) tmp = x + (t * a); elseif (a <= 5.6e-67) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.85e+93], t$95$1, If[LessEqual[a, -6e-164], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e-67], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;a \leq -3.85 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-164}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-67}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.85000000000000002e93 or 5.60000000000000021e-67 < a Initial program 87.5%
Taylor expanded in x around 0 79.4%
Taylor expanded in a around inf 82.8%
if -3.85000000000000002e93 < a < -6.0000000000000002e-164Initial program 96.8%
associate-+l+96.8%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in z around 0 63.2%
+-commutative63.2%
Simplified63.2%
if -6.0000000000000002e-164 < a < 5.60000000000000021e-67Initial program 100.0%
associate-+l+100.0%
associate-*l*88.1%
Simplified88.1%
Taylor expanded in a around 0 79.1%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z -5.1e+14)
t_1
(if (<= z 3.4e+72)
(+ x (* t a))
(if (<= z 1.55e+268) t_1 (* z (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -5.1e+14) {
tmp = t_1;
} else if (z <= 3.4e+72) {
tmp = x + (t * a);
} else if (z <= 1.55e+268) {
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) :: tmp
t_1 = x + (y * z)
if (z <= (-5.1d+14)) then
tmp = t_1
else if (z <= 3.4d+72) then
tmp = x + (t * a)
else if (z <= 1.55d+268) 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 + (y * z);
double tmp;
if (z <= -5.1e+14) {
tmp = t_1;
} else if (z <= 3.4e+72) {
tmp = x + (t * a);
} else if (z <= 1.55e+268) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= -5.1e+14: tmp = t_1 elif z <= 3.4e+72: tmp = x + (t * a) elif z <= 1.55e+268: tmp = t_1 else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -5.1e+14) tmp = t_1; elseif (z <= 3.4e+72) tmp = Float64(x + Float64(t * a)); elseif (z <= 1.55e+268) tmp = t_1; else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= -5.1e+14) tmp = t_1; elseif (z <= 3.4e+72) tmp = x + (t * a); elseif (z <= 1.55e+268) 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[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+14], t$95$1, If[LessEqual[z, 3.4e+72], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+268], t$95$1, N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+72}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+268}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -5.1e14 or 3.3999999999999998e72 < z < 1.55000000000000005e268Initial program 86.0%
associate-+l+86.0%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in a around 0 55.7%
if -5.1e14 < z < 3.3999999999999998e72Initial program 96.9%
associate-+l+96.9%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
Simplified78.8%
if 1.55000000000000005e268 < z Initial program 100.0%
associate-+l+100.0%
associate-*l*71.5%
Simplified71.5%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around 0 89.9%
*-commutative89.9%
Simplified89.9%
Final simplification71.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.8e+64) (not (<= z 2.15e+74))) (* 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 <= -1.8e+64) || !(z <= 2.15e+74)) {
tmp = 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 <= (-1.8d+64)) .or. (.not. (z <= 2.15d+74))) then
tmp = 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 <= -1.8e+64) || !(z <= 2.15e+74)) {
tmp = 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 <= -1.8e+64) or not (z <= 2.15e+74): tmp = 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 <= -1.8e+64) || !(z <= 2.15e+74)) tmp = 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 <= -1.8e+64) || ~((z <= 2.15e+74))) tmp = 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, -1.8e+64], N[Not[LessEqual[z, 2.15e+74]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $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 -1.8 \cdot 10^{+64} \lor \neg \left(z \leq 2.15 \cdot 10^{+74}\right):\\
\;\;\;\;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 < -1.80000000000000007e64 or 2.15e74 < z Initial program 87.4%
associate-+l+87.4%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in z around inf 83.5%
if -1.80000000000000007e64 < z < 2.15e74Initial program 96.4%
associate-+l+96.4%
+-commutative96.4%
fma-def96.4%
associate-*l*97.6%
*-commutative97.6%
*-commutative97.6%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 91.9%
Final simplification89.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.2e+15) (not (<= z 2.25e+75))) (+ 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 <= -2.2e+15) || !(z <= 2.25e+75)) {
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 <= (-2.2d+15)) .or. (.not. (z <= 2.25d+75))) 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 <= -2.2e+15) || !(z <= 2.25e+75)) {
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 <= -2.2e+15) or not (z <= 2.25e+75): 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 <= -2.2e+15) || !(z <= 2.25e+75)) 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 <= -2.2e+15) || ~((z <= 2.25e+75))) 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, -2.2e+15], N[Not[LessEqual[z, 2.25e+75]], $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 -2.2 \cdot 10^{+15} \lor \neg \left(z \leq 2.25 \cdot 10^{+75}\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 < -2.2e15 or 2.2500000000000002e75 < z Initial program 87.4%
associate-+l+87.4%
associate-*l*79.6%
Simplified79.6%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
+-commutative77.6%
associate-*r*89.6%
distribute-rgt-in93.7%
Simplified93.7%
if -2.2e15 < z < 2.2500000000000002e75Initial program 96.9%
associate-+l+96.9%
+-commutative96.9%
fma-def96.9%
associate-*l*98.1%
*-commutative98.1%
*-commutative98.1%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 92.8%
Final simplification93.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.6e-18) (not (<= t 9.5e-39))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.6e-18) || !(t <= 9.5e-39)) {
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 ((t <= (-4.6d-18)) .or. (.not. (t <= 9.5d-39))) 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 ((t <= -4.6e-18) || !(t <= 9.5e-39)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.6e-18) or not (t <= 9.5e-39): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.6e-18) || !(t <= 9.5e-39)) 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 ((t <= -4.6e-18) || ~((t <= 9.5e-39))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.6e-18], N[Not[LessEqual[t, 9.5e-39]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-18} \lor \neg \left(t \leq 9.5 \cdot 10^{-39}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.6000000000000002e-18 or 9.4999999999999999e-39 < t Initial program 90.4%
Taylor expanded in x around 0 77.1%
Taylor expanded in a around inf 67.9%
Taylor expanded in t around inf 53.9%
if -4.6000000000000002e-18 < t < 9.4999999999999999e-39Initial program 97.2%
associate-+l+97.2%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 38.8%
Final simplification47.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.3%
associate-+l+93.3%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in x around inf 25.0%
Final simplification25.0%
(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 2024031
(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)))