
(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 (if (<= z 2.1e+21) (fma a (+ t (* z b)) (fma y z x)) (fma z (* a b) (fma t a (fma y z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2.1e+21) {
tmp = fma(a, (t + (z * b)), fma(y, z, x));
} else {
tmp = fma(z, (a * b), fma(t, a, fma(y, z, x)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 2.1e+21) tmp = fma(a, Float64(t + Float64(z * b)), fma(y, z, x)); else tmp = fma(z, Float64(a * b), fma(t, a, fma(y, z, x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2.1e+21], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision] + N[(t * a + N[(y * z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(a, t + z \cdot b, \mathsf{fma}\left(y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, a \cdot b, \mathsf{fma}\left(t, a, \mathsf{fma}\left(y, z, x\right)\right)\right)\\
\end{array}
\end{array}
if z < 2.1e21Initial program 94.0%
associate-+l+94.0%
+-commutative94.0%
*-commutative94.0%
*-commutative94.0%
associate-*l*96.4%
distribute-rgt-out99.0%
fma-def99.0%
*-commutative99.0%
+-commutative99.0%
fma-def99.0%
Simplified99.0%
if 2.1e21 < z Initial program 89.9%
+-commutative89.9%
*-commutative89.9%
associate-*l*93.2%
*-commutative93.2%
fma-def96.6%
*-commutative96.6%
+-commutative96.6%
fma-def96.6%
+-commutative96.6%
fma-def96.6%
Simplified96.6%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* z y))) (* b (* z a))))) (if (<= t_1 5e+264) t_1 (fma a (+ t (* z b)) (fma y z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * t) + (x + (z * y))) + (b * (z * a));
double tmp;
if (t_1 <= 5e+264) {
tmp = t_1;
} else {
tmp = fma(a, (t + (z * b)), fma(y, z, x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= 5e+264) tmp = t_1; else tmp = fma(a, Float64(t + Float64(z * b)), fma(y, z, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+264], t$95$1, N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+264}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t + z \cdot b, \mathsf{fma}\left(y, z, x\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 5.00000000000000033e264Initial program 98.9%
if 5.00000000000000033e264 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 76.7%
associate-+l+76.7%
+-commutative76.7%
*-commutative76.7%
*-commutative76.7%
associate-*l*86.8%
distribute-rgt-out95.6%
fma-def95.6%
*-commutative95.6%
+-commutative95.6%
fma-def95.6%
Simplified95.6%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* z y))) (* b (* z a))))) (if (<= t_1 INFINITY) t_1 (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * t) + (x + (z * y))) + (b * (z * a));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * t) + (x + (z * y))) + (b * (z * a));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a * t) + (x + (z * y))) + (b * (z * a)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a * t) + (x + (z * y))) + (b * (z * a)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 97.6%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
*-commutative0.0%
associate-*l*25.0%
Simplified25.0%
Taylor expanded in z around inf 83.3%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))) (t_2 (+ (* z y) t_1)) (t_3 (* a (* z b))))
(if (<= t -9e+80)
t_2
(if (<= t -6e-18)
(+ (* b (* z a)) (+ (* z y) (* a t)))
(if (<= t 1.55e-44)
(+ (* z y) (+ x t_3))
(if (<= t 3.6e+166) (+ t_3 t_1) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double t_2 = (z * y) + t_1;
double t_3 = a * (z * b);
double tmp;
if (t <= -9e+80) {
tmp = t_2;
} else if (t <= -6e-18) {
tmp = (b * (z * a)) + ((z * y) + (a * t));
} else if (t <= 1.55e-44) {
tmp = (z * y) + (x + t_3);
} else if (t <= 3.6e+166) {
tmp = t_3 + 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) :: t_3
real(8) :: tmp
t_1 = x + (a * t)
t_2 = (z * y) + t_1
t_3 = a * (z * b)
if (t <= (-9d+80)) then
tmp = t_2
else if (t <= (-6d-18)) then
tmp = (b * (z * a)) + ((z * y) + (a * t))
else if (t <= 1.55d-44) then
tmp = (z * y) + (x + t_3)
else if (t <= 3.6d+166) then
tmp = t_3 + 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 + (a * t);
double t_2 = (z * y) + t_1;
double t_3 = a * (z * b);
double tmp;
if (t <= -9e+80) {
tmp = t_2;
} else if (t <= -6e-18) {
tmp = (b * (z * a)) + ((z * y) + (a * t));
} else if (t <= 1.55e-44) {
tmp = (z * y) + (x + t_3);
} else if (t <= 3.6e+166) {
tmp = t_3 + t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) t_2 = (z * y) + t_1 t_3 = a * (z * b) tmp = 0 if t <= -9e+80: tmp = t_2 elif t <= -6e-18: tmp = (b * (z * a)) + ((z * y) + (a * t)) elif t <= 1.55e-44: tmp = (z * y) + (x + t_3) elif t <= 3.6e+166: tmp = t_3 + t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) t_2 = Float64(Float64(z * y) + t_1) t_3 = Float64(a * Float64(z * b)) tmp = 0.0 if (t <= -9e+80) tmp = t_2; elseif (t <= -6e-18) tmp = Float64(Float64(b * Float64(z * a)) + Float64(Float64(z * y) + Float64(a * t))); elseif (t <= 1.55e-44) tmp = Float64(Float64(z * y) + Float64(x + t_3)); elseif (t <= 3.6e+166) tmp = Float64(t_3 + t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); t_2 = (z * y) + t_1; t_3 = a * (z * b); tmp = 0.0; if (t <= -9e+80) tmp = t_2; elseif (t <= -6e-18) tmp = (b * (z * a)) + ((z * y) + (a * t)); elseif (t <= 1.55e-44) tmp = (z * y) + (x + t_3); elseif (t <= 3.6e+166) tmp = t_3 + 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[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+80], t$95$2, If[LessEqual[t, -6e-18], N[(N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e-44], N[(N[(z * y), $MachinePrecision] + N[(x + t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+166], N[(t$95$3 + t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
t_2 := z \cdot y + t_1\\
t_3 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-18}:\\
\;\;\;\;b \cdot \left(z \cdot a\right) + \left(z \cdot y + a \cdot t\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-44}:\\
\;\;\;\;z \cdot y + \left(x + t_3\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+166}:\\
\;\;\;\;t_3 + t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -9.00000000000000013e80 or 3.5999999999999997e166 < t Initial program 94.4%
*-commutative94.4%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in b around 0 93.2%
if -9.00000000000000013e80 < t < -5.99999999999999966e-18Initial program 95.6%
Taylor expanded in x around 0 91.5%
if -5.99999999999999966e-18 < t < 1.54999999999999992e-44Initial program 94.2%
associate-+l+94.2%
+-commutative94.2%
*-commutative94.2%
*-commutative94.2%
associate-*l*95.1%
distribute-rgt-out95.1%
fma-def95.1%
*-commutative95.1%
+-commutative95.1%
fma-def95.1%
Simplified95.1%
Taylor expanded in t around 0 93.4%
if 1.54999999999999992e-44 < t < 3.5999999999999997e166Initial program 86.0%
+-commutative86.0%
*-commutative86.0%
associate-*l*88.2%
*-commutative88.2%
fma-def88.2%
*-commutative88.2%
+-commutative88.2%
fma-def88.2%
+-commutative88.2%
fma-def88.2%
Simplified88.2%
Taylor expanded in y around 0 85.2%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))) (t_2 (+ x (* a t))) (t_3 (+ (* z y) t_2)))
(if (<= t -7e-19)
t_3
(if (<= t 3.4e-44)
(+ (* z y) (+ x t_1))
(if (<= t 2.15e+167) (+ t_1 t_2) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double t_2 = x + (a * t);
double t_3 = (z * y) + t_2;
double tmp;
if (t <= -7e-19) {
tmp = t_3;
} else if (t <= 3.4e-44) {
tmp = (z * y) + (x + t_1);
} else if (t <= 2.15e+167) {
tmp = t_1 + t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = a * (z * b)
t_2 = x + (a * t)
t_3 = (z * y) + t_2
if (t <= (-7d-19)) then
tmp = t_3
else if (t <= 3.4d-44) then
tmp = (z * y) + (x + t_1)
else if (t <= 2.15d+167) then
tmp = t_1 + t_2
else
tmp = t_3
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 t_2 = x + (a * t);
double t_3 = (z * y) + t_2;
double tmp;
if (t <= -7e-19) {
tmp = t_3;
} else if (t <= 3.4e-44) {
tmp = (z * y) + (x + t_1);
} else if (t <= 2.15e+167) {
tmp = t_1 + t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) t_2 = x + (a * t) t_3 = (z * y) + t_2 tmp = 0 if t <= -7e-19: tmp = t_3 elif t <= 3.4e-44: tmp = (z * y) + (x + t_1) elif t <= 2.15e+167: tmp = t_1 + t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) t_2 = Float64(x + Float64(a * t)) t_3 = Float64(Float64(z * y) + t_2) tmp = 0.0 if (t <= -7e-19) tmp = t_3; elseif (t <= 3.4e-44) tmp = Float64(Float64(z * y) + Float64(x + t_1)); elseif (t <= 2.15e+167) tmp = Float64(t_1 + t_2); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); t_2 = x + (a * t); t_3 = (z * y) + t_2; tmp = 0.0; if (t <= -7e-19) tmp = t_3; elseif (t <= 3.4e-44) tmp = (z * y) + (x + t_1); elseif (t <= 2.15e+167) tmp = t_1 + t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t, -7e-19], t$95$3, If[LessEqual[t, 3.4e-44], N[(N[(z * y), $MachinePrecision] + N[(x + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e+167], N[(t$95$1 + t$95$2), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
t_2 := x + a \cdot t\\
t_3 := z \cdot y + t_2\\
\mathbf{if}\;t \leq -7 \cdot 10^{-19}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;z \cdot y + \left(x + t_1\right)\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+167}:\\
\;\;\;\;t_1 + t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -7.00000000000000031e-19 or 2.1500000000000001e167 < t Initial program 94.7%
*-commutative94.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in b around 0 87.6%
if -7.00000000000000031e-19 < t < 3.40000000000000016e-44Initial program 94.2%
associate-+l+94.2%
+-commutative94.2%
*-commutative94.2%
*-commutative94.2%
associate-*l*95.1%
distribute-rgt-out95.1%
fma-def95.1%
*-commutative95.1%
+-commutative95.1%
fma-def95.1%
Simplified95.1%
Taylor expanded in t around 0 93.4%
if 3.40000000000000016e-44 < t < 2.1500000000000001e167Initial program 86.0%
+-commutative86.0%
*-commutative86.0%
associate-*l*88.2%
*-commutative88.2%
fma-def88.2%
*-commutative88.2%
+-commutative88.2%
fma-def88.2%
+-commutative88.2%
fma-def88.2%
Simplified88.2%
Taylor expanded in y around 0 85.2%
Final simplification89.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.6e+119) (+ (* a (* z b)) (+ x (* a t))) (+ (+ (* a t) (+ x (* z y))) (* z (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.6e+119) {
tmp = (a * (z * b)) + (x + (a * t));
} else {
tmp = ((a * t) + (x + (z * y))) + (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) :: tmp
if (a <= (-1.6d+119)) then
tmp = (a * (z * b)) + (x + (a * t))
else
tmp = ((a * t) + (x + (z * y))) + (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 tmp;
if (a <= -1.6e+119) {
tmp = (a * (z * b)) + (x + (a * t));
} else {
tmp = ((a * t) + (x + (z * y))) + (z * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.6e+119: tmp = (a * (z * b)) + (x + (a * t)) else: tmp = ((a * t) + (x + (z * y))) + (z * (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.6e+119) tmp = Float64(Float64(a * Float64(z * b)) + Float64(x + Float64(a * t))); else tmp = Float64(Float64(Float64(a * t) + Float64(x + Float64(z * y))) + Float64(z * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.6e+119) tmp = (a * (z * b)) + (x + (a * t)); else tmp = ((a * t) + (x + (z * y))) + (z * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.6e+119], N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+119}:\\
\;\;\;\;a \cdot \left(z \cdot b\right) + \left(x + a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot t + \left(x + z \cdot y\right)\right) + z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -1.59999999999999995e119Initial program 82.5%
+-commutative82.5%
*-commutative82.5%
associate-*l*78.0%
*-commutative78.0%
fma-def78.0%
*-commutative78.0%
+-commutative78.0%
fma-def78.0%
+-commutative78.0%
fma-def78.0%
Simplified78.0%
Taylor expanded in y around 0 89.9%
if -1.59999999999999995e119 < a Initial program 95.0%
*-commutative95.0%
associate-*l*94.6%
Simplified94.6%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))))
(if (or (<= y -2.2e+45) (not (<= y 2.4e+76)))
(+ (* z y) t_1)
(+ (* a (* z b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if ((y <= -2.2e+45) || !(y <= 2.4e+76)) {
tmp = (z * y) + t_1;
} else {
tmp = (a * (z * b)) + 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 = x + (a * t)
if ((y <= (-2.2d+45)) .or. (.not. (y <= 2.4d+76))) then
tmp = (z * y) + t_1
else
tmp = (a * (z * b)) + 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 = x + (a * t);
double tmp;
if ((y <= -2.2e+45) || !(y <= 2.4e+76)) {
tmp = (z * y) + t_1;
} else {
tmp = (a * (z * b)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if (y <= -2.2e+45) or not (y <= 2.4e+76): tmp = (z * y) + t_1 else: tmp = (a * (z * b)) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if ((y <= -2.2e+45) || !(y <= 2.4e+76)) tmp = Float64(Float64(z * y) + t_1); else tmp = Float64(Float64(a * Float64(z * b)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if ((y <= -2.2e+45) || ~((y <= 2.4e+76))) tmp = (z * y) + t_1; else tmp = (a * (z * b)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -2.2e+45], N[Not[LessEqual[y, 2.4e+76]], $MachinePrecision]], N[(N[(z * y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+45} \lor \neg \left(y \leq 2.4 \cdot 10^{+76}\right):\\
\;\;\;\;z \cdot y + t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right) + t_1\\
\end{array}
\end{array}
if y < -2.2e45 or 2.4e76 < y Initial program 90.3%
*-commutative90.3%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in b around 0 87.1%
if -2.2e45 < y < 2.4e76Initial program 95.2%
+-commutative95.2%
*-commutative95.2%
associate-*l*90.6%
*-commutative90.6%
fma-def91.3%
*-commutative91.3%
+-commutative91.3%
fma-def91.3%
+-commutative91.3%
fma-def91.3%
Simplified91.3%
Taylor expanded in y around 0 88.5%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))))
(if (<= b -1.5e+168)
(* b (* z a))
(if (<= b -5.2e-213)
t_1
(if (<= b -1.5e-254) (* z y) (if (<= b 2.8e+139) t_1 (* z (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (b <= -1.5e+168) {
tmp = b * (z * a);
} else if (b <= -5.2e-213) {
tmp = t_1;
} else if (b <= -1.5e-254) {
tmp = z * y;
} else if (b <= 2.8e+139) {
tmp = t_1;
} 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 = x + (a * t)
if (b <= (-1.5d+168)) then
tmp = b * (z * a)
else if (b <= (-5.2d-213)) then
tmp = t_1
else if (b <= (-1.5d-254)) then
tmp = z * y
else if (b <= 2.8d+139) then
tmp = t_1
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 = x + (a * t);
double tmp;
if (b <= -1.5e+168) {
tmp = b * (z * a);
} else if (b <= -5.2e-213) {
tmp = t_1;
} else if (b <= -1.5e-254) {
tmp = z * y;
} else if (b <= 2.8e+139) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if b <= -1.5e+168: tmp = b * (z * a) elif b <= -5.2e-213: tmp = t_1 elif b <= -1.5e-254: tmp = z * y elif b <= 2.8e+139: tmp = t_1 else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if (b <= -1.5e+168) tmp = Float64(b * Float64(z * a)); elseif (b <= -5.2e-213) tmp = t_1; elseif (b <= -1.5e-254) tmp = Float64(z * y); elseif (b <= 2.8e+139) tmp = t_1; else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if (b <= -1.5e+168) tmp = b * (z * a); elseif (b <= -5.2e-213) tmp = t_1; elseif (b <= -1.5e-254) tmp = z * y; elseif (b <= 2.8e+139) tmp = t_1; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e+168], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.2e-213], t$95$1, If[LessEqual[b, -1.5e-254], N[(z * y), $MachinePrecision], If[LessEqual[b, 2.8e+139], t$95$1, N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+168}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-254}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if b < -1.4999999999999999e168Initial program 90.6%
*-commutative90.6%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in z around inf 75.8%
Taylor expanded in a around inf 66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in b around 0 66.6%
*-commutative66.6%
associate-*r*75.3%
Simplified75.3%
if -1.4999999999999999e168 < b < -5.2000000000000003e-213 or -1.50000000000000006e-254 < b < 2.7999999999999998e139Initial program 94.0%
*-commutative94.0%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in z around 0 60.8%
if -5.2000000000000003e-213 < b < -1.50000000000000006e-254Initial program 91.7%
*-commutative91.7%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around inf 75.6%
*-commutative75.6%
Simplified75.6%
if 2.7999999999999998e139 < b Initial program 90.2%
*-commutative90.2%
associate-*l*84.2%
Simplified84.2%
Taylor expanded in z around inf 80.7%
Taylor expanded in a around inf 61.5%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7e+96) (not (<= a 6.2e+30))) (* a (+ t (* z b))) (+ (* z y) (+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+96) || !(a <= 6.2e+30)) {
tmp = a * (t + (z * b));
} else {
tmp = (z * y) + (x + (a * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-7d+96)) .or. (.not. (a <= 6.2d+30))) then
tmp = a * (t + (z * b))
else
tmp = (z * y) + (x + (a * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+96) || !(a <= 6.2e+30)) {
tmp = a * (t + (z * b));
} else {
tmp = (z * y) + (x + (a * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e+96) or not (a <= 6.2e+30): tmp = a * (t + (z * b)) else: tmp = (z * y) + (x + (a * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e+96) || !(a <= 6.2e+30)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(Float64(z * y) + Float64(x + Float64(a * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7e+96) || ~((a <= 6.2e+30))) tmp = a * (t + (z * b)); else tmp = (z * y) + (x + (a * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+96], N[Not[LessEqual[a, 6.2e+30]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] + N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+96} \lor \neg \left(a \leq 6.2 \cdot 10^{+30}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot y + \left(x + a \cdot t\right)\\
\end{array}
\end{array}
if a < -6.9999999999999998e96 or 6.1999999999999995e30 < a Initial program 86.4%
*-commutative86.4%
associate-*l*83.3%
Simplified83.3%
Taylor expanded in a around inf 81.3%
if -6.9999999999999998e96 < a < 6.1999999999999995e30Initial program 98.5%
*-commutative98.5%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in b around 0 87.5%
Final simplification84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= a -2e+221)
t_1
(if (<= a -1.35e+63)
(+ x (* a t))
(if (<= a 6.6e+30) (+ x (* z y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -2e+221) {
tmp = t_1;
} else if (a <= -1.35e+63) {
tmp = x + (a * t);
} else if (a <= 6.6e+30) {
tmp = x + (z * y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (a <= (-2d+221)) then
tmp = t_1
else if (a <= (-1.35d+63)) then
tmp = x + (a * t)
else if (a <= 6.6d+30) then
tmp = x + (z * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -2e+221) {
tmp = t_1;
} else if (a <= -1.35e+63) {
tmp = x + (a * t);
} else if (a <= 6.6e+30) {
tmp = x + (z * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if a <= -2e+221: tmp = t_1 elif a <= -1.35e+63: tmp = x + (a * t) elif a <= 6.6e+30: tmp = x + (z * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (a <= -2e+221) tmp = t_1; elseif (a <= -1.35e+63) tmp = Float64(x + Float64(a * t)); elseif (a <= 6.6e+30) tmp = Float64(x + Float64(z * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (a <= -2e+221) tmp = t_1; elseif (a <= -1.35e+63) tmp = x + (a * t); elseif (a <= 6.6e+30) tmp = x + (z * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+221], t$95$1, If[LessEqual[a, -1.35e+63], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e+30], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;a \leq -2 \cdot 10^{+221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{+63}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+30}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -2.0000000000000001e221 or 6.60000000000000053e30 < a Initial program 86.1%
*-commutative86.1%
associate-*l*83.3%
Simplified83.3%
Taylor expanded in z around inf 58.0%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
Simplified52.9%
if -2.0000000000000001e221 < a < -1.35000000000000009e63Initial program 89.7%
*-commutative89.7%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in z around 0 69.7%
if -1.35000000000000009e63 < a < 6.60000000000000053e30Initial program 98.5%
*-commutative98.5%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 75.4%
Final simplification66.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.5e+49) (not (<= z 5.3e-13))) (* z (+ y (* a b))) (+ x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+49) || !(z <= 5.3e-13)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.5d+49)) .or. (.not. (z <= 5.3d-13))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+49) || !(z <= 5.3e-13)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e+49) or not (z <= 5.3e-13): tmp = z * (y + (a * b)) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e+49) || !(z <= 5.3e-13)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.5e+49) || ~((z <= 5.3e-13))) tmp = z * (y + (a * b)); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e+49], N[Not[LessEqual[z, 5.3e-13]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+49} \lor \neg \left(z \leq 5.3 \cdot 10^{-13}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -1.5000000000000001e49 or 5.2999999999999996e-13 < z Initial program 87.1%
*-commutative87.1%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in z around inf 81.5%
if -1.5000000000000001e49 < z < 5.2999999999999996e-13Initial program 98.4%
*-commutative98.4%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in z around 0 73.7%
Final simplification77.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.3e+63) (not (<= a 66000000.0))) (* a (+ t (* z b))) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.3e+63) || !(a <= 66000000.0)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.3d+63)) .or. (.not. (a <= 66000000.0d0))) then
tmp = a * (t + (z * b))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.3e+63) || !(a <= 66000000.0)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.3e+63) or not (a <= 66000000.0): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.3e+63) || !(a <= 66000000.0)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.3e+63) || ~((a <= 66000000.0))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.3e+63], N[Not[LessEqual[a, 66000000.0]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+63} \lor \neg \left(a \leq 66000000\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -1.3000000000000001e63 or 6.6e7 < a Initial program 87.6%
*-commutative87.6%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in a around inf 79.8%
if -1.3000000000000001e63 < a < 6.6e7Initial program 98.4%
*-commutative98.4%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 77.2%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3e+81) (* z y) (if (<= z -8e-238) (* a t) (if (<= z 2.9e-15) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3e+81) {
tmp = z * y;
} else if (z <= -8e-238) {
tmp = a * t;
} else if (z <= 2.9e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3d+81)) then
tmp = z * y
else if (z <= (-8d-238)) then
tmp = a * t
else if (z <= 2.9d-15) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3e+81) {
tmp = z * y;
} else if (z <= -8e-238) {
tmp = a * t;
} else if (z <= 2.9e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3e+81: tmp = z * y elif z <= -8e-238: tmp = a * t elif z <= 2.9e-15: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3e+81) tmp = Float64(z * y); elseif (z <= -8e-238) tmp = Float64(a * t); elseif (z <= 2.9e-15) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3e+81) tmp = z * y; elseif (z <= -8e-238) tmp = a * t; elseif (z <= 2.9e-15) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3e+81], N[(z * y), $MachinePrecision], If[LessEqual[z, -8e-238], N[(a * t), $MachinePrecision], If[LessEqual[z, 2.9e-15], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+81}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-238}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -2.99999999999999997e81 or 2.90000000000000019e-15 < z Initial program 85.8%
*-commutative85.8%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in y around inf 41.1%
*-commutative41.1%
Simplified41.1%
if -2.99999999999999997e81 < z < -7.9999999999999999e-238Initial program 97.0%
*-commutative97.0%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in t around inf 41.1%
if -7.9999999999999999e-238 < z < 2.90000000000000019e-15Initial program 99.9%
*-commutative99.9%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in x around inf 48.1%
Final simplification43.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.7e+34) (* a (* z b)) (if (<= z -1.06e-237) (* a t) (if (<= z 6.4e-15) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.7e+34) {
tmp = a * (z * b);
} else if (z <= -1.06e-237) {
tmp = a * t;
} else if (z <= 6.4e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.7d+34)) then
tmp = a * (z * b)
else if (z <= (-1.06d-237)) then
tmp = a * t
else if (z <= 6.4d-15) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.7e+34) {
tmp = a * (z * b);
} else if (z <= -1.06e-237) {
tmp = a * t;
} else if (z <= 6.4e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.7e+34: tmp = a * (z * b) elif z <= -1.06e-237: tmp = a * t elif z <= 6.4e-15: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.7e+34) tmp = Float64(a * Float64(z * b)); elseif (z <= -1.06e-237) tmp = Float64(a * t); elseif (z <= 6.4e-15) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.7e+34) tmp = a * (z * b); elseif (z <= -1.06e-237) tmp = a * t; elseif (z <= 6.4e-15) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.7e+34], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.06e-237], N[(a * t), $MachinePrecision], If[LessEqual[z, 6.4e-15], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+34}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-237}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -1.7e34Initial program 81.9%
*-commutative81.9%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in z around inf 78.1%
Taylor expanded in a around inf 52.2%
*-commutative52.2%
Simplified52.2%
if -1.7e34 < z < -1.05999999999999994e-237Initial program 98.0%
*-commutative98.0%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in t around inf 43.2%
if -1.05999999999999994e-237 < z < 6.3999999999999999e-15Initial program 99.9%
*-commutative99.9%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in x around inf 48.1%
if 6.3999999999999999e-15 < z Initial program 90.3%
*-commutative90.3%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in y around inf 45.7%
*-commutative45.7%
Simplified45.7%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.12e+36) (* z (* a b)) (if (<= z -9.4e-238) (* a t) (if (<= z 4e-15) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+36) {
tmp = z * (a * b);
} else if (z <= -9.4e-238) {
tmp = a * t;
} else if (z <= 4e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.12d+36)) then
tmp = z * (a * b)
else if (z <= (-9.4d-238)) then
tmp = a * t
else if (z <= 4d-15) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+36) {
tmp = z * (a * b);
} else if (z <= -9.4e-238) {
tmp = a * t;
} else if (z <= 4e-15) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.12e+36: tmp = z * (a * b) elif z <= -9.4e-238: tmp = a * t elif z <= 4e-15: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12e+36) tmp = Float64(z * Float64(a * b)); elseif (z <= -9.4e-238) tmp = Float64(a * t); elseif (z <= 4e-15) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.12e+36) tmp = z * (a * b); elseif (z <= -9.4e-238) tmp = a * t; elseif (z <= 4e-15) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.12e+36], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.4e-238], N[(a * t), $MachinePrecision], If[LessEqual[z, 4e-15], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+36}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq -9.4 \cdot 10^{-238}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -1.11999999999999999e36Initial program 81.9%
*-commutative81.9%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in z around inf 78.1%
Taylor expanded in a around inf 54.0%
if -1.11999999999999999e36 < z < -9.40000000000000046e-238Initial program 98.0%
*-commutative98.0%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in t around inf 43.2%
if -9.40000000000000046e-238 < z < 4.0000000000000003e-15Initial program 99.9%
*-commutative99.9%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in x around inf 48.1%
if 4.0000000000000003e-15 < z Initial program 90.3%
*-commutative90.3%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in y around inf 45.7%
*-commutative45.7%
Simplified45.7%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.4e-15) (* a t) (if (<= t 1.45e-56) x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.4e-15) {
tmp = a * t;
} else if (t <= 1.45e-56) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.4d-15)) then
tmp = a * t
else if (t <= 1.45d-56) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.4e-15) {
tmp = a * t;
} else if (t <= 1.45e-56) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.4e-15: tmp = a * t elif t <= 1.45e-56: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.4e-15) tmp = Float64(a * t); elseif (t <= 1.45e-56) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.4e-15) tmp = a * t; elseif (t <= 1.45e-56) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.4e-15], N[(a * t), $MachinePrecision], If[LessEqual[t, 1.45e-56], x, N[(a * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-15}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -1.40000000000000007e-15 or 1.44999999999999996e-56 < t Initial program 92.2%
*-commutative92.2%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in t around inf 44.7%
if -1.40000000000000007e-15 < t < 1.44999999999999996e-56Initial program 94.0%
*-commutative94.0%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in x around inf 37.8%
Final simplification41.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.0%
*-commutative93.0%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 25.9%
Final simplification25.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023268
(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)))