
(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 13 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 -9.6e+130) (not (<= z 2.5e+67))) (+ x (* z (+ y (* a b)))) (+ (+ x (* y z)) (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.6e+130) || !(z <= 2.5e+67)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (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 <= (-9.6d+130)) .or. (.not. (z <= 2.5d+67))) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (y * z)) + ((t * a) + (a * (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 <= -9.6e+130) || !(z <= 2.5e+67)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.6e+130) or not (z <= 2.5e+67): tmp = x + (z * (y + (a * b))) else: tmp = (x + (y * z)) + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.6e+130) || !(z <= 2.5e+67)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.6e+130) || ~((z <= 2.5e+67))) tmp = x + (z * (y + (a * b))); else tmp = (x + (y * z)) + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.6e+130], N[Not[LessEqual[z, 2.5e+67]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+130} \lor \neg \left(z \leq 2.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -9.60000000000000097e130 or 2.49999999999999988e67 < z Initial program 78.7%
associate-+l+78.7%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in t around 0 78.9%
+-commutative78.9%
+-commutative78.9%
associate-*r*89.2%
distribute-rgt-in96.3%
Simplified96.3%
if -9.60000000000000097e130 < z < 2.49999999999999988e67Initial program 97.6%
associate-+l+97.6%
associate-*l*97.7%
Simplified97.7%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b))))
(if (<= t_1 2e+304)
t_1
(* y (+ (* a (+ (/ t y) (* z (/ b y)))) (+ z (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 2e+304) {
tmp = t_1;
} else {
tmp = y * ((a * ((t / y) + (z * (b / y)))) + (z + (x / 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) :: t_1
real(8) :: tmp
t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
if (t_1 <= 2d+304) then
tmp = t_1
else
tmp = y * ((a * ((t / y) + (z * (b / y)))) + (z + (x / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 2e+304) {
tmp = t_1;
} else {
tmp = y * ((a * ((t / y) + (z * (b / y)))) + (z + (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= 2e+304: tmp = t_1 else: tmp = y * ((a * ((t / y) + (z * (b / y)))) + (z + (x / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 2e+304) tmp = t_1; else tmp = Float64(y * Float64(Float64(a * Float64(Float64(t / y) + Float64(z * Float64(b / y)))) + Float64(z + Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= 2e+304) tmp = t_1; else tmp = y * ((a * ((t / y) + (z * (b / y)))) + (z + (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+304], t$95$1, N[(y * N[(N[(a * N[(N[(t / y), $MachinePrecision] + N[(z * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(a \cdot \left(\frac{t}{y} + z \cdot \frac{b}{y}\right) + \left(z + \frac{x}{y}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 1.9999999999999999e304Initial program 97.6%
if 1.9999999999999999e304 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 63.3%
associate-+l+63.3%
associate-*l*76.1%
Simplified76.1%
Taylor expanded in y around inf 76.1%
associate-+r+76.1%
+-commutative76.1%
associate-/l*80.4%
associate-/l*82.6%
distribute-lft-out87.0%
*-commutative87.0%
associate-/l*91.3%
Simplified91.3%
Final simplification96.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))) (if (<= t_1 INFINITY) t_1 (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 97.1%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*33.3%
Simplified33.3%
Taylor expanded in z around inf 80.0%
Final simplification96.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* z a) b)))
(if (<= y -6.6e+25)
(* y z)
(if (<= y -2.2e-172)
t_1
(if (<= y -4.9e-259)
x
(if (<= y 1.6e-289)
t_1
(if (<= y 1.4e-218) x (if (<= y 4200000.0) (* t a) (* y z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double tmp;
if (y <= -6.6e+25) {
tmp = y * z;
} else if (y <= -2.2e-172) {
tmp = t_1;
} else if (y <= -4.9e-259) {
tmp = x;
} else if (y <= 1.6e-289) {
tmp = t_1;
} else if (y <= 1.4e-218) {
tmp = x;
} else if (y <= 4200000.0) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * a) * b
if (y <= (-6.6d+25)) then
tmp = y * z
else if (y <= (-2.2d-172)) then
tmp = t_1
else if (y <= (-4.9d-259)) then
tmp = x
else if (y <= 1.6d-289) then
tmp = t_1
else if (y <= 1.4d-218) then
tmp = x
else if (y <= 4200000.0d0) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double tmp;
if (y <= -6.6e+25) {
tmp = y * z;
} else if (y <= -2.2e-172) {
tmp = t_1;
} else if (y <= -4.9e-259) {
tmp = x;
} else if (y <= 1.6e-289) {
tmp = t_1;
} else if (y <= 1.4e-218) {
tmp = x;
} else if (y <= 4200000.0) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * a) * b tmp = 0 if y <= -6.6e+25: tmp = y * z elif y <= -2.2e-172: tmp = t_1 elif y <= -4.9e-259: tmp = x elif y <= 1.6e-289: tmp = t_1 elif y <= 1.4e-218: tmp = x elif y <= 4200000.0: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * a) * b) tmp = 0.0 if (y <= -6.6e+25) tmp = Float64(y * z); elseif (y <= -2.2e-172) tmp = t_1; elseif (y <= -4.9e-259) tmp = x; elseif (y <= 1.6e-289) tmp = t_1; elseif (y <= 1.4e-218) tmp = x; elseif (y <= 4200000.0) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * a) * b; tmp = 0.0; if (y <= -6.6e+25) tmp = y * z; elseif (y <= -2.2e-172) tmp = t_1; elseif (y <= -4.9e-259) tmp = x; elseif (y <= 1.6e-289) tmp = t_1; elseif (y <= 1.4e-218) tmp = x; elseif (y <= 4200000.0) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, -6.6e+25], N[(y * z), $MachinePrecision], If[LessEqual[y, -2.2e-172], t$95$1, If[LessEqual[y, -4.9e-259], x, If[LessEqual[y, 1.6e-289], t$95$1, If[LessEqual[y, 1.4e-218], x, If[LessEqual[y, 4200000.0], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+25}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{-259}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-218}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4200000:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -6.6000000000000002e25 or 4.2e6 < y Initial program 90.4%
associate-+l+90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in y around inf 53.0%
*-commutative53.0%
Simplified53.0%
if -6.6000000000000002e25 < y < -2.20000000000000009e-172 or -4.90000000000000023e-259 < y < 1.6000000000000001e-289Initial program 95.7%
associate-+l+95.7%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in y around inf 62.0%
associate-+r+62.0%
+-commutative62.0%
associate-/l*60.0%
associate-/l*53.7%
distribute-lft-out53.7%
*-commutative53.7%
associate-/l*53.7%
Simplified53.7%
Taylor expanded in t around 0 50.0%
associate-+r+50.0%
associate-/l*43.7%
*-commutative43.7%
associate-*r/43.7%
Simplified43.7%
Taylor expanded in a around inf 36.7%
*-commutative36.7%
associate-*r*44.6%
*-commutative44.6%
Simplified44.6%
if -2.20000000000000009e-172 < y < -4.90000000000000023e-259 or 1.6000000000000001e-289 < y < 1.40000000000000004e-218Initial program 97.0%
associate-+l+97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in x around inf 63.8%
if 1.40000000000000004e-218 < y < 4.2e6Initial program 85.8%
associate-+l+85.8%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in t around inf 45.1%
Final simplification51.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= a -1.85e+209)
t_1
(if (<= a -1.55e+180)
(* t a)
(if (<= a -4.5e+44)
(* (* z a) b)
(if (<= a 3.8e+117) (+ x (* y z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -1.85e+209) {
tmp = t_1;
} else if (a <= -1.55e+180) {
tmp = t * a;
} else if (a <= -4.5e+44) {
tmp = (z * a) * b;
} else if (a <= 3.8e+117) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (a <= (-1.85d+209)) then
tmp = t_1
else if (a <= (-1.55d+180)) then
tmp = t * a
else if (a <= (-4.5d+44)) then
tmp = (z * a) * b
else if (a <= 3.8d+117) then
tmp = x + (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -1.85e+209) {
tmp = t_1;
} else if (a <= -1.55e+180) {
tmp = t * a;
} else if (a <= -4.5e+44) {
tmp = (z * a) * b;
} else if (a <= 3.8e+117) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if a <= -1.85e+209: tmp = t_1 elif a <= -1.55e+180: tmp = t * a elif a <= -4.5e+44: tmp = (z * a) * b elif a <= 3.8e+117: tmp = x + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (a <= -1.85e+209) tmp = t_1; elseif (a <= -1.55e+180) tmp = Float64(t * a); elseif (a <= -4.5e+44) tmp = Float64(Float64(z * a) * b); elseif (a <= 3.8e+117) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (a <= -1.85e+209) tmp = t_1; elseif (a <= -1.55e+180) tmp = t * a; elseif (a <= -4.5e+44) tmp = (z * a) * b; elseif (a <= 3.8e+117) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85e+209], t$95$1, If[LessEqual[a, -1.55e+180], N[(t * a), $MachinePrecision], If[LessEqual[a, -4.5e+44], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 3.8e+117], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{+180}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -4.5 \cdot 10^{+44}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+117}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.85e209 or 3.8000000000000002e117 < a Initial program 80.8%
associate-+l+80.8%
associate-*l*91.8%
Simplified91.8%
Taylor expanded in y around inf 73.3%
associate-+r+73.3%
+-commutative73.3%
associate-/l*76.5%
associate-/l*78.1%
distribute-lft-out80.0%
*-commutative80.0%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in t around 0 61.4%
associate-+r+61.4%
associate-/l*63.1%
*-commutative63.1%
associate-*r/61.5%
Simplified61.5%
Taylor expanded in a around inf 58.2%
if -1.85e209 < a < -1.54999999999999999e180Initial program 63.6%
associate-+l+63.6%
associate-*l*81.8%
Simplified81.8%
Taylor expanded in t around inf 65.8%
if -1.54999999999999999e180 < a < -4.5e44Initial program 84.9%
associate-+l+84.9%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in y around inf 75.9%
associate-+r+75.9%
+-commutative75.9%
associate-/l*75.8%
associate-/l*75.8%
distribute-lft-out75.8%
*-commutative75.8%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in t around 0 56.9%
associate-+r+56.9%
associate-/l*56.9%
*-commutative56.9%
associate-*r/56.9%
Simplified56.9%
Taylor expanded in a around inf 46.3%
*-commutative46.3%
associate-*r*46.4%
*-commutative46.4%
Simplified46.4%
if -4.5e44 < a < 3.8000000000000002e117Initial program 98.1%
associate-+l+98.1%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in a around 0 73.4%
Final simplification67.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.8e+157) (not (<= z 1.4e+108))) (+ x (* z (+ y (* a b)))) (+ (+ x (* y z)) (* b (* a (+ z (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.8e+157) || !(z <= 1.4e+108)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + (b * (a * (z + (t / 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 <= (-9.8d+157)) .or. (.not. (z <= 1.4d+108))) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (y * z)) + (b * (a * (z + (t / 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 <= -9.8e+157) || !(z <= 1.4e+108)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + (b * (a * (z + (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.8e+157) or not (z <= 1.4e+108): tmp = x + (z * (y + (a * b))) else: tmp = (x + (y * z)) + (b * (a * (z + (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.8e+157) || !(z <= 1.4e+108)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(b * Float64(a * Float64(z + Float64(t / b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.8e+157) || ~((z <= 1.4e+108))) tmp = x + (z * (y + (a * b))); else tmp = (x + (y * z)) + (b * (a * (z + (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.8e+157], N[Not[LessEqual[z, 1.4e+108]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+157} \lor \neg \left(z \leq 1.4 \cdot 10^{+108}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\end{array}
\end{array}
if z < -9.8000000000000003e157 or 1.3999999999999999e108 < z Initial program 78.0%
associate-+l+78.0%
associate-*l*78.2%
Simplified78.2%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
+-commutative81.4%
associate-*r*92.0%
distribute-rgt-in100.0%
Simplified100.0%
if -9.8000000000000003e157 < z < 1.3999999999999999e108Initial program 95.8%
associate-+l+95.8%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in b around inf 89.5%
associate-/l*87.9%
distribute-lft-out88.9%
Simplified88.9%
Final simplification91.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -1.9e+69) (not (<= x 7e-84))) (+ x (* z (+ y (* a b)))) (+ (* (* z a) b) (+ (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -1.9e+69) || !(x <= 7e-84)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((z * a) * b) + ((y * z) + (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 ((x <= (-1.9d+69)) .or. (.not. (x <= 7d-84))) then
tmp = x + (z * (y + (a * b)))
else
tmp = ((z * a) * b) + ((y * z) + (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 ((x <= -1.9e+69) || !(x <= 7e-84)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = ((z * a) * b) + ((y * z) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -1.9e+69) or not (x <= 7e-84): tmp = x + (z * (y + (a * b))) else: tmp = ((z * a) * b) + ((y * z) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -1.9e+69) || !(x <= 7e-84)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(Float64(z * a) * b) + Float64(Float64(y * z) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -1.9e+69) || ~((x <= 7e-84))) tmp = x + (z * (y + (a * b))); else tmp = ((z * a) * b) + ((y * z) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -1.9e+69], N[Not[LessEqual[x, 7e-84]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+69} \lor \neg \left(x \leq 7 \cdot 10^{-84}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b + \left(y \cdot z + t \cdot a\right)\\
\end{array}
\end{array}
if x < -1.90000000000000014e69 or 7.0000000000000002e-84 < x Initial program 89.8%
associate-+l+89.8%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in t around 0 83.1%
+-commutative83.1%
+-commutative83.1%
associate-*r*82.4%
distribute-rgt-in84.9%
Simplified84.9%
if -1.90000000000000014e69 < x < 7.0000000000000002e-84Initial program 92.8%
Taylor expanded in x around 0 85.8%
Final simplification85.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.05e+245) (* (* z a) b) (if (or (<= z -7.6e-9) (not (<= z 1e+66))) (+ x (* y z)) (+ x (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+245) {
tmp = (z * a) * b;
} else if ((z <= -7.6e-9) || !(z <= 1e+66)) {
tmp = x + (y * z);
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.05d+245)) then
tmp = (z * a) * b
else if ((z <= (-7.6d-9)) .or. (.not. (z <= 1d+66))) then
tmp = x + (y * z)
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+245) {
tmp = (z * a) * b;
} else if ((z <= -7.6e-9) || !(z <= 1e+66)) {
tmp = x + (y * z);
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.05e+245: tmp = (z * a) * b elif (z <= -7.6e-9) or not (z <= 1e+66): tmp = x + (y * z) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e+245) tmp = Float64(Float64(z * a) * b); elseif ((z <= -7.6e-9) || !(z <= 1e+66)) tmp = Float64(x + Float64(y * z)); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.05e+245) tmp = (z * a) * b; elseif ((z <= -7.6e-9) || ~((z <= 1e+66))) tmp = x + (y * z); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+245], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[Or[LessEqual[z, -7.6e-9], N[Not[LessEqual[z, 1e+66]], $MachinePrecision]], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+245}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-9} \lor \neg \left(z \leq 10^{+66}\right):\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.04999999999999998e245Initial program 67.1%
associate-+l+67.1%
associate-*l*83.1%
Simplified83.1%
Taylor expanded in y around inf 60.8%
associate-+r+60.8%
+-commutative60.8%
associate-/l*69.2%
associate-/l*69.2%
distribute-lft-out69.2%
*-commutative69.2%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in t around 0 69.2%
associate-+r+69.2%
associate-/l*69.2%
*-commutative69.2%
associate-*r/69.2%
Simplified69.2%
Taylor expanded in a around inf 75.4%
*-commutative75.4%
associate-*r*75.5%
*-commutative75.5%
Simplified75.5%
if -1.04999999999999998e245 < z < -7.60000000000000023e-9 or 9.99999999999999945e65 < z Initial program 85.5%
associate-+l+85.5%
associate-*l*82.0%
Simplified82.0%
Taylor expanded in a around 0 67.7%
if -7.60000000000000023e-9 < z < 9.99999999999999945e65Initial program 97.8%
associate-+l+97.8%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around 0 70.7%
+-commutative70.7%
Simplified70.7%
Final simplification69.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.3e+82) (not (<= a 8.5e+19))) (* a (+ t (* z b))) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e+82) || !(a <= 8.5e+19)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (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.3d+82)) .or. (.not. (a <= 8.5d+19))) then
tmp = a * (t + (z * b))
else
tmp = x + (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.3e+82) || !(a <= 8.5e+19)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.3e+82) or not (a <= 8.5e+19): tmp = a * (t + (z * b)) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.3e+82) || !(a <= 8.5e+19)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + 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.3e+82) || ~((a <= 8.5e+19))) tmp = a * (t + (z * b)); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.3e+82], N[Not[LessEqual[a, 8.5e+19]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+82} \lor \neg \left(a \leq 8.5 \cdot 10^{+19}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if a < -2.29999999999999988e82 or 8.5e19 < a Initial program 82.8%
associate-+l+82.8%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in a around inf 82.2%
if -2.29999999999999988e82 < a < 8.5e19Initial program 97.3%
associate-+l+97.3%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in t around 0 78.5%
+-commutative78.5%
+-commutative78.5%
associate-*r*86.0%
distribute-rgt-in87.3%
Simplified87.3%
Final simplification85.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.5e+36) (* y z) (if (<= y 4.3e-218) x (if (<= y 4200000.0) (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.5e+36) {
tmp = y * z;
} else if (y <= 4.3e-218) {
tmp = x;
} else if (y <= 4200000.0) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-5.5d+36)) then
tmp = y * z
else if (y <= 4.3d-218) then
tmp = x
else if (y <= 4200000.0d0) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.5e+36) {
tmp = y * z;
} else if (y <= 4.3e-218) {
tmp = x;
} else if (y <= 4200000.0) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.5e+36: tmp = y * z elif y <= 4.3e-218: tmp = x elif y <= 4200000.0: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.5e+36) tmp = Float64(y * z); elseif (y <= 4.3e-218) tmp = x; elseif (y <= 4200000.0) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.5e+36) tmp = y * z; elseif (y <= 4.3e-218) tmp = x; elseif (y <= 4200000.0) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.5e+36], N[(y * z), $MachinePrecision], If[LessEqual[y, 4.3e-218], x, If[LessEqual[y, 4200000.0], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+36}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-218}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4200000:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -5.5000000000000002e36 or 4.2e6 < y Initial program 90.0%
associate-+l+90.0%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in y around inf 54.2%
*-commutative54.2%
Simplified54.2%
if -5.5000000000000002e36 < y < 4.3e-218Initial program 96.4%
associate-+l+96.4%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 39.6%
if 4.3e-218 < y < 4.2e6Initial program 85.8%
associate-+l+85.8%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in t around inf 45.1%
Final simplification47.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.85e-7) (not (<= a 2.55e+19))) (* 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 <= -1.85e-7) || !(a <= 2.55e+19)) {
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 <= (-1.85d-7)) .or. (.not. (a <= 2.55d+19))) 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 <= -1.85e-7) || !(a <= 2.55e+19)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.85e-7) or not (a <= 2.55e+19): 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 <= -1.85e-7) || !(a <= 2.55e+19)) 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 <= -1.85e-7) || ~((a <= 2.55e+19))) 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, -1.85e-7], N[Not[LessEqual[a, 2.55e+19]], $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 -1.85 \cdot 10^{-7} \lor \neg \left(a \leq 2.55 \cdot 10^{+19}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -1.85000000000000002e-7 or 2.55e19 < a Initial program 83.0%
associate-+l+83.0%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in a around inf 79.5%
if -1.85000000000000002e-7 < a < 2.55e19Initial program 98.5%
associate-+l+98.5%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in a around 0 79.3%
Final simplification79.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.6e-15) (not (<= a 6.6e-94))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.6e-15) || !(a <= 6.6e-94)) {
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 ((a <= (-1.6d-15)) .or. (.not. (a <= 6.6d-94))) 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 ((a <= -1.6e-15) || !(a <= 6.6e-94)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.6e-15) or not (a <= 6.6e-94): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.6e-15) || !(a <= 6.6e-94)) 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 ((a <= -1.6e-15) || ~((a <= 6.6e-94))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.6e-15], N[Not[LessEqual[a, 6.6e-94]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-15} \lor \neg \left(a \leq 6.6 \cdot 10^{-94}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.6e-15 or 6.6000000000000003e-94 < a Initial program 84.9%
associate-+l+84.9%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in t around inf 36.7%
if -1.6e-15 < a < 6.6000000000000003e-94Initial program 99.1%
associate-+l+99.1%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 41.5%
Final simplification38.9%
(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.4%
associate-+l+91.4%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in x around inf 25.7%
(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 2024092
(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)))