
(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 19 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 4.2e+30) (+ (fma y z x) (* a (+ t (* z b)))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.2e+30) {
tmp = fma(y, z, x) + (a * (t + (z * b)));
} else {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 4.2e+30) tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.2e+30], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.2 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\end{array}
\end{array}
if z < 4.2e30Initial program 94.8%
associate-+l+94.8%
+-commutative94.8%
fma-define94.8%
associate-*l*96.3%
*-commutative96.3%
*-commutative96.3%
distribute-rgt-out98.9%
remove-double-neg98.9%
*-commutative98.9%
distribute-lft-neg-out98.9%
sub-neg98.9%
sub-neg98.9%
distribute-lft-neg-in98.9%
remove-double-neg98.9%
Simplified98.9%
if 4.2e30 < z Initial program 92.0%
associate-+l+92.0%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in z around inf 96.6%
+-commutative96.6%
associate-+r+96.6%
associate-/l*98.2%
distribute-lft-out99.8%
Simplified99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -3.8e+26)
(* a t)
(if (<= t -2e-134)
t_1
(if (<= t -5.2e-161)
(* z y)
(if (<= t -3.3e-195)
(* z (* a b))
(if (<= t -1.9e-304)
x
(if (<= t 3.2e-241)
t_1
(if (<= t 5.5e-171)
x
(if (<= t 7.6e+109) (* z y) (* a t)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -3.8e+26) {
tmp = a * t;
} else if (t <= -2e-134) {
tmp = t_1;
} else if (t <= -5.2e-161) {
tmp = z * y;
} else if (t <= -3.3e-195) {
tmp = z * (a * b);
} else if (t <= -1.9e-304) {
tmp = x;
} else if (t <= 3.2e-241) {
tmp = t_1;
} else if (t <= 5.5e-171) {
tmp = x;
} else if (t <= 7.6e+109) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (t <= (-3.8d+26)) then
tmp = a * t
else if (t <= (-2d-134)) then
tmp = t_1
else if (t <= (-5.2d-161)) then
tmp = z * y
else if (t <= (-3.3d-195)) then
tmp = z * (a * b)
else if (t <= (-1.9d-304)) then
tmp = x
else if (t <= 3.2d-241) then
tmp = t_1
else if (t <= 5.5d-171) then
tmp = x
else if (t <= 7.6d+109) then
tmp = z * y
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -3.8e+26) {
tmp = a * t;
} else if (t <= -2e-134) {
tmp = t_1;
} else if (t <= -5.2e-161) {
tmp = z * y;
} else if (t <= -3.3e-195) {
tmp = z * (a * b);
} else if (t <= -1.9e-304) {
tmp = x;
} else if (t <= 3.2e-241) {
tmp = t_1;
} else if (t <= 5.5e-171) {
tmp = x;
} else if (t <= 7.6e+109) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if t <= -3.8e+26: tmp = a * t elif t <= -2e-134: tmp = t_1 elif t <= -5.2e-161: tmp = z * y elif t <= -3.3e-195: tmp = z * (a * b) elif t <= -1.9e-304: tmp = x elif t <= 3.2e-241: tmp = t_1 elif t <= 5.5e-171: tmp = x elif t <= 7.6e+109: tmp = z * y else: tmp = a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (t <= -3.8e+26) tmp = Float64(a * t); elseif (t <= -2e-134) tmp = t_1; elseif (t <= -5.2e-161) tmp = Float64(z * y); elseif (t <= -3.3e-195) tmp = Float64(z * Float64(a * b)); elseif (t <= -1.9e-304) tmp = x; elseif (t <= 3.2e-241) tmp = t_1; elseif (t <= 5.5e-171) tmp = x; elseif (t <= 7.6e+109) tmp = Float64(z * y); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (t <= -3.8e+26) tmp = a * t; elseif (t <= -2e-134) tmp = t_1; elseif (t <= -5.2e-161) tmp = z * y; elseif (t <= -3.3e-195) tmp = z * (a * b); elseif (t <= -1.9e-304) tmp = x; elseif (t <= 3.2e-241) tmp = t_1; elseif (t <= 5.5e-171) tmp = x; elseif (t <= 7.6e+109) tmp = z * y; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+26], N[(a * t), $MachinePrecision], If[LessEqual[t, -2e-134], t$95$1, If[LessEqual[t, -5.2e-161], N[(z * y), $MachinePrecision], If[LessEqual[t, -3.3e-195], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-304], x, If[LessEqual[t, 3.2e-241], t$95$1, If[LessEqual[t, 5.5e-171], x, If[LessEqual[t, 7.6e+109], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+26}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-161}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-195}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-304}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-171}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+109}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -3.8000000000000002e26 or 7.60000000000000078e109 < t Initial program 91.3%
associate-+l+91.3%
+-commutative91.3%
fma-define91.3%
associate-*l*91.4%
*-commutative91.4%
*-commutative91.4%
distribute-rgt-out98.2%
remove-double-neg98.2%
*-commutative98.2%
distribute-lft-neg-out98.2%
sub-neg98.2%
sub-neg98.2%
distribute-lft-neg-in98.2%
remove-double-neg98.2%
Simplified98.2%
Taylor expanded in y around 0 89.0%
Taylor expanded in t around inf 89.0%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around inf 64.9%
if -3.8000000000000002e26 < t < -2.00000000000000008e-134 or -1.8999999999999998e-304 < t < 3.2e-241Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
fma-define97.3%
associate-*l*94.9%
*-commutative94.9%
*-commutative94.9%
distribute-rgt-out94.9%
remove-double-neg94.9%
*-commutative94.9%
distribute-lft-neg-out94.9%
sub-neg94.9%
sub-neg94.9%
distribute-lft-neg-in94.9%
remove-double-neg94.9%
Simplified94.9%
Taylor expanded in y around 0 72.3%
Taylor expanded in t around inf 57.6%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in b around inf 52.3%
if -2.00000000000000008e-134 < t < -5.19999999999999991e-161 or 5.50000000000000037e-171 < t < 7.60000000000000078e109Initial program 93.4%
associate-+l+93.4%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in y around inf 47.8%
*-commutative47.8%
Simplified47.8%
if -5.19999999999999991e-161 < t < -3.3e-195Initial program 99.9%
associate-+l+99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.9%
+-commutative66.9%
Simplified66.9%
Taylor expanded in a around inf 66.9%
*-commutative66.9%
Simplified66.9%
if -3.3e-195 < t < -1.8999999999999998e-304 or 3.2e-241 < t < 5.50000000000000037e-171Initial program 97.6%
associate-+l+97.6%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in x around inf 53.8%
Final simplification57.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -3e+24)
(* a t)
(if (<= t -9.6e-129)
t_1
(if (<= t -1.25e-160)
(* z y)
(if (<= t -5e-195)
t_1
(if (<= t -6.2e-307)
x
(if (<= t 8.5e-242)
t_1
(if (<= t 3.9e-167)
x
(if (<= t 2.25e+110) (* z y) (* a t)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -3e+24) {
tmp = a * t;
} else if (t <= -9.6e-129) {
tmp = t_1;
} else if (t <= -1.25e-160) {
tmp = z * y;
} else if (t <= -5e-195) {
tmp = t_1;
} else if (t <= -6.2e-307) {
tmp = x;
} else if (t <= 8.5e-242) {
tmp = t_1;
} else if (t <= 3.9e-167) {
tmp = x;
} else if (t <= 2.25e+110) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (t <= (-3d+24)) then
tmp = a * t
else if (t <= (-9.6d-129)) then
tmp = t_1
else if (t <= (-1.25d-160)) then
tmp = z * y
else if (t <= (-5d-195)) then
tmp = t_1
else if (t <= (-6.2d-307)) then
tmp = x
else if (t <= 8.5d-242) then
tmp = t_1
else if (t <= 3.9d-167) then
tmp = x
else if (t <= 2.25d+110) then
tmp = z * y
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -3e+24) {
tmp = a * t;
} else if (t <= -9.6e-129) {
tmp = t_1;
} else if (t <= -1.25e-160) {
tmp = z * y;
} else if (t <= -5e-195) {
tmp = t_1;
} else if (t <= -6.2e-307) {
tmp = x;
} else if (t <= 8.5e-242) {
tmp = t_1;
} else if (t <= 3.9e-167) {
tmp = x;
} else if (t <= 2.25e+110) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if t <= -3e+24: tmp = a * t elif t <= -9.6e-129: tmp = t_1 elif t <= -1.25e-160: tmp = z * y elif t <= -5e-195: tmp = t_1 elif t <= -6.2e-307: tmp = x elif t <= 8.5e-242: tmp = t_1 elif t <= 3.9e-167: tmp = x elif t <= 2.25e+110: tmp = z * y else: tmp = a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (t <= -3e+24) tmp = Float64(a * t); elseif (t <= -9.6e-129) tmp = t_1; elseif (t <= -1.25e-160) tmp = Float64(z * y); elseif (t <= -5e-195) tmp = t_1; elseif (t <= -6.2e-307) tmp = x; elseif (t <= 8.5e-242) tmp = t_1; elseif (t <= 3.9e-167) tmp = x; elseif (t <= 2.25e+110) tmp = Float64(z * y); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (t <= -3e+24) tmp = a * t; elseif (t <= -9.6e-129) tmp = t_1; elseif (t <= -1.25e-160) tmp = z * y; elseif (t <= -5e-195) tmp = t_1; elseif (t <= -6.2e-307) tmp = x; elseif (t <= 8.5e-242) tmp = t_1; elseif (t <= 3.9e-167) tmp = x; elseif (t <= 2.25e+110) tmp = z * y; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+24], N[(a * t), $MachinePrecision], If[LessEqual[t, -9.6e-129], t$95$1, If[LessEqual[t, -1.25e-160], N[(z * y), $MachinePrecision], If[LessEqual[t, -5e-195], t$95$1, If[LessEqual[t, -6.2e-307], x, If[LessEqual[t, 8.5e-242], t$95$1, If[LessEqual[t, 3.9e-167], x, If[LessEqual[t, 2.25e+110], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+24}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-160}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-167}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+110}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -2.99999999999999995e24 or 2.2500000000000001e110 < t Initial program 91.3%
associate-+l+91.3%
+-commutative91.3%
fma-define91.3%
associate-*l*91.4%
*-commutative91.4%
*-commutative91.4%
distribute-rgt-out98.2%
remove-double-neg98.2%
*-commutative98.2%
distribute-lft-neg-out98.2%
sub-neg98.2%
sub-neg98.2%
distribute-lft-neg-in98.2%
remove-double-neg98.2%
Simplified98.2%
Taylor expanded in y around 0 89.0%
Taylor expanded in t around inf 89.0%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around inf 64.9%
if -2.99999999999999995e24 < t < -9.59999999999999954e-129 or -1.24999999999999999e-160 < t < -5.00000000000000009e-195 or -6.1999999999999996e-307 < t < 8.4999999999999997e-242Initial program 97.9%
associate-+l+97.9%
+-commutative97.9%
fma-define97.9%
associate-*l*96.0%
*-commutative96.0%
*-commutative96.0%
distribute-rgt-out96.1%
remove-double-neg96.1%
*-commutative96.1%
distribute-lft-neg-out96.1%
sub-neg96.1%
sub-neg96.1%
distribute-lft-neg-in96.1%
remove-double-neg96.1%
Simplified96.1%
Taylor expanded in y around 0 77.6%
Taylor expanded in t around inf 59.8%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in b around inf 55.7%
if -9.59999999999999954e-129 < t < -1.24999999999999999e-160 or 3.89999999999999984e-167 < t < 2.2500000000000001e110Initial program 93.4%
associate-+l+93.4%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in y around inf 47.8%
*-commutative47.8%
Simplified47.8%
if -5.00000000000000009e-195 < t < -6.1999999999999996e-307 or 8.4999999999999997e-242 < t < 3.89999999999999984e-167Initial program 97.6%
associate-+l+97.6%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in x around inf 53.8%
Final simplification57.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* z y)) (* a t)) (* b (* z a))))) (if (<= t_1 INFINITY) t_1 (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + ((a * (b + (t / z))) + (x / z))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * y)) + Float64(a * t)) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * y)) + (a * t)) + (b * (z * a)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + ((a * (b + (t / z))) + (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 98.7%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*25.0%
Simplified25.0%
Taylor expanded in z around inf 58.3%
+-commutative58.3%
associate-+r+58.3%
associate-/l*66.7%
distribute-lft-out100.0%
Simplified100.0%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -470000000000.0)
(* a t)
(if (<= t -9.8e-175)
(* z y)
(if (<= t -3.8e-265)
x
(if (<= t 3.15e-239)
(* z y)
(if (<= t 3e-171) x (if (<= t 8.5e+109) (* z y) (* a t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -470000000000.0) {
tmp = a * t;
} else if (t <= -9.8e-175) {
tmp = z * y;
} else if (t <= -3.8e-265) {
tmp = x;
} else if (t <= 3.15e-239) {
tmp = z * y;
} else if (t <= 3e-171) {
tmp = x;
} else if (t <= 8.5e+109) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-470000000000.0d0)) then
tmp = a * t
else if (t <= (-9.8d-175)) then
tmp = z * y
else if (t <= (-3.8d-265)) then
tmp = x
else if (t <= 3.15d-239) then
tmp = z * y
else if (t <= 3d-171) then
tmp = x
else if (t <= 8.5d+109) then
tmp = z * y
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -470000000000.0) {
tmp = a * t;
} else if (t <= -9.8e-175) {
tmp = z * y;
} else if (t <= -3.8e-265) {
tmp = x;
} else if (t <= 3.15e-239) {
tmp = z * y;
} else if (t <= 3e-171) {
tmp = x;
} else if (t <= 8.5e+109) {
tmp = z * y;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -470000000000.0: tmp = a * t elif t <= -9.8e-175: tmp = z * y elif t <= -3.8e-265: tmp = x elif t <= 3.15e-239: tmp = z * y elif t <= 3e-171: tmp = x elif t <= 8.5e+109: tmp = z * y else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -470000000000.0) tmp = Float64(a * t); elseif (t <= -9.8e-175) tmp = Float64(z * y); elseif (t <= -3.8e-265) tmp = x; elseif (t <= 3.15e-239) tmp = Float64(z * y); elseif (t <= 3e-171) tmp = x; elseif (t <= 8.5e+109) tmp = Float64(z * y); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -470000000000.0) tmp = a * t; elseif (t <= -9.8e-175) tmp = z * y; elseif (t <= -3.8e-265) tmp = x; elseif (t <= 3.15e-239) tmp = z * y; elseif (t <= 3e-171) tmp = x; elseif (t <= 8.5e+109) tmp = z * y; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -470000000000.0], N[(a * t), $MachinePrecision], If[LessEqual[t, -9.8e-175], N[(z * y), $MachinePrecision], If[LessEqual[t, -3.8e-265], x, If[LessEqual[t, 3.15e-239], N[(z * y), $MachinePrecision], If[LessEqual[t, 3e-171], x, If[LessEqual[t, 8.5e+109], N[(z * y), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -470000000000:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-175}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-265}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-239}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-171}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+109}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -4.7e11 or 8.5000000000000004e109 < t Initial program 91.5%
associate-+l+91.5%
+-commutative91.5%
fma-define91.5%
associate-*l*91.6%
*-commutative91.6%
*-commutative91.6%
distribute-rgt-out98.2%
remove-double-neg98.2%
*-commutative98.2%
distribute-lft-neg-out98.2%
sub-neg98.2%
sub-neg98.2%
distribute-lft-neg-in98.2%
remove-double-neg98.2%
Simplified98.2%
Taylor expanded in y around 0 89.2%
Taylor expanded in t around inf 89.2%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in t around inf 63.9%
if -4.7e11 < t < -9.79999999999999996e-175 or -3.7999999999999998e-265 < t < 3.15000000000000009e-239 or 3e-171 < t < 8.5000000000000004e109Initial program 95.6%
associate-+l+95.6%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in y around inf 42.9%
*-commutative42.9%
Simplified42.9%
if -9.79999999999999996e-175 < t < -3.7999999999999998e-265 or 3.15000000000000009e-239 < t < 3e-171Initial program 97.2%
associate-+l+97.2%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around inf 58.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -3.8e+118)
t_1
(if (<= z -8e+28)
(+ (* a t) (* z y))
(if (<= z -980000.0)
(+ x (* a (* z b)))
(if (<= z 6e-82)
(+ x (* a t))
(if (<= z 1.45e+14) (+ x (* b (* z a))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -3.8e+118) {
tmp = t_1;
} else if (z <= -8e+28) {
tmp = (a * t) + (z * y);
} else if (z <= -980000.0) {
tmp = x + (a * (z * b));
} else if (z <= 6e-82) {
tmp = x + (a * t);
} else if (z <= 1.45e+14) {
tmp = x + (b * (z * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-3.8d+118)) then
tmp = t_1
else if (z <= (-8d+28)) then
tmp = (a * t) + (z * y)
else if (z <= (-980000.0d0)) then
tmp = x + (a * (z * b))
else if (z <= 6d-82) then
tmp = x + (a * t)
else if (z <= 1.45d+14) then
tmp = x + (b * (z * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -3.8e+118) {
tmp = t_1;
} else if (z <= -8e+28) {
tmp = (a * t) + (z * y);
} else if (z <= -980000.0) {
tmp = x + (a * (z * b));
} else if (z <= 6e-82) {
tmp = x + (a * t);
} else if (z <= 1.45e+14) {
tmp = x + (b * (z * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -3.8e+118: tmp = t_1 elif z <= -8e+28: tmp = (a * t) + (z * y) elif z <= -980000.0: tmp = x + (a * (z * b)) elif z <= 6e-82: tmp = x + (a * t) elif z <= 1.45e+14: tmp = x + (b * (z * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -3.8e+118) tmp = t_1; elseif (z <= -8e+28) tmp = Float64(Float64(a * t) + Float64(z * y)); elseif (z <= -980000.0) tmp = Float64(x + Float64(a * Float64(z * b))); elseif (z <= 6e-82) tmp = Float64(x + Float64(a * t)); elseif (z <= 1.45e+14) tmp = Float64(x + Float64(b * Float64(z * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -3.8e+118) tmp = t_1; elseif (z <= -8e+28) tmp = (a * t) + (z * y); elseif (z <= -980000.0) tmp = x + (a * (z * b)); elseif (z <= 6e-82) tmp = x + (a * t); elseif (z <= 1.45e+14) tmp = x + (b * (z * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+118], t$95$1, If[LessEqual[z, -8e+28], N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -980000.0], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+14], N[(x + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{+28}:\\
\;\;\;\;a \cdot t + z \cdot y\\
\mathbf{elif}\;z \leq -980000:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+14}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.80000000000000016e118 or 1.45e14 < z Initial program 90.4%
associate-+l+90.4%
associate-*l*86.8%
Simplified86.8%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
Simplified80.7%
if -3.80000000000000016e118 < z < -7.99999999999999967e28Initial program 88.7%
associate-+l+88.7%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in x around 0 96.6%
if -7.99999999999999967e28 < z < -9.8e5Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
remove-double-neg100.0%
*-commutative100.0%
distribute-lft-neg-out100.0%
sub-neg100.0%
sub-neg100.0%
distribute-lft-neg-in100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 92.2%
Taylor expanded in t around 0 92.2%
if -9.8e5 < z < 5.9999999999999998e-82Initial program 96.6%
associate-+l+96.6%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in z around 0 79.9%
+-commutative79.9%
Simplified79.9%
if 5.9999999999999998e-82 < z < 1.45e14Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
associate-*l*99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
remove-double-neg99.7%
*-commutative99.7%
distribute-lft-neg-out99.7%
sub-neg99.7%
sub-neg99.7%
distribute-lft-neg-in99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in y around 0 90.0%
Taylor expanded in t around inf 69.3%
associate-/l*69.3%
Simplified69.3%
Taylor expanded in t around 0 84.7%
*-commutative84.7%
associate-*r*84.8%
Simplified84.8%
Final simplification81.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))) (t_2 (+ x (* z y))))
(if (<= z -2.25e-17)
t_1
(if (<= z -3e-209)
(+ t_2 (* a t))
(if (<= z 5e+29) (+ t_2 (+ (* a t) (* a (* z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + ((a * (b + (t / z))) + (x / z)));
double t_2 = x + (z * y);
double tmp;
if (z <= -2.25e-17) {
tmp = t_1;
} else if (z <= -3e-209) {
tmp = t_2 + (a * t);
} else if (z <= 5e+29) {
tmp = t_2 + ((a * t) + (a * (z * b)));
} 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) :: t_2
real(8) :: tmp
t_1 = z * (y + ((a * (b + (t / z))) + (x / z)))
t_2 = x + (z * y)
if (z <= (-2.25d-17)) then
tmp = t_1
else if (z <= (-3d-209)) then
tmp = t_2 + (a * t)
else if (z <= 5d+29) then
tmp = t_2 + ((a * t) + (a * (z * b)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + ((a * (b + (t / z))) + (x / z)));
double t_2 = x + (z * y);
double tmp;
if (z <= -2.25e-17) {
tmp = t_1;
} else if (z <= -3e-209) {
tmp = t_2 + (a * t);
} else if (z <= 5e+29) {
tmp = t_2 + ((a * t) + (a * (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + ((a * (b + (t / z))) + (x / z))) t_2 = x + (z * y) tmp = 0 if z <= -2.25e-17: tmp = t_1 elif z <= -3e-209: tmp = t_2 + (a * t) elif z <= 5e+29: tmp = t_2 + ((a * t) + (a * (z * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))) t_2 = Float64(x + Float64(z * y)) tmp = 0.0 if (z <= -2.25e-17) tmp = t_1; elseif (z <= -3e-209) tmp = Float64(t_2 + Float64(a * t)); elseif (z <= 5e+29) tmp = Float64(t_2 + Float64(Float64(a * t) + Float64(a * Float64(z * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + ((a * (b + (t / z))) + (x / z))); t_2 = x + (z * y); tmp = 0.0; if (z <= -2.25e-17) tmp = t_1; elseif (z <= -3e-209) tmp = t_2 + (a * t); elseif (z <= 5e+29) tmp = t_2 + ((a * t) + (a * (z * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-17], t$95$1, If[LessEqual[z, -3e-209], N[(t$95$2 + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+29], N[(t$95$2 + N[(N[(a * t), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
t_2 := x + z \cdot y\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-209}:\\
\;\;\;\;t\_2 + a \cdot t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+29}:\\
\;\;\;\;t\_2 + \left(a \cdot t + a \cdot \left(z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.24999999999999989e-17 or 5.0000000000000001e29 < z Initial program 91.1%
associate-+l+91.1%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in z around inf 98.2%
+-commutative98.2%
associate-+r+98.2%
associate-/l*99.0%
distribute-lft-out99.8%
Simplified99.8%
if -2.24999999999999989e-17 < z < -2.9999999999999999e-209Initial program 94.6%
associate-+l+94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in t around inf 95.0%
if -2.9999999999999999e-209 < z < 5.0000000000000001e29Initial program 97.9%
associate-+l+97.9%
associate-*l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.5e-17) (not (<= z 8.5e-89))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.5e-17) || !(z <= 8.5e-89)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (x + (z * y)) + (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 <= (-7.5d-17)) .or. (.not. (z <= 8.5d-89))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = (x + (z * y)) + (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 <= -7.5e-17) || !(z <= 8.5e-89)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (x + (z * y)) + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.5e-17) or not (z <= 8.5e-89): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = (x + (z * y)) + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.5e-17) || !(z <= 8.5e-89)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.5e-17) || ~((z <= 8.5e-89))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = (x + (z * y)) + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.5e-17], N[Not[LessEqual[z, 8.5e-89]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-17} \lor \neg \left(z \leq 8.5 \cdot 10^{-89}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\
\end{array}
\end{array}
if z < -7.49999999999999984e-17 or 8.49999999999999937e-89 < z Initial program 92.6%
associate-+l+92.6%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in z around inf 96.0%
+-commutative96.0%
associate-+r+96.0%
associate-/l*96.6%
distribute-lft-out97.9%
Simplified97.9%
if -7.49999999999999984e-17 < z < 8.49999999999999937e-89Initial program 96.2%
associate-+l+96.2%
associate-*l*97.1%
Simplified97.1%
Taylor expanded in t around inf 93.0%
Final simplification95.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1500000.0)
t_1
(if (<= z 4e-82)
(+ x (* a t))
(if (<= z 4.9e+14) (+ x (* b (* z a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1500000.0) {
tmp = t_1;
} else if (z <= 4e-82) {
tmp = x + (a * t);
} else if (z <= 4.9e+14) {
tmp = x + (b * (z * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-1500000.0d0)) then
tmp = t_1
else if (z <= 4d-82) then
tmp = x + (a * t)
else if (z <= 4.9d+14) then
tmp = x + (b * (z * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1500000.0) {
tmp = t_1;
} else if (z <= 4e-82) {
tmp = x + (a * t);
} else if (z <= 4.9e+14) {
tmp = x + (b * (z * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1500000.0: tmp = t_1 elif z <= 4e-82: tmp = x + (a * t) elif z <= 4.9e+14: tmp = x + (b * (z * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1500000.0) tmp = t_1; elseif (z <= 4e-82) tmp = Float64(x + Float64(a * t)); elseif (z <= 4.9e+14) tmp = Float64(x + Float64(b * Float64(z * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1500000.0) tmp = t_1; elseif (z <= 4e-82) tmp = x + (a * t); elseif (z <= 4.9e+14) tmp = x + (b * (z * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1500000.0], t$95$1, If[LessEqual[z, 4e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+14], N[(x + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+14}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5e6 or 4.9e14 < z Initial program 90.7%
associate-+l+90.7%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -1.5e6 < z < 4e-82Initial program 96.6%
associate-+l+96.6%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in z around 0 79.9%
+-commutative79.9%
Simplified79.9%
if 4e-82 < z < 4.9e14Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
associate-*l*99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
remove-double-neg99.7%
*-commutative99.7%
distribute-lft-neg-out99.7%
sub-neg99.7%
sub-neg99.7%
distribute-lft-neg-in99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in y around 0 90.0%
Taylor expanded in t around inf 69.3%
associate-/l*69.3%
Simplified69.3%
Taylor expanded in t around 0 84.7%
*-commutative84.7%
associate-*r*84.8%
Simplified84.8%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1250000.0)
t_1
(if (<= z 3.9e-82)
(+ x (* a t))
(if (<= z 48000000000.0) (+ x (* a (* z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1250000.0) {
tmp = t_1;
} else if (z <= 3.9e-82) {
tmp = x + (a * t);
} else if (z <= 48000000000.0) {
tmp = x + (a * (z * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-1250000.0d0)) then
tmp = t_1
else if (z <= 3.9d-82) then
tmp = x + (a * t)
else if (z <= 48000000000.0d0) then
tmp = x + (a * (z * b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1250000.0) {
tmp = t_1;
} else if (z <= 3.9e-82) {
tmp = x + (a * t);
} else if (z <= 48000000000.0) {
tmp = x + (a * (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1250000.0: tmp = t_1 elif z <= 3.9e-82: tmp = x + (a * t) elif z <= 48000000000.0: tmp = x + (a * (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1250000.0) tmp = t_1; elseif (z <= 3.9e-82) tmp = Float64(x + Float64(a * t)); elseif (z <= 48000000000.0) tmp = Float64(x + Float64(a * Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1250000.0) tmp = t_1; elseif (z <= 3.9e-82) tmp = x + (a * t); elseif (z <= 48000000000.0) tmp = x + (a * (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1250000.0], t$95$1, If[LessEqual[z, 3.9e-82], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 48000000000.0], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1250000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 48000000000:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25e6 or 4.8e10 < z Initial program 90.7%
associate-+l+90.7%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -1.25e6 < z < 3.89999999999999973e-82Initial program 96.6%
associate-+l+96.6%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in z around 0 79.9%
+-commutative79.9%
Simplified79.9%
if 3.89999999999999973e-82 < z < 4.8e10Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
associate-*l*99.7%
*-commutative99.7%
*-commutative99.7%
distribute-rgt-out99.7%
remove-double-neg99.7%
*-commutative99.7%
distribute-lft-neg-out99.7%
sub-neg99.7%
sub-neg99.7%
distribute-lft-neg-in99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in y around 0 90.0%
Taylor expanded in t around 0 84.7%
Final simplification79.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8e+90) (not (<= b 9e-20))) (+ x (* b (* a (+ z (/ t b))))) (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8e+90) || !(b <= 9e-20)) {
tmp = x + (b * (a * (z + (t / b))));
} else {
tmp = (x + (z * y)) + (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 ((b <= (-8d+90)) .or. (.not. (b <= 9d-20))) then
tmp = x + (b * (a * (z + (t / b))))
else
tmp = (x + (z * y)) + (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 ((b <= -8e+90) || !(b <= 9e-20)) {
tmp = x + (b * (a * (z + (t / b))));
} else {
tmp = (x + (z * y)) + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8e+90) or not (b <= 9e-20): tmp = x + (b * (a * (z + (t / b)))) else: tmp = (x + (z * y)) + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8e+90) || !(b <= 9e-20)) tmp = Float64(x + Float64(b * Float64(a * Float64(z + Float64(t / b))))); else tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8e+90) || ~((b <= 9e-20))) tmp = x + (b * (a * (z + (t / b)))); else tmp = (x + (z * y)) + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8e+90], N[Not[LessEqual[b, 9e-20]], $MachinePrecision]], N[(x + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+90} \lor \neg \left(b \leq 9 \cdot 10^{-20}\right):\\
\;\;\;\;x + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\
\end{array}
\end{array}
if b < -7.99999999999999973e90 or 9.0000000000000003e-20 < b Initial program 93.9%
associate-+l+93.9%
+-commutative93.9%
fma-define93.9%
associate-*l*88.8%
*-commutative88.8%
*-commutative88.8%
distribute-rgt-out93.2%
remove-double-neg93.2%
*-commutative93.2%
distribute-lft-neg-out93.2%
sub-neg93.2%
sub-neg93.2%
distribute-lft-neg-in93.2%
remove-double-neg93.2%
Simplified93.2%
Taylor expanded in y around 0 86.3%
Taylor expanded in b around inf 86.2%
associate-/l*87.0%
distribute-lft-out87.9%
Simplified87.9%
if -7.99999999999999973e90 < b < 9.0000000000000003e-20Initial program 94.3%
associate-+l+94.3%
associate-*l*97.2%
Simplified97.2%
Taylor expanded in t around inf 91.4%
Final simplification89.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.5e+88) (not (<= b 3.05e+38))) (+ x (* a (+ t (* z b)))) (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.5e+88) || !(b <= 3.05e+38)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (z * y)) + (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 ((b <= (-9.5d+88)) .or. (.not. (b <= 3.05d+38))) then
tmp = x + (a * (t + (z * b)))
else
tmp = (x + (z * y)) + (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 ((b <= -9.5e+88) || !(b <= 3.05e+38)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = (x + (z * y)) + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9.5e+88) or not (b <= 3.05e+38): tmp = x + (a * (t + (z * b))) else: tmp = (x + (z * y)) + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.5e+88) || !(b <= 3.05e+38)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9.5e+88) || ~((b <= 3.05e+38))) tmp = x + (a * (t + (z * b))); else tmp = (x + (z * y)) + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.5e+88], N[Not[LessEqual[b, 3.05e+38]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+88} \lor \neg \left(b \leq 3.05 \cdot 10^{+38}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\
\end{array}
\end{array}
if b < -9.50000000000000059e88 or 3.05e38 < b Initial program 94.0%
associate-+l+94.0%
+-commutative94.0%
fma-define94.0%
associate-*l*89.2%
*-commutative89.2%
*-commutative89.2%
distribute-rgt-out93.2%
remove-double-neg93.2%
*-commutative93.2%
distribute-lft-neg-out93.2%
sub-neg93.2%
sub-neg93.2%
distribute-lft-neg-in93.2%
remove-double-neg93.2%
Simplified93.2%
Taylor expanded in y around 0 89.0%
if -9.50000000000000059e88 < b < 3.05e38Initial program 94.2%
associate-+l+94.2%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in t around inf 89.7%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e+48) (not (<= z 2.1e+32))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+48) || !(z <= 2.1e+32)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.5d+48)) .or. (.not. (z <= 2.1d+32))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+48) || !(z <= 2.1e+32)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+48) or not (z <= 2.1e+32): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+48) || !(z <= 2.1e+32)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e+48) || ~((z <= 2.1e+32))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+48], N[Not[LessEqual[z, 2.1e+32]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+48} \lor \neg \left(z \leq 2.1 \cdot 10^{+32}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -6.49999999999999972e48 or 2.1000000000000001e32 < z Initial program 89.4%
associate-+l+89.4%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in z around inf 80.8%
+-commutative80.8%
Simplified80.8%
if -6.49999999999999972e48 < z < 2.1000000000000001e32Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
fma-define97.3%
associate-*l*97.9%
*-commutative97.9%
*-commutative97.9%
distribute-rgt-out99.9%
remove-double-neg99.9%
*-commutative99.9%
distribute-lft-neg-out99.9%
sub-neg99.9%
sub-neg99.9%
distribute-lft-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 88.2%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5600000.0) (not (<= z 265000000000.0))) (* 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 <= -5600000.0) || !(z <= 265000000000.0)) {
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 <= (-5600000.0d0)) .or. (.not. (z <= 265000000000.0d0))) 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 <= -5600000.0) || !(z <= 265000000000.0)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5600000.0) or not (z <= 265000000000.0): 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 <= -5600000.0) || !(z <= 265000000000.0)) 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 <= -5600000.0) || ~((z <= 265000000000.0))) 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, -5600000.0], N[Not[LessEqual[z, 265000000000.0]], $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 -5600000 \lor \neg \left(z \leq 265000000000\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -5.6e6 or 2.65e11 < z Initial program 90.7%
associate-+l+90.7%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around inf 77.2%
+-commutative77.2%
Simplified77.2%
if -5.6e6 < z < 2.65e11Initial program 97.0%
associate-+l+97.0%
associate-*l*97.7%
Simplified97.7%
Taylor expanded in z around 0 76.2%
+-commutative76.2%
Simplified76.2%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.4e+19) (not (<= t 5.2e+96))) (+ x (* a t)) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.4e+19) || !(t <= 5.2e+96)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.4d+19)) .or. (.not. (t <= 5.2d+96))) then
tmp = x + (a * t)
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.4e+19) || !(t <= 5.2e+96)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.4e+19) or not (t <= 5.2e+96): tmp = x + (a * t) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.4e+19) || !(t <= 5.2e+96)) tmp = Float64(x + Float64(a * t)); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.4e+19) || ~((t <= 5.2e+96))) tmp = x + (a * t); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.4e+19], N[Not[LessEqual[t, 5.2e+96]], $MachinePrecision]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+19} \lor \neg \left(t \leq 5.2 \cdot 10^{+96}\right):\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if t < -2.4e19 or 5.2e96 < t Initial program 90.6%
associate-+l+90.6%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in z around 0 79.3%
+-commutative79.3%
Simplified79.3%
if -2.4e19 < t < 5.2e96Initial program 96.6%
associate-+l+96.6%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 66.7%
Final simplification72.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.5e+103) (not (<= t 1e+105))) (* a t) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e+103) || !(t <= 1e+105)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8.5d+103)) .or. (.not. (t <= 1d+105))) then
tmp = a * t
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.5e+103) || !(t <= 1e+105)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.5e+103) or not (t <= 1e+105): tmp = a * t else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.5e+103) || !(t <= 1e+105)) tmp = Float64(a * t); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.5e+103) || ~((t <= 1e+105))) tmp = a * t; else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.5e+103], N[Not[LessEqual[t, 1e+105]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+103} \lor \neg \left(t \leq 10^{+105}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if t < -8.4999999999999992e103 or 9.9999999999999994e104 < t Initial program 90.1%
associate-+l+90.1%
+-commutative90.1%
fma-define90.1%
associate-*l*90.2%
*-commutative90.2%
*-commutative90.2%
distribute-rgt-out97.9%
remove-double-neg97.9%
*-commutative97.9%
distribute-lft-neg-out97.9%
sub-neg97.9%
sub-neg97.9%
distribute-lft-neg-in97.9%
remove-double-neg97.9%
Simplified97.9%
Taylor expanded in y around 0 91.8%
Taylor expanded in t around inf 91.8%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in t around inf 69.4%
if -8.4999999999999992e103 < t < 9.9999999999999994e104Initial program 96.3%
associate-+l+96.3%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in a around 0 66.2%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5e+92) (* a (+ t (* z b))) (if (<= t 2.7e+97) (+ x (* z y)) (+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5e+92) {
tmp = a * (t + (z * b));
} else if (t <= 2.7e+97) {
tmp = x + (z * y);
} 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 (t <= (-5d+92)) then
tmp = a * (t + (z * b))
else if (t <= 2.7d+97) then
tmp = x + (z * y)
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 (t <= -5e+92) {
tmp = a * (t + (z * b));
} else if (t <= 2.7e+97) {
tmp = x + (z * y);
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5e+92: tmp = a * (t + (z * b)) elif t <= 2.7e+97: tmp = x + (z * y) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5e+92) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (t <= 2.7e+97) tmp = Float64(x + Float64(z * y)); 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 (t <= -5e+92) tmp = a * (t + (z * b)); elseif (t <= 2.7e+97) tmp = x + (z * y); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5e+92], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+97], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+92}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+97}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if t < -5.00000000000000022e92Initial program 94.4%
associate-+l+94.4%
+-commutative94.4%
fma-define94.4%
associate-*l*90.9%
*-commutative90.9%
*-commutative90.9%
distribute-rgt-out96.5%
remove-double-neg96.5%
*-commutative96.5%
distribute-lft-neg-out96.5%
sub-neg96.5%
sub-neg96.5%
distribute-lft-neg-in96.5%
remove-double-neg96.5%
Simplified96.5%
Taylor expanded in y around 0 92.8%
Taylor expanded in x around 0 82.8%
if -5.00000000000000022e92 < t < 2.69999999999999993e97Initial program 96.3%
associate-+l+96.3%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in a around 0 66.2%
if 2.69999999999999993e97 < t Initial program 83.8%
associate-+l+83.8%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in z around 0 82.5%
+-commutative82.5%
Simplified82.5%
Final simplification72.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8e+28) (not (<= t 1.2e+100))) (* a t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+28) || !(t <= 1.2e+100)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8d+28)) .or. (.not. (t <= 1.2d+100))) then
tmp = a * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e+28) || !(t <= 1.2e+100)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8e+28) or not (t <= 1.2e+100): tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8e+28) || !(t <= 1.2e+100)) tmp = Float64(a * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8e+28) || ~((t <= 1.2e+100))) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8e+28], N[Not[LessEqual[t, 1.2e+100]], $MachinePrecision]], N[(a * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+28} \lor \neg \left(t \leq 1.2 \cdot 10^{+100}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -7.99999999999999967e28 or 1.20000000000000006e100 < t Initial program 90.5%
associate-+l+90.5%
+-commutative90.5%
fma-define90.5%
associate-*l*91.5%
*-commutative91.5%
*-commutative91.5%
distribute-rgt-out98.2%
remove-double-neg98.2%
*-commutative98.2%
distribute-lft-neg-out98.2%
sub-neg98.2%
sub-neg98.2%
distribute-lft-neg-in98.2%
remove-double-neg98.2%
Simplified98.2%
Taylor expanded in y around 0 88.2%
Taylor expanded in t around inf 88.2%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in t around inf 65.2%
if -7.99999999999999967e28 < t < 1.20000000000000006e100Initial program 96.6%
associate-+l+96.6%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in x around inf 31.4%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.1%
associate-+l+94.1%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in x around inf 24.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024108
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))