
(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 17 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 (* (* z a) b))
(t_2 (+ (+ (+ x (* y z)) (* t a)) t_1))
(t_3 (* a (+ t (* z b)))))
(if (<= t_2 5e+288)
(+ t_1 (+ x (fma z y (* t a))))
(if (<= t_2 INFINITY) (+ (fma y z x) t_3) t_3))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double t_2 = ((x + (y * z)) + (t * a)) + t_1;
double t_3 = a * (t + (z * b));
double tmp;
if (t_2 <= 5e+288) {
tmp = t_1 + (x + fma(z, y, (t * a)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = fma(y, z, x) + t_3;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * a) * b) t_2 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + t_1) t_3 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (t_2 <= 5e+288) tmp = Float64(t_1 + Float64(x + fma(z, y, Float64(t * a)))); elseif (t_2 <= Inf) tmp = Float64(fma(y, z, x) + t_3); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 5e+288], N[(t$95$1 + N[(x + N[(z * y + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(y * z + x), $MachinePrecision] + t$95$3), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b\\
t_2 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + t_1\\
t_3 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t_1 + \left(x + \mathsf{fma}\left(z, y, t \cdot a\right)\right)\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + t_3\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 5.0000000000000003e288Initial program 99.0%
associate-+l+99.0%
*-un-lft-identity99.0%
fma-def99.0%
*-commutative99.0%
fma-def99.0%
*-commutative99.0%
Applied egg-rr99.0%
fma-udef99.0%
*-un-lft-identity99.0%
+-commutative99.0%
Applied egg-rr99.0%
if 5.0000000000000003e288 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 86.1%
associate-+l+86.1%
+-commutative86.1%
fma-def86.1%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.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*11.1%
Simplified11.1%
Taylor expanded in a around inf 83.4%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))
(t_2 (* a (+ t (* z b)))))
(if (<= t_1 5e+288) t_1 (if (<= t_1 INFINITY) (+ (fma y z x) t_2) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double t_2 = a * (t + (z * b));
double tmp;
if (t_1 <= 5e+288) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma(y, z, x) + t_2;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) t_2 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (t_1 <= 5e+288) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(fma(y, z, x) + t_2); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+288], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y * z + x), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
t_2 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + t_2\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 5.0000000000000003e288Initial program 99.0%
if 5.0000000000000003e288 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 86.1%
associate-+l+86.1%
+-commutative86.1%
fma-def86.1%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.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*11.1%
Simplified11.1%
Taylor expanded in a around inf 83.4%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))
(t_2 (* a (+ t (* z b)))))
(if (<= t_1 2e+300) t_1 (if (<= t_1 INFINITY) (+ t_2 (* y z)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double t_2 = a * (t + (z * b));
double tmp;
if (t_1 <= 2e+300) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2 + (y * z);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double t_2 = a * (t + (z * b));
double tmp;
if (t_1 <= 2e+300) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2 + (y * z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) t_2 = a * (t + (z * b)) tmp = 0 if t_1 <= 2e+300: tmp = t_1 elif t_1 <= math.inf: tmp = t_2 + (y * z) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) t_2 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (t_1 <= 2e+300) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(t_2 + Float64(y * z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); t_2 = a * (t + (z * b)); tmp = 0.0; if (t_1 <= 2e+300) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2 + (y * z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+300], t$95$1, If[LessEqual[t$95$1, Infinity], N[(t$95$2 + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
t_2 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2 + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 2.0000000000000001e300Initial program 99.0%
if 2.0000000000000001e300 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 85.4%
associate-+l+85.4%
+-commutative85.4%
fma-def85.4%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.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*11.1%
Simplified11.1%
Taylor expanded in a around inf 83.4%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* a b))))
(if (<= z -1.2e+245)
(* y z)
(if (<= z -5e+169)
t_1
(if (<= z -1.45e+111)
(* y z)
(if (<= z -1800000000000.0)
t_1
(if (<= z 3.3)
(* t a)
(if (or (<= z 2.3e+140) (not (<= z 1.05e+209)))
t_1
(* y z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a * b);
double tmp;
if (z <= -1.2e+245) {
tmp = y * z;
} else if (z <= -5e+169) {
tmp = t_1;
} else if (z <= -1.45e+111) {
tmp = y * z;
} else if (z <= -1800000000000.0) {
tmp = t_1;
} else if (z <= 3.3) {
tmp = t * a;
} else if ((z <= 2.3e+140) || !(z <= 1.05e+209)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z * (a * b)
if (z <= (-1.2d+245)) then
tmp = y * z
else if (z <= (-5d+169)) then
tmp = t_1
else if (z <= (-1.45d+111)) then
tmp = y * z
else if (z <= (-1800000000000.0d0)) then
tmp = t_1
else if (z <= 3.3d0) then
tmp = t * a
else if ((z <= 2.3d+140) .or. (.not. (z <= 1.05d+209))) then
tmp = t_1
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 t_1 = z * (a * b);
double tmp;
if (z <= -1.2e+245) {
tmp = y * z;
} else if (z <= -5e+169) {
tmp = t_1;
} else if (z <= -1.45e+111) {
tmp = y * z;
} else if (z <= -1800000000000.0) {
tmp = t_1;
} else if (z <= 3.3) {
tmp = t * a;
} else if ((z <= 2.3e+140) || !(z <= 1.05e+209)) {
tmp = t_1;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a * b) tmp = 0 if z <= -1.2e+245: tmp = y * z elif z <= -5e+169: tmp = t_1 elif z <= -1.45e+111: tmp = y * z elif z <= -1800000000000.0: tmp = t_1 elif z <= 3.3: tmp = t * a elif (z <= 2.3e+140) or not (z <= 1.05e+209): tmp = t_1 else: tmp = y * z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a * b)) tmp = 0.0 if (z <= -1.2e+245) tmp = Float64(y * z); elseif (z <= -5e+169) tmp = t_1; elseif (z <= -1.45e+111) tmp = Float64(y * z); elseif (z <= -1800000000000.0) tmp = t_1; elseif (z <= 3.3) tmp = Float64(t * a); elseif ((z <= 2.3e+140) || !(z <= 1.05e+209)) tmp = t_1; else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (a * b); tmp = 0.0; if (z <= -1.2e+245) tmp = y * z; elseif (z <= -5e+169) tmp = t_1; elseif (z <= -1.45e+111) tmp = y * z; elseif (z <= -1800000000000.0) tmp = t_1; elseif (z <= 3.3) tmp = t * a; elseif ((z <= 2.3e+140) || ~((z <= 1.05e+209))) tmp = t_1; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+245], N[(y * z), $MachinePrecision], If[LessEqual[z, -5e+169], t$95$1, If[LessEqual[z, -1.45e+111], N[(y * z), $MachinePrecision], If[LessEqual[z, -1800000000000.0], t$95$1, If[LessEqual[z, 3.3], N[(t * a), $MachinePrecision], If[Or[LessEqual[z, 2.3e+140], N[Not[LessEqual[z, 1.05e+209]], $MachinePrecision]], t$95$1, N[(y * z), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+245}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+111}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1800000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.3:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+140} \lor \neg \left(z \leq 1.05 \cdot 10^{+209}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -1.1999999999999999e245 or -5.00000000000000017e169 < z < -1.45e111 or 2.2999999999999999e140 < z < 1.05e209Initial program 78.2%
associate-+l+78.2%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
Simplified63.9%
if -1.1999999999999999e245 < z < -5.00000000000000017e169 or -1.45e111 < z < -1.8e12 or 3.2999999999999998 < z < 2.2999999999999999e140 or 1.05e209 < z Initial program 85.3%
associate-+l+85.3%
associate-*l*85.1%
Simplified85.1%
Taylor expanded in z around inf 77.9%
Taylor expanded in y around 0 56.8%
if -1.8e12 < z < 3.2999999999999998Initial program 98.2%
associate-+l+98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in t around inf 48.2%
Final simplification54.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* a b))))
(if (<= z -9.2e+249)
(* y z)
(if (<= z -2.4e+169)
t_1
(if (<= z -1.35e+110)
(* y z)
(if (<= z -1150000000000.0)
t_1
(if (<= z 380000.0)
(* t a)
(if (<= z 5.2e+139)
t_1
(if (<= z 6e+209) (* y z) (* (* z a) b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a * b);
double tmp;
if (z <= -9.2e+249) {
tmp = y * z;
} else if (z <= -2.4e+169) {
tmp = t_1;
} else if (z <= -1.35e+110) {
tmp = y * z;
} else if (z <= -1150000000000.0) {
tmp = t_1;
} else if (z <= 380000.0) {
tmp = t * a;
} else if (z <= 5.2e+139) {
tmp = t_1;
} else if (z <= 6e+209) {
tmp = y * z;
} else {
tmp = (z * a) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (a * b)
if (z <= (-9.2d+249)) then
tmp = y * z
else if (z <= (-2.4d+169)) then
tmp = t_1
else if (z <= (-1.35d+110)) then
tmp = y * z
else if (z <= (-1150000000000.0d0)) then
tmp = t_1
else if (z <= 380000.0d0) then
tmp = t * a
else if (z <= 5.2d+139) then
tmp = t_1
else if (z <= 6d+209) then
tmp = y * z
else
tmp = (z * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (a * b);
double tmp;
if (z <= -9.2e+249) {
tmp = y * z;
} else if (z <= -2.4e+169) {
tmp = t_1;
} else if (z <= -1.35e+110) {
tmp = y * z;
} else if (z <= -1150000000000.0) {
tmp = t_1;
} else if (z <= 380000.0) {
tmp = t * a;
} else if (z <= 5.2e+139) {
tmp = t_1;
} else if (z <= 6e+209) {
tmp = y * z;
} else {
tmp = (z * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a * b) tmp = 0 if z <= -9.2e+249: tmp = y * z elif z <= -2.4e+169: tmp = t_1 elif z <= -1.35e+110: tmp = y * z elif z <= -1150000000000.0: tmp = t_1 elif z <= 380000.0: tmp = t * a elif z <= 5.2e+139: tmp = t_1 elif z <= 6e+209: tmp = y * z else: tmp = (z * a) * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a * b)) tmp = 0.0 if (z <= -9.2e+249) tmp = Float64(y * z); elseif (z <= -2.4e+169) tmp = t_1; elseif (z <= -1.35e+110) tmp = Float64(y * z); elseif (z <= -1150000000000.0) tmp = t_1; elseif (z <= 380000.0) tmp = Float64(t * a); elseif (z <= 5.2e+139) tmp = t_1; elseif (z <= 6e+209) tmp = Float64(y * z); else tmp = Float64(Float64(z * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (a * b); tmp = 0.0; if (z <= -9.2e+249) tmp = y * z; elseif (z <= -2.4e+169) tmp = t_1; elseif (z <= -1.35e+110) tmp = y * z; elseif (z <= -1150000000000.0) tmp = t_1; elseif (z <= 380000.0) tmp = t * a; elseif (z <= 5.2e+139) tmp = t_1; elseif (z <= 6e+209) tmp = y * z; else tmp = (z * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+249], N[(y * z), $MachinePrecision], If[LessEqual[z, -2.4e+169], t$95$1, If[LessEqual[z, -1.35e+110], N[(y * z), $MachinePrecision], If[LessEqual[z, -1150000000000.0], t$95$1, If[LessEqual[z, 380000.0], N[(t * a), $MachinePrecision], If[LessEqual[z, 5.2e+139], t$95$1, If[LessEqual[z, 6e+209], N[(y * z), $MachinePrecision], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+249}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+110}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1150000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 380000:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+209}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -9.1999999999999993e249 or -2.3999999999999998e169 < z < -1.35000000000000005e110 or 5.20000000000000044e139 < z < 5.99999999999999971e209Initial program 78.2%
associate-+l+78.2%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
Simplified63.9%
if -9.1999999999999993e249 < z < -2.3999999999999998e169 or -1.35000000000000005e110 < z < -1.15e12 or 3.8e5 < z < 5.20000000000000044e139Initial program 81.8%
associate-+l+81.8%
associate-*l*83.9%
Simplified83.9%
Taylor expanded in z around inf 77.6%
Taylor expanded in y around 0 56.7%
if -1.15e12 < z < 3.8e5Initial program 98.2%
associate-+l+98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in t around inf 48.2%
if 5.99999999999999971e209 < z Initial program 99.9%
Taylor expanded in x around 0 87.1%
Taylor expanded in b around inf 52.1%
*-commutative52.1%
associate-*r*62.4%
*-commutative62.4%
Simplified62.4%
Final simplification54.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))) (t_2 (* a (+ t (* z b)))))
(if (<= a -3.8e+70)
t_2
(if (<= a -2.3e-11)
t_1
(if (<= a -5.2e-100)
(+ x (* t a))
(if (or (<= a 9.6e-56) (and (not (<= a 1.82e+25)) (<= a 9.2e+55)))
t_1
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = a * (t + (z * b));
double tmp;
if (a <= -3.8e+70) {
tmp = t_2;
} else if (a <= -2.3e-11) {
tmp = t_1;
} else if (a <= -5.2e-100) {
tmp = x + (t * a);
} else if ((a <= 9.6e-56) || (!(a <= 1.82e+25) && (a <= 9.2e+55))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * z)
t_2 = a * (t + (z * b))
if (a <= (-3.8d+70)) then
tmp = t_2
else if (a <= (-2.3d-11)) then
tmp = t_1
else if (a <= (-5.2d-100)) then
tmp = x + (t * a)
else if ((a <= 9.6d-56) .or. (.not. (a <= 1.82d+25)) .and. (a <= 9.2d+55)) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = a * (t + (z * b));
double tmp;
if (a <= -3.8e+70) {
tmp = t_2;
} else if (a <= -2.3e-11) {
tmp = t_1;
} else if (a <= -5.2e-100) {
tmp = x + (t * a);
} else if ((a <= 9.6e-56) || (!(a <= 1.82e+25) && (a <= 9.2e+55))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) t_2 = a * (t + (z * b)) tmp = 0 if a <= -3.8e+70: tmp = t_2 elif a <= -2.3e-11: tmp = t_1 elif a <= -5.2e-100: tmp = x + (t * a) elif (a <= 9.6e-56) or (not (a <= 1.82e+25) and (a <= 9.2e+55)): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) t_2 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (a <= -3.8e+70) tmp = t_2; elseif (a <= -2.3e-11) tmp = t_1; elseif (a <= -5.2e-100) tmp = Float64(x + Float64(t * a)); elseif ((a <= 9.6e-56) || (!(a <= 1.82e+25) && (a <= 9.2e+55))) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); t_2 = a * (t + (z * b)); tmp = 0.0; if (a <= -3.8e+70) tmp = t_2; elseif (a <= -2.3e-11) tmp = t_1; elseif (a <= -5.2e-100) tmp = x + (t * a); elseif ((a <= 9.6e-56) || (~((a <= 1.82e+25)) && (a <= 9.2e+55))) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+70], t$95$2, If[LessEqual[a, -2.3e-11], t$95$1, If[LessEqual[a, -5.2e-100], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 9.6e-56], And[N[Not[LessEqual[a, 1.82e+25]], $MachinePrecision], LessEqual[a, 9.2e+55]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{-100}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-56} \lor \neg \left(a \leq 1.82 \cdot 10^{+25}\right) \land a \leq 9.2 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -3.7999999999999998e70 or 9.60000000000000002e-56 < a < 1.8199999999999999e25 or 9.1999999999999995e55 < a Initial program 81.7%
associate-+l+81.7%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in a around inf 83.1%
if -3.7999999999999998e70 < a < -2.30000000000000014e-11 or -5.1999999999999997e-100 < a < 9.60000000000000002e-56 or 1.8199999999999999e25 < a < 9.1999999999999995e55Initial program 98.0%
associate-+l+98.0%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in a around 0 77.1%
if -2.30000000000000014e-11 < a < -5.1999999999999997e-100Initial program 99.9%
associate-+l+99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around 0 63.6%
+-commutative63.6%
Simplified63.6%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))) (t_2 (+ x (* t a))))
(if (<= a -1.1e+229)
t_2
(if (<= a -6.4e+71)
(* (* z a) b)
(if (<= a -2.4e-11)
t_1
(if (<= a -1.18e-101)
t_2
(if (<= a 2.1e-56)
t_1
(if (<= a 1.15e+247) t_2 (* a (* z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = x + (t * a);
double tmp;
if (a <= -1.1e+229) {
tmp = t_2;
} else if (a <= -6.4e+71) {
tmp = (z * a) * b;
} else if (a <= -2.4e-11) {
tmp = t_1;
} else if (a <= -1.18e-101) {
tmp = t_2;
} else if (a <= 2.1e-56) {
tmp = t_1;
} else if (a <= 1.15e+247) {
tmp = t_2;
} else {
tmp = a * (z * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * z)
t_2 = x + (t * a)
if (a <= (-1.1d+229)) then
tmp = t_2
else if (a <= (-6.4d+71)) then
tmp = (z * a) * b
else if (a <= (-2.4d-11)) then
tmp = t_1
else if (a <= (-1.18d-101)) then
tmp = t_2
else if (a <= 2.1d-56) then
tmp = t_1
else if (a <= 1.15d+247) then
tmp = t_2
else
tmp = a * (z * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = x + (t * a);
double tmp;
if (a <= -1.1e+229) {
tmp = t_2;
} else if (a <= -6.4e+71) {
tmp = (z * a) * b;
} else if (a <= -2.4e-11) {
tmp = t_1;
} else if (a <= -1.18e-101) {
tmp = t_2;
} else if (a <= 2.1e-56) {
tmp = t_1;
} else if (a <= 1.15e+247) {
tmp = t_2;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) t_2 = x + (t * a) tmp = 0 if a <= -1.1e+229: tmp = t_2 elif a <= -6.4e+71: tmp = (z * a) * b elif a <= -2.4e-11: tmp = t_1 elif a <= -1.18e-101: tmp = t_2 elif a <= 2.1e-56: tmp = t_1 elif a <= 1.15e+247: tmp = t_2 else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) t_2 = Float64(x + Float64(t * a)) tmp = 0.0 if (a <= -1.1e+229) tmp = t_2; elseif (a <= -6.4e+71) tmp = Float64(Float64(z * a) * b); elseif (a <= -2.4e-11) tmp = t_1; elseif (a <= -1.18e-101) tmp = t_2; elseif (a <= 2.1e-56) tmp = t_1; elseif (a <= 1.15e+247) tmp = t_2; else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); t_2 = x + (t * a); tmp = 0.0; if (a <= -1.1e+229) tmp = t_2; elseif (a <= -6.4e+71) tmp = (z * a) * b; elseif (a <= -2.4e-11) tmp = t_1; elseif (a <= -1.18e-101) tmp = t_2; elseif (a <= 2.1e-56) tmp = t_1; elseif (a <= 1.15e+247) tmp = t_2; else tmp = 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]}, Block[{t$95$2 = N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+229], t$95$2, If[LessEqual[a, -6.4e+71], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, -2.4e-11], t$95$1, If[LessEqual[a, -1.18e-101], t$95$2, If[LessEqual[a, 2.1e-56], t$95$1, If[LessEqual[a, 1.15e+247], t$95$2, N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := x + t \cdot a\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6.4 \cdot 10^{+71}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.18 \cdot 10^{-101}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+247}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if a < -1.10000000000000002e229 or -2.4000000000000001e-11 < a < -1.1800000000000001e-101 or 2.10000000000000006e-56 < a < 1.14999999999999995e247Initial program 88.7%
associate-+l+88.7%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in z around 0 62.4%
+-commutative62.4%
Simplified62.4%
if -1.10000000000000002e229 < a < -6.40000000000000046e71Initial program 87.8%
Taylor expanded in x around 0 80.4%
Taylor expanded in b around inf 55.0%
*-commutative55.0%
associate-*r*57.8%
*-commutative57.8%
Simplified57.8%
if -6.40000000000000046e71 < a < -2.4000000000000001e-11 or -1.1800000000000001e-101 < a < 2.10000000000000006e-56Initial program 98.9%
associate-+l+98.9%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in a around 0 76.1%
if 1.14999999999999995e247 < a Initial program 50.8%
associate-+l+50.8%
*-un-lft-identity50.8%
fma-def50.8%
*-commutative50.8%
fma-def57.1%
*-commutative57.1%
Applied egg-rr57.1%
fma-udef57.1%
*-un-lft-identity57.1%
+-commutative57.1%
Applied egg-rr57.1%
Taylor expanded in b around inf 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -520000000000.0)
t_1
(if (<= z 2.8e-165)
(+ x (* t a))
(if (<= z 2.1e-32)
(* a (+ t (* z b)))
(if (<= z 1.05e-5) (+ x (* y z)) 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 <= -520000000000.0) {
tmp = t_1;
} else if (z <= 2.8e-165) {
tmp = x + (t * a);
} else if (z <= 2.1e-32) {
tmp = a * (t + (z * b));
} else if (z <= 1.05e-5) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-520000000000.0d0)) then
tmp = t_1
else if (z <= 2.8d-165) then
tmp = x + (t * a)
else if (z <= 2.1d-32) then
tmp = a * (t + (z * b))
else if (z <= 1.05d-5) then
tmp = x + (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -520000000000.0) {
tmp = t_1;
} else if (z <= 2.8e-165) {
tmp = x + (t * a);
} else if (z <= 2.1e-32) {
tmp = a * (t + (z * b));
} else if (z <= 1.05e-5) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -520000000000.0: tmp = t_1 elif z <= 2.8e-165: tmp = x + (t * a) elif z <= 2.1e-32: tmp = a * (t + (z * b)) elif z <= 1.05e-5: tmp = x + (y * z) 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 <= -520000000000.0) tmp = t_1; elseif (z <= 2.8e-165) tmp = Float64(x + Float64(t * a)); elseif (z <= 2.1e-32) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (z <= 1.05e-5) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -520000000000.0) tmp = t_1; elseif (z <= 2.8e-165) tmp = x + (t * a); elseif (z <= 2.1e-32) tmp = a * (t + (z * b)); elseif (z <= 1.05e-5) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -520000000000.0], t$95$1, If[LessEqual[z, 2.8e-165], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-32], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-5], N[(x + N[(y * z), $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 -520000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-165}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-32}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-5}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.2e11 or 1.04999999999999994e-5 < z Initial program 83.2%
associate-+l+83.2%
associate-*l*83.2%
Simplified83.2%
Taylor expanded in z around inf 81.8%
if -5.2e11 < z < 2.7999999999999999e-165Initial program 98.8%
associate-+l+98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in z around 0 77.4%
+-commutative77.4%
Simplified77.4%
if 2.7999999999999999e-165 < z < 2.0999999999999999e-32Initial program 94.6%
associate-+l+94.6%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around inf 89.7%
if 2.0999999999999999e-32 < z < 1.04999999999999994e-5Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in a around 0 78.2%
Final simplification80.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= z -1150000000000.0)
t_1
(if (<= z 25.0)
(* t a)
(if (or (<= z 2e+140) (not (<= z 5.5e+218))) t_1 (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (z <= -1150000000000.0) {
tmp = t_1;
} else if (z <= 25.0) {
tmp = t * a;
} else if ((z <= 2e+140) || !(z <= 5.5e+218)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (z <= (-1150000000000.0d0)) then
tmp = t_1
else if (z <= 25.0d0) then
tmp = t * a
else if ((z <= 2d+140) .or. (.not. (z <= 5.5d+218))) then
tmp = t_1
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 t_1 = a * (z * b);
double tmp;
if (z <= -1150000000000.0) {
tmp = t_1;
} else if (z <= 25.0) {
tmp = t * a;
} else if ((z <= 2e+140) || !(z <= 5.5e+218)) {
tmp = t_1;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if z <= -1150000000000.0: tmp = t_1 elif z <= 25.0: tmp = t * a elif (z <= 2e+140) or not (z <= 5.5e+218): tmp = t_1 else: tmp = y * z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (z <= -1150000000000.0) tmp = t_1; elseif (z <= 25.0) tmp = Float64(t * a); elseif ((z <= 2e+140) || !(z <= 5.5e+218)) tmp = t_1; else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (z <= -1150000000000.0) tmp = t_1; elseif (z <= 25.0) tmp = t * a; elseif ((z <= 2e+140) || ~((z <= 5.5e+218))) tmp = t_1; else tmp = y * z; 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[z, -1150000000000.0], t$95$1, If[LessEqual[z, 25.0], N[(t * a), $MachinePrecision], If[Or[LessEqual[z, 2e+140], N[Not[LessEqual[z, 5.5e+218]], $MachinePrecision]], t$95$1, N[(y * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;z \leq -1150000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 25:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+140} \lor \neg \left(z \leq 5.5 \cdot 10^{+218}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -1.15e12 or 25 < z < 2.00000000000000012e140 or 5.5000000000000004e218 < z Initial program 80.9%
associate-+l+80.9%
*-un-lft-identity80.9%
fma-def80.9%
*-commutative80.9%
fma-def81.7%
*-commutative81.7%
Applied egg-rr81.7%
fma-udef81.7%
*-un-lft-identity81.7%
+-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
if -1.15e12 < z < 25Initial program 98.2%
associate-+l+98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in t around inf 48.2%
if 2.00000000000000012e140 < z < 5.5000000000000004e218Initial program 100.0%
associate-+l+100.0%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in y around inf 71.3%
*-commutative71.3%
Simplified71.3%
Final simplification49.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.7e+73)
(* y z)
(if (<= z -5.3e-135)
x
(if (or (<= z -1.55e-144) (not (<= z 3.9e-82))) (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.7e+73) {
tmp = y * z;
} else if (z <= -5.3e-135) {
tmp = x;
} else if ((z <= -1.55e-144) || !(z <= 3.9e-82)) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.7d+73)) then
tmp = y * z
else if (z <= (-5.3d-135)) then
tmp = x
else if ((z <= (-1.55d-144)) .or. (.not. (z <= 3.9d-82))) then
tmp = y * z
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.7e+73) {
tmp = y * z;
} else if (z <= -5.3e-135) {
tmp = x;
} else if ((z <= -1.55e-144) || !(z <= 3.9e-82)) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.7e+73: tmp = y * z elif z <= -5.3e-135: tmp = x elif (z <= -1.55e-144) or not (z <= 3.9e-82): tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.7e+73) tmp = Float64(y * z); elseif (z <= -5.3e-135) tmp = x; elseif ((z <= -1.55e-144) || !(z <= 3.9e-82)) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.7e+73) tmp = y * z; elseif (z <= -5.3e-135) tmp = x; elseif ((z <= -1.55e-144) || ~((z <= 3.9e-82))) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.7e+73], N[(y * z), $MachinePrecision], If[LessEqual[z, -5.3e-135], x, If[Or[LessEqual[z, -1.55e-144], N[Not[LessEqual[z, 3.9e-82]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+73}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-135}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-144} \lor \neg \left(z \leq 3.9 \cdot 10^{-82}\right):\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if z < -1.7000000000000001e73 or -5.3e-135 < z < -1.55e-144 or 3.89999999999999973e-82 < z Initial program 84.1%
associate-+l+84.1%
associate-*l*84.1%
Simplified84.1%
Taylor expanded in y around inf 42.4%
*-commutative42.4%
Simplified42.4%
if -1.7000000000000001e73 < z < -5.3e-135Initial program 97.0%
associate-+l+97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in x around inf 34.7%
if -1.55e-144 < z < 3.89999999999999973e-82Initial program 98.5%
associate-+l+98.5%
associate-*l*98.6%
Simplified98.6%
Taylor expanded in t around inf 60.5%
Final simplification46.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -4.2e+231)
(* t a)
(if (<= a -1.06e+72)
(* (* z a) b)
(if (<= a 6.2e+57) (+ x (* y z)) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.2e+231) {
tmp = t * a;
} else if (a <= -1.06e+72) {
tmp = (z * a) * b;
} else if (a <= 6.2e+57) {
tmp = x + (y * z);
} else {
tmp = a * (z * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.2d+231)) then
tmp = t * a
else if (a <= (-1.06d+72)) then
tmp = (z * a) * b
else if (a <= 6.2d+57) then
tmp = x + (y * z)
else
tmp = a * (z * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.2e+231) {
tmp = t * a;
} else if (a <= -1.06e+72) {
tmp = (z * a) * b;
} else if (a <= 6.2e+57) {
tmp = x + (y * z);
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.2e+231: tmp = t * a elif a <= -1.06e+72: tmp = (z * a) * b elif a <= 6.2e+57: tmp = x + (y * z) else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.2e+231) tmp = Float64(t * a); elseif (a <= -1.06e+72) tmp = Float64(Float64(z * a) * b); elseif (a <= 6.2e+57) tmp = Float64(x + Float64(y * z)); else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.2e+231) tmp = t * a; elseif (a <= -1.06e+72) tmp = (z * a) * b; elseif (a <= 6.2e+57) tmp = x + (y * z); else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.2e+231], N[(t * a), $MachinePrecision], If[LessEqual[a, -1.06e+72], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 6.2e+57], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+231}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -1.06 \cdot 10^{+72}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if a < -4.19999999999999969e231Initial program 67.2%
associate-+l+67.2%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in t around inf 74.0%
if -4.19999999999999969e231 < a < -1.06e72Initial program 88.1%
Taylor expanded in x around 0 78.6%
Taylor expanded in b around inf 53.9%
*-commutative53.9%
associate-*r*56.7%
*-commutative56.7%
Simplified56.7%
if -1.06e72 < a < 6.20000000000000026e57Initial program 97.2%
associate-+l+97.2%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in a around 0 64.3%
if 6.20000000000000026e57 < a Initial program 79.1%
associate-+l+79.1%
*-un-lft-identity79.1%
fma-def79.1%
*-commutative79.1%
fma-def80.9%
*-commutative80.9%
Applied egg-rr80.9%
fma-udef80.9%
*-un-lft-identity80.9%
+-commutative80.9%
Applied egg-rr80.9%
Taylor expanded in b around inf 48.4%
*-commutative48.4%
Simplified48.4%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.8e+94) (+ x (* z (+ y (* a b)))) (+ (+ x (* y z)) (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e+94) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.8d+94)) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e+94) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.8e+94: tmp = x + (z * (y + (a * b))) else: tmp = (x + (y * z)) + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.8e+94) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.8e+94) tmp = x + (z * (y + (a * b))); else tmp = (x + (y * z)) + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.8e+94], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+94}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -3.7999999999999996e94Initial program 71.5%
associate-+l+71.5%
associate-*l*76.2%
Simplified76.2%
Taylor expanded in t around 0 70.2%
+-commutative70.2%
+-commutative70.2%
associate-*r*76.1%
distribute-rgt-in93.9%
Simplified93.9%
if -3.7999999999999996e94 < z Initial program 95.9%
associate-+l+95.9%
associate-*l*94.4%
Simplified94.4%
Final simplification94.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.45e+113) (not (<= z 1.45e+45))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.45e+113) || !(z <= 1.45e+45)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.45d+113)) .or. (.not. (z <= 1.45d+45))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.45e+113) || !(z <= 1.45e+45)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.45e+113) or not (z <= 1.45e+45): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.45e+113) || !(z <= 1.45e+45)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.45e+113) || ~((z <= 1.45e+45))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.45e+113], N[Not[LessEqual[z, 1.45e+45]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+113} \lor \neg \left(z \leq 1.45 \cdot 10^{+45}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -1.44999999999999992e113 or 1.4499999999999999e45 < z Initial program 80.4%
associate-+l+80.4%
associate-*l*79.5%
Simplified79.5%
Taylor expanded in z around inf 85.7%
if -1.44999999999999992e113 < z < 1.4499999999999999e45Initial program 97.2%
associate-+l+97.2%
+-commutative97.2%
fma-def97.2%
associate-*l*97.9%
*-commutative97.9%
*-commutative97.9%
distribute-rgt-out99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in y around 0 86.0%
Final simplification85.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -22000.0) (not (<= b 9.8e+95))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -22000.0) || !(b <= 9.8e+95)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (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 ((b <= (-22000.0d0)) .or. (.not. (b <= 9.8d+95))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((t * a) + (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 ((b <= -22000.0) || !(b <= 9.8e+95)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -22000.0) or not (b <= 9.8e+95): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -22000.0) || !(b <= 9.8e+95)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -22000.0) || ~((b <= 9.8e+95))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -22000.0], N[Not[LessEqual[b, 9.8e+95]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -22000 \lor \neg \left(b \leq 9.8 \cdot 10^{+95}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if b < -22000 or 9.7999999999999998e95 < b Initial program 89.2%
associate-+l+89.2%
+-commutative89.2%
fma-def89.2%
associate-*l*80.1%
*-commutative80.1%
*-commutative80.1%
distribute-rgt-out83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y around 0 87.0%
if -22000 < b < 9.7999999999999998e95Initial program 90.5%
associate-+l+90.5%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in b around 0 89.8%
Final simplification88.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.5e-62) (not (<= z 1.56e-58))) (+ x (* z (+ y (* a b)))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e-62) || !(z <= 1.56e-58)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.5d-62)) .or. (.not. (z <= 1.56d-58))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e-62) || !(z <= 1.56e-58)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.5e-62) or not (z <= 1.56e-58): tmp = x + (z * (y + (a * b))) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.5e-62) || !(z <= 1.56e-58)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.5e-62) || ~((z <= 1.56e-58))) tmp = x + (z * (y + (a * b))); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.5e-62], N[Not[LessEqual[z, 1.56e-58]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-62} \lor \neg \left(z \leq 1.56 \cdot 10^{-58}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -3.5000000000000001e-62 or 1.56000000000000008e-58 < z Initial program 84.9%
associate-+l+84.9%
associate-*l*85.0%
Simplified85.0%
Taylor expanded in t around 0 75.6%
+-commutative75.6%
+-commutative75.6%
associate-*r*81.4%
distribute-rgt-in88.1%
Simplified88.1%
if -3.5000000000000001e-62 < z < 1.56000000000000008e-58Initial program 98.8%
associate-+l+98.8%
+-commutative98.8%
fma-def98.8%
associate-*l*98.8%
*-commutative98.8%
*-commutative98.8%
distribute-rgt-out99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 91.7%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.8e+31) x (if (<= x 4.2e+145) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.8e+31) {
tmp = x;
} else if (x <= 4.2e+145) {
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 (x <= (-1.8d+31)) then
tmp = x
else if (x <= 4.2d+145) 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 (x <= -1.8e+31) {
tmp = x;
} else if (x <= 4.2e+145) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.8e+31: tmp = x elif x <= 4.2e+145: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.8e+31) tmp = x; elseif (x <= 4.2e+145) 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 (x <= -1.8e+31) tmp = x; elseif (x <= 4.2e+145) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.8e+31], x, If[LessEqual[x, 4.2e+145], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+31}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+145}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.79999999999999998e31 or 4.19999999999999979e145 < x Initial program 91.9%
associate-+l+91.9%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in x around inf 40.7%
if -1.79999999999999998e31 < x < 4.19999999999999979e145Initial program 89.0%
associate-+l+89.0%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in t around inf 37.2%
Final simplification38.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 90.0%
associate-+l+90.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in x around inf 18.3%
Final simplification18.3%
(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 2024021
(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)))