
(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 18 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 -6.1e+28) (not (<= z 0.0002))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (+ (* t a) (+ x (* y z))) (* (* z a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.1e+28) || !(z <= 0.0002)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = ((t * a) + (x + (y * z))) + ((z * a) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.1d+28)) .or. (.not. (z <= 0.0002d0))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = ((t * a) + (x + (y * z))) + ((z * a) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.1e+28) || !(z <= 0.0002)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = ((t * a) + (x + (y * z))) + ((z * a) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.1e+28) or not (z <= 0.0002): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = ((t * a) + (x + (y * z))) + ((z * a) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.1e+28) || !(z <= 0.0002)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.1e+28) || ~((z <= 0.0002))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = ((t * a) + (x + (y * z))) + ((z * a) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.1e+28], N[Not[LessEqual[z, 0.0002]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{+28} \lor \neg \left(z \leq 0.0002\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -6.1000000000000002e28 or 2.0000000000000001e-4 < z Initial program 75.2%
associate-+l+75.2%
associate-*l*79.4%
Simplified79.4%
Taylor expanded in z around inf 93.4%
+-commutative93.4%
associate-+l+93.4%
+-commutative93.4%
associate-/l*98.2%
distribute-lft-out99.9%
Simplified99.9%
if -6.1000000000000002e28 < z < 2.0000000000000001e-4Initial program 100.0%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (* t a) (+ x (* y z))) (* (* z a) b))))
(if (<= t_1 4e+303)
t_1
(* x (+ 1.0 (/ (* z (+ y (* a (+ b (/ t z))))) x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= 4e+303) {
tmp = t_1;
} else {
tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / 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) :: t_1
real(8) :: tmp
t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b)
if (t_1 <= 4d+303) then
tmp = t_1
else
tmp = x * (1.0d0 + ((z * (y + (a * (b + (t / z))))) / x))
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 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= 4e+303) {
tmp = t_1;
} else {
tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b) tmp = 0 if t_1 <= 4e+303: tmp = t_1 else: tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 4e+303) tmp = t_1; else tmp = Float64(x * Float64(1.0 + Float64(Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z))))) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b); tmp = 0.0; if (t_1 <= 4e+303) tmp = t_1; else tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+303], t$95$1, N[(x * N[(1.0 + N[(N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \frac{z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)}{x}\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 4e303Initial program 98.5%
if 4e303 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 56.5%
associate-+l+56.5%
associate-*l*71.9%
Simplified71.9%
Taylor expanded in z around inf 79.7%
+-commutative79.7%
associate-+l+79.7%
+-commutative79.7%
associate-/l*89.0%
distribute-lft-out95.3%
Simplified95.3%
Taylor expanded in x around inf 100.0%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ (* t a) (* y z)))) (t_2 (+ x (* z (+ y (* a b))))))
(if (<= b -4.5e+61)
t_2
(if (<= b -3.5e-22)
t_1
(if (<= b -2e-91)
t_2
(if (<= b 3e-305)
(+ x (* z (+ y (/ (* t a) z))))
(if (<= b 1.55e+103) t_1 (+ x (* a (+ t (* z b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((t * a) + (y * z));
double t_2 = x + (z * (y + (a * b)));
double tmp;
if (b <= -4.5e+61) {
tmp = t_2;
} else if (b <= -3.5e-22) {
tmp = t_1;
} else if (b <= -2e-91) {
tmp = t_2;
} else if (b <= 3e-305) {
tmp = x + (z * (y + ((t * a) / z)));
} else if (b <= 1.55e+103) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t * a) + (y * z))
t_2 = x + (z * (y + (a * b)))
if (b <= (-4.5d+61)) then
tmp = t_2
else if (b <= (-3.5d-22)) then
tmp = t_1
else if (b <= (-2d-91)) then
tmp = t_2
else if (b <= 3d-305) then
tmp = x + (z * (y + ((t * a) / z)))
else if (b <= 1.55d+103) then
tmp = t_1
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 t_1 = x + ((t * a) + (y * z));
double t_2 = x + (z * (y + (a * b)));
double tmp;
if (b <= -4.5e+61) {
tmp = t_2;
} else if (b <= -3.5e-22) {
tmp = t_1;
} else if (b <= -2e-91) {
tmp = t_2;
} else if (b <= 3e-305) {
tmp = x + (z * (y + ((t * a) / z)));
} else if (b <= 1.55e+103) {
tmp = t_1;
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((t * a) + (y * z)) t_2 = x + (z * (y + (a * b))) tmp = 0 if b <= -4.5e+61: tmp = t_2 elif b <= -3.5e-22: tmp = t_1 elif b <= -2e-91: tmp = t_2 elif b <= 3e-305: tmp = x + (z * (y + ((t * a) / z))) elif b <= 1.55e+103: tmp = t_1 else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(t * a) + Float64(y * z))) t_2 = Float64(x + Float64(z * Float64(y + Float64(a * b)))) tmp = 0.0 if (b <= -4.5e+61) tmp = t_2; elseif (b <= -3.5e-22) tmp = t_1; elseif (b <= -2e-91) tmp = t_2; elseif (b <= 3e-305) tmp = Float64(x + Float64(z * Float64(y + Float64(Float64(t * a) / z)))); elseif (b <= 1.55e+103) tmp = t_1; 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) t_1 = x + ((t * a) + (y * z)); t_2 = x + (z * (y + (a * b))); tmp = 0.0; if (b <= -4.5e+61) tmp = t_2; elseif (b <= -3.5e-22) tmp = t_1; elseif (b <= -2e-91) tmp = t_2; elseif (b <= 3e-305) tmp = x + (z * (y + ((t * a) / z))); elseif (b <= 1.55e+103) tmp = t_1; else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.5e+61], t$95$2, If[LessEqual[b, -3.5e-22], t$95$1, If[LessEqual[b, -2e-91], t$95$2, If[LessEqual[b, 3e-305], N[(x + N[(z * N[(y + N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.55e+103], t$95$1, N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t \cdot a + y \cdot z\right)\\
t_2 := x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;b \leq -4.5 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-91}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\
\;\;\;\;x + z \cdot \left(y + \frac{t \cdot a}{z}\right)\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if b < -4.5e61 or -3.50000000000000005e-22 < b < -2.00000000000000004e-91Initial program 90.5%
associate-+l+90.5%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in t around 0 74.4%
+-commutative74.4%
+-commutative74.4%
associate-*r*81.6%
distribute-rgt-in89.4%
Simplified89.4%
if -4.5e61 < b < -3.50000000000000005e-22 or 3.0000000000000001e-305 < b < 1.5500000000000001e103Initial program 91.9%
associate-+l+91.9%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in b around 0 95.5%
if -2.00000000000000004e-91 < b < 3.0000000000000001e-305Initial program 78.8%
associate-+l+78.8%
associate-*l*97.8%
Simplified97.8%
Taylor expanded in b around 0 97.7%
Taylor expanded in z around inf 99.9%
if 1.5500000000000001e103 < b Initial program 83.7%
associate-+l+83.7%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around 0 76.2%
Taylor expanded in y around 0 73.5%
+-commutative73.5%
distribute-lft-in87.0%
+-commutative87.0%
Simplified87.0%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -920.0)
(* t a)
(if (<= t 4e-293)
(* y z)
(if (<= t 1.72e-43)
x
(if (or (<= t 2.3e-9) (and (not (<= t 1.12e+55)) (<= t 1.7e+117)))
(* y z)
(* t a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -920.0) {
tmp = t * a;
} else if (t <= 4e-293) {
tmp = y * z;
} else if (t <= 1.72e-43) {
tmp = x;
} else if ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117))) {
tmp = y * z;
} else {
tmp = 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 (t <= (-920.0d0)) then
tmp = t * a
else if (t <= 4d-293) then
tmp = y * z
else if (t <= 1.72d-43) then
tmp = x
else if ((t <= 2.3d-9) .or. (.not. (t <= 1.12d+55)) .and. (t <= 1.7d+117)) then
tmp = y * z
else
tmp = 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 (t <= -920.0) {
tmp = t * a;
} else if (t <= 4e-293) {
tmp = y * z;
} else if (t <= 1.72e-43) {
tmp = x;
} else if ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117))) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -920.0: tmp = t * a elif t <= 4e-293: tmp = y * z elif t <= 1.72e-43: tmp = x elif (t <= 2.3e-9) or (not (t <= 1.12e+55) and (t <= 1.7e+117)): tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -920.0) tmp = Float64(t * a); elseif (t <= 4e-293) tmp = Float64(y * z); elseif (t <= 1.72e-43) tmp = x; elseif ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117))) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -920.0) tmp = t * a; elseif (t <= 4e-293) tmp = y * z; elseif (t <= 1.72e-43) tmp = x; elseif ((t <= 2.3e-9) || (~((t <= 1.12e+55)) && (t <= 1.7e+117))) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -920.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4e-293], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.72e-43], x, If[Or[LessEqual[t, 2.3e-9], And[N[Not[LessEqual[t, 1.12e+55]], $MachinePrecision], LessEqual[t, 1.7e+117]]], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -920:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-293}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 1.72 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-9} \lor \neg \left(t \leq 1.12 \cdot 10^{+55}\right) \land t \leq 1.7 \cdot 10^{+117}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -920 or 2.2999999999999999e-9 < t < 1.12000000000000006e55 or 1.7e117 < t Initial program 87.1%
associate-+l+87.1%
associate-*l*89.1%
Simplified89.1%
Taylor expanded in t around inf 60.1%
if -920 < t < 4.0000000000000002e-293 or 1.72000000000000005e-43 < t < 2.2999999999999999e-9 or 1.12000000000000006e55 < t < 1.7e117Initial program 88.2%
associate-+l+88.2%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in y around inf 50.4%
*-commutative50.4%
Simplified50.4%
if 4.0000000000000002e-293 < t < 1.72000000000000005e-43Initial program 89.6%
associate-+l+89.6%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in x around inf 47.1%
Final simplification53.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.1)
(* t a)
(if (<= t 2.2e-291)
(* y z)
(if (<= t 7.4e-140)
x
(if (<= t 1.26e-114)
(* a (* z b))
(if (<= t 2.1e-45) x (if (<= t 4.6e+115) (* y z) (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.1) {
tmp = t * a;
} else if (t <= 2.2e-291) {
tmp = y * z;
} else if (t <= 7.4e-140) {
tmp = x;
} else if (t <= 1.26e-114) {
tmp = a * (z * b);
} else if (t <= 2.1e-45) {
tmp = x;
} else if (t <= 4.6e+115) {
tmp = y * z;
} else {
tmp = 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 (t <= (-2.1d0)) then
tmp = t * a
else if (t <= 2.2d-291) then
tmp = y * z
else if (t <= 7.4d-140) then
tmp = x
else if (t <= 1.26d-114) then
tmp = a * (z * b)
else if (t <= 2.1d-45) then
tmp = x
else if (t <= 4.6d+115) then
tmp = y * z
else
tmp = 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 (t <= -2.1) {
tmp = t * a;
} else if (t <= 2.2e-291) {
tmp = y * z;
} else if (t <= 7.4e-140) {
tmp = x;
} else if (t <= 1.26e-114) {
tmp = a * (z * b);
} else if (t <= 2.1e-45) {
tmp = x;
} else if (t <= 4.6e+115) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.1: tmp = t * a elif t <= 2.2e-291: tmp = y * z elif t <= 7.4e-140: tmp = x elif t <= 1.26e-114: tmp = a * (z * b) elif t <= 2.1e-45: tmp = x elif t <= 4.6e+115: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.1) tmp = Float64(t * a); elseif (t <= 2.2e-291) tmp = Float64(y * z); elseif (t <= 7.4e-140) tmp = x; elseif (t <= 1.26e-114) tmp = Float64(a * Float64(z * b)); elseif (t <= 2.1e-45) tmp = x; elseif (t <= 4.6e+115) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.1) tmp = t * a; elseif (t <= 2.2e-291) tmp = y * z; elseif (t <= 7.4e-140) tmp = x; elseif (t <= 1.26e-114) tmp = a * (z * b); elseif (t <= 2.1e-45) tmp = x; elseif (t <= 4.6e+115) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.1], N[(t * a), $MachinePrecision], If[LessEqual[t, 2.2e-291], N[(y * z), $MachinePrecision], If[LessEqual[t, 7.4e-140], x, If[LessEqual[t, 1.26e-114], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-45], x, If[LessEqual[t, 4.6e+115], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-291}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-114}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+115}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -2.10000000000000009 or 4.60000000000000007e115 < t Initial program 87.0%
associate-+l+87.0%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in t around inf 63.1%
if -2.10000000000000009 < t < 2.20000000000000002e-291 or 2.09999999999999995e-45 < t < 4.60000000000000007e115Initial program 88.1%
associate-+l+88.1%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
if 2.20000000000000002e-291 < t < 7.39999999999999955e-140 or 1.25999999999999992e-114 < t < 2.09999999999999995e-45Initial program 92.5%
associate-+l+92.5%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in x around inf 55.0%
if 7.39999999999999955e-140 < t < 1.25999999999999992e-114Initial program 77.3%
associate-+l+77.3%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around inf 88.7%
Taylor expanded in t around 0 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification54.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))) (t_2 (+ x (* t a))))
(if (<= t -850.0)
t_2
(if (<= t 4.5e-139)
t_1
(if (<= t 3.1e-115) (* a (* z b)) (if (<= t 8.2e+115) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = x + (t * a);
double tmp;
if (t <= -850.0) {
tmp = t_2;
} else if (t <= 4.5e-139) {
tmp = t_1;
} else if (t <= 3.1e-115) {
tmp = a * (z * b);
} else if (t <= 8.2e+115) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * z)
t_2 = x + (t * a)
if (t <= (-850.0d0)) then
tmp = t_2
else if (t <= 4.5d-139) then
tmp = t_1
else if (t <= 3.1d-115) then
tmp = a * (z * b)
else if (t <= 8.2d+115) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double t_2 = x + (t * a);
double tmp;
if (t <= -850.0) {
tmp = t_2;
} else if (t <= 4.5e-139) {
tmp = t_1;
} else if (t <= 3.1e-115) {
tmp = a * (z * b);
} else if (t <= 8.2e+115) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) t_2 = x + (t * a) tmp = 0 if t <= -850.0: tmp = t_2 elif t <= 4.5e-139: tmp = t_1 elif t <= 3.1e-115: tmp = a * (z * b) elif t <= 8.2e+115: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) t_2 = Float64(x + Float64(t * a)) tmp = 0.0 if (t <= -850.0) tmp = t_2; elseif (t <= 4.5e-139) tmp = t_1; elseif (t <= 3.1e-115) tmp = Float64(a * Float64(z * b)); elseif (t <= 8.2e+115) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); t_2 = x + (t * a); tmp = 0.0; if (t <= -850.0) tmp = t_2; elseif (t <= 4.5e-139) tmp = t_1; elseif (t <= 3.1e-115) tmp = a * (z * b); elseif (t <= 8.2e+115) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -850.0], t$95$2, If[LessEqual[t, 4.5e-139], t$95$1, If[LessEqual[t, 3.1e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+115], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := x + t \cdot a\\
\mathbf{if}\;t \leq -850:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-115}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -850 or 8.19999999999999925e115 < t Initial program 87.0%
associate-+l+87.0%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in z around 0 73.6%
+-commutative73.6%
Simplified73.6%
if -850 < t < 4.50000000000000023e-139 or 3.10000000000000007e-115 < t < 8.19999999999999925e115Initial program 89.2%
associate-+l+89.2%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in z around 0 96.2%
Taylor expanded in a around 0 69.7%
*-commutative69.7%
Simplified69.7%
if 4.50000000000000023e-139 < t < 3.10000000000000007e-115Initial program 77.3%
associate-+l+77.3%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around inf 88.7%
Taylor expanded in t around 0 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification71.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= t -5200.0)
(* t a)
(if (<= t 4.8e-139)
t_1
(if (<= t 2.9e-115) (* a (* z b)) (if (<= t 3.5e+116) t_1 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (t <= -5200.0) {
tmp = t * a;
} else if (t <= 4.8e-139) {
tmp = t_1;
} else if (t <= 2.9e-115) {
tmp = a * (z * b);
} else if (t <= 3.5e+116) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if (t <= (-5200.0d0)) then
tmp = t * a
else if (t <= 4.8d-139) then
tmp = t_1
else if (t <= 2.9d-115) then
tmp = a * (z * b)
else if (t <= 3.5d+116) then
tmp = t_1
else
tmp = 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 t_1 = x + (y * z);
double tmp;
if (t <= -5200.0) {
tmp = t * a;
} else if (t <= 4.8e-139) {
tmp = t_1;
} else if (t <= 2.9e-115) {
tmp = a * (z * b);
} else if (t <= 3.5e+116) {
tmp = t_1;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if t <= -5200.0: tmp = t * a elif t <= 4.8e-139: tmp = t_1 elif t <= 2.9e-115: tmp = a * (z * b) elif t <= 3.5e+116: tmp = t_1 else: tmp = t * a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (t <= -5200.0) tmp = Float64(t * a); elseif (t <= 4.8e-139) tmp = t_1; elseif (t <= 2.9e-115) tmp = Float64(a * Float64(z * b)); elseif (t <= 3.5e+116) tmp = t_1; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (t <= -5200.0) tmp = t * a; elseif (t <= 4.8e-139) tmp = t_1; elseif (t <= 2.9e-115) tmp = a * (z * b); elseif (t <= 3.5e+116) tmp = t_1; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4.8e-139], t$95$1, If[LessEqual[t, 2.9e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+116], t$95$1, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;t \leq -5200:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -5200 or 3.49999999999999997e116 < t Initial program 86.9%
associate-+l+86.9%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in t around inf 63.8%
if -5200 < t < 4.80000000000000029e-139 or 2.8999999999999998e-115 < t < 3.49999999999999997e116Initial program 89.2%
associate-+l+89.2%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in z around 0 96.2%
Taylor expanded in a around 0 69.9%
*-commutative69.9%
Simplified69.9%
if 4.80000000000000029e-139 < t < 2.8999999999999998e-115Initial program 77.3%
associate-+l+77.3%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around inf 88.7%
Taylor expanded in t around 0 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= t -5200.0)
(* t a)
(if (<= t 4.8e-139)
t_1
(if (<= t 2.9e-115) (* a (* z b)) (if (<= t 6.8e+128) t_1 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (t <= -5200.0) {
tmp = t * a;
} else if (t <= 4.8e-139) {
tmp = t_1;
} else if (t <= 2.9e-115) {
tmp = a * (z * b);
} else if (t <= 6.8e+128) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if (t <= (-5200.0d0)) then
tmp = t * a
else if (t <= 4.8d-139) then
tmp = t_1
else if (t <= 2.9d-115) then
tmp = a * (z * b)
else if (t <= 6.8d+128) then
tmp = t_1
else
tmp = 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 t_1 = x + (y * z);
double tmp;
if (t <= -5200.0) {
tmp = t * a;
} else if (t <= 4.8e-139) {
tmp = t_1;
} else if (t <= 2.9e-115) {
tmp = a * (z * b);
} else if (t <= 6.8e+128) {
tmp = t_1;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if t <= -5200.0: tmp = t * a elif t <= 4.8e-139: tmp = t_1 elif t <= 2.9e-115: tmp = a * (z * b) elif t <= 6.8e+128: tmp = t_1 else: tmp = t * a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (t <= -5200.0) tmp = Float64(t * a); elseif (t <= 4.8e-139) tmp = t_1; elseif (t <= 2.9e-115) tmp = Float64(a * Float64(z * b)); elseif (t <= 6.8e+128) tmp = t_1; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (t <= -5200.0) tmp = t * a; elseif (t <= 4.8e-139) tmp = t_1; elseif (t <= 2.9e-115) tmp = a * (z * b); elseif (t <= 6.8e+128) tmp = t_1; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4.8e-139], t$95$1, If[LessEqual[t, 2.9e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+128], t$95$1, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;t \leq -5200:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -5200 or 6.7999999999999997e128 < t Initial program 86.9%
associate-+l+86.9%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in t around inf 63.8%
if -5200 < t < 4.80000000000000029e-139 or 2.8999999999999998e-115 < t < 6.7999999999999997e128Initial program 89.2%
associate-+l+89.2%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in a around 0 69.9%
if 4.80000000000000029e-139 < t < 2.8999999999999998e-115Initial program 77.3%
associate-+l+77.3%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around inf 88.7%
Taylor expanded in t around 0 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification68.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e+34) (not (<= z 1e-6))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (+ (* a (* z b)) (* t a)) (+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+34) || !(z <= 1e-6)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = ((a * (z * b)) + (t * a)) + (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 ((z <= (-6d+34)) .or. (.not. (z <= 1d-6))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = ((a * (z * b)) + (t * a)) + (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 ((z <= -6e+34) || !(z <= 1e-6)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+34) or not (z <= 1e-6): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+34) || !(z <= 1e-6)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(Float64(Float64(a * Float64(z * b)) + Float64(t * a)) + Float64(x + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e+34) || ~((z <= 1e-6))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+34], N[Not[LessEqual[z, 1e-6]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+34} \lor \neg \left(z \leq 10^{-6}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot b\right) + t \cdot a\right) + \left(x + y \cdot z\right)\\
\end{array}
\end{array}
if z < -6.00000000000000037e34 or 9.99999999999999955e-7 < z Initial program 75.0%
associate-+l+75.0%
associate-*l*79.3%
Simplified79.3%
Taylor expanded in z around inf 93.4%
+-commutative93.4%
associate-+l+93.4%
+-commutative93.4%
associate-/l*98.2%
distribute-lft-out99.9%
Simplified99.9%
if -6.00000000000000037e34 < z < 9.99999999999999955e-7Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.7e+215) (not (<= a 1.45e+166))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.7e+215) || !(a <= 1.45e+166)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (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 <= (-2.7d+215)) .or. (.not. (a <= 1.45d+166))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((t * a) + (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 <= -2.7e+215) || !(a <= 1.45e+166)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (z * (y + (a * b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.7e+215) or not (a <= 1.45e+166): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (z * (y + (a * b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.7e+215) || !(a <= 1.45e+166)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(t * a) + 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 <= -2.7e+215) || ~((a <= 1.45e+166))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (z * (y + (a * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.7e+215], N[Not[LessEqual[a, 1.45e+166]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+215} \lor \neg \left(a \leq 1.45 \cdot 10^{+166}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -2.7e215Initial program 58.3%
associate-+l+58.3%
+-commutative58.3%
fma-define58.3%
associate-*l*68.4%
*-commutative68.4%
*-commutative68.4%
distribute-rgt-out89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in y around 0 94.8%
if -2.7e215 < a < 1.4500000000000001e166Initial program 91.9%
associate-+l+91.9%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in z around 0 98.5%
if 1.4500000000000001e166 < a Initial program 78.8%
associate-+l+78.8%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in z around 0 79.2%
Taylor expanded in y around 0 89.5%
+-commutative89.5%
distribute-lft-in96.7%
+-commutative96.7%
Simplified96.7%
Final simplification98.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -2.5e+207)
(* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))
(if (<= a 9.2e+164)
(+ x (+ (* t a) (* 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 (a <= -2.5e+207) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else if (a <= 9.2e+164) {
tmp = x + ((t * a) + (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 (a <= (-2.5d+207)) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else if (a <= 9.2d+164) then
tmp = x + ((t * a) + (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 (a <= -2.5e+207) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else if (a <= 9.2e+164) {
tmp = x + ((t * a) + (z * (y + (a * b))));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.5e+207: tmp = z * (y + ((a * (b + (t / z))) + (x / z))) elif a <= 9.2e+164: tmp = x + ((t * a) + (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 (a <= -2.5e+207) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); elseif (a <= 9.2e+164) tmp = Float64(x + Float64(Float64(t * a) + 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 (a <= -2.5e+207) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); elseif (a <= 9.2e+164) tmp = x + ((t * a) + (z * (y + (a * b)))); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.5e+207], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+164], N[(x + N[(N[(t * a), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $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}\;a \leq -2.5 \cdot 10^{+207}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+164}:\\
\;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if a < -2.5e207Initial program 54.9%
associate-+l+54.9%
associate-*l*68.2%
Simplified68.2%
Taylor expanded in z around inf 59.1%
+-commutative59.1%
associate-+l+59.1%
+-commutative59.1%
associate-/l*72.7%
distribute-lft-out95.7%
Simplified95.7%
if -2.5e207 < a < 9.1999999999999998e164Initial program 92.8%
associate-+l+92.8%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in z around 0 98.5%
if 9.1999999999999998e164 < a Initial program 78.8%
associate-+l+78.8%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in z around 0 79.2%
Taylor expanded in y around 0 89.5%
+-commutative89.5%
distribute-lft-in96.7%
+-commutative96.7%
Simplified96.7%
Final simplification98.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.16e+35) (not (<= b 6.2e+100))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.16e+35) || !(b <= 6.2e+100)) {
tmp = x + (a * (t + (z * 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 ((b <= (-1.16d+35)) .or. (.not. (b <= 6.2d+100))) then
tmp = x + (a * (t + (z * 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 ((b <= -1.16e+35) || !(b <= 6.2e+100)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.16e+35) or not (b <= 6.2e+100): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.16e+35) || !(b <= 6.2e+100)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * 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 ((b <= -1.16e+35) || ~((b <= 6.2e+100))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.16e+35], N[Not[LessEqual[b, 6.2e+100]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * 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}\;b \leq -1.16 \cdot 10^{+35} \lor \neg \left(b \leq 6.2 \cdot 10^{+100}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if b < -1.1600000000000001e35Initial program 91.2%
associate-+l+91.2%
+-commutative91.2%
fma-define91.2%
associate-*l*83.4%
*-commutative83.4%
*-commutative83.4%
distribute-rgt-out85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 83.6%
if -1.1600000000000001e35 < b < 6.20000000000000014e100Initial program 87.8%
associate-+l+87.8%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in b around 0 93.9%
if 6.20000000000000014e100 < b Initial program 83.7%
associate-+l+83.7%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around 0 76.2%
Taylor expanded in y around 0 73.5%
+-commutative73.5%
distribute-lft-in87.0%
+-commutative87.0%
Simplified87.0%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.65e+32) (not (<= b 7e+100))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.65e+32) || !(b <= 7e+100)) {
tmp = x + (a * (t + (z * 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 ((b <= (-1.65d+32)) .or. (.not. (b <= 7d+100))) then
tmp = x + (a * (t + (z * 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 ((b <= -1.65e+32) || !(b <= 7e+100)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.65e+32) or not (b <= 7e+100): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.65e+32) || !(b <= 7e+100)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * 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 ((b <= -1.65e+32) || ~((b <= 7e+100))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.65e+32], N[Not[LessEqual[b, 7e+100]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * 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}\;b \leq -1.65 \cdot 10^{+32} \lor \neg \left(b \leq 7 \cdot 10^{+100}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if b < -1.6500000000000001e32 or 6.99999999999999953e100 < b Initial program 88.3%
associate-+l+88.3%
+-commutative88.3%
fma-define88.3%
associate-*l*79.5%
*-commutative79.5%
*-commutative79.5%
distribute-rgt-out84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in y around 0 84.9%
if -1.6500000000000001e32 < b < 6.99999999999999953e100Initial program 87.8%
associate-+l+87.8%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in b around 0 93.9%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.65e-129) (not (<= a 5.8e-61))) (+ x (* a (+ t (* z b)))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.65e-129) || !(a <= 5.8e-61)) {
tmp = x + (a * (t + (z * b)));
} 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 ((a <= (-2.65d-129)) .or. (.not. (a <= 5.8d-61))) then
tmp = x + (a * (t + (z * b)))
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 ((a <= -2.65e-129) || !(a <= 5.8e-61)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.65e-129) or not (a <= 5.8e-61): tmp = x + (a * (t + (z * b))) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.65e-129) || !(a <= 5.8e-61)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); 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 ((a <= -2.65e-129) || ~((a <= 5.8e-61))) tmp = x + (a * (t + (z * b))); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.65e-129], N[Not[LessEqual[a, 5.8e-61]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{-129} \lor \neg \left(a \leq 5.8 \cdot 10^{-61}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -2.64999999999999987e-129 or 5.7999999999999999e-61 < a Initial program 82.4%
associate-+l+82.4%
+-commutative82.4%
fma-define82.4%
associate-*l*88.6%
*-commutative88.6%
*-commutative88.6%
distribute-rgt-out92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in y around 0 83.6%
if -2.64999999999999987e-129 < a < 5.7999999999999999e-61Initial program 99.9%
associate-+l+99.9%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in z around 0 99.9%
Taylor expanded in a around 0 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification83.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.6e+60) (+ x (* z (+ y (* a b)))) (if (<= b 9.2e+101) (+ x (+ (* t a) (* y z))) (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e+60) {
tmp = x + (z * (y + (a * b)));
} else if (b <= 9.2e+101) {
tmp = x + ((t * a) + (y * z));
} 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 <= (-3.6d+60)) then
tmp = x + (z * (y + (a * b)))
else if (b <= 9.2d+101) then
tmp = x + ((t * a) + (y * z))
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 <= -3.6e+60) {
tmp = x + (z * (y + (a * b)));
} else if (b <= 9.2e+101) {
tmp = x + ((t * a) + (y * z));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.6e+60: tmp = x + (z * (y + (a * b))) elif b <= 9.2e+101: tmp = x + ((t * a) + (y * z)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.6e+60) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); elseif (b <= 9.2e+101) tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); 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 <= -3.6e+60) tmp = x + (z * (y + (a * b))); elseif (b <= 9.2e+101) tmp = x + ((t * a) + (y * z)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e+60], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e+101], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $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 -3.6 \cdot 10^{+60}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+101}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if b < -3.59999999999999968e60Initial program 90.2%
associate-+l+90.2%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in t around 0 70.5%
+-commutative70.5%
+-commutative70.5%
associate-*r*79.3%
distribute-rgt-in87.0%
Simplified87.0%
if -3.59999999999999968e60 < b < 9.2000000000000005e101Initial program 88.3%
associate-+l+88.3%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in b around 0 94.1%
if 9.2000000000000005e101 < b Initial program 83.7%
associate-+l+83.7%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around 0 76.2%
Taylor expanded in y around 0 73.5%
+-commutative73.5%
distribute-lft-in87.0%
+-commutative87.0%
Simplified87.0%
Final simplification91.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.7e+71) (not (<= a 1.05e+29))) (* a (+ t (* z b))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.7e+71) || !(a <= 1.05e+29)) {
tmp = a * (t + (z * b));
} 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 ((a <= (-3.7d+71)) .or. (.not. (a <= 1.05d+29))) then
tmp = a * (t + (z * b))
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 ((a <= -3.7e+71) || !(a <= 1.05e+29)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.7e+71) or not (a <= 1.05e+29): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.7e+71) || !(a <= 1.05e+29)) tmp = Float64(a * Float64(t + Float64(z * b))); 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 ((a <= -3.7e+71) || ~((a <= 1.05e+29))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.7e+71], N[Not[LessEqual[a, 1.05e+29]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+71} \lor \neg \left(a \leq 1.05 \cdot 10^{+29}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -3.7e71 or 1.0500000000000001e29 < a Initial program 75.1%
associate-+l+75.1%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in a around inf 79.1%
if -3.7e71 < a < 1.0500000000000001e29Initial program 98.5%
associate-+l+98.5%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in a around 0 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification75.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3700.0) (not (<= t 2.5e-31))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3700.0) || !(t <= 2.5e-31)) {
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 ((t <= (-3700.0d0)) .or. (.not. (t <= 2.5d-31))) 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 ((t <= -3700.0) || !(t <= 2.5e-31)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3700.0) or not (t <= 2.5e-31): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3700.0) || !(t <= 2.5e-31)) 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 ((t <= -3700.0) || ~((t <= 2.5e-31))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3700.0], N[Not[LessEqual[t, 2.5e-31]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3700 \lor \neg \left(t \leq 2.5 \cdot 10^{-31}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -3700 or 2.5e-31 < t Initial program 87.9%
associate-+l+87.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in t around inf 51.8%
if -3700 < t < 2.5e-31Initial program 88.1%
associate-+l+88.1%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in x around inf 37.1%
Final simplification44.7%
(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 88.0%
associate-+l+88.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in x around inf 24.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 2024103
(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)))