
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e+25) (not (<= z 2.7e-76))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ (+ (* a t) (+ x (* z y))) (* b (* z a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+25) || !(z <= 2.7e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * t) + (x + (z * y))) + (b * (z * 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 <= (-6d+25)) .or. (.not. (z <= 2.7d-76))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = ((a * t) + (x + (z * y))) + (b * (z * 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 <= -6e+25) || !(z <= 2.7e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * t) + (x + (z * y))) + (b * (z * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+25) or not (z <= 2.7e-76): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = ((a * t) + (x + (z * y))) + (b * (z * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+25) || !(z <= 2.7e-76)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(Float64(Float64(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e+25) || ~((z <= 2.7e-76))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = ((a * t) + (x + (z * y))) + (b * (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+25], N[Not[LessEqual[z, 2.7e-76]], $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[(N[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+25} \lor \neg \left(z \leq 2.7 \cdot 10^{-76}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(z \cdot a\right)\\
\end{array}
\end{array}
if z < -6.00000000000000011e25 or 2.7e-76 < z Initial program 83.6%
associate-+l+83.6%
associate-*l*83.9%
Simplified83.9%
Taylor expanded in z around inf 96.5%
+-commutative96.5%
associate-+l+96.5%
+-commutative96.5%
associate-/l*99.2%
distribute-lft-out99.9%
Simplified99.9%
if -6.00000000000000011e25 < z < 2.7e-76Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e+62) (not (<= z 2.7e-76))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ (+ (* a (* z b)) (* a t)) (+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e+62) || !(z <= 2.7e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * (z * b)) + (a * t)) + (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 ((z <= (-3.9d+62)) .or. (.not. (z <= 2.7d-76))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = ((a * (z * b)) + (a * t)) + (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 ((z <= -3.9e+62) || !(z <= 2.7e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * (z * b)) + (a * t)) + (x + (z * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e+62) or not (z <= 2.7e-76): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = ((a * (z * b)) + (a * t)) + (x + (z * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e+62) || !(z <= 2.7e-76)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(Float64(Float64(a * Float64(z * b)) + Float64(a * t)) + Float64(x + Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e+62) || ~((z <= 2.7e-76))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = ((a * (z * b)) + (a * t)) + (x + (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e+62], N[Not[LessEqual[z, 2.7e-76]], $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[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+62} \lor \neg \left(z \leq 2.7 \cdot 10^{-76}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot b\right) + a \cdot t\right) + \left(x + z \cdot y\right)\\
\end{array}
\end{array}
if z < -3.9e62 or 2.7e-76 < z Initial program 82.9%
associate-+l+82.9%
associate-*l*82.5%
Simplified82.5%
Taylor expanded in z around inf 96.2%
+-commutative96.2%
associate-+l+96.2%
+-commutative96.2%
associate-/l*99.2%
distribute-lft-out99.9%
Simplified99.9%
if -3.9e62 < z < 2.7e-76Initial program 99.2%
associate-+l+99.2%
associate-*l*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e-121) (not (<= z 1.65e-76))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ x (+ (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e-121) || !(z <= 1.65e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((a * t) + (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8d-121)) .or. (.not. (z <= 1.65d-76))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = x + ((a * t) + (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e-121) || !(z <= 1.65e-76)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((a * t) + (z * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8e-121) or not (z <= 1.65e-76): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = x + ((a * t) + (z * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e-121) || !(z <= 1.65e-76)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(x + Float64(Float64(a * t) + Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8e-121) || ~((z <= 1.65e-76))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = x + ((a * t) + (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e-121], N[Not[LessEqual[z, 1.65e-76]], $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[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-121} \lor \neg \left(z \leq 1.65 \cdot 10^{-76}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\
\end{array}
\end{array}
if z < -7.9999999999999998e-121 or 1.64999999999999992e-76 < z Initial program 86.2%
associate-+l+86.2%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in z around inf 95.4%
+-commutative95.4%
associate-+l+95.4%
+-commutative95.4%
associate-/l*97.6%
distribute-lft-out99.4%
Simplified99.4%
if -7.9999999999999998e-121 < z < 1.64999999999999992e-76Initial program 99.9%
associate-+l+99.9%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in b around 0 90.5%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z y))))
(if (<= y -2.6e+78)
t_1
(if (<= y -1300000.0)
(* a (* z b))
(if (<= y 4e-26) (+ x (* a t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (y <= -2.6e+78) {
tmp = t_1;
} else if (y <= -1300000.0) {
tmp = a * (z * b);
} else if (y <= 4e-26) {
tmp = x + (a * t);
} 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 = x + (z * y)
if (y <= (-2.6d+78)) then
tmp = t_1
else if (y <= (-1300000.0d0)) then
tmp = a * (z * b)
else if (y <= 4d-26) then
tmp = x + (a * t)
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 = x + (z * y);
double tmp;
if (y <= -2.6e+78) {
tmp = t_1;
} else if (y <= -1300000.0) {
tmp = a * (z * b);
} else if (y <= 4e-26) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * y) tmp = 0 if y <= -2.6e+78: tmp = t_1 elif y <= -1300000.0: tmp = a * (z * b) elif y <= 4e-26: tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * y)) tmp = 0.0 if (y <= -2.6e+78) tmp = t_1; elseif (y <= -1300000.0) tmp = Float64(a * Float64(z * b)); elseif (y <= 4e-26) tmp = Float64(x + Float64(a * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * y); tmp = 0.0; if (y <= -2.6e+78) tmp = t_1; elseif (y <= -1300000.0) tmp = a * (z * b); elseif (y <= 4e-26) tmp = x + (a * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+78], t$95$1, If[LessEqual[y, -1300000.0], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-26], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1300000:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-26}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6e78 or 4.0000000000000002e-26 < y Initial program 87.0%
associate-+l+87.0%
associate-*l*87.9%
Simplified87.9%
Taylor expanded in a around inf 74.0%
+-commutative74.0%
+-commutative74.0%
*-commutative74.0%
associate-+l+74.0%
+-commutative74.0%
associate-/l*78.0%
fma-define78.1%
*-commutative78.1%
fma-undefine78.1%
Simplified78.1%
Taylor expanded in a around 0 72.8%
*-commutative72.8%
Simplified72.8%
if -2.6e78 < y < -1.3e6Initial program 84.7%
associate-+l+84.7%
+-commutative84.7%
fma-define84.7%
associate-*l*94.7%
*-commutative94.7%
*-commutative94.7%
distribute-rgt-out99.9%
remove-double-neg99.9%
*-commutative99.9%
distribute-lft-neg-out99.9%
sub-neg99.9%
sub-neg99.9%
distribute-lft-neg-out99.9%
*-commutative99.9%
remove-double-neg99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 94.7%
Taylor expanded in z around inf 63.8%
*-commutative63.8%
Simplified63.8%
if -1.3e6 < y < 4.0000000000000002e-26Initial program 95.6%
associate-+l+95.6%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in z around 0 66.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* z a))))
(if (<= z -2.3e+68)
t_1
(if (<= z 4e+41) (+ x (* a t)) (if (<= z 8e+192) (* z y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (z * a);
double tmp;
if (z <= -2.3e+68) {
tmp = t_1;
} else if (z <= 4e+41) {
tmp = x + (a * t);
} else if (z <= 8e+192) {
tmp = z * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (z * a)
if (z <= (-2.3d+68)) then
tmp = t_1
else if (z <= 4d+41) then
tmp = x + (a * t)
else if (z <= 8d+192) then
tmp = z * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (z * a);
double tmp;
if (z <= -2.3e+68) {
tmp = t_1;
} else if (z <= 4e+41) {
tmp = x + (a * t);
} else if (z <= 8e+192) {
tmp = z * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (z * a) tmp = 0 if z <= -2.3e+68: tmp = t_1 elif z <= 4e+41: tmp = x + (a * t) elif z <= 8e+192: tmp = z * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(z * a)) tmp = 0.0 if (z <= -2.3e+68) tmp = t_1; elseif (z <= 4e+41) tmp = Float64(x + Float64(a * t)); elseif (z <= 8e+192) tmp = Float64(z * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (z * a); tmp = 0.0; if (z <= -2.3e+68) tmp = t_1; elseif (z <= 4e+41) tmp = x + (a * t); elseif (z <= 8e+192) tmp = z * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+68], t$95$1, If[LessEqual[z, 4e+41], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+192], N[(z * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+41}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+192}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.3e68 or 8.00000000000000033e192 < z Initial program 74.6%
associate-+l+74.6%
associate-*l*72.4%
Simplified72.4%
Taylor expanded in z around inf 93.5%
+-commutative93.5%
associate-+l+93.5%
+-commutative93.5%
associate-/l*98.7%
distribute-lft-out100.0%
Simplified100.0%
Taylor expanded in z around inf 85.8%
+-commutative85.8%
Simplified85.8%
Taylor expanded in a around inf 43.3%
associate-*r*51.6%
Simplified51.6%
Taylor expanded in a around 0 43.3%
associate-*r*51.6%
*-commutative51.6%
associate-*r*53.6%
Simplified53.6%
if -2.3e68 < z < 4.00000000000000002e41Initial program 97.9%
associate-+l+97.9%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around 0 71.7%
if 4.00000000000000002e41 < z < 8.00000000000000033e192Initial program 96.9%
associate-+l+96.9%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in z around inf 99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-/l*99.8%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in y around inf 53.1%
*-commutative53.1%
Simplified53.1%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e+82) (not (<= y 2.2e-82))) (+ x (+ (* a t) (* z y))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e+82) || !(y <= 2.2e-82)) {
tmp = x + ((a * t) + (z * y));
} 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 ((y <= (-1.05d+82)) .or. (.not. (y <= 2.2d-82))) then
tmp = x + ((a * t) + (z * y))
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 ((y <= -1.05e+82) || !(y <= 2.2e-82)) {
tmp = x + ((a * t) + (z * y));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e+82) or not (y <= 2.2e-82): tmp = x + ((a * t) + (z * y)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e+82) || !(y <= 2.2e-82)) tmp = Float64(x + Float64(Float64(a * t) + Float64(z * y))); 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 ((y <= -1.05e+82) || ~((y <= 2.2e-82))) tmp = x + ((a * t) + (z * y)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e+82], N[Not[LessEqual[y, 2.2e-82]], $MachinePrecision]], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+82} \lor \neg \left(y \leq 2.2 \cdot 10^{-82}\right):\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if y < -1.05e82 or 2.19999999999999986e-82 < y Initial program 87.7%
associate-+l+87.7%
associate-*l*87.9%
Simplified87.9%
Taylor expanded in b around 0 86.4%
if -1.05e82 < y < 2.19999999999999986e-82Initial program 93.8%
associate-+l+93.8%
+-commutative93.8%
fma-define93.8%
associate-*l*93.9%
*-commutative93.9%
*-commutative93.9%
distribute-rgt-out96.2%
remove-double-neg96.2%
*-commutative96.2%
distribute-lft-neg-out96.2%
sub-neg96.2%
sub-neg96.2%
distribute-lft-neg-out96.2%
*-commutative96.2%
remove-double-neg96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in y around 0 92.4%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.4e+88) (not (<= z 1.75e+49))) (* 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 <= -2.4e+88) || !(z <= 1.75e+49)) {
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 <= (-2.4d+88)) .or. (.not. (z <= 1.75d+49))) 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 <= -2.4e+88) || !(z <= 1.75e+49)) {
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 <= -2.4e+88) or not (z <= 1.75e+49): 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 <= -2.4e+88) || !(z <= 1.75e+49)) 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 <= -2.4e+88) || ~((z <= 1.75e+49))) 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, -2.4e+88], N[Not[LessEqual[z, 1.75e+49]], $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 -2.4 \cdot 10^{+88} \lor \neg \left(z \leq 1.75 \cdot 10^{+49}\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 < -2.3999999999999999e88 or 1.74999999999999987e49 < z Initial program 81.1%
associate-+l+81.1%
associate-*l*78.6%
Simplified78.6%
Taylor expanded in z around inf 83.3%
if -2.3999999999999999e88 < z < 1.74999999999999987e49Initial program 96.8%
associate-+l+96.8%
+-commutative96.8%
fma-define96.8%
associate-*l*98.7%
*-commutative98.7%
*-commutative98.7%
distribute-rgt-out98.7%
remove-double-neg98.7%
*-commutative98.7%
distribute-lft-neg-out98.7%
sub-neg98.7%
sub-neg98.7%
distribute-lft-neg-out98.7%
*-commutative98.7%
remove-double-neg98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in y around 0 85.3%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.25e+82) (* z (+ y (/ (+ x (* a t)) z))) (if (<= y 3.6e-82) (+ x (* a (+ t (* z b)))) (+ x (+ (* a t) (* z y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.25e+82) {
tmp = z * (y + ((x + (a * t)) / z));
} else if (y <= 3.6e-82) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((a * t) + (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 (y <= (-1.25d+82)) then
tmp = z * (y + ((x + (a * t)) / z))
else if (y <= 3.6d-82) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((a * t) + (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 (y <= -1.25e+82) {
tmp = z * (y + ((x + (a * t)) / z));
} else if (y <= 3.6e-82) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((a * t) + (z * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.25e+82: tmp = z * (y + ((x + (a * t)) / z)) elif y <= 3.6e-82: tmp = x + (a * (t + (z * b))) else: tmp = x + ((a * t) + (z * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.25e+82) tmp = Float64(z * Float64(y + Float64(Float64(x + Float64(a * t)) / z))); elseif (y <= 3.6e-82) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(a * t) + Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.25e+82) tmp = z * (y + ((x + (a * t)) / z)); elseif (y <= 3.6e-82) tmp = x + (a * (t + (z * b))); else tmp = x + ((a * t) + (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.25e+82], N[(z * N[(y + N[(N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-82], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+82}:\\
\;\;\;\;z \cdot \left(y + \frac{x + a \cdot t}{z}\right)\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-82}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\
\end{array}
\end{array}
if y < -1.25000000000000004e82Initial program 83.8%
associate-+l+83.8%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in z around inf 96.8%
+-commutative96.8%
associate-+l+96.8%
+-commutative96.8%
associate-/l*96.8%
distribute-lft-out96.8%
Simplified96.8%
Taylor expanded in z around 0 90.6%
if -1.25000000000000004e82 < y < 3.59999999999999998e-82Initial program 93.8%
associate-+l+93.8%
+-commutative93.8%
fma-define93.8%
associate-*l*93.9%
*-commutative93.9%
*-commutative93.9%
distribute-rgt-out96.2%
remove-double-neg96.2%
*-commutative96.2%
distribute-lft-neg-out96.2%
sub-neg96.2%
sub-neg96.2%
distribute-lft-neg-out96.2%
*-commutative96.2%
remove-double-neg96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in y around 0 92.4%
if 3.59999999999999998e-82 < y Initial program 88.9%
associate-+l+88.9%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in b around 0 85.1%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.6e+78) (* z y) (if (<= y -7.8e-46) (* z (* a b)) (if (<= y 2200000000000.0) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.6e+78) {
tmp = z * y;
} else if (y <= -7.8e-46) {
tmp = z * (a * b);
} else if (y <= 2200000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.6d+78)) then
tmp = z * y
else if (y <= (-7.8d-46)) then
tmp = z * (a * b)
else if (y <= 2200000000000.0d0) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.6e+78) {
tmp = z * y;
} else if (y <= -7.8e-46) {
tmp = z * (a * b);
} else if (y <= 2200000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.6e+78: tmp = z * y elif y <= -7.8e-46: tmp = z * (a * b) elif y <= 2200000000000.0: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.6e+78) tmp = Float64(z * y); elseif (y <= -7.8e-46) tmp = Float64(z * Float64(a * b)); elseif (y <= 2200000000000.0) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.6e+78) tmp = z * y; elseif (y <= -7.8e-46) tmp = z * (a * b); elseif (y <= 2200000000000.0) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.6e+78], N[(z * y), $MachinePrecision], If[LessEqual[y, -7.8e-46], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2200000000000.0], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+78}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;y \leq 2200000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -2.6e78 or 2.2e12 < y Initial program 86.0%
associate-+l+86.0%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in z around inf 83.2%
+-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-/l*84.1%
distribute-lft-out84.1%
Simplified84.1%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Simplified54.1%
if -2.6e78 < y < -7.8000000000000005e-46Initial program 90.5%
associate-+l+90.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in z around inf 81.0%
+-commutative81.0%
associate-+l+81.0%
+-commutative81.0%
associate-/l*84.2%
distribute-lft-out87.4%
Simplified87.4%
Taylor expanded in z around inf 62.1%
+-commutative62.1%
Simplified62.1%
Taylor expanded in a around inf 49.4%
associate-*r*49.4%
Simplified49.4%
if -7.8000000000000005e-46 < y < 2.2e12Initial program 95.6%
associate-+l+95.6%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 43.9%
Final simplification49.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.42e+82) (* z y) (if (<= y -9e-45) (* a (* z b)) (if (<= y 1600000000000.0) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.42e+82) {
tmp = z * y;
} else if (y <= -9e-45) {
tmp = a * (z * b);
} else if (y <= 1600000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.42d+82)) then
tmp = z * y
else if (y <= (-9d-45)) then
tmp = a * (z * b)
else if (y <= 1600000000000.0d0) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.42e+82) {
tmp = z * y;
} else if (y <= -9e-45) {
tmp = a * (z * b);
} else if (y <= 1600000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.42e+82: tmp = z * y elif y <= -9e-45: tmp = a * (z * b) elif y <= 1600000000000.0: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.42e+82) tmp = Float64(z * y); elseif (y <= -9e-45) tmp = Float64(a * Float64(z * b)); elseif (y <= 1600000000000.0) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.42e+82) tmp = z * y; elseif (y <= -9e-45) tmp = a * (z * b); elseif (y <= 1600000000000.0) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.42e+82], N[(z * y), $MachinePrecision], If[LessEqual[y, -9e-45], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1600000000000.0], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{+82}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-45}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;y \leq 1600000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -1.41999999999999993e82 or 1.6e12 < y Initial program 86.0%
associate-+l+86.0%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in z around inf 83.2%
+-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-/l*84.1%
distribute-lft-out84.1%
Simplified84.1%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Simplified54.1%
if -1.41999999999999993e82 < y < -8.9999999999999997e-45Initial program 90.5%
associate-+l+90.5%
+-commutative90.5%
fma-define90.5%
associate-*l*93.5%
*-commutative93.5%
*-commutative93.5%
distribute-rgt-out96.8%
remove-double-neg96.8%
*-commutative96.8%
distribute-lft-neg-out96.8%
sub-neg96.8%
sub-neg96.8%
distribute-lft-neg-out96.8%
*-commutative96.8%
remove-double-neg96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in y around 0 84.2%
Taylor expanded in z around inf 49.4%
*-commutative49.4%
Simplified49.4%
if -8.9999999999999997e-45 < y < 1.6e12Initial program 95.6%
associate-+l+95.6%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in z around 0 68.5%
Taylor expanded in x around inf 43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.3e+83) (* z y) (if (<= y -9.6e-83) (* a t) (if (<= y 225000000000.0) x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+83) {
tmp = z * y;
} else if (y <= -9.6e-83) {
tmp = a * t;
} else if (y <= 225000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.3d+83)) then
tmp = z * y
else if (y <= (-9.6d-83)) then
tmp = a * t
else if (y <= 225000000000.0d0) then
tmp = x
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+83) {
tmp = z * y;
} else if (y <= -9.6e-83) {
tmp = a * t;
} else if (y <= 225000000000.0) {
tmp = x;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.3e+83: tmp = z * y elif y <= -9.6e-83: tmp = a * t elif y <= 225000000000.0: tmp = x else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e+83) tmp = Float64(z * y); elseif (y <= -9.6e-83) tmp = Float64(a * t); elseif (y <= 225000000000.0) tmp = x; else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.3e+83) tmp = z * y; elseif (y <= -9.6e-83) tmp = a * t; elseif (y <= 225000000000.0) tmp = x; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e+83], N[(z * y), $MachinePrecision], If[LessEqual[y, -9.6e-83], N[(a * t), $MachinePrecision], If[LessEqual[y, 225000000000.0], x, N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+83}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-83}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;y \leq 225000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if y < -2.29999999999999995e83 or 2.25e11 < y Initial program 85.7%
associate-+l+85.7%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in z around inf 82.9%
+-commutative82.9%
associate-+l+82.9%
+-commutative82.9%
associate-/l*83.8%
distribute-lft-out83.8%
Simplified83.8%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
Simplified54.4%
if -2.29999999999999995e83 < y < -9.6000000000000003e-83Initial program 93.4%
associate-+l+93.4%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in z around 0 53.0%
Taylor expanded in x around 0 39.9%
if -9.6000000000000003e-83 < y < 2.25e11Initial program 95.0%
associate-+l+95.0%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around 0 67.6%
Taylor expanded in x around inf 44.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.2e+42) (not (<= a 1.72e+44))) (* a (+ t (* z b))) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.2e+42) || !(a <= 1.72e+44)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.2d+42)) .or. (.not. (a <= 1.72d+44))) then
tmp = a * (t + (z * b))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.2e+42) || !(a <= 1.72e+44)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.2e+42) or not (a <= 1.72e+44): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.2e+42) || !(a <= 1.72e+44)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.2e+42) || ~((a <= 1.72e+44))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.2e+42], N[Not[LessEqual[a, 1.72e+44]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+42} \lor \neg \left(a \leq 1.72 \cdot 10^{+44}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -4.19999999999999991e42 or 1.72e44 < a Initial program 79.5%
associate-+l+79.5%
+-commutative79.5%
fma-define79.5%
associate-*l*86.8%
*-commutative86.8%
*-commutative86.8%
distribute-rgt-out90.6%
remove-double-neg90.6%
*-commutative90.6%
distribute-lft-neg-out90.6%
sub-neg90.6%
sub-neg90.6%
distribute-lft-neg-out90.6%
*-commutative90.6%
remove-double-neg90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 86.1%
Taylor expanded in x around 0 79.7%
if -4.19999999999999991e42 < a < 1.72e44Initial program 98.7%
associate-+l+98.7%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around inf 68.1%
+-commutative68.1%
+-commutative68.1%
*-commutative68.1%
associate-+l+68.1%
+-commutative68.1%
associate-/l*63.8%
fma-define63.8%
*-commutative63.8%
fma-undefine63.8%
Simplified63.8%
Taylor expanded in a around 0 75.8%
*-commutative75.8%
Simplified75.8%
Final simplification77.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -19500.0) (not (<= a 1.1e+29))) (* a t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -19500.0) || !(a <= 1.1e+29)) {
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 ((a <= (-19500.0d0)) .or. (.not. (a <= 1.1d+29))) 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 ((a <= -19500.0) || !(a <= 1.1e+29)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -19500.0) or not (a <= 1.1e+29): tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -19500.0) || !(a <= 1.1e+29)) 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 ((a <= -19500.0) || ~((a <= 1.1e+29))) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -19500.0], N[Not[LessEqual[a, 1.1e+29]], $MachinePrecision]], N[(a * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -19500 \lor \neg \left(a \leq 1.1 \cdot 10^{+29}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -19500 or 1.1000000000000001e29 < a Initial program 80.8%
associate-+l+80.8%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in z around 0 47.8%
Taylor expanded in x around 0 40.5%
if -19500 < a < 1.1000000000000001e29Initial program 99.3%
associate-+l+99.3%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in z around 0 53.4%
Taylor expanded in x around inf 45.1%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 90.7%
associate-+l+90.7%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in z around 0 50.8%
Taylor expanded in x around inf 28.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024185
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))