
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (fma t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
function code(x, y, z, t, a, b, c) return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0))))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Initial program 98.0%
associate-+l-98.0%
+-commutative98.0%
associate--l+98.0%
associate-*l/98.0%
*-commutative98.0%
fma-def99.2%
fma-neg99.6%
neg-sub099.6%
associate-+l-99.6%
neg-sub099.6%
+-commutative99.6%
unsub-neg99.6%
*-commutative99.6%
associate-*r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0))))
(if (<= t_1 INFINITY)
(+ c t_1)
(fma (* z 0.0625) t (+ c (* (* b a) -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = fma((z * 0.0625), t, (c + ((b * a) * -0.25)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = fma(Float64(z * 0.0625), t, Float64(c + Float64(Float64(b * a) * -0.25))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(N[(z * 0.0625), $MachinePrecision] * t + N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 0.0625, t, c + \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in x around 0 20.0%
sub-neg20.0%
+-commutative20.0%
associate-+l+20.0%
*-commutative20.0%
associate-*r*20.0%
fma-def80.0%
*-commutative80.0%
distribute-rgt-neg-in80.0%
metadata-eval80.0%
Applied egg-rr80.0%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (* (* b a) -0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = (b * a) * -0.25;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = (b * a) * -0.25;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = (b * a) * -0.25 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(Float64(b * a) * -0.25); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = (b * a) * -0.25; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;c + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in z around 0 60.0%
Taylor expanded in a around inf 80.0%
*-commutative80.0%
Simplified80.0%
Final simplification99.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= (* b a) -2e+45)
t_2
(if (<= (* b a) -2e-86)
t_1
(if (<= (* b a) -5e-174)
(+ c (* t (* z 0.0625)))
(if (<= (* b a) 5e-43)
t_1
(if (<= (* b a) 2e+54) (+ (* 0.0625 (* t z)) (* x y)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -2e+45) {
tmp = t_2;
} else if ((b * a) <= -2e-86) {
tmp = t_1;
} else if ((b * a) <= -5e-174) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 5e-43) {
tmp = t_1;
} else if ((b * a) <= 2e+54) {
tmp = (0.0625 * (t * z)) + (x * y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (b * (a * (-0.25d0)))
if ((b * a) <= (-2d+45)) then
tmp = t_2
else if ((b * a) <= (-2d-86)) then
tmp = t_1
else if ((b * a) <= (-5d-174)) then
tmp = c + (t * (z * 0.0625d0))
else if ((b * a) <= 5d-43) then
tmp = t_1
else if ((b * a) <= 2d+54) then
tmp = (0.0625d0 * (t * z)) + (x * y)
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 c) {
double t_1 = c + (x * y);
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -2e+45) {
tmp = t_2;
} else if ((b * a) <= -2e-86) {
tmp = t_1;
} else if ((b * a) <= -5e-174) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 5e-43) {
tmp = t_1;
} else if ((b * a) <= 2e+54) {
tmp = (0.0625 * (t * z)) + (x * y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (b * (a * -0.25)) tmp = 0 if (b * a) <= -2e+45: tmp = t_2 elif (b * a) <= -2e-86: tmp = t_1 elif (b * a) <= -5e-174: tmp = c + (t * (z * 0.0625)) elif (b * a) <= 5e-43: tmp = t_1 elif (b * a) <= 2e+54: tmp = (0.0625 * (t * z)) + (x * y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(b * a) <= -2e+45) tmp = t_2; elseif (Float64(b * a) <= -2e-86) tmp = t_1; elseif (Float64(b * a) <= -5e-174) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (Float64(b * a) <= 5e-43) tmp = t_1; elseif (Float64(b * a) <= 2e+54) tmp = Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if ((b * a) <= -2e+45) tmp = t_2; elseif ((b * a) <= -2e-86) tmp = t_1; elseif ((b * a) <= -5e-174) tmp = c + (t * (z * 0.0625)); elseif ((b * a) <= 5e-43) tmp = t_1; elseif ((b * a) <= 2e+54) tmp = (0.0625 * (t * z)) + (x * y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -2e+45], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -2e-86], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -5e-174], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e-43], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2e+54], N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -5 \cdot 10^{-174}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+54}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e45 or 2.0000000000000002e54 < (*.f64 a b) Initial program 95.1%
Taylor expanded in a around inf 73.0%
*-commutative73.0%
*-commutative73.0%
associate-*r*73.0%
Simplified73.0%
if -1.9999999999999999e45 < (*.f64 a b) < -2.00000000000000017e-86 or -5.0000000000000002e-174 < (*.f64 a b) < 5.00000000000000019e-43Initial program 100.0%
Taylor expanded in x around inf 69.3%
if -2.00000000000000017e-86 < (*.f64 a b) < -5.0000000000000002e-174Initial program 99.9%
Taylor expanded in z around inf 84.1%
associate-*r*84.1%
*-commutative84.1%
associate-*r*84.1%
Simplified84.1%
if 5.00000000000000019e-43 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in a around 0 96.0%
Taylor expanded in c around 0 83.9%
Final simplification73.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z)))
(t_2 (* (* b a) 0.25))
(t_3 (- (+ c t_1) t_2)))
(if (<= (* b a) -5e+162)
t_3
(if (<= (* b a) -2e+45)
(- (+ c (* x y)) t_2)
(if (<= (* b a) 2e+54) (+ c (+ t_1 (* x y))) t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double t_2 = (b * a) * 0.25;
double t_3 = (c + t_1) - t_2;
double tmp;
if ((b * a) <= -5e+162) {
tmp = t_3;
} else if ((b * a) <= -2e+45) {
tmp = (c + (x * y)) - t_2;
} else if ((b * a) <= 2e+54) {
tmp = c + (t_1 + (x * y));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
t_2 = (b * a) * 0.25d0
t_3 = (c + t_1) - t_2
if ((b * a) <= (-5d+162)) then
tmp = t_3
else if ((b * a) <= (-2d+45)) then
tmp = (c + (x * y)) - t_2
else if ((b * a) <= 2d+54) then
tmp = c + (t_1 + (x * y))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double t_2 = (b * a) * 0.25;
double t_3 = (c + t_1) - t_2;
double tmp;
if ((b * a) <= -5e+162) {
tmp = t_3;
} else if ((b * a) <= -2e+45) {
tmp = (c + (x * y)) - t_2;
} else if ((b * a) <= 2e+54) {
tmp = c + (t_1 + (x * y));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) t_2 = (b * a) * 0.25 t_3 = (c + t_1) - t_2 tmp = 0 if (b * a) <= -5e+162: tmp = t_3 elif (b * a) <= -2e+45: tmp = (c + (x * y)) - t_2 elif (b * a) <= 2e+54: tmp = c + (t_1 + (x * y)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) t_2 = Float64(Float64(b * a) * 0.25) t_3 = Float64(Float64(c + t_1) - t_2) tmp = 0.0 if (Float64(b * a) <= -5e+162) tmp = t_3; elseif (Float64(b * a) <= -2e+45) tmp = Float64(Float64(c + Float64(x * y)) - t_2); elseif (Float64(b * a) <= 2e+54) tmp = Float64(c + Float64(t_1 + Float64(x * y))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); t_2 = (b * a) * 0.25; t_3 = (c + t_1) - t_2; tmp = 0.0; if ((b * a) <= -5e+162) tmp = t_3; elseif ((b * a) <= -2e+45) tmp = (c + (x * y)) - t_2; elseif ((b * a) <= 2e+54) tmp = c + (t_1 + (x * y)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+162], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -2e+45], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+54], N[(c + N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := \left(b \cdot a\right) \cdot 0.25\\
t_3 := \left(c + t_1\right) - t_2\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+162}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{+45}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+54}:\\
\;\;\;\;c + \left(t_1 + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e162 or 2.0000000000000002e54 < (*.f64 a b) Initial program 94.2%
Taylor expanded in x around 0 88.7%
if -4.9999999999999997e162 < (*.f64 a b) < -1.9999999999999999e45Initial program 100.0%
Taylor expanded in z around 0 94.4%
if -1.9999999999999999e45 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in a around 0 95.8%
Final simplification93.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= (* b a) -2e+45)
t_2
(if (<= (* b a) -2e-86)
t_1
(if (<= (* b a) -2e-164)
(+ c (* t (* z 0.0625)))
(if (<= (* b a) 2e+54) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -2e+45) {
tmp = t_2;
} else if ((b * a) <= -2e-86) {
tmp = t_1;
} else if ((b * a) <= -2e-164) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 2e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (b * (a * (-0.25d0)))
if ((b * a) <= (-2d+45)) then
tmp = t_2
else if ((b * a) <= (-2d-86)) then
tmp = t_1
else if ((b * a) <= (-2d-164)) then
tmp = c + (t * (z * 0.0625d0))
else if ((b * a) <= 2d+54) 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 c) {
double t_1 = c + (x * y);
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -2e+45) {
tmp = t_2;
} else if ((b * a) <= -2e-86) {
tmp = t_1;
} else if ((b * a) <= -2e-164) {
tmp = c + (t * (z * 0.0625));
} else if ((b * a) <= 2e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (b * (a * -0.25)) tmp = 0 if (b * a) <= -2e+45: tmp = t_2 elif (b * a) <= -2e-86: tmp = t_1 elif (b * a) <= -2e-164: tmp = c + (t * (z * 0.0625)) elif (b * a) <= 2e+54: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(b * a) <= -2e+45) tmp = t_2; elseif (Float64(b * a) <= -2e-86) tmp = t_1; elseif (Float64(b * a) <= -2e-164) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (Float64(b * a) <= 2e+54) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if ((b * a) <= -2e+45) tmp = t_2; elseif ((b * a) <= -2e-86) tmp = t_1; elseif ((b * a) <= -2e-164) tmp = c + (t * (z * 0.0625)); elseif ((b * a) <= 2e+54) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -2e+45], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -2e-86], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -2e-164], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+54], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{-164}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e45 or 2.0000000000000002e54 < (*.f64 a b) Initial program 95.1%
Taylor expanded in a around inf 73.0%
*-commutative73.0%
*-commutative73.0%
associate-*r*73.0%
Simplified73.0%
if -1.9999999999999999e45 < (*.f64 a b) < -2.00000000000000017e-86 or -1.99999999999999992e-164 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in x around inf 67.5%
if -2.00000000000000017e-86 < (*.f64 a b) < -1.99999999999999992e-164Initial program 99.9%
Taylor expanded in z around inf 82.9%
associate-*r*82.9%
*-commutative82.9%
associate-*r*82.9%
Simplified82.9%
Final simplification70.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25)) (t_2 (* 0.0625 (* t z))))
(if (<= (* b a) -5e+162)
(- t_2 t_1)
(if (or (<= (* b a) -2e+45) (not (<= (* b a) 2e+28)))
(- (+ c (* x y)) t_1)
(+ c (+ t_2 (* x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+162) {
tmp = t_2 - t_1;
} else if (((b * a) <= -2e+45) || !((b * a) <= 2e+28)) {
tmp = (c + (x * y)) - t_1;
} else {
tmp = c + (t_2 + (x * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = 0.0625d0 * (t * z)
if ((b * a) <= (-5d+162)) then
tmp = t_2 - t_1
else if (((b * a) <= (-2d+45)) .or. (.not. ((b * a) <= 2d+28))) then
tmp = (c + (x * y)) - t_1
else
tmp = c + (t_2 + (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 c) {
double t_1 = (b * a) * 0.25;
double t_2 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -5e+162) {
tmp = t_2 - t_1;
} else if (((b * a) <= -2e+45) || !((b * a) <= 2e+28)) {
tmp = (c + (x * y)) - t_1;
} else {
tmp = c + (t_2 + (x * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = 0.0625 * (t * z) tmp = 0 if (b * a) <= -5e+162: tmp = t_2 - t_1 elif ((b * a) <= -2e+45) or not ((b * a) <= 2e+28): tmp = (c + (x * y)) - t_1 else: tmp = c + (t_2 + (x * y)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) t_2 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(b * a) <= -5e+162) tmp = Float64(t_2 - t_1); elseif ((Float64(b * a) <= -2e+45) || !(Float64(b * a) <= 2e+28)) tmp = Float64(Float64(c + Float64(x * y)) - t_1); else tmp = Float64(c + Float64(t_2 + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; t_2 = 0.0625 * (t * z); tmp = 0.0; if ((b * a) <= -5e+162) tmp = t_2 - t_1; elseif (((b * a) <= -2e+45) || ~(((b * a) <= 2e+28))) tmp = (c + (x * y)) - t_1; else tmp = c + (t_2 + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+162], N[(t$95$2 - t$95$1), $MachinePrecision], If[Or[LessEqual[N[(b * a), $MachinePrecision], -2e+45], N[Not[LessEqual[N[(b * a), $MachinePrecision], 2e+28]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(c + N[(t$95$2 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+162}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{+45} \lor \neg \left(b \cdot a \leq 2 \cdot 10^{+28}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;c + \left(t_2 + x \cdot y\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999997e162Initial program 92.9%
Taylor expanded in x around 0 88.2%
Taylor expanded in c around 0 85.7%
if -4.9999999999999997e162 < (*.f64 a b) < -1.9999999999999999e45 or 1.99999999999999992e28 < (*.f64 a b) Initial program 96.9%
Taylor expanded in z around 0 89.9%
if -1.9999999999999999e45 < (*.f64 a b) < 1.99999999999999992e28Initial program 100.0%
Taylor expanded in a around 0 95.6%
Final simplification92.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) -0.25)))
(if (<= (* b a) -9.8e+42)
t_1
(if (<= (* b a) -7.5e-87)
(* x y)
(if (<= (* b a) -4.4e-185) c (if (<= (* b a) 4.6e+55) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -9.8e+42) {
tmp = t_1;
} else if ((b * a) <= -7.5e-87) {
tmp = x * y;
} else if ((b * a) <= -4.4e-185) {
tmp = c;
} else if ((b * a) <= 4.6e+55) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b * a) * (-0.25d0)
if ((b * a) <= (-9.8d+42)) then
tmp = t_1
else if ((b * a) <= (-7.5d-87)) then
tmp = x * y
else if ((b * a) <= (-4.4d-185)) then
tmp = c
else if ((b * a) <= 4.6d+55) then
tmp = x * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -9.8e+42) {
tmp = t_1;
} else if ((b * a) <= -7.5e-87) {
tmp = x * y;
} else if ((b * a) <= -4.4e-185) {
tmp = c;
} else if ((b * a) <= 4.6e+55) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * -0.25 tmp = 0 if (b * a) <= -9.8e+42: tmp = t_1 elif (b * a) <= -7.5e-87: tmp = x * y elif (b * a) <= -4.4e-185: tmp = c elif (b * a) <= 4.6e+55: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -9.8e+42) tmp = t_1; elseif (Float64(b * a) <= -7.5e-87) tmp = Float64(x * y); elseif (Float64(b * a) <= -4.4e-185) tmp = c; elseif (Float64(b * a) <= 4.6e+55) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -9.8e+42) tmp = t_1; elseif ((b * a) <= -7.5e-87) tmp = x * y; elseif ((b * a) <= -4.4e-185) tmp = c; elseif ((b * a) <= 4.6e+55) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -9.8e+42], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -7.5e-87], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -4.4e-185], c, If[LessEqual[N[(b * a), $MachinePrecision], 4.6e+55], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -9.8 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -7.5 \cdot 10^{-87}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq -4.4 \cdot 10^{-185}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq 4.6 \cdot 10^{+55}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -9.8000000000000004e42 or 4.59999999999999975e55 < (*.f64 a b) Initial program 95.1%
Taylor expanded in z around 0 83.7%
Taylor expanded in a around inf 61.3%
*-commutative61.3%
Simplified61.3%
if -9.8000000000000004e42 < (*.f64 a b) < -7.5000000000000002e-87 or -4.4000000000000001e-185 < (*.f64 a b) < 4.59999999999999975e55Initial program 100.0%
Taylor expanded in z around 0 70.3%
Taylor expanded in y around inf 40.8%
if -7.5000000000000002e-87 < (*.f64 a b) < -4.4000000000000001e-185Initial program 99.9%
Taylor expanded in c around inf 42.1%
Final simplification49.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* b a) -2e+45)
(- (* x y) (* (* b a) 0.25))
(if (<= (* b a) 2e+54)
(+ c (+ (* 0.0625 (* t z)) (* x y)))
(+ c (* b (* a -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -2e+45) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 2e+54) {
tmp = c + ((0.0625 * (t * z)) + (x * y));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b * a) <= (-2d+45)) then
tmp = (x * y) - ((b * a) * 0.25d0)
else if ((b * a) <= 2d+54) then
tmp = c + ((0.0625d0 * (t * z)) + (x * y))
else
tmp = c + (b * (a * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -2e+45) {
tmp = (x * y) - ((b * a) * 0.25);
} else if ((b * a) <= 2e+54) {
tmp = c + ((0.0625 * (t * z)) + (x * y));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b * a) <= -2e+45: tmp = (x * y) - ((b * a) * 0.25) elif (b * a) <= 2e+54: tmp = c + ((0.0625 * (t * z)) + (x * y)) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b * a) <= -2e+45) tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 2e+54) tmp = Float64(c + Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y))); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b * a) <= -2e+45) tmp = (x * y) - ((b * a) * 0.25); elseif ((b * a) <= 2e+54) tmp = c + ((0.0625 * (t * z)) + (x * y)); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b * a), $MachinePrecision], -2e+45], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+54], N[(c + N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+45}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+54}:\\
\;\;\;\;c + \left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e45Initial program 94.8%
Taylor expanded in z around 0 81.0%
Taylor expanded in c around 0 72.5%
if -1.9999999999999999e45 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in a around 0 95.8%
if 2.0000000000000002e54 < (*.f64 a b) Initial program 95.5%
Taylor expanded in a around inf 78.6%
*-commutative78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Final simplification87.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))))
(if (<= (* b a) -1e+168)
(- t_1 (* (* b a) 0.25))
(if (<= (* b a) 2e+54) (+ c (+ t_1 (* x y))) (+ c (* b (* a -0.25)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -1e+168) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 2e+54) {
tmp = c + (t_1 + (x * y));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
if ((b * a) <= (-1d+168)) then
tmp = t_1 - ((b * a) * 0.25d0)
else if ((b * a) <= 2d+54) then
tmp = c + (t_1 + (x * y))
else
tmp = c + (b * (a * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((b * a) <= -1e+168) {
tmp = t_1 - ((b * a) * 0.25);
} else if ((b * a) <= 2e+54) {
tmp = c + (t_1 + (x * y));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) tmp = 0 if (b * a) <= -1e+168: tmp = t_1 - ((b * a) * 0.25) elif (b * a) <= 2e+54: tmp = c + (t_1 + (x * y)) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(b * a) <= -1e+168) tmp = Float64(t_1 - Float64(Float64(b * a) * 0.25)); elseif (Float64(b * a) <= 2e+54) tmp = Float64(c + Float64(t_1 + Float64(x * y))); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); tmp = 0.0; if ((b * a) <= -1e+168) tmp = t_1 - ((b * a) * 0.25); elseif ((b * a) <= 2e+54) tmp = c + (t_1 + (x * y)); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+168], N[(t$95$1 - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+54], N[(c + N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+168}:\\
\;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+54}:\\
\;\;\;\;c + \left(t_1 + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999993e167Initial program 92.7%
Taylor expanded in x around 0 88.0%
Taylor expanded in c around 0 85.4%
if -9.9999999999999993e167 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in a around 0 92.7%
if 2.0000000000000002e54 < (*.f64 a b) Initial program 95.5%
Taylor expanded in a around inf 78.6%
*-commutative78.6%
*-commutative78.6%
associate-*r*78.6%
Simplified78.6%
Final simplification89.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -1e+75)
(- (* x y) (* (* b a) 0.25))
(if (<= a -1e-18)
(+ c (* t (* z 0.0625)))
(if (<= a -7.5e-138)
(+ (* 0.0625 (* t z)) (* x y))
(if (<= a 1.9e-68) (+ c (* x y)) (+ c (* b (* a -0.25))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -1e+75) {
tmp = (x * y) - ((b * a) * 0.25);
} else if (a <= -1e-18) {
tmp = c + (t * (z * 0.0625));
} else if (a <= -7.5e-138) {
tmp = (0.0625 * (t * z)) + (x * y);
} else if (a <= 1.9e-68) {
tmp = c + (x * y);
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (a <= (-1d+75)) then
tmp = (x * y) - ((b * a) * 0.25d0)
else if (a <= (-1d-18)) then
tmp = c + (t * (z * 0.0625d0))
else if (a <= (-7.5d-138)) then
tmp = (0.0625d0 * (t * z)) + (x * y)
else if (a <= 1.9d-68) then
tmp = c + (x * y)
else
tmp = c + (b * (a * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -1e+75) {
tmp = (x * y) - ((b * a) * 0.25);
} else if (a <= -1e-18) {
tmp = c + (t * (z * 0.0625));
} else if (a <= -7.5e-138) {
tmp = (0.0625 * (t * z)) + (x * y);
} else if (a <= 1.9e-68) {
tmp = c + (x * y);
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= -1e+75: tmp = (x * y) - ((b * a) * 0.25) elif a <= -1e-18: tmp = c + (t * (z * 0.0625)) elif a <= -7.5e-138: tmp = (0.0625 * (t * z)) + (x * y) elif a <= 1.9e-68: tmp = c + (x * y) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -1e+75) tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); elseif (a <= -1e-18) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); elseif (a <= -7.5e-138) tmp = Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y)); elseif (a <= 1.9e-68) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= -1e+75) tmp = (x * y) - ((b * a) * 0.25); elseif (a <= -1e-18) tmp = c + (t * (z * 0.0625)); elseif (a <= -7.5e-138) tmp = (0.0625 * (t * z)) + (x * y); elseif (a <= 1.9e-68) tmp = c + (x * y); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -1e+75], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1e-18], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.5e-138], N[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-68], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+75}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-18}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-138}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) + x \cdot y\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if a < -9.99999999999999927e74Initial program 94.3%
Taylor expanded in z around 0 74.4%
Taylor expanded in c around 0 69.6%
if -9.99999999999999927e74 < a < -1.0000000000000001e-18Initial program 100.0%
Taylor expanded in z around inf 70.3%
associate-*r*70.3%
*-commutative70.3%
associate-*r*70.3%
Simplified70.3%
if -1.0000000000000001e-18 < a < -7.4999999999999995e-138Initial program 100.0%
Taylor expanded in a around 0 94.2%
Taylor expanded in c around 0 77.1%
if -7.4999999999999995e-138 < a < 1.90000000000000019e-68Initial program 100.0%
Taylor expanded in x around inf 65.6%
if 1.90000000000000019e-68 < a Initial program 96.6%
Taylor expanded in a around inf 66.8%
*-commutative66.8%
*-commutative66.8%
associate-*r*66.8%
Simplified66.8%
Final simplification67.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* b a) -2e+45) (not (<= (* b a) 2e+54))) (+ c (* b (* a -0.25))) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -2e+45) || !((b * a) <= 2e+54)) {
tmp = c + (b * (a * -0.25));
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (((b * a) <= (-2d+45)) .or. (.not. ((b * a) <= 2d+54))) then
tmp = c + (b * (a * (-0.25d0)))
else
tmp = c + (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 c) {
double tmp;
if (((b * a) <= -2e+45) || !((b * a) <= 2e+54)) {
tmp = c + (b * (a * -0.25));
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((b * a) <= -2e+45) or not ((b * a) <= 2e+54): tmp = c + (b * (a * -0.25)) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(b * a) <= -2e+45) || !(Float64(b * a) <= 2e+54)) tmp = Float64(c + Float64(b * Float64(a * -0.25))); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((b * a) <= -2e+45) || ~(((b * a) <= 2e+54))) tmp = c + (b * (a * -0.25)); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(b * a), $MachinePrecision], -2e+45], N[Not[LessEqual[N[(b * a), $MachinePrecision], 2e+54]], $MachinePrecision]], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+45} \lor \neg \left(b \cdot a \leq 2 \cdot 10^{+54}\right):\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999999e45 or 2.0000000000000002e54 < (*.f64 a b) Initial program 95.1%
Taylor expanded in a around inf 73.0%
*-commutative73.0%
*-commutative73.0%
associate-*r*73.0%
Simplified73.0%
if -1.9999999999999999e45 < (*.f64 a b) < 2.0000000000000002e54Initial program 100.0%
Taylor expanded in x around inf 65.1%
Final simplification68.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* t z))))
(if (<= z -1.6e+119)
t_1
(if (<= z -1.2e-99)
(* x y)
(if (<= z -4.4e-304) c (if (<= z 2e-85) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if (z <= -1.6e+119) {
tmp = t_1;
} else if (z <= -1.2e-99) {
tmp = x * y;
} else if (z <= -4.4e-304) {
tmp = c;
} else if (z <= 2e-85) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 0.0625d0 * (t * z)
if (z <= (-1.6d+119)) then
tmp = t_1
else if (z <= (-1.2d-99)) then
tmp = x * y
else if (z <= (-4.4d-304)) then
tmp = c
else if (z <= 2d-85) then
tmp = x * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if (z <= -1.6e+119) {
tmp = t_1;
} else if (z <= -1.2e-99) {
tmp = x * y;
} else if (z <= -4.4e-304) {
tmp = c;
} else if (z <= 2e-85) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (t * z) tmp = 0 if z <= -1.6e+119: tmp = t_1 elif z <= -1.2e-99: tmp = x * y elif z <= -4.4e-304: tmp = c elif z <= 2e-85: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (z <= -1.6e+119) tmp = t_1; elseif (z <= -1.2e-99) tmp = Float64(x * y); elseif (z <= -4.4e-304) tmp = c; elseif (z <= 2e-85) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (t * z); tmp = 0.0; if (z <= -1.6e+119) tmp = t_1; elseif (z <= -1.2e-99) tmp = x * y; elseif (z <= -4.4e-304) tmp = c; elseif (z <= 2e-85) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+119], t$95$1, If[LessEqual[z, -1.2e-99], N[(x * y), $MachinePrecision], If[LessEqual[z, -4.4e-304], c, If[LessEqual[z, 2e-85], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-99}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-304}:\\
\;\;\;\;c\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-85}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.59999999999999995e119 or 2e-85 < z Initial program 95.4%
Taylor expanded in z around inf 62.3%
associate-*r*62.3%
*-commutative62.3%
associate-*r*62.3%
Simplified62.3%
Taylor expanded in t around inf 44.4%
if -1.59999999999999995e119 < z < -1.2e-99 or -4.4e-304 < z < 2e-85Initial program 100.0%
Taylor expanded in z around 0 85.7%
Taylor expanded in y around inf 41.9%
if -1.2e-99 < z < -4.4e-304Initial program 100.0%
Taylor expanded in c around inf 34.3%
Final simplification41.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* b a) -1e+162) (not (<= (* b a) 1.2e+109))) (* (* b a) -0.25) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -1e+162) || !((b * a) <= 1.2e+109)) {
tmp = (b * a) * -0.25;
} else {
tmp = c + (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (((b * a) <= (-1d+162)) .or. (.not. ((b * a) <= 1.2d+109))) then
tmp = (b * a) * (-0.25d0)
else
tmp = c + (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 c) {
double tmp;
if (((b * a) <= -1e+162) || !((b * a) <= 1.2e+109)) {
tmp = (b * a) * -0.25;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((b * a) <= -1e+162) or not ((b * a) <= 1.2e+109): tmp = (b * a) * -0.25 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(b * a) <= -1e+162) || !(Float64(b * a) <= 1.2e+109)) tmp = Float64(Float64(b * a) * -0.25); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((b * a) <= -1e+162) || ~(((b * a) <= 1.2e+109))) tmp = (b * a) * -0.25; else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(b * a), $MachinePrecision], -1e+162], N[Not[LessEqual[N[(b * a), $MachinePrecision], 1.2e+109]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+162} \lor \neg \left(b \cdot a \leq 1.2 \cdot 10^{+109}\right):\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if (*.f64 a b) < -9.9999999999999994e161 or 1.19999999999999994e109 < (*.f64 a b) Initial program 93.6%
Taylor expanded in z around 0 80.9%
Taylor expanded in a around inf 69.2%
*-commutative69.2%
Simplified69.2%
if -9.9999999999999994e161 < (*.f64 a b) < 1.19999999999999994e109Initial program 100.0%
Taylor expanded in x around inf 64.1%
Final simplification65.6%
(FPCore (x y z t a b c) :precision binary64 (if (<= x -1.01e+62) (* x y) (if (<= x 3.4e-124) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.01e+62) {
tmp = x * y;
} else if (x <= 3.4e-124) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (x <= (-1.01d+62)) then
tmp = x * y
else if (x <= 3.4d-124) then
tmp = c
else
tmp = 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 c) {
double tmp;
if (x <= -1.01e+62) {
tmp = x * y;
} else if (x <= 3.4e-124) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.01e+62: tmp = x * y elif x <= 3.4e-124: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.01e+62) tmp = Float64(x * y); elseif (x <= 3.4e-124) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (x <= -1.01e+62) tmp = x * y; elseif (x <= 3.4e-124) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.01e+62], N[(x * y), $MachinePrecision], If[LessEqual[x, 3.4e-124], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.01 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-124}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if x < -1.01e62 or 3.4000000000000001e-124 < x Initial program 98.5%
Taylor expanded in z around 0 82.8%
Taylor expanded in y around inf 44.9%
if -1.01e62 < x < 3.4000000000000001e-124Initial program 97.4%
Taylor expanded in c around inf 28.4%
Final simplification37.4%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 98.0%
Taylor expanded in c around inf 22.7%
Final simplification22.7%
herbie shell --seed 2023257
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))