
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (if (<= b -9.5e+139) (+ (+ (* t a) (+ x (* y z))) (* b (* z a))) (fma y z (fma a (fma z b t) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e+139) {
tmp = ((t * a) + (x + (y * z))) + (b * (z * a));
} else {
tmp = fma(y, z, fma(a, fma(z, b, t), x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.5e+139) tmp = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a))); else tmp = fma(y, z, fma(a, fma(z, b, t), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.5e+139], N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * z + N[(a * N[(z * b + t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+139}:\\
\;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, \mathsf{fma}\left(a, \mathsf{fma}\left(z, b, t\right), x\right)\right)\\
\end{array}
\end{array}
if b < -9.5000000000000002e139Initial program 94.7%
if -9.5000000000000002e139 < b Initial program 90.9%
associate-+l+90.9%
+-commutative90.9%
associate-+l+90.9%
fma-def91.9%
+-commutative91.9%
*-commutative91.9%
associate-*l*95.4%
distribute-lft-out98.6%
fma-def98.6%
+-commutative98.6%
fma-def98.6%
Simplified98.6%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3e+138) (+ (+ (* t a) (+ x (* y z))) (* b (* z a))) (fma a (+ t (* b z)) (fma y z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3e+138) {
tmp = ((t * a) + (x + (y * z))) + (b * (z * a));
} else {
tmp = fma(a, (t + (b * z)), fma(y, z, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3e+138) tmp = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a))); else tmp = fma(a, Float64(t + Float64(b * z)), fma(y, z, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3e+138], N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+138}:\\
\;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t + b \cdot z, \mathsf{fma}\left(y, z, x\right)\right)\\
\end{array}
\end{array}
if b < -3.0000000000000001e138Initial program 94.7%
if -3.0000000000000001e138 < b Initial program 90.9%
associate-+l+90.9%
+-commutative90.9%
*-commutative90.9%
associate-*l*94.5%
distribute-lft-out97.2%
fma-def97.7%
+-commutative97.7%
fma-def97.7%
Simplified97.7%
Final simplification97.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* t a) (+ x (* y z))) (* b (* z a))))) (if (<= t_1 INFINITY) t_1 (* a (+ t (* b z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + (b * (z * a));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * (t + (b * z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + (b * (z * a));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * (t + (b * z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x + (y * z))) + (b * (z * a)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = a * (t + (b * z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(t + Float64(b * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x + (y * z))) + (b * (z * a)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = a * (t + (b * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + b \cdot z\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 96.8%
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%
associate-+l+0.0%
fma-def21.4%
+-commutative21.4%
*-commutative21.4%
associate-*l*35.7%
distribute-lft-out85.7%
fma-def85.7%
+-commutative85.7%
fma-def85.7%
Simplified85.7%
Taylor expanded in a around inf 79.1%
Final simplification95.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7.5e-26)
(* t a)
(if (<= t -1.02e-202)
x
(if (<= t -1.1e-286)
(* y z)
(if (<= t 9.5e-7)
x
(if (<= t 4.2e+15)
(* y z)
(if (<= t 6.2e+81) (* a (* b z)) (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e-26) {
tmp = t * a;
} else if (t <= -1.02e-202) {
tmp = x;
} else if (t <= -1.1e-286) {
tmp = y * z;
} else if (t <= 9.5e-7) {
tmp = x;
} else if (t <= 4.2e+15) {
tmp = y * z;
} else if (t <= 6.2e+81) {
tmp = a * (b * 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 (t <= (-7.5d-26)) then
tmp = t * a
else if (t <= (-1.02d-202)) then
tmp = x
else if (t <= (-1.1d-286)) then
tmp = y * z
else if (t <= 9.5d-7) then
tmp = x
else if (t <= 4.2d+15) then
tmp = y * z
else if (t <= 6.2d+81) then
tmp = a * (b * 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 (t <= -7.5e-26) {
tmp = t * a;
} else if (t <= -1.02e-202) {
tmp = x;
} else if (t <= -1.1e-286) {
tmp = y * z;
} else if (t <= 9.5e-7) {
tmp = x;
} else if (t <= 4.2e+15) {
tmp = y * z;
} else if (t <= 6.2e+81) {
tmp = a * (b * z);
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e-26: tmp = t * a elif t <= -1.02e-202: tmp = x elif t <= -1.1e-286: tmp = y * z elif t <= 9.5e-7: tmp = x elif t <= 4.2e+15: tmp = y * z elif t <= 6.2e+81: tmp = a * (b * z) else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e-26) tmp = Float64(t * a); elseif (t <= -1.02e-202) tmp = x; elseif (t <= -1.1e-286) tmp = Float64(y * z); elseif (t <= 9.5e-7) tmp = x; elseif (t <= 4.2e+15) tmp = Float64(y * z); elseif (t <= 6.2e+81) tmp = Float64(a * Float64(b * z)); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.5e-26) tmp = t * a; elseif (t <= -1.02e-202) tmp = x; elseif (t <= -1.1e-286) tmp = y * z; elseif (t <= 9.5e-7) tmp = x; elseif (t <= 4.2e+15) tmp = y * z; elseif (t <= 6.2e+81) tmp = a * (b * z); else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e-26], N[(t * a), $MachinePrecision], If[LessEqual[t, -1.02e-202], x, If[LessEqual[t, -1.1e-286], N[(y * z), $MachinePrecision], If[LessEqual[t, 9.5e-7], x, If[LessEqual[t, 4.2e+15], N[(y * z), $MachinePrecision], If[LessEqual[t, 6.2e+81], N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-26}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq -1.02 \cdot 10^{-202}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-286}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+81}:\\
\;\;\;\;a \cdot \left(b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -7.4999999999999994e-26 or 6.2e81 < t Initial program 84.0%
associate-+l+84.0%
+-commutative84.0%
associate-+l+84.0%
fma-def86.7%
+-commutative86.7%
*-commutative86.7%
associate-*l*87.4%
distribute-lft-out93.7%
fma-def93.7%
+-commutative93.7%
fma-def93.7%
Simplified93.7%
Taylor expanded in a around inf 70.4%
Taylor expanded in z around 0 57.3%
*-commutative57.3%
Simplified57.3%
if -7.4999999999999994e-26 < t < -1.01999999999999997e-202 or -1.1e-286 < t < 9.5000000000000001e-7Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def97.3%
+-commutative97.3%
*-commutative97.3%
associate-*l*97.3%
distribute-lft-out97.3%
fma-def97.4%
+-commutative97.4%
fma-def97.4%
Simplified97.4%
Taylor expanded in y around 0 82.6%
Taylor expanded in x around inf 50.2%
if -1.01999999999999997e-202 < t < -1.1e-286 or 9.5000000000000001e-7 < t < 4.2e15Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*95.2%
distribute-lft-out95.2%
fma-def95.2%
+-commutative95.2%
fma-def95.2%
Simplified95.2%
Taylor expanded in y around inf 69.5%
*-commutative69.5%
Simplified69.5%
if 4.2e15 < t < 6.2e81Initial program 92.2%
associate-+l+92.2%
+-commutative92.2%
associate-+l+92.2%
fma-def92.2%
+-commutative92.2%
*-commutative92.2%
associate-*l*99.9%
distribute-lft-out99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around inf 70.6%
Taylor expanded in z around inf 47.3%
Final simplification54.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t 4e+112) (+ (+ (* t a) (* a (* b z))) (+ x (* y z))) (+ x (* a (+ t (* b z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 4e+112) {
tmp = ((t * a) + (a * (b * z))) + (x + (y * z));
} else {
tmp = x + (a * (t + (b * 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 <= 4d+112) then
tmp = ((t * a) + (a * (b * z))) + (x + (y * z))
else
tmp = x + (a * (t + (b * 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 <= 4e+112) {
tmp = ((t * a) + (a * (b * z))) + (x + (y * z));
} else {
tmp = x + (a * (t + (b * z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 4e+112: tmp = ((t * a) + (a * (b * z))) + (x + (y * z)) else: tmp = x + (a * (t + (b * z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 4e+112) tmp = Float64(Float64(Float64(t * a) + Float64(a * Float64(b * z))) + Float64(x + Float64(y * z))); else tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 4e+112) tmp = ((t * a) + (a * (b * z))) + (x + (y * z)); else tmp = x + (a * (t + (b * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 4e+112], N[(N[(N[(t * a), $MachinePrecision] + N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4 \cdot 10^{+112}:\\
\;\;\;\;\left(t \cdot a + a \cdot \left(b \cdot z\right)\right) + \left(x + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\end{array}
\end{array}
if t < 3.9999999999999997e112Initial program 95.0%
associate-+l+95.0%
associate-*l*94.5%
Simplified94.5%
if 3.9999999999999997e112 < t Initial program 72.5%
associate-+l+72.5%
+-commutative72.5%
associate-+l+72.5%
fma-def77.5%
+-commutative77.5%
*-commutative77.5%
associate-*l*82.5%
distribute-lft-out92.5%
fma-def92.5%
+-commutative92.5%
fma-def92.5%
Simplified92.5%
Taylor expanded in y around 0 90.1%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.85e+22)
(* t a)
(if (<= a -1.02e-98)
x
(if (<= a -1.4e-137)
(* y z)
(if (<= a 4.4e-215) x (if (<= a 1.9e-41) (* y z) (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.85e+22) {
tmp = t * a;
} else if (a <= -1.02e-98) {
tmp = x;
} else if (a <= -1.4e-137) {
tmp = y * z;
} else if (a <= 4.4e-215) {
tmp = x;
} else if (a <= 1.9e-41) {
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 (a <= (-1.85d+22)) then
tmp = t * a
else if (a <= (-1.02d-98)) then
tmp = x
else if (a <= (-1.4d-137)) then
tmp = y * z
else if (a <= 4.4d-215) then
tmp = x
else if (a <= 1.9d-41) 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 (a <= -1.85e+22) {
tmp = t * a;
} else if (a <= -1.02e-98) {
tmp = x;
} else if (a <= -1.4e-137) {
tmp = y * z;
} else if (a <= 4.4e-215) {
tmp = x;
} else if (a <= 1.9e-41) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.85e+22: tmp = t * a elif a <= -1.02e-98: tmp = x elif a <= -1.4e-137: tmp = y * z elif a <= 4.4e-215: tmp = x elif a <= 1.9e-41: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.85e+22) tmp = Float64(t * a); elseif (a <= -1.02e-98) tmp = x; elseif (a <= -1.4e-137) tmp = Float64(y * z); elseif (a <= 4.4e-215) tmp = x; elseif (a <= 1.9e-41) 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 (a <= -1.85e+22) tmp = t * a; elseif (a <= -1.02e-98) tmp = x; elseif (a <= -1.4e-137) tmp = y * z; elseif (a <= 4.4e-215) tmp = x; elseif (a <= 1.9e-41) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.85e+22], N[(t * a), $MachinePrecision], If[LessEqual[a, -1.02e-98], x, If[LessEqual[a, -1.4e-137], N[(y * z), $MachinePrecision], If[LessEqual[a, 4.4e-215], x, If[LessEqual[a, 1.9e-41], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+22}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -1.02 \cdot 10^{-98}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-137}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-215}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-41}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -1.8499999999999999e22 or 1.8999999999999999e-41 < a Initial program 85.5%
associate-+l+85.5%
+-commutative85.5%
associate-+l+85.5%
fma-def87.0%
+-commutative87.0%
*-commutative87.0%
associate-*l*93.3%
distribute-lft-out98.4%
fma-def98.5%
+-commutative98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in a around inf 78.2%
Taylor expanded in z around 0 49.8%
*-commutative49.8%
Simplified49.8%
if -1.8499999999999999e22 < a < -1.02e-98 or -1.3999999999999999e-137 < a < 4.39999999999999993e-215Initial program 98.7%
associate-+l+98.7%
+-commutative98.7%
associate-+l+98.7%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
associate-*l*93.8%
distribute-lft-out93.8%
fma-def93.8%
+-commutative93.8%
fma-def93.8%
Simplified93.8%
Taylor expanded in y around 0 77.9%
Taylor expanded in x around inf 57.0%
if -1.02e-98 < a < -1.3999999999999999e-137 or 4.39999999999999993e-215 < a < 1.8999999999999999e-41Initial program 97.6%
associate-+l+97.6%
+-commutative97.6%
associate-+l+97.6%
fma-def97.7%
+-commutative97.7%
*-commutative97.7%
associate-*l*90.1%
distribute-lft-out90.1%
fma-def90.1%
+-commutative90.1%
fma-def90.1%
Simplified90.1%
Taylor expanded in y around inf 54.7%
*-commutative54.7%
Simplified54.7%
Final simplification52.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* b z)))))
(if (<= a -1.35e+22)
t_1
(if (<= a -2.05e-82)
(+ x (* a (* b z)))
(if (<= a 6.5e-46) (+ x (* y z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (b * z));
double tmp;
if (a <= -1.35e+22) {
tmp = t_1;
} else if (a <= -2.05e-82) {
tmp = x + (a * (b * z));
} else if (a <= 6.5e-46) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t + (b * z))
if (a <= (-1.35d+22)) then
tmp = t_1
else if (a <= (-2.05d-82)) then
tmp = x + (a * (b * z))
else if (a <= 6.5d-46) then
tmp = x + (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (b * z));
double tmp;
if (a <= -1.35e+22) {
tmp = t_1;
} else if (a <= -2.05e-82) {
tmp = x + (a * (b * z));
} else if (a <= 6.5e-46) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (b * z)) tmp = 0 if a <= -1.35e+22: tmp = t_1 elif a <= -2.05e-82: tmp = x + (a * (b * z)) elif a <= 6.5e-46: tmp = x + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(b * z))) tmp = 0.0 if (a <= -1.35e+22) tmp = t_1; elseif (a <= -2.05e-82) tmp = Float64(x + Float64(a * Float64(b * z))); elseif (a <= 6.5e-46) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (b * z)); tmp = 0.0; if (a <= -1.35e+22) tmp = t_1; elseif (a <= -2.05e-82) tmp = x + (a * (b * z)); elseif (a <= 6.5e-46) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+22], t$95$1, If[LessEqual[a, -2.05e-82], N[(x + N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-46], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + b \cdot z\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-46}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.3500000000000001e22 or 6.49999999999999966e-46 < a Initial program 85.7%
associate-+l+85.7%
+-commutative85.7%
associate-+l+85.7%
fma-def87.2%
+-commutative87.2%
*-commutative87.2%
associate-*l*93.4%
distribute-lft-out98.5%
fma-def98.5%
+-commutative98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in a around inf 77.9%
if -1.3500000000000001e22 < a < -2.04999999999999998e-82Initial program 94.7%
associate-+l+94.7%
+-commutative94.7%
associate-+l+94.7%
fma-def99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.8%
distribute-lft-out99.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around 0 84.3%
Taylor expanded in t around 0 84.3%
if -2.04999999999999998e-82 < a < 6.49999999999999966e-46Initial program 99.0%
associate-+l+99.0%
+-commutative99.0%
associate-+l+99.0%
fma-def99.1%
+-commutative99.1%
*-commutative99.1%
associate-*l*91.0%
distribute-lft-out91.0%
fma-def91.0%
+-commutative91.0%
fma-def91.0%
Simplified91.0%
Taylor expanded in a around 0 84.7%
Final simplification80.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.05e-113) (not (<= a 7.5e-69))) (+ x (* a (+ t (* b z)))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.05e-113) || !(a <= 7.5e-69)) {
tmp = x + (a * (t + (b * z)));
} 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.05d-113)) .or. (.not. (a <= 7.5d-69))) then
tmp = x + (a * (t + (b * z)))
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.05e-113) || !(a <= 7.5e-69)) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.05e-113) or not (a <= 7.5e-69): tmp = x + (a * (t + (b * z))) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.05e-113) || !(a <= 7.5e-69)) tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); 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.05e-113) || ~((a <= 7.5e-69))) tmp = x + (a * (t + (b * z))); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.05e-113], N[Not[LessEqual[a, 7.5e-69]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-113} \lor \neg \left(a \leq 7.5 \cdot 10^{-69}\right):\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -1.05e-113 or 7.5e-69 < a Initial program 87.5%
associate-+l+87.5%
+-commutative87.5%
associate-+l+87.5%
fma-def89.3%
+-commutative89.3%
*-commutative89.3%
associate-*l*94.5%
distribute-lft-out98.7%
fma-def98.7%
+-commutative98.7%
fma-def98.7%
Simplified98.7%
Taylor expanded in y around 0 91.4%
if -1.05e-113 < a < 7.5e-69Initial program 99.0%
associate-+l+99.0%
+-commutative99.0%
associate-+l+99.0%
fma-def99.0%
+-commutative99.0%
*-commutative99.0%
associate-*l*90.1%
distribute-lft-out90.1%
fma-def90.1%
+-commutative90.1%
fma-def90.1%
Simplified90.1%
Taylor expanded in a around 0 85.3%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.55e-82) (not (<= a 6.2e-48))) (+ x (* a (+ t (* b z)))) (+ (+ x (* t a)) (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.55e-82) || !(a <= 6.2e-48)) {
tmp = x + (a * (t + (b * z)));
} 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 ((a <= (-1.55d-82)) .or. (.not. (a <= 6.2d-48))) then
tmp = x + (a * (t + (b * z)))
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 ((a <= -1.55e-82) || !(a <= 6.2e-48)) {
tmp = x + (a * (t + (b * z)));
} else {
tmp = (x + (t * a)) + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.55e-82) or not (a <= 6.2e-48): tmp = x + (a * (t + (b * z))) else: tmp = (x + (t * a)) + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.55e-82) || !(a <= 6.2e-48)) tmp = Float64(x + Float64(a * Float64(t + Float64(b * z)))); else tmp = Float64(Float64(x + Float64(t * a)) + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.55e-82) || ~((a <= 6.2e-48))) tmp = x + (a * (t + (b * z))); else tmp = (x + (t * a)) + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.55e-82], N[Not[LessEqual[a, 6.2e-48]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-82} \lor \neg \left(a \leq 6.2 \cdot 10^{-48}\right):\\
\;\;\;\;x + a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + t \cdot a\right) + y \cdot z\\
\end{array}
\end{array}
if a < -1.55e-82 or 6.20000000000000033e-48 < a Initial program 86.8%
associate-+l+86.8%
+-commutative86.8%
associate-+l+86.8%
fma-def88.7%
+-commutative88.7%
*-commutative88.7%
associate-*l*94.2%
distribute-lft-out98.6%
fma-def98.7%
+-commutative98.7%
fma-def98.7%
Simplified98.7%
Taylor expanded in y around 0 92.2%
if -1.55e-82 < a < 6.20000000000000033e-48Initial program 99.0%
associate-+l+99.0%
+-commutative99.0%
associate-+l+99.0%
fma-def99.1%
+-commutative99.1%
*-commutative99.1%
associate-*l*91.0%
distribute-lft-out91.0%
fma-def91.0%
+-commutative91.0%
fma-def91.0%
Simplified91.0%
Taylor expanded in b around 0 95.9%
Final simplification93.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3e+21) (not (<= a 7.6e-46))) (* a (+ t (* b z))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3e+21) || !(a <= 7.6e-46)) {
tmp = a * (t + (b * z));
} 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 <= (-3d+21)) .or. (.not. (a <= 7.6d-46))) then
tmp = a * (t + (b * z))
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 <= -3e+21) || !(a <= 7.6e-46)) {
tmp = a * (t + (b * z));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3e+21) or not (a <= 7.6e-46): tmp = a * (t + (b * z)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3e+21) || !(a <= 7.6e-46)) tmp = Float64(a * Float64(t + Float64(b * z))); 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 <= -3e+21) || ~((a <= 7.6e-46))) tmp = a * (t + (b * z)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3e+21], N[Not[LessEqual[a, 7.6e-46]], $MachinePrecision]], N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+21} \lor \neg \left(a \leq 7.6 \cdot 10^{-46}\right):\\
\;\;\;\;a \cdot \left(t + b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -3e21 or 7.5999999999999993e-46 < a Initial program 85.7%
associate-+l+85.7%
+-commutative85.7%
associate-+l+85.7%
fma-def87.2%
+-commutative87.2%
*-commutative87.2%
associate-*l*93.4%
distribute-lft-out98.5%
fma-def98.5%
+-commutative98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in a around inf 77.9%
if -3e21 < a < 7.5999999999999993e-46Initial program 98.3%
associate-+l+98.3%
+-commutative98.3%
associate-+l+98.3%
fma-def99.2%
+-commutative99.2%
*-commutative99.2%
associate-*l*92.4%
distribute-lft-out92.4%
fma-def92.4%
+-commutative92.4%
fma-def92.4%
Simplified92.4%
Taylor expanded in a around 0 80.6%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.7) (not (<= a 3.2e-64))) (+ x (* t a)) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.7) || !(a <= 3.2e-64)) {
tmp = x + (t * a);
} 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 <= (-3.7d0)) .or. (.not. (a <= 3.2d-64))) then
tmp = x + (t * a)
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 <= -3.7) || !(a <= 3.2e-64)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.7) or not (a <= 3.2e-64): tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.7) || !(a <= 3.2e-64)) tmp = Float64(x + Float64(t * a)); 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 <= -3.7) || ~((a <= 3.2e-64))) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.7], N[Not[LessEqual[a, 3.2e-64]], $MachinePrecision]], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \lor \neg \left(a \leq 3.2 \cdot 10^{-64}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -3.7000000000000002 or 3.19999999999999975e-64 < a Initial program 85.8%
associate-+l+85.8%
+-commutative85.8%
associate-+l+85.8%
fma-def87.9%
+-commutative87.9%
*-commutative87.9%
associate-*l*93.8%
distribute-lft-out98.6%
fma-def98.6%
+-commutative98.6%
fma-def98.6%
Simplified98.6%
Taylor expanded in y around 0 93.0%
Taylor expanded in z around 0 64.4%
if -3.7000000000000002 < a < 3.19999999999999975e-64Initial program 99.1%
associate-+l+99.1%
+-commutative99.1%
associate-+l+99.1%
fma-def99.1%
+-commutative99.1%
*-commutative99.1%
associate-*l*91.9%
distribute-lft-out91.9%
fma-def91.9%
+-commutative91.9%
fma-def91.9%
Simplified91.9%
Taylor expanded in a around 0 81.8%
Final simplification71.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.2e+168) (* b (* z a)) (if (<= b 4.7e+61) (+ x (* t a)) (* a (* b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e+168) {
tmp = b * (z * a);
} else if (b <= 4.7e+61) {
tmp = x + (t * a);
} else {
tmp = a * (b * 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 <= (-1.2d+168)) then
tmp = b * (z * a)
else if (b <= 4.7d+61) then
tmp = x + (t * a)
else
tmp = a * (b * 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 <= -1.2e+168) {
tmp = b * (z * a);
} else if (b <= 4.7e+61) {
tmp = x + (t * a);
} else {
tmp = a * (b * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.2e+168: tmp = b * (z * a) elif b <= 4.7e+61: tmp = x + (t * a) else: tmp = a * (b * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.2e+168) tmp = Float64(b * Float64(z * a)); elseif (b <= 4.7e+61) tmp = Float64(x + Float64(t * a)); else tmp = Float64(a * Float64(b * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.2e+168) tmp = b * (z * a); elseif (b <= 4.7e+61) tmp = x + (t * a); else tmp = a * (b * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e+168], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.7e+61], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+168}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;b \leq 4.7 \cdot 10^{+61}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot z\right)\\
\end{array}
\end{array}
if b < -1.20000000000000005e168Initial program 93.7%
associate-+l+93.7%
+-commutative93.7%
associate-+l+93.7%
fma-def97.0%
+-commutative97.0%
*-commutative97.0%
associate-*l*77.9%
distribute-lft-out77.9%
fma-def77.9%
+-commutative77.9%
fma-def77.9%
Simplified77.9%
Taylor expanded in a around inf 59.2%
Taylor expanded in z around inf 52.8%
associate-*r*56.0%
Simplified56.0%
if -1.20000000000000005e168 < b < 4.6999999999999998e61Initial program 92.4%
associate-+l+92.4%
+-commutative92.4%
associate-+l+92.4%
fma-def93.5%
+-commutative93.5%
*-commutative93.5%
associate-*l*97.7%
distribute-lft-out98.8%
fma-def98.9%
+-commutative98.9%
fma-def98.9%
Simplified98.9%
Taylor expanded in y around 0 80.2%
Taylor expanded in z around 0 72.6%
if 4.6999999999999998e61 < b Initial program 86.2%
associate-+l+86.2%
+-commutative86.2%
associate-+l+86.2%
fma-def86.2%
+-commutative86.2%
*-commutative86.2%
associate-*l*84.0%
distribute-lft-out95.4%
fma-def95.4%
+-commutative95.4%
fma-def95.4%
Simplified95.4%
Taylor expanded in a around inf 75.6%
Taylor expanded in z around inf 66.7%
Final simplification69.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.2e+21) (* t a) (if (<= a 4.5e-188) x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.2e+21) {
tmp = t * a;
} else if (a <= 4.5e-188) {
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 (a <= (-7.2d+21)) then
tmp = t * a
else if (a <= 4.5d-188) 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 (a <= -7.2e+21) {
tmp = t * a;
} else if (a <= 4.5e-188) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.2e+21: tmp = t * a elif a <= 4.5e-188: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.2e+21) tmp = Float64(t * a); elseif (a <= 4.5e-188) 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 (a <= -7.2e+21) tmp = t * a; elseif (a <= 4.5e-188) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.2e+21], N[(t * a), $MachinePrecision], If[LessEqual[a, 4.5e-188], x, N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+21}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-188}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -7.2e21 or 4.49999999999999993e-188 < a Initial program 87.0%
associate-+l+87.0%
+-commutative87.0%
associate-+l+87.0%
fma-def88.3%
+-commutative88.3%
*-commutative88.3%
associate-*l*93.1%
distribute-lft-out97.5%
fma-def97.5%
+-commutative97.5%
fma-def97.5%
Simplified97.5%
Taylor expanded in a around inf 71.1%
Taylor expanded in z around 0 45.5%
*-commutative45.5%
Simplified45.5%
if -7.2e21 < a < 4.49999999999999993e-188Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
associate-*l*92.8%
distribute-lft-out92.8%
fma-def92.8%
+-commutative92.8%
fma-def92.8%
Simplified92.8%
Taylor expanded in y around 0 72.5%
Taylor expanded in x around inf 52.0%
Final simplification47.9%
(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 91.5%
associate-+l+91.5%
+-commutative91.5%
associate-+l+91.5%
fma-def92.7%
+-commutative92.7%
*-commutative92.7%
associate-*l*93.0%
distribute-lft-out95.7%
fma-def95.7%
+-commutative95.7%
fma-def95.7%
Simplified95.7%
Taylor expanded in y around 0 81.0%
Taylor expanded in x around inf 29.6%
Final simplification29.6%
(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 2023238
(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)))