
(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 18 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))))
(if (or (<= b -2e+47) (not (<= b 6e-36)))
(+ t_1 (* b (* a (+ z (/ t b)))))
(+ t_1 (+ (* t a) (* a (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if ((b <= -2e+47) || !(b <= 6e-36)) {
tmp = t_1 + (b * (a * (z + (t / b))));
} else {
tmp = t_1 + ((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) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if ((b <= (-2d+47)) .or. (.not. (b <= 6d-36))) then
tmp = t_1 + (b * (a * (z + (t / b))))
else
tmp = t_1 + ((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 t_1 = x + (y * z);
double tmp;
if ((b <= -2e+47) || !(b <= 6e-36)) {
tmp = t_1 + (b * (a * (z + (t / b))));
} else {
tmp = t_1 + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if (b <= -2e+47) or not (b <= 6e-36): tmp = t_1 + (b * (a * (z + (t / b)))) else: tmp = t_1 + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if ((b <= -2e+47) || !(b <= 6e-36)) tmp = Float64(t_1 + Float64(b * Float64(a * Float64(z + Float64(t / b))))); else tmp = Float64(t_1 + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if ((b <= -2e+47) || ~((b <= 6e-36))) tmp = t_1 + (b * (a * (z + (t / b)))); else tmp = t_1 + ((t * a) + (a * (z * 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[Or[LessEqual[b, -2e+47], N[Not[LessEqual[b, 6e-36]], $MachinePrecision]], N[(t$95$1 + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;b \leq -2 \cdot 10^{+47} \lor \neg \left(b \leq 6 \cdot 10^{-36}\right):\\
\;\;\;\;t\_1 + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if b < -2.0000000000000001e47 or 6.0000000000000003e-36 < b Initial program 92.1%
associate-+l+92.1%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in b around inf 94.6%
associate-/l*96.2%
distribute-lft-out97.0%
Simplified97.0%
if -2.0000000000000001e47 < b < 6.0000000000000003e-36Initial program 92.8%
associate-+l+92.8%
associate-*l*99.2%
Simplified99.2%
Final simplification98.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* (* z a) b) (+ (+ x (* y z)) (* t a)))))
(if (<= t_1 INFINITY)
t_1
(* y (+ z (+ (/ x y) (/ (* a (+ t (* z b))) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (z + ((x / y) + ((a * (t + (z * b))) / y)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y * (z + ((x / y) + ((a * (t + (z * b))) / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = y * (z + ((x / y) + ((a * (t + (z * b))) / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * a) * b) + Float64(Float64(x + Float64(y * z)) + Float64(t * a))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(z + Float64(Float64(x / y) + Float64(Float64(a * Float64(t + Float64(z * b))) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = y * (z + ((x / y) + ((a * (t + (z * b))) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(z + N[(N[(x / y), $MachinePrecision] + N[(N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b + \left(\left(x + y \cdot z\right) + t \cdot a\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z + \left(\frac{x}{y} + \frac{a \cdot \left(t + z \cdot b\right)}{y}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 98.2%
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%
+-commutative0.0%
fma-define0.0%
associate-*l*33.3%
*-commutative33.3%
*-commutative33.3%
distribute-rgt-out80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y around inf 93.3%
Final simplification97.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (* (* z a) b) (+ (+ x (* y z)) (* t a))))) (if (<= t_1 5e+295) t_1 (+ (* y z) (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a));
double tmp;
if (t_1 <= 5e+295) {
tmp = t_1;
} else {
tmp = (y * z) + (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) :: t_1
real(8) :: tmp
t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a))
if (t_1 <= 5d+295) then
tmp = t_1
else
tmp = (y * z) + (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 t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a));
double tmp;
if (t_1 <= 5e+295) {
tmp = t_1;
} else {
tmp = (y * z) + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a)) tmp = 0 if t_1 <= 5e+295: tmp = t_1 else: tmp = (y * z) + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * a) * b) + Float64(Float64(x + Float64(y * z)) + Float64(t * a))) tmp = 0.0 if (t_1 <= 5e+295) tmp = t_1; else tmp = Float64(Float64(y * z) + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * a) * b) + ((x + (y * z)) + (t * a)); tmp = 0.0; if (t_1 <= 5e+295) tmp = t_1; else tmp = (y * z) + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+295], t$95$1, N[(N[(y * z), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b + \left(\left(x + y \cdot z\right) + t \cdot a\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot z + 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)) < 4.99999999999999991e295Initial program 99.2%
if 4.99999999999999991e295 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 73.4%
associate-+l+73.4%
+-commutative73.4%
fma-define73.4%
associate-*l*83.6%
*-commutative83.6%
*-commutative83.6%
distribute-rgt-out94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in x around 0 94.0%
Final simplification97.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -1.95e+32)
(* t a)
(if (<= t 3.8e-166)
(* y z)
(if (<= t 1.15e-106)
t_1
(if (<= t 1.15e-47)
x
(if (<= t 2.65e+26) t_1 (if (<= t 6e+51) 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 <= -1.95e+32) {
tmp = t * a;
} else if (t <= 3.8e-166) {
tmp = y * z;
} else if (t <= 1.15e-106) {
tmp = t_1;
} else if (t <= 1.15e-47) {
tmp = x;
} else if (t <= 2.65e+26) {
tmp = t_1;
} else if (t <= 6e+51) {
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 <= (-1.95d+32)) then
tmp = t * a
else if (t <= 3.8d-166) then
tmp = y * z
else if (t <= 1.15d-106) then
tmp = t_1
else if (t <= 1.15d-47) then
tmp = x
else if (t <= 2.65d+26) then
tmp = t_1
else if (t <= 6d+51) 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 <= -1.95e+32) {
tmp = t * a;
} else if (t <= 3.8e-166) {
tmp = y * z;
} else if (t <= 1.15e-106) {
tmp = t_1;
} else if (t <= 1.15e-47) {
tmp = x;
} else if (t <= 2.65e+26) {
tmp = t_1;
} else if (t <= 6e+51) {
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 <= -1.95e+32: tmp = t * a elif t <= 3.8e-166: tmp = y * z elif t <= 1.15e-106: tmp = t_1 elif t <= 1.15e-47: tmp = x elif t <= 2.65e+26: tmp = t_1 elif t <= 6e+51: 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 <= -1.95e+32) tmp = Float64(t * a); elseif (t <= 3.8e-166) tmp = Float64(y * z); elseif (t <= 1.15e-106) tmp = t_1; elseif (t <= 1.15e-47) tmp = x; elseif (t <= 2.65e+26) tmp = t_1; elseif (t <= 6e+51) 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 <= -1.95e+32) tmp = t * a; elseif (t <= 3.8e-166) tmp = y * z; elseif (t <= 1.15e-106) tmp = t_1; elseif (t <= 1.15e-47) tmp = x; elseif (t <= 2.65e+26) tmp = t_1; elseif (t <= 6e+51) 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, -1.95e+32], N[(t * a), $MachinePrecision], If[LessEqual[t, 3.8e-166], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.15e-106], t$95$1, If[LessEqual[t, 1.15e-47], x, If[LessEqual[t, 2.65e+26], t$95$1, If[LessEqual[t, 6e+51], x, N[(t * a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+32}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-166}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -1.95e32 or 6e51 < t Initial program 92.3%
associate-+l+92.3%
+-commutative92.3%
fma-define92.3%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 85.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.3%
distribute-lft-out71.1%
Simplified71.1%
Taylor expanded in t around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -1.95e32 < t < 3.79999999999999982e-166Initial program 90.9%
associate-+l+90.9%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in y around inf 47.2%
*-commutative47.2%
Simplified47.2%
if 3.79999999999999982e-166 < t < 1.15e-106 or 1.14999999999999991e-47 < t < 2.64999999999999984e26Initial program 93.8%
associate-+l+93.8%
+-commutative93.8%
fma-define93.8%
associate-*l*95.9%
*-commutative95.9%
*-commutative95.9%
distribute-rgt-out95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around 0 76.5%
Taylor expanded in b around inf 74.1%
associate-/l*74.1%
distribute-lft-out74.4%
Simplified74.4%
Taylor expanded in b around inf 59.7%
if 1.15e-106 < t < 1.14999999999999991e-47 or 2.64999999999999984e26 < t < 6e51Initial program 100.0%
associate-+l+100.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 50.8%
Final simplification53.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.5e+33)
(* t a)
(if (<= t 6.7e-168)
(* y z)
(if (<= t 1.15e-106)
(* (* z a) b)
(if (<= t 7e-49)
x
(if (<= t 6.2e+25) (* a (* z b)) (if (<= t 7.8e+51) x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+33) {
tmp = t * a;
} else if (t <= 6.7e-168) {
tmp = y * z;
} else if (t <= 1.15e-106) {
tmp = (z * a) * b;
} else if (t <= 7e-49) {
tmp = x;
} else if (t <= 6.2e+25) {
tmp = a * (z * b);
} else if (t <= 7.8e+51) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.5d+33)) then
tmp = t * a
else if (t <= 6.7d-168) then
tmp = y * z
else if (t <= 1.15d-106) then
tmp = (z * a) * b
else if (t <= 7d-49) then
tmp = x
else if (t <= 6.2d+25) then
tmp = a * (z * b)
else if (t <= 7.8d+51) then
tmp = x
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+33) {
tmp = t * a;
} else if (t <= 6.7e-168) {
tmp = y * z;
} else if (t <= 1.15e-106) {
tmp = (z * a) * b;
} else if (t <= 7e-49) {
tmp = x;
} else if (t <= 6.2e+25) {
tmp = a * (z * b);
} else if (t <= 7.8e+51) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e+33: tmp = t * a elif t <= 6.7e-168: tmp = y * z elif t <= 1.15e-106: tmp = (z * a) * b elif t <= 7e-49: tmp = x elif t <= 6.2e+25: tmp = a * (z * b) elif t <= 7.8e+51: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e+33) tmp = Float64(t * a); elseif (t <= 6.7e-168) tmp = Float64(y * z); elseif (t <= 1.15e-106) tmp = Float64(Float64(z * a) * b); elseif (t <= 7e-49) tmp = x; elseif (t <= 6.2e+25) tmp = Float64(a * Float64(z * b)); elseif (t <= 7.8e+51) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.5e+33) tmp = t * a; elseif (t <= 6.7e-168) tmp = y * z; elseif (t <= 1.15e-106) tmp = (z * a) * b; elseif (t <= 7e-49) tmp = x; elseif (t <= 6.2e+25) tmp = a * (z * b); elseif (t <= 7.8e+51) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e+33], N[(t * a), $MachinePrecision], If[LessEqual[t, 6.7e-168], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.15e-106], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 7e-49], x, If[LessEqual[t, 6.2e+25], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+51], x, N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+33}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 6.7 \cdot 10^{-168}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-106}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+25}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -4.5e33 or 7.79999999999999968e51 < t Initial program 92.3%
associate-+l+92.3%
+-commutative92.3%
fma-define92.3%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 85.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.3%
distribute-lft-out71.1%
Simplified71.1%
Taylor expanded in t around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -4.5e33 < t < 6.69999999999999988e-168Initial program 90.9%
associate-+l+90.9%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in y around inf 47.2%
*-commutative47.2%
Simplified47.2%
if 6.69999999999999988e-168 < t < 1.15e-106Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 92.1%
Taylor expanded in b around inf 92.1%
associate-/l*92.1%
distribute-lft-out92.1%
Simplified92.1%
Taylor expanded in b around inf 67.3%
*-commutative67.3%
associate-*r*67.4%
Simplified67.4%
if 1.15e-106 < t < 7.00000000000000012e-49 or 6.1999999999999996e25 < t < 7.79999999999999968e51Initial program 100.0%
associate-+l+100.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 50.8%
if 7.00000000000000012e-49 < t < 6.1999999999999996e25Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
fma-define87.6%
associate-*l*91.8%
*-commutative91.8%
*-commutative91.8%
distribute-rgt-out91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y around 0 61.0%
Taylor expanded in b around inf 56.1%
associate-/l*56.1%
distribute-lft-out56.7%
Simplified56.7%
Taylor expanded in b around inf 52.0%
Final simplification53.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.55e+31)
(* t a)
(if (<= t 2.5e-166)
(* y z)
(if (<= t 1.1e-106)
(* (* z a) b)
(if (<= t 2e-46)
x
(if (<= t 2.1e+26) (* z (* a b)) (if (<= t 6.2e+51) x (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.55e+31) {
tmp = t * a;
} else if (t <= 2.5e-166) {
tmp = y * z;
} else if (t <= 1.1e-106) {
tmp = (z * a) * b;
} else if (t <= 2e-46) {
tmp = x;
} else if (t <= 2.1e+26) {
tmp = z * (a * b);
} else if (t <= 6.2e+51) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.55d+31)) then
tmp = t * a
else if (t <= 2.5d-166) then
tmp = y * z
else if (t <= 1.1d-106) then
tmp = (z * a) * b
else if (t <= 2d-46) then
tmp = x
else if (t <= 2.1d+26) then
tmp = z * (a * b)
else if (t <= 6.2d+51) then
tmp = x
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.55e+31) {
tmp = t * a;
} else if (t <= 2.5e-166) {
tmp = y * z;
} else if (t <= 1.1e-106) {
tmp = (z * a) * b;
} else if (t <= 2e-46) {
tmp = x;
} else if (t <= 2.1e+26) {
tmp = z * (a * b);
} else if (t <= 6.2e+51) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.55e+31: tmp = t * a elif t <= 2.5e-166: tmp = y * z elif t <= 1.1e-106: tmp = (z * a) * b elif t <= 2e-46: tmp = x elif t <= 2.1e+26: tmp = z * (a * b) elif t <= 6.2e+51: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.55e+31) tmp = Float64(t * a); elseif (t <= 2.5e-166) tmp = Float64(y * z); elseif (t <= 1.1e-106) tmp = Float64(Float64(z * a) * b); elseif (t <= 2e-46) tmp = x; elseif (t <= 2.1e+26) tmp = Float64(z * Float64(a * b)); elseif (t <= 6.2e+51) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.55e+31) tmp = t * a; elseif (t <= 2.5e-166) tmp = y * z; elseif (t <= 1.1e-106) tmp = (z * a) * b; elseif (t <= 2e-46) tmp = x; elseif (t <= 2.1e+26) tmp = z * (a * b); elseif (t <= 6.2e+51) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.55e+31], N[(t * a), $MachinePrecision], If[LessEqual[t, 2.5e-166], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.1e-106], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 2e-46], x, If[LessEqual[t, 2.1e+26], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+51], x, N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+31}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-166}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-106}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+26}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -1.5500000000000001e31 or 6.20000000000000022e51 < t Initial program 92.3%
associate-+l+92.3%
+-commutative92.3%
fma-define92.3%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 85.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.3%
distribute-lft-out71.1%
Simplified71.1%
Taylor expanded in t around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -1.5500000000000001e31 < t < 2.5e-166Initial program 90.9%
associate-+l+90.9%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in y around inf 47.2%
*-commutative47.2%
Simplified47.2%
if 2.5e-166 < t < 1.09999999999999997e-106Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 92.1%
Taylor expanded in b around inf 92.1%
associate-/l*92.1%
distribute-lft-out92.1%
Simplified92.1%
Taylor expanded in b around inf 67.3%
*-commutative67.3%
associate-*r*67.4%
Simplified67.4%
if 1.09999999999999997e-106 < t < 2.00000000000000005e-46 or 2.1000000000000001e26 < t < 6.20000000000000022e51Initial program 100.0%
associate-+l+100.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 50.8%
if 2.00000000000000005e-46 < t < 2.1000000000000001e26Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
fma-define87.6%
associate-*l*91.8%
*-commutative91.8%
*-commutative91.8%
distribute-rgt-out91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y around 0 61.0%
Taylor expanded in b around inf 56.1%
associate-/l*56.1%
distribute-lft-out56.7%
Simplified56.7%
Taylor expanded in b around inf 52.0%
associate-*r*60.0%
*-commutative60.0%
*-commutative60.0%
Simplified60.0%
Final simplification54.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -1.95e+54)
(not (or (<= a -6.2e+19) (and (not (<= a -4.6e-27)) (<= a 1.1e+57)))))
(* a (+ t (* z b)))
(+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.95e+54) || !((a <= -6.2e+19) || (!(a <= -4.6e-27) && (a <= 1.1e+57)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.95d+54)) .or. (.not. (a <= (-6.2d+19)) .or. (.not. (a <= (-4.6d-27))) .and. (a <= 1.1d+57))) then
tmp = a * (t + (z * b))
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.95e+54) || !((a <= -6.2e+19) || (!(a <= -4.6e-27) && (a <= 1.1e+57)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.95e+54) or not ((a <= -6.2e+19) or (not (a <= -4.6e-27) and (a <= 1.1e+57))): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.95e+54) || !((a <= -6.2e+19) || (!(a <= -4.6e-27) && (a <= 1.1e+57)))) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.95e+54) || ~(((a <= -6.2e+19) || (~((a <= -4.6e-27)) && (a <= 1.1e+57))))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.95e+54], N[Not[Or[LessEqual[a, -6.2e+19], And[N[Not[LessEqual[a, -4.6e-27]], $MachinePrecision], LessEqual[a, 1.1e+57]]]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+54} \lor \neg \left(a \leq -6.2 \cdot 10^{+19} \lor \neg \left(a \leq -4.6 \cdot 10^{-27}\right) \land a \leq 1.1 \cdot 10^{+57}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -1.9500000000000001e54 or -6.2e19 < a < -4.5999999999999999e-27 or 1.1e57 < a Initial program 84.0%
associate-+l+84.0%
+-commutative84.0%
fma-define84.0%
associate-*l*91.4%
*-commutative91.4%
*-commutative91.4%
distribute-rgt-out97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around 0 89.3%
Taylor expanded in x around 0 82.7%
if -1.9500000000000001e54 < a < -6.2e19 or -4.5999999999999999e-27 < a < 1.1e57Initial program 99.6%
associate-+l+99.6%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in a around 0 79.7%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -1.76e+93)
(not (or (<= y -3.55e+50) (and (not (<= y -0.45)) (<= y 8.5e+65)))))
(+ x (* y z))
(+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.76e+93) || !((y <= -3.55e+50) || (!(y <= -0.45) && (y <= 8.5e+65)))) {
tmp = x + (y * z);
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.76d+93)) .or. (.not. (y <= (-3.55d+50)) .or. (.not. (y <= (-0.45d0))) .and. (y <= 8.5d+65))) then
tmp = x + (y * z)
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.76e+93) || !((y <= -3.55e+50) || (!(y <= -0.45) && (y <= 8.5e+65)))) {
tmp = x + (y * z);
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.76e+93) or not ((y <= -3.55e+50) or (not (y <= -0.45) and (y <= 8.5e+65))): tmp = x + (y * z) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.76e+93) || !((y <= -3.55e+50) || (!(y <= -0.45) && (y <= 8.5e+65)))) tmp = Float64(x + Float64(y * z)); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.76e+93) || ~(((y <= -3.55e+50) || (~((y <= -0.45)) && (y <= 8.5e+65))))) tmp = x + (y * z); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.76e+93], N[Not[Or[LessEqual[y, -3.55e+50], And[N[Not[LessEqual[y, -0.45]], $MachinePrecision], LessEqual[y, 8.5e+65]]]], $MachinePrecision]], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.76 \cdot 10^{+93} \lor \neg \left(y \leq -3.55 \cdot 10^{+50} \lor \neg \left(y \leq -0.45\right) \land y \leq 8.5 \cdot 10^{+65}\right):\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if y < -1.75999999999999994e93 or -3.54999999999999996e50 < y < -0.450000000000000011 or 8.50000000000000075e65 < y Initial program 89.2%
associate-+l+89.2%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around 0 78.4%
if -1.75999999999999994e93 < y < -3.54999999999999996e50 or -0.450000000000000011 < y < 8.50000000000000075e65Initial program 94.9%
associate-+l+94.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in z around 0 70.9%
+-commutative70.9%
Simplified70.9%
Final simplification74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= t -4.9e+33)
(* t a)
(if (<= t 1.62e-34)
t_1
(if (<= t 2.55e+20) (* z (* a b)) (if (<= t 7.8e+51) t_1 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (t <= -4.9e+33) {
tmp = t * a;
} else if (t <= 1.62e-34) {
tmp = t_1;
} else if (t <= 2.55e+20) {
tmp = z * (a * b);
} else if (t <= 7.8e+51) {
tmp = t_1;
} 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 = x + (y * z)
if (t <= (-4.9d+33)) then
tmp = t * a
else if (t <= 1.62d-34) then
tmp = t_1
else if (t <= 2.55d+20) then
tmp = z * (a * b)
else if (t <= 7.8d+51) then
tmp = t_1
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 = x + (y * z);
double tmp;
if (t <= -4.9e+33) {
tmp = t * a;
} else if (t <= 1.62e-34) {
tmp = t_1;
} else if (t <= 2.55e+20) {
tmp = z * (a * b);
} else if (t <= 7.8e+51) {
tmp = t_1;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if t <= -4.9e+33: tmp = t * a elif t <= 1.62e-34: tmp = t_1 elif t <= 2.55e+20: tmp = z * (a * b) elif t <= 7.8e+51: tmp = t_1 else: tmp = t * a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (t <= -4.9e+33) tmp = Float64(t * a); elseif (t <= 1.62e-34) tmp = t_1; elseif (t <= 2.55e+20) tmp = Float64(z * Float64(a * b)); elseif (t <= 7.8e+51) tmp = t_1; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (t <= -4.9e+33) tmp = t * a; elseif (t <= 1.62e-34) tmp = t_1; elseif (t <= 2.55e+20) tmp = z * (a * b); elseif (t <= 7.8e+51) tmp = t_1; else tmp = t * a; 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[t, -4.9e+33], N[(t * a), $MachinePrecision], If[LessEqual[t, 1.62e-34], t$95$1, If[LessEqual[t, 2.55e+20], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+51], t$95$1, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;t \leq -4.9 \cdot 10^{+33}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+20}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -4.90000000000000014e33 or 7.79999999999999968e51 < t Initial program 92.3%
associate-+l+92.3%
+-commutative92.3%
fma-define92.3%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 85.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.3%
distribute-lft-out71.1%
Simplified71.1%
Taylor expanded in t around inf 58.1%
*-commutative58.1%
Simplified58.1%
if -4.90000000000000014e33 < t < 1.62000000000000006e-34 or 2.55e20 < t < 7.79999999999999968e51Initial program 93.3%
associate-+l+93.3%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 74.0%
if 1.62000000000000006e-34 < t < 2.55e20Initial program 78.7%
associate-+l+78.7%
+-commutative78.7%
fma-define78.7%
associate-*l*86.2%
*-commutative86.2%
*-commutative86.2%
distribute-rgt-out86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 73.5%
Taylor expanded in b around inf 65.1%
associate-/l*65.1%
distribute-lft-out66.0%
Simplified66.0%
Taylor expanded in b around inf 72.2%
associate-*r*85.9%
*-commutative85.9%
*-commutative85.9%
Simplified85.9%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (or (<= b -2.05e-21) (not (<= b 1.75e-41)))
(+ t_1 (* b (* a (+ z (/ t b)))))
(+ t_1 (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if ((b <= -2.05e-21) || !(b <= 1.75e-41)) {
tmp = t_1 + (b * (a * (z + (t / b))));
} else {
tmp = t_1 + (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 = x + (y * z)
if ((b <= (-2.05d-21)) .or. (.not. (b <= 1.75d-41))) then
tmp = t_1 + (b * (a * (z + (t / b))))
else
tmp = t_1 + (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 = x + (y * z);
double tmp;
if ((b <= -2.05e-21) || !(b <= 1.75e-41)) {
tmp = t_1 + (b * (a * (z + (t / b))));
} else {
tmp = t_1 + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if (b <= -2.05e-21) or not (b <= 1.75e-41): tmp = t_1 + (b * (a * (z + (t / b)))) else: tmp = t_1 + (t * a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if ((b <= -2.05e-21) || !(b <= 1.75e-41)) tmp = Float64(t_1 + Float64(b * Float64(a * Float64(z + Float64(t / b))))); else tmp = Float64(t_1 + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if ((b <= -2.05e-21) || ~((b <= 1.75e-41))) tmp = t_1 + (b * (a * (z + (t / b)))); else tmp = t_1 + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -2.05e-21], N[Not[LessEqual[b, 1.75e-41]], $MachinePrecision]], N[(t$95$1 + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{-21} \lor \neg \left(b \leq 1.75 \cdot 10^{-41}\right):\\
\;\;\;\;t\_1 + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t \cdot a\\
\end{array}
\end{array}
if b < -2.04999999999999997e-21 or 1.75e-41 < b Initial program 92.9%
associate-+l+92.9%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in b around inf 95.1%
associate-/l*96.5%
distribute-lft-out97.3%
Simplified97.3%
if -2.04999999999999997e-21 < b < 1.75e-41Initial program 92.0%
associate-+l+92.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in t around inf 96.1%
Final simplification96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -9e+166)
t_1
(if (<= z -6.5e-27)
(+ (* y z) (* t a))
(if (<= z 1.6e-41) (+ x (* t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -9e+166) {
tmp = t_1;
} else if (z <= -6.5e-27) {
tmp = (y * z) + (t * a);
} else if (z <= 1.6e-41) {
tmp = x + (t * a);
} 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 * (y + (a * b))
if (z <= (-9d+166)) then
tmp = t_1
else if (z <= (-6.5d-27)) then
tmp = (y * z) + (t * a)
else if (z <= 1.6d-41) then
tmp = x + (t * a)
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 * (y + (a * b));
double tmp;
if (z <= -9e+166) {
tmp = t_1;
} else if (z <= -6.5e-27) {
tmp = (y * z) + (t * a);
} else if (z <= 1.6e-41) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -9e+166: tmp = t_1 elif z <= -6.5e-27: tmp = (y * z) + (t * a) elif z <= 1.6e-41: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -9e+166) tmp = t_1; elseif (z <= -6.5e-27) tmp = Float64(Float64(y * z) + Float64(t * a)); elseif (z <= 1.6e-41) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -9e+166) tmp = t_1; elseif (z <= -6.5e-27) tmp = (y * z) + (t * a); elseif (z <= 1.6e-41) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+166], t$95$1, If[LessEqual[z, -6.5e-27], N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-41], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-27}:\\
\;\;\;\;y \cdot z + t \cdot a\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-41}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.00000000000000061e166 or 1.60000000000000006e-41 < z Initial program 88.3%
associate-+l+88.3%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in z around inf 81.9%
+-commutative81.9%
Simplified81.9%
if -9.00000000000000061e166 < z < -6.50000000000000025e-27Initial program 88.9%
associate-+l+88.9%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in t around inf 86.8%
Taylor expanded in x around 0 71.8%
if -6.50000000000000025e-27 < z < 1.60000000000000006e-41Initial program 97.7%
associate-+l+97.7%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in z around 0 83.4%
+-commutative83.4%
Simplified83.4%
Final simplification80.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1e-20) (not (<= a 2.6e+38))) (+ (* y z) (* a (+ t (* z b)))) (+ (+ x (* y z)) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e-20) || !(a <= 2.6e+38)) {
tmp = (y * z) + (a * (t + (z * b)));
} else {
tmp = (x + (y * z)) + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1d-20)) .or. (.not. (a <= 2.6d+38))) then
tmp = (y * z) + (a * (t + (z * b)))
else
tmp = (x + (y * z)) + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e-20) || !(a <= 2.6e+38)) {
tmp = (y * z) + (a * (t + (z * b)));
} else {
tmp = (x + (y * z)) + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1e-20) or not (a <= 2.6e+38): tmp = (y * z) + (a * (t + (z * b))) else: tmp = (x + (y * z)) + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1e-20) || !(a <= 2.6e+38)) tmp = Float64(Float64(y * z) + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1e-20) || ~((a <= 2.6e+38))) tmp = (y * z) + (a * (t + (z * b))); else tmp = (x + (y * z)) + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1e-20], N[Not[LessEqual[a, 2.6e+38]], $MachinePrecision]], N[(N[(y * z), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-20} \lor \neg \left(a \leq 2.6 \cdot 10^{+38}\right):\\
\;\;\;\;y \cdot z + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + t \cdot a\\
\end{array}
\end{array}
if a < -9.99999999999999945e-21 or 2.5999999999999999e38 < a Initial program 85.7%
associate-+l+85.7%
+-commutative85.7%
fma-define85.7%
associate-*l*92.7%
*-commutative92.7%
*-commutative92.7%
distribute-rgt-out98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in x around 0 90.5%
if -9.99999999999999945e-21 < a < 2.5999999999999999e38Initial program 98.8%
associate-+l+98.8%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in t around inf 91.9%
Final simplification91.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.4e-27) (not (<= a 3.2e+45))) (+ x (* a (+ t (* z b)))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.4e-27) || !(a <= 3.2e+45)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-6.4d-27)) .or. (.not. (a <= 3.2d+45))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.4e-27) || !(a <= 3.2e+45)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.4e-27) or not (a <= 3.2e+45): tmp = x + (a * (t + (z * b))) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.4e-27) || !(a <= 3.2e+45)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -6.4e-27) || ~((a <= 3.2e+45))) tmp = x + (a * (t + (z * b))); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.4e-27], N[Not[LessEqual[a, 3.2e+45]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{-27} \lor \neg \left(a \leq 3.2 \cdot 10^{+45}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -6.39999999999999982e-27 or 3.2000000000000003e45 < a Initial program 84.9%
associate-+l+84.9%
+-commutative84.9%
fma-define84.9%
associate-*l*91.9%
*-commutative91.9%
*-commutative91.9%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 86.8%
if -6.39999999999999982e-27 < a < 3.2000000000000003e45Initial program 99.6%
associate-+l+99.6%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in a around 0 79.9%
Final simplification83.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.2e-26) (not (<= z 1.4e-46))) (* z (+ y (* a b))) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e-26) || !(z <= 1.4e-46)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.2d-26)) .or. (.not. (z <= 1.4d-46))) then
tmp = z * (y + (a * b))
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e-26) || !(z <= 1.4e-46)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.2e-26) or not (z <= 1.4e-46): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.2e-26) || !(z <= 1.4e-46)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.2e-26) || ~((z <= 1.4e-46))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e-26], N[Not[LessEqual[z, 1.4e-46]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-26} \lor \neg \left(z \leq 1.4 \cdot 10^{-46}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.2e-26 or 1.3999999999999999e-46 < z Initial program 88.5%
associate-+l+88.5%
associate-*l*89.1%
Simplified89.1%
Taylor expanded in z around inf 75.9%
+-commutative75.9%
Simplified75.9%
if -1.2e-26 < z < 1.3999999999999999e-46Initial program 97.7%
associate-+l+97.7%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in z around 0 83.4%
+-commutative83.4%
Simplified83.4%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8e-27) (+ x (* a (+ t (* z b)))) (+ (+ x (* y z)) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e-27) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (y * z)) + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-8d-27)) then
tmp = x + (a * (t + (z * b)))
else
tmp = (x + (y * z)) + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e-27) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (y * z)) + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8e-27: tmp = x + (a * (t + (z * b))) else: tmp = (x + (y * z)) + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8e-27) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8e-27) tmp = x + (a * (t + (z * b))); else tmp = (x + (y * z)) + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8e-27], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-27}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + t \cdot a\\
\end{array}
\end{array}
if a < -8.0000000000000003e-27Initial program 84.4%
associate-+l+84.4%
+-commutative84.4%
fma-define84.4%
associate-*l*93.3%
*-commutative93.3%
*-commutative93.3%
distribute-rgt-out97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in y around 0 88.7%
if -8.0000000000000003e-27 < a Initial program 95.8%
associate-+l+95.8%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in t around inf 88.7%
Final simplification88.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.4e+25) (not (<= t 5.8e+51))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e+25) || !(t <= 5.8e+51)) {
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 <= (-1.4d+25)) .or. (.not. (t <= 5.8d+51))) 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 <= -1.4e+25) || !(t <= 5.8e+51)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.4e+25) or not (t <= 5.8e+51): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.4e+25) || !(t <= 5.8e+51)) 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 <= -1.4e+25) || ~((t <= 5.8e+51))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.4e+25], N[Not[LessEqual[t, 5.8e+51]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+25} \lor \neg \left(t \leq 5.8 \cdot 10^{+51}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.4000000000000001e25 or 5.7999999999999997e51 < t Initial program 92.4%
associate-+l+92.4%
+-commutative92.4%
fma-define92.4%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 84.9%
Taylor expanded in b around inf 71.9%
associate-/l*68.8%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in t around inf 57.6%
*-commutative57.6%
Simplified57.6%
if -1.4000000000000001e25 < t < 5.7999999999999997e51Initial program 92.6%
associate-+l+92.6%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in x around inf 31.3%
Final simplification43.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.6e+32) (not (<= t 9.5e+46))) (* t a) (* y z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.6e+32) || !(t <= 9.5e+46)) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.6d+32)) .or. (.not. (t <= 9.5d+46))) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.6e+32) || !(t <= 9.5e+46)) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.6e+32) or not (t <= 9.5e+46): tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.6e+32) || !(t <= 9.5e+46)) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.6e+32) || ~((t <= 9.5e+46))) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.6e+32], N[Not[LessEqual[t, 9.5e+46]], $MachinePrecision]], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+32} \lor \neg \left(t \leq 9.5 \cdot 10^{+46}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if t < -6.60000000000000039e32 or 9.5000000000000008e46 < t Initial program 92.4%
associate-+l+92.4%
+-commutative92.4%
fma-define92.4%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in y around 0 85.7%
Taylor expanded in b around inf 72.8%
associate-/l*69.6%
distribute-lft-out71.3%
Simplified71.3%
Taylor expanded in t around inf 57.6%
*-commutative57.6%
Simplified57.6%
if -6.60000000000000039e32 < t < 9.5000000000000008e46Initial program 92.6%
associate-+l+92.6%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in y around inf 42.7%
*-commutative42.7%
Simplified42.7%
Final simplification49.5%
(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 92.5%
associate-+l+92.5%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in x around inf 24.2%
Final simplification24.2%
(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 2024059
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(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)))