
(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 (if (<= z -3e+87) (+ (* z (+ y (* a b))) x) (+ (fma y z x) (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3e+87) {
tmp = (z * (y + (a * b))) + x;
} else {
tmp = fma(y, z, x) + (a * (t + (z * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3e+87) tmp = Float64(Float64(z * Float64(y + Float64(a * b))) + x); else tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3e+87], N[(N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+87}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right) + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -2.9999999999999999e87Initial program 83.6%
associate-+l+83.6%
associate-*l*83.1%
Simplified83.1%
Taylor expanded in t around 0 83.2%
+-commutative83.2%
+-commutative83.2%
associate-*r*88.7%
distribute-rgt-in98.2%
Simplified98.2%
if -2.9999999999999999e87 < z Initial program 96.2%
associate-+l+96.2%
+-commutative96.2%
fma-define96.2%
associate-*l*97.0%
*-commutative97.0%
*-commutative97.0%
distribute-rgt-out98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z y))))
(if (<= (+ (+ t_1 (* a t)) (* b (* z a))) INFINITY)
(+ t_1 (+ (* a t) (* a (* z b))))
(* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (((t_1 + (a * t)) + (b * (z * a))) <= ((double) INFINITY)) {
tmp = t_1 + ((a * t) + (a * (z * b)));
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (((t_1 + (a * t)) + (b * (z * a))) <= Double.POSITIVE_INFINITY) {
tmp = t_1 + ((a * t) + (a * (z * b)));
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * y) tmp = 0 if ((t_1 + (a * t)) + (b * (z * a))) <= math.inf: tmp = t_1 + ((a * t) + (a * (z * b))) else: tmp = a * (t + (z * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * y)) tmp = 0.0 if (Float64(Float64(t_1 + Float64(a * t)) + Float64(b * Float64(z * a))) <= Inf) tmp = Float64(t_1 + Float64(Float64(a * t) + Float64(a * Float64(z * b)))); else tmp = Float64(a * Float64(t + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * y); tmp = 0.0; if (((t_1 + (a * t)) + (b * (z * a))) <= Inf) tmp = t_1 + ((a * t) + (a * (z * b))); else tmp = a * (t + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 + N[(N[(a * t), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;\left(t\_1 + a \cdot t\right) + b \cdot \left(z \cdot a\right) \leq \infty:\\
\;\;\;\;t\_1 + \left(a \cdot t + a \cdot \left(z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + z \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.8%
associate-+l+97.8%
associate-*l*98.0%
Simplified98.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*9.1%
Simplified9.1%
Taylor expanded in a around inf 81.8%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= a -5.5e-65)
t_1
(if (<= a 2e-168)
x
(if (<= a 1.9e+30)
(* z y)
(if (or (<= a 2.9e+179) (not (<= a 8e+202))) (* a t) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -5.5e-65) {
tmp = t_1;
} else if (a <= 2e-168) {
tmp = x;
} else if (a <= 1.9e+30) {
tmp = z * y;
} else if ((a <= 2.9e+179) || !(a <= 8e+202)) {
tmp = a * t;
} 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 * (z * b)
if (a <= (-5.5d-65)) then
tmp = t_1
else if (a <= 2d-168) then
tmp = x
else if (a <= 1.9d+30) then
tmp = z * y
else if ((a <= 2.9d+179) .or. (.not. (a <= 8d+202))) then
tmp = a * t
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 * (z * b);
double tmp;
if (a <= -5.5e-65) {
tmp = t_1;
} else if (a <= 2e-168) {
tmp = x;
} else if (a <= 1.9e+30) {
tmp = z * y;
} else if ((a <= 2.9e+179) || !(a <= 8e+202)) {
tmp = a * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if a <= -5.5e-65: tmp = t_1 elif a <= 2e-168: tmp = x elif a <= 1.9e+30: tmp = z * y elif (a <= 2.9e+179) or not (a <= 8e+202): tmp = a * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (a <= -5.5e-65) tmp = t_1; elseif (a <= 2e-168) tmp = x; elseif (a <= 1.9e+30) tmp = Float64(z * y); elseif ((a <= 2.9e+179) || !(a <= 8e+202)) tmp = Float64(a * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (a <= -5.5e-65) tmp = t_1; elseif (a <= 2e-168) tmp = x; elseif (a <= 1.9e+30) tmp = z * y; elseif ((a <= 2.9e+179) || ~((a <= 8e+202))) tmp = a * t; else tmp = t_1; 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[a, -5.5e-65], t$95$1, If[LessEqual[a, 2e-168], x, If[LessEqual[a, 1.9e+30], N[(z * y), $MachinePrecision], If[Or[LessEqual[a, 2.9e+179], N[Not[LessEqual[a, 8e+202]], $MachinePrecision]], N[(a * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+30}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+179} \lor \neg \left(a \leq 8 \cdot 10^{+202}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.4999999999999999e-65 or 2.90000000000000019e179 < a < 7.9999999999999992e202Initial program 88.8%
associate-+l+88.8%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in z around inf 66.3%
Taylor expanded in y around 0 48.9%
if -5.4999999999999999e-65 < a < 2.0000000000000001e-168Initial program 98.7%
associate-+l+98.7%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in x around inf 48.1%
if 2.0000000000000001e-168 < a < 1.9000000000000001e30Initial program 98.1%
associate-+l+98.1%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in y around inf 39.3%
*-commutative39.3%
Simplified39.3%
if 1.9000000000000001e30 < a < 2.90000000000000019e179 or 7.9999999999999992e202 < a Initial program 88.3%
associate-+l+88.3%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in t around inf 60.7%
Final simplification48.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* z a))))
(if (<= a -5.6e-9)
t_1
(if (<= a 3.7e-168)
x
(if (<= a 2.35e+29)
(* z y)
(if (or (<= a 5.7e+175) (not (<= a 2.8e+259))) (* a t) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (z * a);
double tmp;
if (a <= -5.6e-9) {
tmp = t_1;
} else if (a <= 3.7e-168) {
tmp = x;
} else if (a <= 2.35e+29) {
tmp = z * y;
} else if ((a <= 5.7e+175) || !(a <= 2.8e+259)) {
tmp = a * t;
} 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 = b * (z * a)
if (a <= (-5.6d-9)) then
tmp = t_1
else if (a <= 3.7d-168) then
tmp = x
else if (a <= 2.35d+29) then
tmp = z * y
else if ((a <= 5.7d+175) .or. (.not. (a <= 2.8d+259))) then
tmp = a * t
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 = b * (z * a);
double tmp;
if (a <= -5.6e-9) {
tmp = t_1;
} else if (a <= 3.7e-168) {
tmp = x;
} else if (a <= 2.35e+29) {
tmp = z * y;
} else if ((a <= 5.7e+175) || !(a <= 2.8e+259)) {
tmp = a * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (z * a) tmp = 0 if a <= -5.6e-9: tmp = t_1 elif a <= 3.7e-168: tmp = x elif a <= 2.35e+29: tmp = z * y elif (a <= 5.7e+175) or not (a <= 2.8e+259): tmp = a * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(z * a)) tmp = 0.0 if (a <= -5.6e-9) tmp = t_1; elseif (a <= 3.7e-168) tmp = x; elseif (a <= 2.35e+29) tmp = Float64(z * y); elseif ((a <= 5.7e+175) || !(a <= 2.8e+259)) tmp = Float64(a * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (z * a); tmp = 0.0; if (a <= -5.6e-9) tmp = t_1; elseif (a <= 3.7e-168) tmp = x; elseif (a <= 2.35e+29) tmp = z * y; elseif ((a <= 5.7e+175) || ~((a <= 2.8e+259))) tmp = a * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e-9], t$95$1, If[LessEqual[a, 3.7e-168], x, If[LessEqual[a, 2.35e+29], N[(z * y), $MachinePrecision], If[Or[LessEqual[a, 5.7e+175], N[Not[LessEqual[a, 2.8e+259]], $MachinePrecision]], N[(a * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{+29}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{+175} \lor \neg \left(a \leq 2.8 \cdot 10^{+259}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.59999999999999969e-9 or 5.70000000000000024e175 < a < 2.8000000000000001e259Initial program 86.0%
associate-+l+86.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in z around inf 66.7%
Taylor expanded in y around 0 53.9%
Taylor expanded in z around 0 52.6%
*-commutative52.6%
*-commutative52.6%
*-commutative52.6%
associate-*l*54.0%
Simplified54.0%
if -5.59999999999999969e-9 < a < 3.69999999999999997e-168Initial program 98.9%
associate-+l+98.9%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in x around inf 46.2%
if 3.69999999999999997e-168 < a < 2.3500000000000001e29Initial program 98.1%
associate-+l+98.1%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in y around inf 39.3%
*-commutative39.3%
Simplified39.3%
if 2.3500000000000001e29 < a < 5.70000000000000024e175 or 2.8000000000000001e259 < a Initial program 90.0%
associate-+l+90.0%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in t around inf 60.7%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -5.8e-9)
(* z (* a b))
(if (<= a 1.8e-168)
x
(if (<= a 1.4e+31)
(* z y)
(if (or (<= a 7.5e+178) (not (<= a 4.8e+259)))
(* a t)
(* b (* z a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.8e-9) {
tmp = z * (a * b);
} else if (a <= 1.8e-168) {
tmp = x;
} else if (a <= 1.4e+31) {
tmp = z * y;
} else if ((a <= 7.5e+178) || !(a <= 4.8e+259)) {
tmp = a * t;
} else {
tmp = b * (z * 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 <= (-5.8d-9)) then
tmp = z * (a * b)
else if (a <= 1.8d-168) then
tmp = x
else if (a <= 1.4d+31) then
tmp = z * y
else if ((a <= 7.5d+178) .or. (.not. (a <= 4.8d+259))) then
tmp = a * t
else
tmp = b * (z * 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 <= -5.8e-9) {
tmp = z * (a * b);
} else if (a <= 1.8e-168) {
tmp = x;
} else if (a <= 1.4e+31) {
tmp = z * y;
} else if ((a <= 7.5e+178) || !(a <= 4.8e+259)) {
tmp = a * t;
} else {
tmp = b * (z * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5.8e-9: tmp = z * (a * b) elif a <= 1.8e-168: tmp = x elif a <= 1.4e+31: tmp = z * y elif (a <= 7.5e+178) or not (a <= 4.8e+259): tmp = a * t else: tmp = b * (z * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.8e-9) tmp = Float64(z * Float64(a * b)); elseif (a <= 1.8e-168) tmp = x; elseif (a <= 1.4e+31) tmp = Float64(z * y); elseif ((a <= 7.5e+178) || !(a <= 4.8e+259)) tmp = Float64(a * t); else tmp = Float64(b * Float64(z * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5.8e-9) tmp = z * (a * b); elseif (a <= 1.8e-168) tmp = x; elseif (a <= 1.4e+31) tmp = z * y; elseif ((a <= 7.5e+178) || ~((a <= 4.8e+259))) tmp = a * t; else tmp = b * (z * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.8e-9], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-168], x, If[LessEqual[a, 1.4e+31], N[(z * y), $MachinePrecision], If[Or[LessEqual[a, 7.5e+178], N[Not[LessEqual[a, 4.8e+259]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-9}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+31}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+178} \lor \neg \left(a \leq 4.8 \cdot 10^{+259}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\end{array}
\end{array}
if a < -5.79999999999999982e-9Initial program 86.6%
associate-+l+86.6%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in z around inf 63.1%
Taylor expanded in y around 0 46.3%
if -5.79999999999999982e-9 < a < 1.7999999999999999e-168Initial program 98.9%
associate-+l+98.9%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in x around inf 46.2%
if 1.7999999999999999e-168 < a < 1.40000000000000008e31Initial program 98.1%
associate-+l+98.1%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in y around inf 39.3%
*-commutative39.3%
Simplified39.3%
if 1.40000000000000008e31 < a < 7.4999999999999995e178 or 4.7999999999999999e259 < a Initial program 90.0%
associate-+l+90.0%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in t around inf 60.7%
if 7.4999999999999995e178 < a < 4.7999999999999999e259Initial program 84.1%
associate-+l+84.1%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in z around inf 78.2%
Taylor expanded in y around 0 78.0%
Taylor expanded in z around 0 78.0%
*-commutative78.0%
*-commutative78.0%
*-commutative78.0%
associate-*l*78.6%
Simplified78.6%
Final simplification49.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -1e-28)
(not
(or (<= a 2.35e-114) (and (not (<= a 2.15e-37)) (<= a 1.22e+30)))))
(* a (+ t (* z b)))
(+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e-28) || !((a <= 2.35e-114) || (!(a <= 2.15e-37) && (a <= 1.22e+30)))) {
tmp = a * (t + (z * b));
} 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 <= (-1d-28)) .or. (.not. (a <= 2.35d-114) .or. (.not. (a <= 2.15d-37)) .and. (a <= 1.22d+30))) then
tmp = a * (t + (z * b))
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 <= -1e-28) || !((a <= 2.35e-114) || (!(a <= 2.15e-37) && (a <= 1.22e+30)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1e-28) or not ((a <= 2.35e-114) or (not (a <= 2.15e-37) and (a <= 1.22e+30))): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1e-28) || !((a <= 2.35e-114) || (!(a <= 2.15e-37) && (a <= 1.22e+30)))) tmp = Float64(a * Float64(t + Float64(z * b))); 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 <= -1e-28) || ~(((a <= 2.35e-114) || (~((a <= 2.15e-37)) && (a <= 1.22e+30))))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1e-28], N[Not[Or[LessEqual[a, 2.35e-114], And[N[Not[LessEqual[a, 2.15e-37]], $MachinePrecision], LessEqual[a, 1.22e+30]]]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-28} \lor \neg \left(a \leq 2.35 \cdot 10^{-114} \lor \neg \left(a \leq 2.15 \cdot 10^{-37}\right) \land a \leq 1.22 \cdot 10^{+30}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -9.99999999999999971e-29 or 2.35000000000000003e-114 < a < 2.14999999999999984e-37 or 1.22e30 < a Initial program 88.5%
associate-+l+88.5%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in a around inf 77.0%
if -9.99999999999999971e-29 < a < 2.35000000000000003e-114 or 2.14999999999999984e-37 < a < 1.22e30Initial program 99.2%
associate-+l+99.2%
associate-*l*96.0%
Simplified96.0%
Taylor expanded in a around 0 80.3%
Final simplification78.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -5.1e+75)
(not
(or (<= z -7.6e+43) (and (not (<= z -460000.0)) (<= z 3.05e+66)))))
(* z (+ y (* a b)))
(+ x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.1e+75) || !((z <= -7.6e+43) || (!(z <= -460000.0) && (z <= 3.05e+66)))) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * 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) :: tmp
if ((z <= (-5.1d+75)) .or. (.not. (z <= (-7.6d+43)) .or. (.not. (z <= (-460000.0d0))) .and. (z <= 3.05d+66))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * t)
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 <= -5.1e+75) || !((z <= -7.6e+43) || (!(z <= -460000.0) && (z <= 3.05e+66)))) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.1e+75) or not ((z <= -7.6e+43) or (not (z <= -460000.0) and (z <= 3.05e+66))): tmp = z * (y + (a * b)) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.1e+75) || !((z <= -7.6e+43) || (!(z <= -460000.0) && (z <= 3.05e+66)))) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.1e+75) || ~(((z <= -7.6e+43) || (~((z <= -460000.0)) && (z <= 3.05e+66))))) tmp = z * (y + (a * b)); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.1e+75], N[Not[Or[LessEqual[z, -7.6e+43], And[N[Not[LessEqual[z, -460000.0]], $MachinePrecision], LessEqual[z, 3.05e+66]]]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+75} \lor \neg \left(z \leq -7.6 \cdot 10^{+43} \lor \neg \left(z \leq -460000\right) \land z \leq 3.05 \cdot 10^{+66}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -5.10000000000000037e75 or -7.60000000000000016e43 < z < -4.6e5 or 3.0500000000000001e66 < z Initial program 89.4%
associate-+l+89.4%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in z around inf 87.2%
if -5.10000000000000037e75 < z < -7.60000000000000016e43 or -4.6e5 < z < 3.0500000000000001e66Initial program 97.1%
associate-+l+97.1%
associate-*l*97.8%
Simplified97.8%
Taylor expanded in z around 0 80.8%
+-commutative80.8%
Simplified80.8%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.25e+92)
(* z (* a b))
(if (<= a 9e+31)
(+ x (* z y))
(if (or (<= a 6.3e+178) (not (<= a 2.75e+259))) (* a t) (* b (* z a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.25e+92) {
tmp = z * (a * b);
} else if (a <= 9e+31) {
tmp = x + (z * y);
} else if ((a <= 6.3e+178) || !(a <= 2.75e+259)) {
tmp = a * t;
} else {
tmp = b * (z * 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.25d+92)) then
tmp = z * (a * b)
else if (a <= 9d+31) then
tmp = x + (z * y)
else if ((a <= 6.3d+178) .or. (.not. (a <= 2.75d+259))) then
tmp = a * t
else
tmp = b * (z * 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.25e+92) {
tmp = z * (a * b);
} else if (a <= 9e+31) {
tmp = x + (z * y);
} else if ((a <= 6.3e+178) || !(a <= 2.75e+259)) {
tmp = a * t;
} else {
tmp = b * (z * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.25e+92: tmp = z * (a * b) elif a <= 9e+31: tmp = x + (z * y) elif (a <= 6.3e+178) or not (a <= 2.75e+259): tmp = a * t else: tmp = b * (z * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.25e+92) tmp = Float64(z * Float64(a * b)); elseif (a <= 9e+31) tmp = Float64(x + Float64(z * y)); elseif ((a <= 6.3e+178) || !(a <= 2.75e+259)) tmp = Float64(a * t); else tmp = Float64(b * Float64(z * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.25e+92) tmp = z * (a * b); elseif (a <= 9e+31) tmp = x + (z * y); elseif ((a <= 6.3e+178) || ~((a <= 2.75e+259))) tmp = a * t; else tmp = b * (z * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.25e+92], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+31], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 6.3e+178], N[Not[LessEqual[a, 2.75e+259]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+92}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+31}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;a \leq 6.3 \cdot 10^{+178} \lor \neg \left(a \leq 2.75 \cdot 10^{+259}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\end{array}
\end{array}
if a < -1.25000000000000005e92Initial program 86.0%
associate-+l+86.0%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in z around inf 69.1%
Taylor expanded in y around 0 54.8%
if -1.25000000000000005e92 < a < 8.9999999999999992e31Initial program 97.5%
associate-+l+97.5%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in a around 0 70.7%
if 8.9999999999999992e31 < a < 6.30000000000000029e178 or 2.75000000000000015e259 < a Initial program 90.0%
associate-+l+90.0%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in t around inf 60.7%
if 6.30000000000000029e178 < a < 2.75000000000000015e259Initial program 84.1%
associate-+l+84.1%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in z around inf 78.2%
Taylor expanded in y around 0 78.0%
Taylor expanded in z around 0 78.0%
*-commutative78.0%
*-commutative78.0%
*-commutative78.0%
associate-*l*78.6%
Simplified78.6%
Final simplification67.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.42e+253)
(* b (* z a))
(if (<= z -2.6e+153)
(* z y)
(if (<= z -1.35e+83)
(* a (* z b))
(if (<= z 0.0152) (+ x (* a t)) (+ x (* z y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.42e+253) {
tmp = b * (z * a);
} else if (z <= -2.6e+153) {
tmp = z * y;
} else if (z <= -1.35e+83) {
tmp = a * (z * b);
} else if (z <= 0.0152) {
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 (z <= (-1.42d+253)) then
tmp = b * (z * a)
else if (z <= (-2.6d+153)) then
tmp = z * y
else if (z <= (-1.35d+83)) then
tmp = a * (z * b)
else if (z <= 0.0152d0) 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 (z <= -1.42e+253) {
tmp = b * (z * a);
} else if (z <= -2.6e+153) {
tmp = z * y;
} else if (z <= -1.35e+83) {
tmp = a * (z * b);
} else if (z <= 0.0152) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.42e+253: tmp = b * (z * a) elif z <= -2.6e+153: tmp = z * y elif z <= -1.35e+83: tmp = a * (z * b) elif z <= 0.0152: tmp = x + (a * t) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.42e+253) tmp = Float64(b * Float64(z * a)); elseif (z <= -2.6e+153) tmp = Float64(z * y); elseif (z <= -1.35e+83) tmp = Float64(a * Float64(z * b)); elseif (z <= 0.0152) 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 (z <= -1.42e+253) tmp = b * (z * a); elseif (z <= -2.6e+153) tmp = z * y; elseif (z <= -1.35e+83) tmp = a * (z * b); elseif (z <= 0.0152) tmp = x + (a * t); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.42e+253], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e+153], N[(z * y), $MachinePrecision], If[LessEqual[z, -1.35e+83], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0152], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+253}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+153}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+83}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 0.0152:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if z < -1.42e253Initial program 84.8%
associate-+l+84.8%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in z around inf 89.9%
Taylor expanded in y around 0 69.7%
Taylor expanded in z around 0 69.7%
*-commutative69.7%
*-commutative69.7%
*-commutative69.7%
associate-*l*75.0%
Simplified75.0%
if -1.42e253 < z < -2.5999999999999999e153Initial program 95.3%
associate-+l+95.3%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in y around inf 72.8%
*-commutative72.8%
Simplified72.8%
if -2.5999999999999999e153 < z < -1.35000000000000003e83Initial program 70.8%
associate-+l+70.8%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 85.0%
Taylor expanded in y around 0 61.4%
if -1.35000000000000003e83 < z < 0.0152Initial program 97.1%
associate-+l+97.1%
associate-*l*97.8%
Simplified97.8%
Taylor expanded in z around 0 79.1%
+-commutative79.1%
Simplified79.1%
if 0.0152 < z Initial program 94.2%
associate-+l+94.2%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in a around 0 59.5%
Final simplification72.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -1.3e-35) (not (<= x 2.9))) (+ (* z (+ y (* a b))) x) (+ (* a (+ t (* z b))) (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.3e-35) || !(x <= 2.9)) {
tmp = (z * (y + (a * b))) + x;
} else {
tmp = (a * (t + (z * b))) + (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 ((x <= (-1.3d-35)) .or. (.not. (x <= 2.9d0))) then
tmp = (z * (y + (a * b))) + x
else
tmp = (a * (t + (z * b))) + (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 ((x <= -1.3e-35) || !(x <= 2.9)) {
tmp = (z * (y + (a * b))) + x;
} else {
tmp = (a * (t + (z * b))) + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -1.3e-35) or not (x <= 2.9): tmp = (z * (y + (a * b))) + x else: tmp = (a * (t + (z * b))) + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -1.3e-35) || !(x <= 2.9)) tmp = Float64(Float64(z * Float64(y + Float64(a * b))) + x); else tmp = Float64(Float64(a * Float64(t + Float64(z * b))) + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -1.3e-35) || ~((x <= 2.9))) tmp = (z * (y + (a * b))) + x; else tmp = (a * (t + (z * b))) + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.3e-35], N[Not[LessEqual[x, 2.9]], $MachinePrecision]], N[(N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-35} \lor \neg \left(x \leq 2.9\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right) + x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right) + z \cdot y\\
\end{array}
\end{array}
if x < -1.30000000000000002e-35 or 2.89999999999999991 < x Initial program 94.5%
associate-+l+94.5%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in t around 0 78.3%
+-commutative78.3%
+-commutative78.3%
associate-*r*81.7%
distribute-rgt-in84.5%
Simplified84.5%
if -1.30000000000000002e-35 < x < 2.89999999999999991Initial program 92.4%
associate-+l+92.4%
+-commutative92.4%
fma-define92.4%
associate-*l*95.5%
*-commutative95.5%
*-commutative95.5%
distribute-rgt-out98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 91.9%
Final simplification87.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e-10) (not (<= z 0.0038))) (+ (* z (+ y (* a b))) x) (+ x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.15e-10) || !(z <= 0.0038)) {
tmp = (z * (y + (a * b))) + x;
} else {
tmp = x + (a * 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) :: tmp
if ((z <= (-1.15d-10)) .or. (.not. (z <= 0.0038d0))) then
tmp = (z * (y + (a * b))) + x
else
tmp = x + (a * t)
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.15e-10) || !(z <= 0.0038)) {
tmp = (z * (y + (a * b))) + x;
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.15e-10) or not (z <= 0.0038): tmp = (z * (y + (a * b))) + x else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e-10) || !(z <= 0.0038)) tmp = Float64(Float64(z * Float64(y + Float64(a * b))) + x); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.15e-10) || ~((z <= 0.0038))) tmp = (z * (y + (a * b))) + x; else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e-10], N[Not[LessEqual[z, 0.0038]], $MachinePrecision]], N[(N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-10} \lor \neg \left(z \leq 0.0038\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right) + x\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -1.15000000000000004e-10 or 0.00379999999999999999 < z Initial program 90.6%
associate-+l+90.6%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in t around 0 84.0%
+-commutative84.0%
+-commutative84.0%
associate-*r*87.6%
distribute-rgt-in92.1%
Simplified92.1%
if -1.15000000000000004e-10 < z < 0.00379999999999999999Initial program 96.8%
associate-+l+96.8%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in z around 0 81.6%
+-commutative81.6%
Simplified81.6%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -65.0) (* a t) (if (<= a 4.5e-169) x (if (<= a 2.1e+29) (* z y) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -65.0) {
tmp = a * t;
} else if (a <= 4.5e-169) {
tmp = x;
} else if (a <= 2.1e+29) {
tmp = z * y;
} else {
tmp = a * 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) :: tmp
if (a <= (-65.0d0)) then
tmp = a * t
else if (a <= 4.5d-169) then
tmp = x
else if (a <= 2.1d+29) then
tmp = z * y
else
tmp = a * t
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 <= -65.0) {
tmp = a * t;
} else if (a <= 4.5e-169) {
tmp = x;
} else if (a <= 2.1e+29) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -65.0: tmp = a * t elif a <= 4.5e-169: tmp = x elif a <= 2.1e+29: tmp = z * y else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -65.0) tmp = Float64(a * t); elseif (a <= 4.5e-169) tmp = x; elseif (a <= 2.1e+29) tmp = Float64(z * y); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -65.0) tmp = a * t; elseif (a <= 4.5e-169) tmp = x; elseif (a <= 2.1e+29) tmp = z * y; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -65.0], N[(a * t), $MachinePrecision], If[LessEqual[a, 4.5e-169], x, If[LessEqual[a, 2.1e+29], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -65:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-169}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+29}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -65 or 2.1000000000000002e29 < a Initial program 88.0%
associate-+l+88.0%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in t around inf 46.6%
if -65 < a < 4.4999999999999999e-169Initial program 97.8%
associate-+l+97.8%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 44.8%
if 4.4999999999999999e-169 < a < 2.1000000000000002e29Initial program 98.1%
associate-+l+98.1%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in y around inf 39.3%
*-commutative39.3%
Simplified39.3%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.112) (not (<= a 5e-5))) (* a t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.112) || !(a <= 5e-5)) {
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 <= (-0.112d0)) .or. (.not. (a <= 5d-5))) 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 <= -0.112) || !(a <= 5e-5)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.112) or not (a <= 5e-5): tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.112) || !(a <= 5e-5)) 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 <= -0.112) || ~((a <= 5e-5))) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.112], N[Not[LessEqual[a, 5e-5]], $MachinePrecision]], N[(a * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.112 \lor \neg \left(a \leq 5 \cdot 10^{-5}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -0.112000000000000002 or 5.00000000000000024e-5 < a Initial program 88.7%
associate-+l+88.7%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in t around inf 45.2%
if -0.112000000000000002 < a < 5.00000000000000024e-5Initial program 97.8%
associate-+l+97.8%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around inf 40.0%
Final simplification42.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.6%
associate-+l+93.6%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in x around inf 26.8%
Final simplification26.8%
(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 2024044
(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)))