
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1e+103)
(* a (+ t (+ (* b z) (+ (/ x a) (/ (* z y) a)))))
(if (<= a 3.5e+95)
(+ x (+ (* a t) (* z (+ y (* a b)))))
(+ (fma y z x) (* a (+ t (* b z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1e+103) {
tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a))));
} else if (a <= 3.5e+95) {
tmp = x + ((a * t) + (z * (y + (a * b))));
} else {
tmp = fma(y, z, x) + (a * (t + (b * z)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1e+103) tmp = Float64(a * Float64(t + Float64(Float64(b * z) + Float64(Float64(x / a) + Float64(Float64(z * y) / a))))); elseif (a <= 3.5e+95) tmp = Float64(x + Float64(Float64(a * t) + Float64(z * Float64(y + Float64(a * b))))); else tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(b * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1e+103], N[(a * N[(t + N[(N[(b * z), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+95], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(t + \left(b \cdot z + \left(\frac{x}{a} + \frac{z \cdot y}{a}\right)\right)\right)\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+95}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + b \cdot z\right)\\
\end{array}
\end{array}
if a < -1e103Initial program 76.4%
associate-+l+76.4%
associate-*l*83.3%
Simplified83.3%
Taylor expanded in a around inf 97.6%
if -1e103 < a < 3.5e95Initial program 94.0%
associate-+l+94.0%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in z around 0 98.8%
if 3.5e95 < a Initial program 91.6%
associate-+l+91.6%
+-commutative91.6%
fma-define91.6%
associate-*l*95.6%
*-commutative95.6%
*-commutative95.6%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* z y))) (* b (* a z))))) (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 = ((a * t) + (x + (z * y))) + (b * (a * z));
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 = ((a * t) + (x + (z * y))) + (b * (a * z));
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 = ((a * t) + (x + (z * y))) + (b * (a * z)) 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(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(a * z))) 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 = ((a * t) + (x + (z * y))) + (b * (a * z)); 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[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * z), $MachinePrecision]), $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(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(a \cdot z\right)\\
\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 97.5%
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*5.6%
Simplified5.6%
Taylor expanded in z around inf 83.3%
+-commutative83.3%
Simplified83.3%
Final simplification96.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.5e+102) (not (<= a 1.76e+96))) (* a (+ t (+ (* b z) (+ (/ x a) (/ (* z y) a))))) (+ x (+ (* a t) (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.5e+102) || !(a <= 1.76e+96)) {
tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a))));
} else {
tmp = x + ((a * t) + (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 <= (-3.5d+102)) .or. (.not. (a <= 1.76d+96))) then
tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a))))
else
tmp = x + ((a * t) + (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 <= -3.5e+102) || !(a <= 1.76e+96)) {
tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a))));
} else {
tmp = x + ((a * t) + (z * (y + (a * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.5e+102) or not (a <= 1.76e+96): tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a)))) else: tmp = x + ((a * t) + (z * (y + (a * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.5e+102) || !(a <= 1.76e+96)) tmp = Float64(a * Float64(t + Float64(Float64(b * z) + Float64(Float64(x / a) + Float64(Float64(z * y) / a))))); else tmp = Float64(x + Float64(Float64(a * t) + 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 <= -3.5e+102) || ~((a <= 1.76e+96))) tmp = a * (t + ((b * z) + ((x / a) + ((z * y) / a)))); else tmp = x + ((a * t) + (z * (y + (a * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.5e+102], N[Not[LessEqual[a, 1.76e+96]], $MachinePrecision]], N[(a * N[(t + N[(N[(b * z), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+102} \lor \neg \left(a \leq 1.76 \cdot 10^{+96}\right):\\
\;\;\;\;a \cdot \left(t + \left(b \cdot z + \left(\frac{x}{a} + \frac{z \cdot y}{a}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -3.50000000000000011e102 or 1.7599999999999999e96 < a Initial program 84.2%
associate-+l+84.2%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in a around inf 98.8%
if -3.50000000000000011e102 < a < 1.7599999999999999e96Initial program 94.1%
associate-+l+94.1%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in z around 0 98.8%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -2.2e+261)
(* a (* b z))
(if (or (<= a -7.5e-28) (not (<= a 2.3e+115)))
(+ x (* a t))
(+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.2e+261) {
tmp = a * (b * z);
} else if ((a <= -7.5e-28) || !(a <= 2.3e+115)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-2.2d+261)) then
tmp = a * (b * z)
else if ((a <= (-7.5d-28)) .or. (.not. (a <= 2.3d+115))) then
tmp = x + (a * t)
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.2e+261) {
tmp = a * (b * z);
} else if ((a <= -7.5e-28) || !(a <= 2.3e+115)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.2e+261: tmp = a * (b * z) elif (a <= -7.5e-28) or not (a <= 2.3e+115): tmp = x + (a * t) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.2e+261) tmp = Float64(a * Float64(b * z)); elseif ((a <= -7.5e-28) || !(a <= 2.3e+115)) tmp = Float64(x + Float64(a * t)); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.2e+261) tmp = a * (b * z); elseif ((a <= -7.5e-28) || ~((a <= 2.3e+115))) tmp = x + (a * t); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.2e+261], N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -7.5e-28], N[Not[LessEqual[a, 2.3e+115]], $MachinePrecision]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+261}:\\
\;\;\;\;a \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-28} \lor \neg \left(a \leq 2.3 \cdot 10^{+115}\right):\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -2.19999999999999984e261Initial program 71.4%
associate-+l+71.4%
associate-*l*71.4%
Simplified71.4%
*-commutative71.4%
distribute-rgt-in92.9%
add-cube-cbrt92.6%
associate-*l*92.6%
pow292.6%
+-commutative92.6%
fma-define92.6%
Applied egg-rr92.6%
Taylor expanded in b around inf 72.4%
if -2.19999999999999984e261 < a < -7.5000000000000003e-28 or 2.30000000000000004e115 < a Initial program 86.0%
associate-+l+86.0%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around 0 58.0%
+-commutative58.0%
Simplified58.0%
if -7.5000000000000003e-28 < a < 2.30000000000000004e115Initial program 95.3%
associate-+l+95.3%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in a around 0 69.4%
Final simplification65.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -5e+246) (* a (* b z)) (if (or (<= a -3.3e+90) (not (<= a 3.8e+113))) (* a t) (+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5e+246) {
tmp = a * (b * z);
} else if ((a <= -3.3e+90) || !(a <= 3.8e+113)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-5d+246)) then
tmp = a * (b * z)
else if ((a <= (-3.3d+90)) .or. (.not. (a <= 3.8d+113))) then
tmp = a * t
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5e+246) {
tmp = a * (b * z);
} else if ((a <= -3.3e+90) || !(a <= 3.8e+113)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5e+246: tmp = a * (b * z) elif (a <= -3.3e+90) or not (a <= 3.8e+113): tmp = a * t else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5e+246) tmp = Float64(a * Float64(b * z)); elseif ((a <= -3.3e+90) || !(a <= 3.8e+113)) tmp = Float64(a * t); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5e+246) tmp = a * (b * z); elseif ((a <= -3.3e+90) || ~((a <= 3.8e+113))) tmp = a * t; else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5e+246], N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3.3e+90], N[Not[LessEqual[a, 3.8e+113]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+246}:\\
\;\;\;\;a \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{+90} \lor \neg \left(a \leq 3.8 \cdot 10^{+113}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -4.99999999999999976e246Initial program 73.7%
associate-+l+73.7%
associate-*l*73.7%
Simplified73.7%
*-commutative73.7%
distribute-rgt-in94.7%
add-cube-cbrt94.6%
associate-*l*94.6%
pow294.6%
+-commutative94.6%
fma-define94.6%
Applied egg-rr94.6%
Taylor expanded in b around inf 64.2%
if -4.99999999999999976e246 < a < -3.30000000000000008e90 or 3.8000000000000003e113 < a Initial program 85.6%
associate-+l+85.6%
associate-*l*92.6%
Simplified92.6%
*-commutative92.6%
distribute-rgt-in98.5%
add-cube-cbrt97.9%
associate-*l*97.8%
pow297.8%
+-commutative97.8%
fma-define97.8%
Applied egg-rr97.8%
Taylor expanded in t around inf 55.2%
if -3.30000000000000008e90 < a < 3.8000000000000003e113Initial program 94.6%
associate-+l+94.6%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in a around 0 67.5%
Final simplification64.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* b z))))
(if (<= b -1.4e-57)
t_1
(if (<= b 1900000000.0) (* z y) (if (<= b 3.8e+122) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (b * z);
double tmp;
if (b <= -1.4e-57) {
tmp = t_1;
} else if (b <= 1900000000.0) {
tmp = z * y;
} else if (b <= 3.8e+122) {
tmp = 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 = a * (b * z)
if (b <= (-1.4d-57)) then
tmp = t_1
else if (b <= 1900000000.0d0) then
tmp = z * y
else if (b <= 3.8d+122) then
tmp = 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 = a * (b * z);
double tmp;
if (b <= -1.4e-57) {
tmp = t_1;
} else if (b <= 1900000000.0) {
tmp = z * y;
} else if (b <= 3.8e+122) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (b * z) tmp = 0 if b <= -1.4e-57: tmp = t_1 elif b <= 1900000000.0: tmp = z * y elif b <= 3.8e+122: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(b * z)) tmp = 0.0 if (b <= -1.4e-57) tmp = t_1; elseif (b <= 1900000000.0) tmp = Float64(z * y); elseif (b <= 3.8e+122) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (b * z); tmp = 0.0; if (b <= -1.4e-57) tmp = t_1; elseif (b <= 1900000000.0) tmp = z * y; elseif (b <= 3.8e+122) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e-57], t$95$1, If[LessEqual[b, 1900000000.0], N[(z * y), $MachinePrecision], If[LessEqual[b, 3.8e+122], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot z\right)\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1900000000:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+122}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.4e-57 or 3.7999999999999998e122 < b Initial program 87.4%
associate-+l+87.4%
associate-*l*84.0%
Simplified84.0%
*-commutative84.0%
distribute-rgt-in90.8%
add-cube-cbrt90.4%
associate-*l*90.3%
pow290.3%
+-commutative90.3%
fma-define90.3%
Applied egg-rr90.3%
Taylor expanded in b around inf 51.2%
if -1.4e-57 < b < 1.9e9Initial program 94.2%
associate-+l+94.2%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in y around inf 40.3%
*-commutative40.3%
Simplified40.3%
if 1.9e9 < b < 3.7999999999999998e122Initial program 89.5%
associate-+l+89.5%
associate-*l*89.4%
Simplified89.4%
Taylor expanded in x around inf 52.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.8e-28) (not (<= a 2.2e+15))) (+ x (* a (+ t (* b z)))) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.8e-28) || !(a <= 2.2e+15)) {
tmp = x + (a * (t + (b * z)));
} 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 <= (-6.8d-28)) .or. (.not. (a <= 2.2d+15))) then
tmp = x + (a * (t + (b * z)))
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 <= -6.8e-28) || !(a <= 2.2e+15)) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.8e-28) or not (a <= 2.2e+15): tmp = x + (a * (t + (b * z))) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.8e-28) || !(a <= 2.2e+15)) tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); 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 <= -6.8e-28) || ~((a <= 2.2e+15))) tmp = x + (a * (t + (b * z))); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.8e-28], N[Not[LessEqual[a, 2.2e+15]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(b * z), $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 -6.8 \cdot 10^{-28} \lor \neg \left(a \leq 2.2 \cdot 10^{+15}\right):\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if a < -6.8000000000000001e-28 or 2.2e15 < a Initial program 85.0%
associate-+l+85.0%
+-commutative85.0%
fma-define85.0%
associate-*l*89.3%
*-commutative89.3%
*-commutative89.3%
distribute-rgt-out96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in y around 0 89.4%
if -6.8000000000000001e-28 < a < 2.2e15Initial program 96.8%
associate-+l+96.8%
associate-*l*92.9%
Simplified92.9%
*-commutative92.9%
distribute-rgt-in92.9%
add-cube-cbrt92.5%
associate-*l*92.5%
pow292.5%
+-commutative92.5%
fma-define92.5%
Applied egg-rr92.5%
Taylor expanded in t around 0 84.2%
+-commutative84.2%
associate-*r*88.4%
distribute-rgt-in90.8%
Simplified90.8%
Final simplification90.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.05e+138) (+ (* z y) (* a t)) (if (<= y 1.62e+153) (+ x (* a (+ t (* b z)))) (* a (+ t (/ (* z y) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e+138) {
tmp = (z * y) + (a * t);
} else if (y <= 1.62e+153) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = a * (t + ((z * y) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.05d+138)) then
tmp = (z * y) + (a * t)
else if (y <= 1.62d+153) then
tmp = x + (a * (t + (b * z)))
else
tmp = a * (t + ((z * y) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e+138) {
tmp = (z * y) + (a * t);
} else if (y <= 1.62e+153) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = a * (t + ((z * y) / a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.05e+138: tmp = (z * y) + (a * t) elif y <= 1.62e+153: tmp = x + (a * (t + (b * z))) else: tmp = a * (t + ((z * y) / a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.05e+138) tmp = Float64(Float64(z * y) + Float64(a * t)); elseif (y <= 1.62e+153) tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); else tmp = Float64(a * Float64(t + Float64(Float64(z * y) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.05e+138) tmp = (z * y) + (a * t); elseif (y <= 1.62e+153) tmp = x + (a * (t + (b * z))); else tmp = a * (t + ((z * y) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.05e+138], N[(N[(z * y), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e+153], N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+138}:\\
\;\;\;\;z \cdot y + a \cdot t\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{+153}:\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + \frac{z \cdot y}{a}\right)\\
\end{array}
\end{array}
if y < -2.0499999999999999e138Initial program 89.1%
associate-+l+89.1%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in t around inf 91.9%
Taylor expanded in x around 0 86.3%
if -2.0499999999999999e138 < y < 1.62e153Initial program 91.7%
associate-+l+91.7%
+-commutative91.7%
fma-define91.7%
associate-*l*91.7%
*-commutative91.7%
*-commutative91.7%
distribute-rgt-out95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around 0 85.2%
if 1.62e153 < y Initial program 87.5%
associate-+l+87.5%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in a around inf 92.7%
Taylor expanded in y around inf 83.3%
Final simplification85.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.1e+78) (+ x (* a (+ t (* b z)))) (+ x (+ (* a t) (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.1e+78) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = x + ((a * t) + (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 <= (-1.1d+78)) then
tmp = x + (a * (t + (b * z)))
else
tmp = x + ((a * t) + (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 <= -1.1e+78) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = x + ((a * t) + (z * (y + (a * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.1e+78: tmp = x + (a * (t + (b * z))) else: tmp = x + ((a * t) + (z * (y + (a * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.1e+78) tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); else tmp = Float64(x + Float64(Float64(a * t) + 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 <= -1.1e+78) tmp = x + (a * (t + (b * z))); else tmp = x + ((a * t) + (z * (y + (a * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.1e+78], N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+78}:\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -1.10000000000000007e78Initial program 75.2%
associate-+l+75.2%
+-commutative75.2%
fma-define75.2%
associate-*l*82.7%
*-commutative82.7%
*-commutative82.7%
distribute-rgt-out94.2%
*-commutative94.2%
Simplified94.2%
Taylor expanded in y around 0 94.1%
if -1.10000000000000007e78 < a Initial program 94.6%
associate-+l+94.6%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in z around 0 97.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.7e+45) (not (<= a 3.7e+14))) (* a (+ t (* b z))) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.7e+45) || !(a <= 3.7e+14)) {
tmp = a * (t + (b * z));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.7d+45)) .or. (.not. (a <= 3.7d+14))) then
tmp = a * (t + (b * z))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.7e+45) || !(a <= 3.7e+14)) {
tmp = a * (t + (b * z));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.7e+45) or not (a <= 3.7e+14): tmp = a * (t + (b * z)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.7e+45) || !(a <= 3.7e+14)) tmp = Float64(a * Float64(t + Float64(b * z))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.7e+45) || ~((a <= 3.7e+14))) tmp = a * (t + (b * z)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.7e+45], N[Not[LessEqual[a, 3.7e+14]], $MachinePrecision]], N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{+45} \lor \neg \left(a \leq 3.7 \cdot 10^{+14}\right):\\
\;\;\;\;a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -4.70000000000000002e45 or 3.7e14 < a Initial program 83.9%
associate-+l+83.9%
associate-*l*88.6%
Simplified88.6%
*-commutative88.6%
distribute-rgt-in95.9%
add-cube-cbrt95.4%
associate-*l*95.4%
pow295.4%
+-commutative95.4%
fma-define95.4%
Applied egg-rr95.4%
Taylor expanded in a around inf 80.6%
if -4.70000000000000002e45 < a < 3.7e14Initial program 97.0%
associate-+l+97.0%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in a around 0 72.5%
Final simplification76.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.05e-29) (not (<= a 2.3e+115))) (* a t) (* z y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.05e-29) || !(a <= 2.3e+115)) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.05d-29)) .or. (.not. (a <= 2.3d+115))) then
tmp = a * t
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.05e-29) || !(a <= 2.3e+115)) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.05e-29) or not (a <= 2.3e+115): tmp = a * t else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.05e-29) || !(a <= 2.3e+115)) tmp = Float64(a * t); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.05e-29) || ~((a <= 2.3e+115))) tmp = a * t; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.05e-29], N[Not[LessEqual[a, 2.3e+115]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-29} \lor \neg \left(a \leq 2.3 \cdot 10^{+115}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if a < -1.04999999999999995e-29 or 2.30000000000000004e115 < a Initial program 84.0%
associate-+l+84.0%
associate-*l*89.5%
Simplified89.5%
*-commutative89.5%
distribute-rgt-in97.1%
add-cube-cbrt96.6%
associate-*l*96.6%
pow296.6%
+-commutative96.6%
fma-define96.6%
Applied egg-rr96.6%
Taylor expanded in t around inf 45.6%
if -1.04999999999999995e-29 < a < 2.30000000000000004e115Initial program 95.3%
associate-+l+95.3%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in y around inf 39.6%
*-commutative39.6%
Simplified39.6%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.2e+88) (not (<= a 2400000.0))) (* a t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.2e+88) || !(a <= 2400000.0)) {
tmp = a * t;
} 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 <= (-3.2d+88)) .or. (.not. (a <= 2400000.0d0))) then
tmp = a * t
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 <= -3.2e+88) || !(a <= 2400000.0)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.2e+88) or not (a <= 2400000.0): tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.2e+88) || !(a <= 2400000.0)) tmp = Float64(a * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.2e+88) || ~((a <= 2400000.0))) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.2e+88], N[Not[LessEqual[a, 2400000.0]], $MachinePrecision]], N[(a * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+88} \lor \neg \left(a \leq 2400000\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.1999999999999999e88 or 2.4e6 < a Initial program 83.9%
associate-+l+83.9%
associate-*l*88.8%
Simplified88.8%
*-commutative88.8%
distribute-rgt-in96.5%
add-cube-cbrt96.1%
associate-*l*96.0%
pow296.0%
+-commutative96.0%
fma-define96.0%
Applied egg-rr96.0%
Taylor expanded in t around inf 43.7%
if -3.1999999999999999e88 < a < 2.4e6Initial program 96.4%
associate-+l+96.4%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 35.4%
Final simplification39.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 90.7%
associate-+l+90.7%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 23.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 2024137
(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)))