
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))) (if (<= t_1 1.8e+306) t_1 (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1.8e+306) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
if (t_1 <= 1.8d+306) then
tmp = t_1
else
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1.8e+306) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= 1.8e+306: tmp = t_1 else: tmp = z * (y + ((x / z) + (a * (b + (t / z))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 1.8e+306) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= 1.8e+306) tmp = t_1; else tmp = z * (y + ((x / z) + (a * (b + (t / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1.8e+306], t$95$1, N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 1.8 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 1.8000000000000001e306Initial program 99.4%
if 1.8000000000000001e306 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 73.8%
associate-+l+73.8%
associate-*l*75.6%
Simplified75.6%
Taylor expanded in z around inf 91.8%
+-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-/l*96.7%
distribute-lft-out100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* z a) b)))
(if (<= z -5.4e+221)
(* y z)
(if (<= z -1.3e+95)
t_1
(if (<= z -5e+46)
(* y z)
(if (<= z -49.0)
x
(if (<= z -6.2e-35)
(* a (* z b))
(if (<= z 2.55e-84)
x
(if (<= z 1.4e-50)
(* t a)
(if (<= z 3.8e+252) (* y z) t_1))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double tmp;
if (z <= -5.4e+221) {
tmp = y * z;
} else if (z <= -1.3e+95) {
tmp = t_1;
} else if (z <= -5e+46) {
tmp = y * z;
} else if (z <= -49.0) {
tmp = x;
} else if (z <= -6.2e-35) {
tmp = a * (z * b);
} else if (z <= 2.55e-84) {
tmp = x;
} else if (z <= 1.4e-50) {
tmp = t * a;
} else if (z <= 3.8e+252) {
tmp = y * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * a) * b
if (z <= (-5.4d+221)) then
tmp = y * z
else if (z <= (-1.3d+95)) then
tmp = t_1
else if (z <= (-5d+46)) then
tmp = y * z
else if (z <= (-49.0d0)) then
tmp = x
else if (z <= (-6.2d-35)) then
tmp = a * (z * b)
else if (z <= 2.55d-84) then
tmp = x
else if (z <= 1.4d-50) then
tmp = t * a
else if (z <= 3.8d+252) then
tmp = y * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double tmp;
if (z <= -5.4e+221) {
tmp = y * z;
} else if (z <= -1.3e+95) {
tmp = t_1;
} else if (z <= -5e+46) {
tmp = y * z;
} else if (z <= -49.0) {
tmp = x;
} else if (z <= -6.2e-35) {
tmp = a * (z * b);
} else if (z <= 2.55e-84) {
tmp = x;
} else if (z <= 1.4e-50) {
tmp = t * a;
} else if (z <= 3.8e+252) {
tmp = y * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * a) * b tmp = 0 if z <= -5.4e+221: tmp = y * z elif z <= -1.3e+95: tmp = t_1 elif z <= -5e+46: tmp = y * z elif z <= -49.0: tmp = x elif z <= -6.2e-35: tmp = a * (z * b) elif z <= 2.55e-84: tmp = x elif z <= 1.4e-50: tmp = t * a elif z <= 3.8e+252: tmp = y * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * a) * b) tmp = 0.0 if (z <= -5.4e+221) tmp = Float64(y * z); elseif (z <= -1.3e+95) tmp = t_1; elseif (z <= -5e+46) tmp = Float64(y * z); elseif (z <= -49.0) tmp = x; elseif (z <= -6.2e-35) tmp = Float64(a * Float64(z * b)); elseif (z <= 2.55e-84) tmp = x; elseif (z <= 1.4e-50) tmp = Float64(t * a); elseif (z <= 3.8e+252) tmp = Float64(y * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * a) * b; tmp = 0.0; if (z <= -5.4e+221) tmp = y * z; elseif (z <= -1.3e+95) tmp = t_1; elseif (z <= -5e+46) tmp = y * z; elseif (z <= -49.0) tmp = x; elseif (z <= -6.2e-35) tmp = a * (z * b); elseif (z <= 2.55e-84) tmp = x; elseif (z <= 1.4e-50) tmp = t * a; elseif (z <= 3.8e+252) tmp = y * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[z, -5.4e+221], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.3e+95], t$95$1, If[LessEqual[z, -5e+46], N[(y * z), $MachinePrecision], If[LessEqual[z, -49.0], x, If[LessEqual[z, -6.2e-35], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-84], x, If[LessEqual[z, 1.4e-50], N[(t * a), $MachinePrecision], If[LessEqual[z, 3.8e+252], N[(y * z), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+221}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+46}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -49:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-35}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-50}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+252}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.3999999999999999e221 or -1.29999999999999995e95 < z < -5.0000000000000002e46 or 1.3999999999999999e-50 < z < 3.79999999999999973e252Initial program 94.3%
associate-+l+94.3%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in y around inf 55.4%
*-commutative55.4%
Simplified55.4%
if -5.3999999999999999e221 < z < -1.29999999999999995e95 or 3.79999999999999973e252 < z Initial program 75.0%
associate-+l+75.0%
associate-*l*68.3%
Simplified68.3%
Taylor expanded in z around inf 92.4%
+-commutative92.4%
associate-+l+92.4%
+-commutative92.4%
associate-/l*99.9%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in b around inf 52.3%
associate-*r*64.2%
*-commutative64.2%
associate-*r*66.4%
Simplified66.4%
if -5.0000000000000002e46 < z < -49 or -6.20000000000000024e-35 < z < 2.5499999999999998e-84Initial program 98.9%
associate-+l+98.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in x around inf 57.6%
if -49 < z < -6.20000000000000024e-35Initial program 99.8%
associate-+l+99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in z around inf 100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-/l*100.0%
distribute-lft-out99.8%
Simplified99.8%
Taylor expanded in b around inf 52.2%
*-commutative52.2%
Simplified52.2%
if 2.5499999999999998e-84 < z < 1.3999999999999999e-50Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around inf 61.5%
Final simplification58.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -6.6e+47)
t_1
(if (<= z -160.0)
(+ x (* a (* z b)))
(if (<= z -3.1e-36)
(* a (+ t (* z b)))
(if (<= z 6.5e-77)
(+ x (* t a))
(if (<= z 1.35e+31) (+ (* t a) (* y z)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -6.6e+47) {
tmp = t_1;
} else if (z <= -160.0) {
tmp = x + (a * (z * b));
} else if (z <= -3.1e-36) {
tmp = a * (t + (z * b));
} else if (z <= 6.5e-77) {
tmp = x + (t * a);
} else if (z <= 1.35e+31) {
tmp = (t * a) + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-6.6d+47)) then
tmp = t_1
else if (z <= (-160.0d0)) then
tmp = x + (a * (z * b))
else if (z <= (-3.1d-36)) then
tmp = a * (t + (z * b))
else if (z <= 6.5d-77) then
tmp = x + (t * a)
else if (z <= 1.35d+31) then
tmp = (t * a) + (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -6.6e+47) {
tmp = t_1;
} else if (z <= -160.0) {
tmp = x + (a * (z * b));
} else if (z <= -3.1e-36) {
tmp = a * (t + (z * b));
} else if (z <= 6.5e-77) {
tmp = x + (t * a);
} else if (z <= 1.35e+31) {
tmp = (t * a) + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -6.6e+47: tmp = t_1 elif z <= -160.0: tmp = x + (a * (z * b)) elif z <= -3.1e-36: tmp = a * (t + (z * b)) elif z <= 6.5e-77: tmp = x + (t * a) elif z <= 1.35e+31: tmp = (t * a) + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -6.6e+47) tmp = t_1; elseif (z <= -160.0) tmp = Float64(x + Float64(a * Float64(z * b))); elseif (z <= -3.1e-36) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (z <= 6.5e-77) tmp = Float64(x + Float64(t * a)); elseif (z <= 1.35e+31) tmp = Float64(Float64(t * a) + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -6.6e+47) tmp = t_1; elseif (z <= -160.0) tmp = x + (a * (z * b)); elseif (z <= -3.1e-36) tmp = a * (t + (z * b)); elseif (z <= 6.5e-77) tmp = x + (t * a); elseif (z <= 1.35e+31) tmp = (t * a) + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+47], t$95$1, If[LessEqual[z, -160.0], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-36], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-77], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+31], N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -160:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-36}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-77}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+31}:\\
\;\;\;\;t \cdot a + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5999999999999998e47 or 1.34999999999999993e31 < z Initial program 87.0%
associate-+l+87.0%
associate-*l*78.5%
Simplified78.5%
Taylor expanded in z around inf 87.6%
if -6.5999999999999998e47 < z < -160Initial program 100.0%
associate-+l+100.0%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r*100.0%
distribute-rgt-in100.0%
Simplified100.0%
Taylor expanded in y around 0 87.4%
*-commutative87.4%
Simplified87.4%
if -160 < z < -3.0999999999999999e-36Initial program 99.8%
associate-+l+99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 75.4%
if -3.0999999999999999e-36 < z < 6.4999999999999999e-77Initial program 98.8%
associate-+l+98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in z around 0 88.4%
+-commutative88.4%
Simplified88.4%
if 6.4999999999999999e-77 < z < 1.34999999999999993e31Initial program 99.9%
associate-+l+99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around inf 96.7%
Taylor expanded in t around inf 92.2%
Taylor expanded in x around 0 88.7%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.1e+205)
(* y z)
(if (<= z -3e+118)
(* a (* z b))
(if (<= z -5.2e+46)
(* y z)
(if (<= z 1.6e-91) x (if (<= z 1.4e-51) (* t a) (* y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.1e+205) {
tmp = y * z;
} else if (z <= -3e+118) {
tmp = a * (z * b);
} else if (z <= -5.2e+46) {
tmp = y * z;
} else if (z <= 1.6e-91) {
tmp = x;
} else if (z <= 1.4e-51) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.1d+205)) then
tmp = y * z
else if (z <= (-3d+118)) then
tmp = a * (z * b)
else if (z <= (-5.2d+46)) then
tmp = y * z
else if (z <= 1.6d-91) then
tmp = x
else if (z <= 1.4d-51) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.1e+205) {
tmp = y * z;
} else if (z <= -3e+118) {
tmp = a * (z * b);
} else if (z <= -5.2e+46) {
tmp = y * z;
} else if (z <= 1.6e-91) {
tmp = x;
} else if (z <= 1.4e-51) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.1e+205: tmp = y * z elif z <= -3e+118: tmp = a * (z * b) elif z <= -5.2e+46: tmp = y * z elif z <= 1.6e-91: tmp = x elif z <= 1.4e-51: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.1e+205) tmp = Float64(y * z); elseif (z <= -3e+118) tmp = Float64(a * Float64(z * b)); elseif (z <= -5.2e+46) tmp = Float64(y * z); elseif (z <= 1.6e-91) tmp = x; elseif (z <= 1.4e-51) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.1e+205) tmp = y * z; elseif (z <= -3e+118) tmp = a * (z * b); elseif (z <= -5.2e+46) tmp = y * z; elseif (z <= 1.6e-91) tmp = x; elseif (z <= 1.4e-51) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.1e+205], N[(y * z), $MachinePrecision], If[LessEqual[z, -3e+118], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e+46], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.6e-91], x, If[LessEqual[z, 1.4e-51], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+205}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+118}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+46}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-91}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-51}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -2.1e205 or -3e118 < z < -5.20000000000000027e46 or 1.4e-51 < z Initial program 89.3%
associate-+l+89.3%
associate-*l*81.3%
Simplified81.3%
Taylor expanded in y around inf 53.1%
*-commutative53.1%
Simplified53.1%
if -2.1e205 < z < -3e118Initial program 86.0%
associate-+l+86.0%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in z around inf 92.7%
+-commutative92.7%
associate-+l+92.7%
+-commutative92.7%
associate-/l*99.9%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in b around inf 58.6%
*-commutative58.6%
Simplified58.6%
if -5.20000000000000027e46 < z < 1.59999999999999998e-91Initial program 99.0%
associate-+l+99.0%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in x around inf 52.9%
if 1.59999999999999998e-91 < z < 1.4e-51Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around inf 61.5%
Final simplification53.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))))
(if (<= a -4.6e+126)
t_1
(if (<= a -8.8e+36)
(+ x (* t a))
(if (or (<= a -290000000.0) (not (<= a 1.55e-48)))
t_1
(+ x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -4.6e+126) {
tmp = t_1;
} else if (a <= -8.8e+36) {
tmp = x + (t * a);
} else if ((a <= -290000000.0) || !(a <= 1.55e-48)) {
tmp = t_1;
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t + (z * b))
if (a <= (-4.6d+126)) then
tmp = t_1
else if (a <= (-8.8d+36)) then
tmp = x + (t * a)
else if ((a <= (-290000000.0d0)) .or. (.not. (a <= 1.55d-48))) then
tmp = t_1
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -4.6e+126) {
tmp = t_1;
} else if (a <= -8.8e+36) {
tmp = x + (t * a);
} else if ((a <= -290000000.0) || !(a <= 1.55e-48)) {
tmp = t_1;
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) tmp = 0 if a <= -4.6e+126: tmp = t_1 elif a <= -8.8e+36: tmp = x + (t * a) elif (a <= -290000000.0) or not (a <= 1.55e-48): tmp = t_1 else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (a <= -4.6e+126) tmp = t_1; elseif (a <= -8.8e+36) tmp = Float64(x + Float64(t * a)); elseif ((a <= -290000000.0) || !(a <= 1.55e-48)) tmp = t_1; else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); tmp = 0.0; if (a <= -4.6e+126) tmp = t_1; elseif (a <= -8.8e+36) tmp = x + (t * a); elseif ((a <= -290000000.0) || ~((a <= 1.55e-48))) tmp = t_1; else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.6e+126], t$95$1, If[LessEqual[a, -8.8e+36], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -290000000.0], N[Not[LessEqual[a, 1.55e-48]], $MachinePrecision]], t$95$1, N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;a \leq -4.6 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{+36}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;a \leq -290000000 \lor \neg \left(a \leq 1.55 \cdot 10^{-48}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -4.6000000000000001e126 or -8.80000000000000002e36 < a < -2.9e8 or 1.55000000000000008e-48 < a Initial program 86.2%
associate-+l+86.2%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in a around inf 74.6%
if -4.6000000000000001e126 < a < -8.80000000000000002e36Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 76.0%
+-commutative76.0%
Simplified76.0%
if -2.9e8 < a < 1.55000000000000008e-48Initial program 98.3%
associate-+l+98.3%
associate-*l*87.1%
Simplified87.1%
Taylor expanded in a around 0 77.4%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -4.8e+47)
t_1
(if (<= z -13.6)
(+ x (* a (* z b)))
(if (<= z -2.75e-36)
(* a (+ t (* z b)))
(if (<= z 1.15e-50) (+ x (* t a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -4.8e+47) {
tmp = t_1;
} else if (z <= -13.6) {
tmp = x + (a * (z * b));
} else if (z <= -2.75e-36) {
tmp = a * (t + (z * b));
} else if (z <= 1.15e-50) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (y + (a * b))
if (z <= (-4.8d+47)) then
tmp = t_1
else if (z <= (-13.6d0)) then
tmp = x + (a * (z * b))
else if (z <= (-2.75d-36)) then
tmp = a * (t + (z * b))
else if (z <= 1.15d-50) then
tmp = x + (t * a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -4.8e+47) {
tmp = t_1;
} else if (z <= -13.6) {
tmp = x + (a * (z * b));
} else if (z <= -2.75e-36) {
tmp = a * (t + (z * b));
} else if (z <= 1.15e-50) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -4.8e+47: tmp = t_1 elif z <= -13.6: tmp = x + (a * (z * b)) elif z <= -2.75e-36: tmp = a * (t + (z * b)) elif z <= 1.15e-50: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -4.8e+47) tmp = t_1; elseif (z <= -13.6) tmp = Float64(x + Float64(a * Float64(z * b))); elseif (z <= -2.75e-36) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (z <= 1.15e-50) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -4.8e+47) tmp = t_1; elseif (z <= -13.6) tmp = x + (a * (z * b)); elseif (z <= -2.75e-36) tmp = a * (t + (z * b)); elseif (z <= 1.15e-50) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+47], t$95$1, If[LessEqual[z, -13.6], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.75e-36], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-50], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -13.6:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-36}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.80000000000000037e47 or 1.1500000000000001e-50 < z Initial program 89.0%
associate-+l+89.0%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in z around inf 83.5%
if -4.80000000000000037e47 < z < -13.5999999999999996Initial program 100.0%
associate-+l+100.0%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r*100.0%
distribute-rgt-in100.0%
Simplified100.0%
Taylor expanded in y around 0 87.4%
*-commutative87.4%
Simplified87.4%
if -13.5999999999999996 < z < -2.74999999999999992e-36Initial program 99.8%
associate-+l+99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 75.4%
if -2.74999999999999992e-36 < z < 1.1500000000000001e-50Initial program 98.9%
associate-+l+98.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in z around 0 87.1%
+-commutative87.1%
Simplified87.1%
Final simplification84.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7e-37) (not (<= z 4e-82))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e-37) || !(z <= 4e-82)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.7d-37)) .or. (.not. (z <= 4d-82))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = x + ((t * a) + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e-37) || !(z <= 4e-82)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7e-37) or not (z <= 4e-82): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7e-37) || !(z <= 4e-82)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.7e-37) || ~((z <= 4e-82))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7e-37], N[Not[LessEqual[z, 4e-82]], $MachinePrecision]], N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-37} \lor \neg \left(z \leq 4 \cdot 10^{-82}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if z < -3.7e-37 or 4e-82 < z Initial program 90.7%
associate-+l+90.7%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in z around inf 97.0%
+-commutative97.0%
associate-+l+97.0%
+-commutative97.0%
associate-/l*98.8%
distribute-lft-out99.3%
Simplified99.3%
if -3.7e-37 < z < 4e-82Initial program 98.8%
associate-+l+98.8%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 96.2%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.15) (not (<= z 2.6e+23))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ (+ x (* y z)) (+ (* a (* z b)) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.15) || !(z <= 2.6e+23)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = (x + (y * z)) + ((a * (z * b)) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-0.15d0)) .or. (.not. (z <= 2.6d+23))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = (x + (y * z)) + ((a * (z * b)) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.15) || !(z <= 2.6e+23)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = (x + (y * z)) + ((a * (z * b)) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.15) or not (z <= 2.6e+23): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = (x + (y * z)) + ((a * (z * b)) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.15) || !(z <= 2.6e+23)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(a * Float64(z * b)) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.15) || ~((z <= 2.6e+23))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = (x + (y * z)) + ((a * (z * b)) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.15], N[Not[LessEqual[z, 2.6e+23]], $MachinePrecision]], N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.15 \lor \neg \left(z \leq 2.6 \cdot 10^{+23}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(a \cdot \left(z \cdot b\right) + t \cdot a\right)\\
\end{array}
\end{array}
if z < -0.149999999999999994 or 2.59999999999999992e23 < z Initial program 88.1%
associate-+l+88.1%
associate-*l*80.4%
Simplified80.4%
Taylor expanded in z around inf 97.7%
+-commutative97.7%
associate-+l+97.7%
+-commutative97.7%
associate-/l*99.9%
distribute-lft-out99.9%
Simplified99.9%
if -0.149999999999999994 < z < 2.59999999999999992e23Initial program 99.1%
associate-+l+99.1%
associate-*l*99.2%
Simplified99.2%
Final simplification99.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e+95) (not (<= z 5.5e+103))) (* z (+ y (* a b))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+95) || !(z <= 5.5e+103)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d+95)) .or. (.not. (z <= 5.5d+103))) then
tmp = z * (y + (a * b))
else
tmp = x + ((t * a) + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+95) || !(z <= 5.5e+103)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e+95) or not (z <= 5.5e+103): tmp = z * (y + (a * b)) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+95) || !(z <= 5.5e+103)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e+95) || ~((z <= 5.5e+103))) tmp = z * (y + (a * b)); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+95], N[Not[LessEqual[z, 5.5e+103]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+95} \lor \neg \left(z \leq 5.5 \cdot 10^{+103}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.29999999999999995e95 or 5.50000000000000001e103 < z Initial program 84.7%
associate-+l+84.7%
associate-*l*73.9%
Simplified73.9%
Taylor expanded in z around inf 92.9%
if -1.29999999999999995e95 < z < 5.50000000000000001e103Initial program 98.7%
associate-+l+98.7%
associate-*l*98.8%
Simplified98.8%
Taylor expanded in b around 0 87.2%
Final simplification89.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.75e-36) (not (<= z 1.62e+28))) (+ x (* z (+ y (* a b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.75e-36) || !(z <= 1.62e+28)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.75d-36)) .or. (.not. (z <= 1.62d+28))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + ((t * a) + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.75e-36) || !(z <= 1.62e+28)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.75e-36) or not (z <= 1.62e+28): tmp = x + (z * (y + (a * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.75e-36) || !(z <= 1.62e+28)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.75e-36) || ~((z <= 1.62e+28))) tmp = x + (z * (y + (a * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.75e-36], N[Not[LessEqual[z, 1.62e+28]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{-36} \lor \neg \left(z \leq 1.62 \cdot 10^{+28}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if z < -2.74999999999999992e-36 or 1.62000000000000006e28 < z Initial program 88.7%
associate-+l+88.7%
associate-*l*81.3%
Simplified81.3%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
+-commutative77.6%
associate-*r*87.7%
distribute-rgt-in93.3%
Simplified93.3%
if -2.74999999999999992e-36 < z < 1.62000000000000006e28Initial program 99.1%
associate-+l+99.1%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around 0 95.2%
Final simplification94.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1e+47) (* y z) (if (<= z 1.6e-90) x (if (<= z 1.6e-51) (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+47) {
tmp = y * z;
} else if (z <= 1.6e-90) {
tmp = x;
} else if (z <= 1.6e-51) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1d+47)) then
tmp = y * z
else if (z <= 1.6d-90) then
tmp = x
else if (z <= 1.6d-51) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+47) {
tmp = y * z;
} else if (z <= 1.6e-90) {
tmp = x;
} else if (z <= 1.6e-51) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1e+47: tmp = y * z elif z <= 1.6e-90: tmp = x elif z <= 1.6e-51: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e+47) tmp = Float64(y * z); elseif (z <= 1.6e-90) tmp = x; elseif (z <= 1.6e-51) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1e+47) tmp = y * z; elseif (z <= 1.6e-90) tmp = x; elseif (z <= 1.6e-51) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+47], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.6e-90], x, If[LessEqual[z, 1.6e-51], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+47}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-51}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -1e47 or 1.6e-51 < z Initial program 89.0%
associate-+l+89.0%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in y around inf 50.9%
*-commutative50.9%
Simplified50.9%
if -1e47 < z < 1.60000000000000004e-90Initial program 99.0%
associate-+l+99.0%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in x around inf 52.9%
if 1.60000000000000004e-90 < z < 1.6e-51Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in t around inf 61.5%
Final simplification52.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.4e-49) (not (<= z 1.05e-50))) (* z (+ y (* a b))) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e-49) || !(z <= 1.05e-50)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.4d-49)) .or. (.not. (z <= 1.05d-50))) then
tmp = z * (y + (a * b))
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.4e-49) || !(z <= 1.05e-50)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.4e-49) or not (z <= 1.05e-50): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.4e-49) || !(z <= 1.05e-50)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.4e-49) || ~((z <= 1.05e-50))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.4e-49], N[Not[LessEqual[z, 1.05e-50]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-49} \lor \neg \left(z \leq 1.05 \cdot 10^{-50}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.39999999999999999e-49 or 1.05e-50 < z Initial program 90.3%
associate-+l+90.3%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in z around inf 80.0%
if -1.39999999999999999e-49 < z < 1.05e-50Initial program 98.9%
associate-+l+98.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in z around 0 87.9%
+-commutative87.9%
Simplified87.9%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.04e+235) (not (<= t 1.5e+196))) (* t a) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.04e+235) || !(t <= 1.5e+196)) {
tmp = t * a;
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.04d+235)) .or. (.not. (t <= 1.5d+196))) then
tmp = t * a
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.04e+235) || !(t <= 1.5e+196)) {
tmp = t * a;
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.04e+235) or not (t <= 1.5e+196): tmp = t * a else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.04e+235) || !(t <= 1.5e+196)) tmp = Float64(t * a); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.04e+235) || ~((t <= 1.5e+196))) tmp = t * a; else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.04e+235], N[Not[LessEqual[t, 1.5e+196]], $MachinePrecision]], N[(t * a), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.04 \cdot 10^{+235} \lor \neg \left(t \leq 1.5 \cdot 10^{+196}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if t < -1.04000000000000006e235 or 1.4999999999999999e196 < t Initial program 90.0%
associate-+l+90.0%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in t around inf 71.5%
if -1.04000000000000006e235 < t < 1.4999999999999999e196Initial program 94.0%
associate-+l+94.0%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in a around 0 63.1%
Final simplification64.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.8e+116) (not (<= t 3.6e+181))) (+ x (* t a)) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.8e+116) || !(t <= 3.6e+181)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.8d+116)) .or. (.not. (t <= 3.6d+181))) then
tmp = x + (t * a)
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.8e+116) || !(t <= 3.6e+181)) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.8e+116) or not (t <= 3.6e+181): tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.8e+116) || !(t <= 3.6e+181)) tmp = Float64(x + Float64(t * a)); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.8e+116) || ~((t <= 3.6e+181))) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.8e+116], N[Not[LessEqual[t, 3.6e+181]], $MachinePrecision]], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+116} \lor \neg \left(t \leq 3.6 \cdot 10^{+181}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if t < -4.8000000000000001e116 or 3.59999999999999985e181 < t Initial program 89.2%
associate-+l+89.2%
associate-*l*85.8%
Simplified85.8%
Taylor expanded in z around 0 74.4%
+-commutative74.4%
Simplified74.4%
if -4.8000000000000001e116 < t < 3.59999999999999985e181Initial program 94.5%
associate-+l+94.5%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in a around 0 64.3%
Final simplification66.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.9e+69) x (if (<= x 5e+16) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.9e+69) {
tmp = x;
} else if (x <= 5e+16) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2.9d+69)) then
tmp = x
else if (x <= 5d+16) then
tmp = t * a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.9e+69) {
tmp = x;
} else if (x <= 5e+16) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.9e+69: tmp = x elif x <= 5e+16: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.9e+69) tmp = x; elseif (x <= 5e+16) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.9e+69) tmp = x; elseif (x <= 5e+16) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.9e+69], x, If[LessEqual[x, 5e+16], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+16}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.8999999999999998e69 or 5e16 < x Initial program 93.8%
associate-+l+93.8%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in x around inf 45.5%
if -2.8999999999999998e69 < x < 5e16Initial program 93.0%
associate-+l+93.0%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in t around inf 32.8%
Final simplification38.4%
(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.3%
associate-+l+93.3%
associate-*l*89.3%
Simplified89.3%
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 2024115
(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)))