
(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 -4.5e+153) (not (<= z 2e+51))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ (fma y z x) (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e+153) || !(z <= 2e+51)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = fma(y, z, x) + (a * (t + (z * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e+153) || !(z <= 2e+51)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e+153], N[Not[LessEqual[z, 2e+51]], $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[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+153} \lor \neg \left(z \leq 2 \cdot 10^{+51}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -4.5000000000000001e153 or 2e51 < z Initial program 79.3%
associate-+l+79.3%
associate-*l*78.2%
Simplified78.2%
Taylor expanded in z around inf 96.5%
+-commutative96.5%
associate-+l+96.4%
+-commutative96.4%
associate-/l*99.9%
distribute-lft-out100.0%
Simplified100.0%
if -4.5000000000000001e153 < z < 2e51Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
fma-define97.1%
associate-*l*98.2%
*-commutative98.2%
*-commutative98.2%
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%
Final simplification100.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -5.4e-40)
(* a t)
(if (<= a 3.6e-260)
(* z y)
(if (<= a 11200000.0) x (if (<= a 1.15e+163) (* a (* z b)) (* a t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.4e-40) {
tmp = a * t;
} else if (a <= 3.6e-260) {
tmp = z * y;
} else if (a <= 11200000.0) {
tmp = x;
} else if (a <= 1.15e+163) {
tmp = a * (z * b);
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-5.4d-40)) then
tmp = a * t
else if (a <= 3.6d-260) then
tmp = z * y
else if (a <= 11200000.0d0) then
tmp = x
else if (a <= 1.15d+163) then
tmp = a * (z * b)
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.4e-40) {
tmp = a * t;
} else if (a <= 3.6e-260) {
tmp = z * y;
} else if (a <= 11200000.0) {
tmp = x;
} else if (a <= 1.15e+163) {
tmp = a * (z * b);
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5.4e-40: tmp = a * t elif a <= 3.6e-260: tmp = z * y elif a <= 11200000.0: tmp = x elif a <= 1.15e+163: tmp = a * (z * b) else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.4e-40) tmp = Float64(a * t); elseif (a <= 3.6e-260) tmp = Float64(z * y); elseif (a <= 11200000.0) tmp = x; elseif (a <= 1.15e+163) tmp = Float64(a * Float64(z * b)); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5.4e-40) tmp = a * t; elseif (a <= 3.6e-260) tmp = z * y; elseif (a <= 11200000.0) tmp = x; elseif (a <= 1.15e+163) tmp = a * (z * b); else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.4e-40], N[(a * t), $MachinePrecision], If[LessEqual[a, 3.6e-260], N[(z * y), $MachinePrecision], If[LessEqual[a, 11200000.0], x, If[LessEqual[a, 1.15e+163], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-40}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-260}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 11200000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+163}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -5.4e-40 or 1.15000000000000001e163 < a Initial program 85.8%
associate-+l+85.7%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in z around 0 55.1%
Taylor expanded in x around 0 45.0%
if -5.4e-40 < a < 3.6000000000000001e-260Initial program 97.2%
associate-+l+97.2%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in t around 0 76.0%
+-commutative76.0%
associate-*r*83.2%
distribute-rgt-in84.7%
Simplified84.7%
Taylor expanded in y around inf 56.9%
*-commutative56.9%
Simplified56.9%
if 3.6000000000000001e-260 < a < 1.12e7Initial program 97.9%
associate-+l+97.9%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in z around 0 64.9%
Taylor expanded in x around inf 56.7%
if 1.12e7 < a < 1.15000000000000001e163Initial program 86.2%
associate-+l+86.2%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in t around 0 70.1%
+-commutative70.1%
associate-*r*63.7%
distribute-rgt-in67.2%
Simplified67.2%
Taylor expanded in a around inf 45.1%
*-commutative45.1%
Simplified45.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.2e+53) (not (<= z 1.75e+59))) (* 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 <= -4.2e+53) || !(z <= 1.75e+59)) {
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 <= (-4.2d+53)) .or. (.not. (z <= 1.75d+59))) 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 <= -4.2e+53) || !(z <= 1.75e+59)) {
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 <= -4.2e+53) or not (z <= 1.75e+59): 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 <= -4.2e+53) || !(z <= 1.75e+59)) 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 <= -4.2e+53) || ~((z <= 1.75e+59))) 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, -4.2e+53], N[Not[LessEqual[z, 1.75e+59]], $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 -4.2 \cdot 10^{+53} \lor \neg \left(z \leq 1.75 \cdot 10^{+59}\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 < -4.2000000000000004e53 or 1.75e59 < z Initial program 78.3%
associate-+l+78.3%
associate-*l*78.3%
Simplified78.3%
Taylor expanded in z around inf 95.9%
+-commutative95.9%
associate-+l+95.9%
+-commutative95.9%
associate-/l*98.9%
distribute-lft-out99.9%
Simplified99.9%
if -4.2000000000000004e53 < z < 1.75e59Initial program 99.4%
associate-+l+99.4%
associate-*l*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.95e+257)
(* a (* z b))
(if (or (<= z -6.8e+80) (not (<= z 7.6e-114)))
(+ x (* z y))
(+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.95e+257) {
tmp = a * (z * b);
} else if ((z <= -6.8e+80) || !(z <= 7.6e-114)) {
tmp = x + (z * y);
} else {
tmp = x + (a * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.95d+257)) then
tmp = a * (z * b)
else if ((z <= (-6.8d+80)) .or. (.not. (z <= 7.6d-114))) then
tmp = x + (z * y)
else
tmp = x + (a * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.95e+257) {
tmp = a * (z * b);
} else if ((z <= -6.8e+80) || !(z <= 7.6e-114)) {
tmp = x + (z * y);
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.95e+257: tmp = a * (z * b) elif (z <= -6.8e+80) or not (z <= 7.6e-114): tmp = x + (z * y) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.95e+257) tmp = Float64(a * Float64(z * b)); elseif ((z <= -6.8e+80) || !(z <= 7.6e-114)) tmp = Float64(x + Float64(z * y)); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.95e+257) tmp = a * (z * b); elseif ((z <= -6.8e+80) || ~((z <= 7.6e-114))) tmp = x + (z * y); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.95e+257], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.8e+80], N[Not[LessEqual[z, 7.6e-114]], $MachinePrecision]], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+257}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+80} \lor \neg \left(z \leq 7.6 \cdot 10^{-114}\right):\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -1.95000000000000003e257Initial program 83.2%
associate-+l+83.2%
associate-*l*83.3%
Simplified83.3%
Taylor expanded in t around 0 91.5%
+-commutative91.5%
associate-*r*91.7%
distribute-rgt-in100.0%
Simplified100.0%
Taylor expanded in a around inf 83.7%
*-commutative83.7%
Simplified83.7%
if -1.95000000000000003e257 < z < -6.79999999999999984e80 or 7.5999999999999997e-114 < z Initial program 84.9%
associate-+l+84.9%
associate-*l*84.8%
Simplified84.8%
Taylor expanded in b around 0 74.4%
Taylor expanded in a around 0 62.3%
*-commutative62.3%
Simplified62.3%
if -6.79999999999999984e80 < z < 7.5999999999999997e-114Initial program 97.7%
associate-+l+97.7%
associate-*l*98.4%
Simplified98.4%
Taylor expanded in z around 0 77.9%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3e+81) (not (<= z 1.16e-108))) (+ x (* 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 <= -3e+81) || !(z <= 1.16e-108)) {
tmp = x + (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 <= (-3d+81)) .or. (.not. (z <= 1.16d-108))) then
tmp = x + (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 <= -3e+81) || !(z <= 1.16e-108)) {
tmp = x + (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 <= -3e+81) or not (z <= 1.16e-108): tmp = x + (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 <= -3e+81) || !(z <= 1.16e-108)) tmp = Float64(x + 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 <= -3e+81) || ~((z <= 1.16e-108))) tmp = x + (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, -3e+81], N[Not[LessEqual[z, 1.16e-108]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $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 -3 \cdot 10^{+81} \lor \neg \left(z \leq 1.16 \cdot 10^{-108}\right):\\
\;\;\;\;x + 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.99999999999999997e81 or 1.16e-108 < z Initial program 84.7%
associate-+l+84.7%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in t around 0 77.4%
+-commutative77.4%
associate-*r*84.1%
distribute-rgt-in90.3%
Simplified90.3%
if -2.99999999999999997e81 < z < 1.16e-108Initial program 97.7%
associate-+l+97.7%
+-commutative97.7%
fma-define97.7%
associate-*l*98.4%
*-commutative98.4%
*-commutative98.4%
distribute-rgt-out100.0%
remove-double-neg100.0%
*-commutative100.0%
distribute-lft-neg-out100.0%
sub-neg100.0%
sub-neg100.0%
distribute-lft-neg-out100.0%
*-commutative100.0%
remove-double-neg100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 89.2%
Final simplification89.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3e-35) (not (<= a 1.16e-95))) (+ x (* 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 <= -3e-35) || !(a <= 1.16e-95)) {
tmp = x + (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 <= (-3d-35)) .or. (.not. (a <= 1.16d-95))) then
tmp = x + (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 <= -3e-35) || !(a <= 1.16e-95)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3e-35) or not (a <= 1.16e-95): tmp = x + (a * (t + (z * b))) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3e-35) || !(a <= 1.16e-95)) tmp = Float64(x + 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 <= -3e-35) || ~((a <= 1.16e-95))) tmp = x + (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, -3e-35], N[Not[LessEqual[a, 1.16e-95]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-35} \lor \neg \left(a \leq 1.16 \cdot 10^{-95}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -2.99999999999999989e-35 or 1.15999999999999997e-95 < a Initial program 87.2%
associate-+l+87.2%
+-commutative87.2%
fma-define87.2%
associate-*l*92.8%
*-commutative92.8%
*-commutative92.8%
distribute-rgt-out96.0%
remove-double-neg96.0%
*-commutative96.0%
distribute-lft-neg-out96.0%
sub-neg96.0%
sub-neg96.0%
distribute-lft-neg-out96.0%
*-commutative96.0%
remove-double-neg96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 85.9%
if -2.99999999999999989e-35 < a < 1.15999999999999997e-95Initial program 97.1%
associate-+l+97.1%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in b around 0 93.3%
Taylor expanded in a around 0 83.1%
*-commutative83.1%
Simplified83.1%
Final simplification84.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.4e+39) (+ x (* t (+ a (* a (* b (/ z t)))))) (if (<= b 3.2e+50) (+ 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 (b <= -6.4e+39) {
tmp = x + (t * (a + (a * (b * (z / t)))));
} else if (b <= 3.2e+50) {
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 (b <= (-6.4d+39)) then
tmp = x + (t * (a + (a * (b * (z / t)))))
else if (b <= 3.2d+50) 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 (b <= -6.4e+39) {
tmp = x + (t * (a + (a * (b * (z / t)))));
} else if (b <= 3.2e+50) {
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 b <= -6.4e+39: tmp = x + (t * (a + (a * (b * (z / t))))) elif b <= 3.2e+50: 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 (b <= -6.4e+39) tmp = Float64(x + Float64(t * Float64(a + Float64(a * Float64(b * Float64(z / t)))))); elseif (b <= 3.2e+50) 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 (b <= -6.4e+39) tmp = x + (t * (a + (a * (b * (z / t))))); elseif (b <= 3.2e+50) 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[LessEqual[b, -6.4e+39], N[(x + N[(t * N[(a + N[(a * N[(b * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e+50], 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}\;b \leq -6.4 \cdot 10^{+39}:\\
\;\;\;\;x + t \cdot \left(a + a \cdot \left(b \cdot \frac{z}{t}\right)\right)\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+50}:\\
\;\;\;\;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 b < -6.39999999999999986e39Initial program 91.2%
associate-+l+91.2%
+-commutative91.2%
fma-define91.2%
associate-*l*78.6%
*-commutative78.6%
*-commutative78.6%
distribute-rgt-out78.6%
remove-double-neg78.6%
*-commutative78.6%
distribute-lft-neg-out78.6%
sub-neg78.6%
sub-neg78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
remove-double-neg78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y around 0 78.8%
Taylor expanded in t around inf 74.8%
associate-/l*74.7%
associate-/l*81.1%
Simplified81.1%
if -6.39999999999999986e39 < b < 3.19999999999999983e50Initial program 91.9%
associate-+l+91.9%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in b around 0 95.6%
if 3.19999999999999983e50 < b Initial program 88.8%
associate-+l+88.8%
+-commutative88.8%
fma-define88.8%
associate-*l*85.1%
*-commutative85.1%
*-commutative85.1%
distribute-rgt-out88.9%
remove-double-neg88.9%
*-commutative88.9%
distribute-lft-neg-out88.9%
sub-neg88.9%
sub-neg88.9%
distribute-lft-neg-out88.9%
*-commutative88.9%
remove-double-neg88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in y around 0 89.0%
Final simplification91.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7e+42) (+ x (* z (+ y (* a b)))) (if (<= b 3.3e+50) (+ 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 (b <= -7e+42) {
tmp = x + (z * (y + (a * b)));
} else if (b <= 3.3e+50) {
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 (b <= (-7d+42)) then
tmp = x + (z * (y + (a * b)))
else if (b <= 3.3d+50) 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 (b <= -7e+42) {
tmp = x + (z * (y + (a * b)));
} else if (b <= 3.3e+50) {
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 b <= -7e+42: tmp = x + (z * (y + (a * b))) elif b <= 3.3e+50: 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 (b <= -7e+42) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); elseif (b <= 3.3e+50) 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 (b <= -7e+42) tmp = x + (z * (y + (a * b))); elseif (b <= 3.3e+50) 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[LessEqual[b, -7e+42], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e+50], 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}\;b \leq -7 \cdot 10^{+42}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+50}:\\
\;\;\;\;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 b < -7.00000000000000047e42Initial program 91.2%
associate-+l+91.2%
associate-*l*78.6%
Simplified78.6%
Taylor expanded in t around 0 64.0%
+-commutative64.0%
associate-*r*72.3%
distribute-rgt-in81.0%
Simplified81.0%
if -7.00000000000000047e42 < b < 3.3e50Initial program 91.9%
associate-+l+91.9%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in b around 0 95.6%
if 3.3e50 < b Initial program 88.8%
associate-+l+88.8%
+-commutative88.8%
fma-define88.8%
associate-*l*85.1%
*-commutative85.1%
*-commutative85.1%
distribute-rgt-out88.9%
remove-double-neg88.9%
*-commutative88.9%
distribute-lft-neg-out88.9%
sub-neg88.9%
sub-neg88.9%
distribute-lft-neg-out88.9%
*-commutative88.9%
remove-double-neg88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in y around 0 89.0%
Final simplification91.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8e-39) (* a t) (if (<= a 4.2e-260) (* z y) (if (<= a 5e+28) x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e-39) {
tmp = a * t;
} else if (a <= 4.2e-260) {
tmp = z * y;
} else if (a <= 5e+28) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-8d-39)) then
tmp = a * t
else if (a <= 4.2d-260) then
tmp = z * y
else if (a <= 5d+28) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e-39) {
tmp = a * t;
} else if (a <= 4.2e-260) {
tmp = z * y;
} else if (a <= 5e+28) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8e-39: tmp = a * t elif a <= 4.2e-260: tmp = z * y elif a <= 5e+28: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8e-39) tmp = Float64(a * t); elseif (a <= 4.2e-260) tmp = Float64(z * y); elseif (a <= 5e+28) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8e-39) tmp = a * t; elseif (a <= 4.2e-260) tmp = z * y; elseif (a <= 5e+28) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8e-39], N[(a * t), $MachinePrecision], If[LessEqual[a, 4.2e-260], N[(z * y), $MachinePrecision], If[LessEqual[a, 5e+28], x, N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-39}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-260}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -7.99999999999999943e-39 or 4.99999999999999957e28 < a Initial program 85.5%
associate-+l+85.4%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in z around 0 54.1%
Taylor expanded in x around 0 43.0%
if -7.99999999999999943e-39 < a < 4.20000000000000009e-260Initial program 97.2%
associate-+l+97.2%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in t around 0 76.0%
+-commutative76.0%
associate-*r*83.2%
distribute-rgt-in84.7%
Simplified84.7%
Taylor expanded in y around inf 56.9%
*-commutative56.9%
Simplified56.9%
if 4.20000000000000009e-260 < a < 4.99999999999999957e28Initial program 98.0%
associate-+l+98.0%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in z around 0 60.2%
Taylor expanded in x around inf 52.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2e+193) (+ x (* a (+ t (* z b)))) (+ x (+ (* a t) (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2e+193) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((a * t) + (z * (y + (a * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-2d+193)) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((a * t) + (z * (y + (a * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2e+193) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((a * t) + (z * (y + (a * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2e+193: tmp = x + (a * (t + (z * b))) else: tmp = x + ((a * t) + (z * (y + (a * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2e+193) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(a * t) + Float64(z * Float64(y + Float64(a * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2e+193) tmp = x + (a * (t + (z * b))); else tmp = x + ((a * t) + (z * (y + (a * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2e+193], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+193}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -2.00000000000000013e193Initial program 83.9%
associate-+l+83.9%
+-commutative83.9%
fma-define83.9%
associate-*l*91.6%
*-commutative91.6%
*-commutative91.6%
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 99.9%
if -2.00000000000000013e193 < a Initial program 91.9%
associate-+l+91.9%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in z around 0 96.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.4e-37) (not (<= a 14000.0))) (* a (+ t (* z b))) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e-37) || !(a <= 14000.0)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.4d-37)) .or. (.not. (a <= 14000.0d0))) then
tmp = a * (t + (z * b))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.4e-37) || !(a <= 14000.0)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.4e-37) or not (a <= 14000.0): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.4e-37) || !(a <= 14000.0)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.4e-37) || ~((a <= 14000.0))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.4e-37], N[Not[LessEqual[a, 14000.0]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-37} \lor \neg \left(a \leq 14000\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -4.40000000000000004e-37 or 14000 < a Initial program 85.8%
associate-+l+85.7%
+-commutative85.7%
fma-define85.7%
associate-*l*91.9%
*-commutative91.9%
*-commutative91.9%
distribute-rgt-out95.6%
remove-double-neg95.6%
*-commutative95.6%
distribute-lft-neg-out95.6%
sub-neg95.6%
sub-neg95.6%
distribute-lft-neg-out95.6%
*-commutative95.6%
remove-double-neg95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around 0 87.1%
Taylor expanded in x around 0 76.7%
if -4.40000000000000004e-37 < a < 14000Initial program 97.5%
associate-+l+97.5%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in b around 0 93.3%
Taylor expanded in a around 0 80.6%
*-commutative80.6%
Simplified80.6%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4.6e+153) (* z (* a b)) (if (<= z 6.1e-108) (+ x (* a t)) (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.6e+153) {
tmp = z * (a * b);
} else if (z <= 6.1e-108) {
tmp = x + (a * t);
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.6d+153)) then
tmp = z * (a * b)
else if (z <= 6.1d-108) then
tmp = x + (a * t)
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.6e+153) {
tmp = z * (a * b);
} else if (z <= 6.1e-108) {
tmp = x + (a * t);
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.6e+153: tmp = z * (a * b) elif z <= 6.1e-108: tmp = x + (a * t) else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.6e+153) tmp = Float64(z * Float64(a * b)); elseif (z <= 6.1e-108) tmp = Float64(x + Float64(a * t)); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.6e+153) tmp = z * (a * b); elseif (z <= 6.1e-108) tmp = x + (a * t); else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.6e+153], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e-108], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(z * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+153}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-108}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -4.6000000000000003e153Initial program 85.4%
associate-+l+85.4%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in z around inf 94.0%
+-commutative94.0%
associate-+l+94.0%
+-commutative94.0%
associate-/l*99.9%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in b around inf 97.0%
Taylor expanded in a around inf 56.9%
if -4.6000000000000003e153 < z < 6.10000000000000007e-108Initial program 96.5%
associate-+l+96.5%
associate-*l*97.8%
Simplified97.8%
Taylor expanded in z around 0 75.2%
if 6.10000000000000007e-108 < z Initial program 84.9%
associate-+l+84.9%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in t around 0 78.5%
+-commutative78.5%
associate-*r*81.8%
distribute-rgt-in88.9%
Simplified88.9%
Taylor expanded in y around inf 48.7%
*-commutative48.7%
Simplified48.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.3e+49) x (if (<= x 2.3e+49) (* a t) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.3e+49) {
tmp = x;
} else if (x <= 2.3e+49) {
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 (x <= (-3.3d+49)) then
tmp = x
else if (x <= 2.3d+49) 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 (x <= -3.3e+49) {
tmp = x;
} else if (x <= 2.3e+49) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.3e+49: tmp = x elif x <= 2.3e+49: tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.3e+49) tmp = x; elseif (x <= 2.3e+49) 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 (x <= -3.3e+49) tmp = x; elseif (x <= 2.3e+49) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.3e+49], x, If[LessEqual[x, 2.3e+49], N[(a * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+49}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.2999999999999998e49 or 2.30000000000000002e49 < x Initial program 92.1%
associate-+l+92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in z around 0 61.2%
Taylor expanded in x around inf 49.0%
if -3.2999999999999998e49 < x < 2.30000000000000002e49Initial program 90.5%
associate-+l+90.5%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in z around 0 45.5%
Taylor expanded in x around 0 38.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 91.2%
associate-+l+91.2%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in z around 0 51.6%
Taylor expanded in x around inf 24.5%
(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 2024163
(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)))