
(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 13 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 (let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)))) (if (<= t_1 INFINITY) (+ c t_1) (+ c (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = c + t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = c + t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0) tmp = 0 if t_1 <= math.inf: tmp = c + t_1 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(c + t_1); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0); tmp = 0.0; if (t_1 <= Inf) tmp = c + t_1; else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;c + t\_1\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\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 inf 44.9%
Final simplification98.1%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (fma 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 fma(x, y, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 96.5%
associate--l+96.5%
fma-define97.3%
associate-/l*97.3%
fma-neg98.0%
distribute-neg-frac298.0%
metadata-eval98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 96.5%
associate-+l-96.5%
*-commutative96.5%
associate-+l-96.5%
fma-define96.9%
*-commutative96.9%
associate-/l*96.9%
associate-/l*96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* a (* b -0.25))))
(t_2 (* 0.0625 (* z t)))
(t_3 (+ c t_2))
(t_4 (+ (* x y) t_2)))
(if (<= (* x y) -3.2e+135)
t_4
(if (<= (* x y) -2.1e-33)
t_1
(if (<= (* x y) -3.6e-56)
t_3
(if (<= (* x y) 8.2e-178)
t_1
(if (<= (* x y) 1.4e-66)
t_3
(if (<= (* x y) 6.8e+92) t_1 t_4))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (a * (b * -0.25));
double t_2 = 0.0625 * (z * t);
double t_3 = c + t_2;
double t_4 = (x * y) + t_2;
double tmp;
if ((x * y) <= -3.2e+135) {
tmp = t_4;
} else if ((x * y) <= -2.1e-33) {
tmp = t_1;
} else if ((x * y) <= -3.6e-56) {
tmp = t_3;
} else if ((x * y) <= 8.2e-178) {
tmp = t_1;
} else if ((x * y) <= 1.4e-66) {
tmp = t_3;
} else if ((x * y) <= 6.8e+92) {
tmp = t_1;
} else {
tmp = t_4;
}
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) :: t_4
real(8) :: tmp
t_1 = c + (a * (b * (-0.25d0)))
t_2 = 0.0625d0 * (z * t)
t_3 = c + t_2
t_4 = (x * y) + t_2
if ((x * y) <= (-3.2d+135)) then
tmp = t_4
else if ((x * y) <= (-2.1d-33)) then
tmp = t_1
else if ((x * y) <= (-3.6d-56)) then
tmp = t_3
else if ((x * y) <= 8.2d-178) then
tmp = t_1
else if ((x * y) <= 1.4d-66) then
tmp = t_3
else if ((x * y) <= 6.8d+92) then
tmp = t_1
else
tmp = t_4
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 + (a * (b * -0.25));
double t_2 = 0.0625 * (z * t);
double t_3 = c + t_2;
double t_4 = (x * y) + t_2;
double tmp;
if ((x * y) <= -3.2e+135) {
tmp = t_4;
} else if ((x * y) <= -2.1e-33) {
tmp = t_1;
} else if ((x * y) <= -3.6e-56) {
tmp = t_3;
} else if ((x * y) <= 8.2e-178) {
tmp = t_1;
} else if ((x * y) <= 1.4e-66) {
tmp = t_3;
} else if ((x * y) <= 6.8e+92) {
tmp = t_1;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (a * (b * -0.25)) t_2 = 0.0625 * (z * t) t_3 = c + t_2 t_4 = (x * y) + t_2 tmp = 0 if (x * y) <= -3.2e+135: tmp = t_4 elif (x * y) <= -2.1e-33: tmp = t_1 elif (x * y) <= -3.6e-56: tmp = t_3 elif (x * y) <= 8.2e-178: tmp = t_1 elif (x * y) <= 1.4e-66: tmp = t_3 elif (x * y) <= 6.8e+92: tmp = t_1 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(a * Float64(b * -0.25))) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(c + t_2) t_4 = Float64(Float64(x * y) + t_2) tmp = 0.0 if (Float64(x * y) <= -3.2e+135) tmp = t_4; elseif (Float64(x * y) <= -2.1e-33) tmp = t_1; elseif (Float64(x * y) <= -3.6e-56) tmp = t_3; elseif (Float64(x * y) <= 8.2e-178) tmp = t_1; elseif (Float64(x * y) <= 1.4e-66) tmp = t_3; elseif (Float64(x * y) <= 6.8e+92) tmp = t_1; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (a * (b * -0.25)); t_2 = 0.0625 * (z * t); t_3 = c + t_2; t_4 = (x * y) + t_2; tmp = 0.0; if ((x * y) <= -3.2e+135) tmp = t_4; elseif ((x * y) <= -2.1e-33) tmp = t_1; elseif ((x * y) <= -3.6e-56) tmp = t_3; elseif ((x * y) <= 8.2e-178) tmp = t_1; elseif ((x * y) <= 1.4e-66) tmp = t_3; elseif ((x * y) <= 6.8e+92) tmp = t_1; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3.2e+135], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], -2.1e-33], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -3.6e-56], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 8.2e-178], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.4e-66], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 6.8e+92], t$95$1, t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + t\_2\\
t_4 := x \cdot y + t\_2\\
\mathbf{if}\;x \cdot y \leq -3.2 \cdot 10^{+135}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \cdot y \leq -2.1 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -3.6 \cdot 10^{-56}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 8.2 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.4 \cdot 10^{-66}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq 6.8 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (*.f64 x y) < -3.19999999999999975e135 or 6.7999999999999996e92 < (*.f64 x y) Initial program 92.0%
Taylor expanded in a around 0 80.9%
Taylor expanded in c around 0 77.6%
if -3.19999999999999975e135 < (*.f64 x y) < -2.1e-33 or -3.59999999999999978e-56 < (*.f64 x y) < 8.1999999999999998e-178 or 1.4e-66 < (*.f64 x y) < 6.7999999999999996e92Initial program 98.6%
Taylor expanded in a around inf 74.4%
*-commutative74.4%
associate-*r*74.4%
Simplified74.4%
if -2.1e-33 < (*.f64 x y) < -3.59999999999999978e-56 or 8.1999999999999998e-178 < (*.f64 x y) < 1.4e-66Initial program 100.0%
Taylor expanded in z around inf 81.3%
Final simplification76.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* a (* b -0.25))))
(t_2 (+ c (* 0.0625 (* z t))))
(t_3 (+ c (* x y))))
(if (<= (* x y) -2.42e+182)
t_3
(if (<= (* x y) -1.36e-33)
t_1
(if (<= (* x y) -4.9e-54)
t_2
(if (<= (* x y) 8e-183)
t_1
(if (<= (* x y) 2.6e-65)
t_2
(if (<= (* x y) 5.2e+116) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (a * (b * -0.25));
double t_2 = c + (0.0625 * (z * t));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -2.42e+182) {
tmp = t_3;
} else if ((x * y) <= -1.36e-33) {
tmp = t_1;
} else if ((x * y) <= -4.9e-54) {
tmp = t_2;
} else if ((x * y) <= 8e-183) {
tmp = t_1;
} else if ((x * y) <= 2.6e-65) {
tmp = t_2;
} else if ((x * y) <= 5.2e+116) {
tmp = t_1;
} 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 = c + (a * (b * (-0.25d0)))
t_2 = c + (0.0625d0 * (z * t))
t_3 = c + (x * y)
if ((x * y) <= (-2.42d+182)) then
tmp = t_3
else if ((x * y) <= (-1.36d-33)) then
tmp = t_1
else if ((x * y) <= (-4.9d-54)) then
tmp = t_2
else if ((x * y) <= 8d-183) then
tmp = t_1
else if ((x * y) <= 2.6d-65) then
tmp = t_2
else if ((x * y) <= 5.2d+116) then
tmp = t_1
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 = c + (a * (b * -0.25));
double t_2 = c + (0.0625 * (z * t));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -2.42e+182) {
tmp = t_3;
} else if ((x * y) <= -1.36e-33) {
tmp = t_1;
} else if ((x * y) <= -4.9e-54) {
tmp = t_2;
} else if ((x * y) <= 8e-183) {
tmp = t_1;
} else if ((x * y) <= 2.6e-65) {
tmp = t_2;
} else if ((x * y) <= 5.2e+116) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (a * (b * -0.25)) t_2 = c + (0.0625 * (z * t)) t_3 = c + (x * y) tmp = 0 if (x * y) <= -2.42e+182: tmp = t_3 elif (x * y) <= -1.36e-33: tmp = t_1 elif (x * y) <= -4.9e-54: tmp = t_2 elif (x * y) <= 8e-183: tmp = t_1 elif (x * y) <= 2.6e-65: tmp = t_2 elif (x * y) <= 5.2e+116: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(a * Float64(b * -0.25))) t_2 = Float64(c + Float64(0.0625 * Float64(z * t))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -2.42e+182) tmp = t_3; elseif (Float64(x * y) <= -1.36e-33) tmp = t_1; elseif (Float64(x * y) <= -4.9e-54) tmp = t_2; elseif (Float64(x * y) <= 8e-183) tmp = t_1; elseif (Float64(x * y) <= 2.6e-65) tmp = t_2; elseif (Float64(x * y) <= 5.2e+116) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (a * (b * -0.25)); t_2 = c + (0.0625 * (z * t)); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -2.42e+182) tmp = t_3; elseif ((x * y) <= -1.36e-33) tmp = t_1; elseif ((x * y) <= -4.9e-54) tmp = t_2; elseif ((x * y) <= 8e-183) tmp = t_1; elseif ((x * y) <= 2.6e-65) tmp = t_2; elseif ((x * y) <= 5.2e+116) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.42e+182], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -1.36e-33], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4.9e-54], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 8e-183], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.6e-65], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 5.2e+116], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -2.42 \cdot 10^{+182}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -1.36 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -4.9 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 8 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{-65}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 5.2 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -2.42000000000000005e182 or 5.19999999999999973e116 < (*.f64 x y) Initial program 92.1%
Taylor expanded in x around inf 75.7%
if -2.42000000000000005e182 < (*.f64 x y) < -1.36e-33 or -4.90000000000000021e-54 < (*.f64 x y) < 8.00000000000000004e-183 or 2.6000000000000001e-65 < (*.f64 x y) < 5.19999999999999973e116Initial program 98.1%
Taylor expanded in a around inf 71.3%
*-commutative71.3%
associate-*r*71.3%
Simplified71.3%
if -1.36e-33 < (*.f64 x y) < -4.90000000000000021e-54 or 8.00000000000000004e-183 < (*.f64 x y) < 2.6000000000000001e-65Initial program 100.0%
Taylor expanded in z around inf 81.3%
Final simplification73.6%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= (* a b) -2e+114)
(not
(or (<= (* a b) 5e-20)
(and (not (<= (* a b) 0.001)) (<= (* a b) 1e+160)))))
(+ c (- (* x y) (* (* a b) 0.25)))
(+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+114) || !(((a * b) <= 5e-20) || (!((a * b) <= 0.001) && ((a * b) <= 1e+160)))) {
tmp = c + ((x * y) - ((a * b) * 0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
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 * b) <= (-2d+114)) .or. (.not. ((a * b) <= 5d-20) .or. (.not. ((a * b) <= 0.001d0)) .and. ((a * b) <= 1d+160))) then
tmp = c + ((x * y) - ((a * b) * 0.25d0))
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
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 * b) <= -2e+114) || !(((a * b) <= 5e-20) || (!((a * b) <= 0.001) && ((a * b) <= 1e+160)))) {
tmp = c + ((x * y) - ((a * b) * 0.25));
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -2e+114) or not (((a * b) <= 5e-20) or (not ((a * b) <= 0.001) and ((a * b) <= 1e+160))): tmp = c + ((x * y) - ((a * b) * 0.25)) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -2e+114) || !((Float64(a * b) <= 5e-20) || (!(Float64(a * b) <= 0.001) && (Float64(a * b) <= 1e+160)))) tmp = Float64(c + Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25))); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -2e+114) || ~((((a * b) <= 5e-20) || (~(((a * b) <= 0.001)) && ((a * b) <= 1e+160))))) tmp = c + ((x * y) - ((a * b) * 0.25)); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2e+114], N[Not[Or[LessEqual[N[(a * b), $MachinePrecision], 5e-20], And[N[Not[LessEqual[N[(a * b), $MachinePrecision], 0.001]], $MachinePrecision], LessEqual[N[(a * b), $MachinePrecision], 1e+160]]]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+114} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{-20} \lor \neg \left(a \cdot b \leq 0.001\right) \land a \cdot b \leq 10^{+160}\right):\\
\;\;\;\;c + \left(x \cdot y - \left(a \cdot b\right) \cdot 0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -2e114 or 4.9999999999999999e-20 < (*.f64 a b) < 1e-3 or 1.00000000000000001e160 < (*.f64 a b) Initial program 92.6%
Taylor expanded in z around 0 90.9%
if -2e114 < (*.f64 a b) < 4.9999999999999999e-20 or 1e-3 < (*.f64 a b) < 1.00000000000000001e160Initial program 98.8%
Taylor expanded in a around 0 94.8%
Final simplification93.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t)))) (t_2 (+ c (* x y))))
(if (<= (* x y) -2.1e+74)
t_2
(if (<= (* x y) -1.9e-251)
t_1
(if (<= (* x y) -5.5e-284)
(* a (* b -0.25))
(if (<= (* x y) 3.6e+116) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -2.1e+74) {
tmp = t_2;
} else if ((x * y) <= -1.9e-251) {
tmp = t_1;
} else if ((x * y) <= -5.5e-284) {
tmp = a * (b * -0.25);
} else if ((x * y) <= 3.6e+116) {
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 + (0.0625d0 * (z * t))
t_2 = c + (x * y)
if ((x * y) <= (-2.1d+74)) then
tmp = t_2
else if ((x * y) <= (-1.9d-251)) then
tmp = t_1
else if ((x * y) <= (-5.5d-284)) then
tmp = a * (b * (-0.25d0))
else if ((x * y) <= 3.6d+116) 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 + (0.0625 * (z * t));
double t_2 = c + (x * y);
double tmp;
if ((x * y) <= -2.1e+74) {
tmp = t_2;
} else if ((x * y) <= -1.9e-251) {
tmp = t_1;
} else if ((x * y) <= -5.5e-284) {
tmp = a * (b * -0.25);
} else if ((x * y) <= 3.6e+116) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) t_2 = c + (x * y) tmp = 0 if (x * y) <= -2.1e+74: tmp = t_2 elif (x * y) <= -1.9e-251: tmp = t_1 elif (x * y) <= -5.5e-284: tmp = a * (b * -0.25) elif (x * y) <= 3.6e+116: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) t_2 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -2.1e+74) tmp = t_2; elseif (Float64(x * y) <= -1.9e-251) tmp = t_1; elseif (Float64(x * y) <= -5.5e-284) tmp = Float64(a * Float64(b * -0.25)); elseif (Float64(x * y) <= 3.6e+116) 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 + (0.0625 * (z * t)); t_2 = c + (x * y); tmp = 0.0; if ((x * y) <= -2.1e+74) tmp = t_2; elseif ((x * y) <= -1.9e-251) tmp = t_1; elseif ((x * y) <= -5.5e-284) tmp = a * (b * -0.25); elseif ((x * y) <= 3.6e+116) 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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.1e+74], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.9e-251], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5.5e-284], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 3.6e+116], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -2.1 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -1.9 \cdot 10^{-251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{-284}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 3.6 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0999999999999999e74 or 3.59999999999999971e116 < (*.f64 x y) Initial program 92.4%
Taylor expanded in x around inf 70.3%
if -2.0999999999999999e74 < (*.f64 x y) < -1.8999999999999999e-251 or -5.4999999999999995e-284 < (*.f64 x y) < 3.59999999999999971e116Initial program 98.7%
Taylor expanded in z around inf 65.2%
if -1.8999999999999999e-251 < (*.f64 x y) < -5.4999999999999995e-284Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in c around 0 100.0%
Taylor expanded in t around 0 97.5%
*-commutative97.5%
associate-*l*97.5%
*-commutative97.5%
Simplified97.5%
Final simplification67.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)))
(if (or (<= (* x y) -6.5e+75) (not (<= (* x y) 5e+119)))
(+ c (- (* x y) t_1))
(+ c (- (* 0.0625 (* z t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double tmp;
if (((x * y) <= -6.5e+75) || !((x * y) <= 5e+119)) {
tmp = c + ((x * y) - t_1);
} else {
tmp = c + ((0.0625 * (z * t)) - 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 = (a * b) * 0.25d0
if (((x * y) <= (-6.5d+75)) .or. (.not. ((x * y) <= 5d+119))) then
tmp = c + ((x * y) - t_1)
else
tmp = c + ((0.0625d0 * (z * t)) - 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 = (a * b) * 0.25;
double tmp;
if (((x * y) <= -6.5e+75) || !((x * y) <= 5e+119)) {
tmp = c + ((x * y) - t_1);
} else {
tmp = c + ((0.0625 * (z * t)) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 tmp = 0 if ((x * y) <= -6.5e+75) or not ((x * y) <= 5e+119): tmp = c + ((x * y) - t_1) else: tmp = c + ((0.0625 * (z * t)) - t_1) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if ((Float64(x * y) <= -6.5e+75) || !(Float64(x * y) <= 5e+119)) tmp = Float64(c + Float64(Float64(x * y) - t_1)); else tmp = Float64(c + Float64(Float64(0.0625 * Float64(z * t)) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; tmp = 0.0; if (((x * y) <= -6.5e+75) || ~(((x * y) <= 5e+119))) tmp = c + ((x * y) - t_1); else tmp = c + ((0.0625 * (z * t)) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[Or[LessEqual[N[(x * y), $MachinePrecision], -6.5e+75], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+119]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{+75} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+119}\right):\\
\;\;\;\;c + \left(x \cdot y - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(0.0625 \cdot \left(z \cdot t\right) - t\_1\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -6.4999999999999998e75 or 4.9999999999999999e119 < (*.f64 x y) Initial program 92.4%
Taylor expanded in z around 0 84.3%
if -6.4999999999999998e75 < (*.f64 x y) < 4.9999999999999999e119Initial program 98.8%
Taylor expanded in x around 0 95.3%
Final simplification91.3%
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= a -1.6e+178)
(and (not (<= a -2.2e+137))
(or (<= a -1.75e+102) (not (<= a 2.45e+38)))))
(* a (* b -0.25))
(+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -1.6e+178) || (!(a <= -2.2e+137) && ((a <= -1.75e+102) || !(a <= 2.45e+38)))) {
tmp = a * (b * -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 ((a <= (-1.6d+178)) .or. (.not. (a <= (-2.2d+137))) .and. (a <= (-1.75d+102)) .or. (.not. (a <= 2.45d+38))) then
tmp = a * (b * (-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 ((a <= -1.6e+178) || (!(a <= -2.2e+137) && ((a <= -1.75e+102) || !(a <= 2.45e+38)))) {
tmp = a * (b * -0.25);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -1.6e+178) or (not (a <= -2.2e+137) and ((a <= -1.75e+102) or not (a <= 2.45e+38))): tmp = a * (b * -0.25) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -1.6e+178) || (!(a <= -2.2e+137) && ((a <= -1.75e+102) || !(a <= 2.45e+38)))) tmp = Float64(a * Float64(b * -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 ((a <= -1.6e+178) || (~((a <= -2.2e+137)) && ((a <= -1.75e+102) || ~((a <= 2.45e+38))))) tmp = a * (b * -0.25); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -1.6e+178], And[N[Not[LessEqual[a, -2.2e+137]], $MachinePrecision], Or[LessEqual[a, -1.75e+102], N[Not[LessEqual[a, 2.45e+38]], $MachinePrecision]]]], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+178} \lor \neg \left(a \leq -2.2 \cdot 10^{+137}\right) \land \left(a \leq -1.75 \cdot 10^{+102} \lor \neg \left(a \leq 2.45 \cdot 10^{+38}\right)\right):\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if a < -1.6e178 or -2.20000000000000015e137 < a < -1.75000000000000005e102 or 2.45000000000000001e38 < a Initial program 96.9%
Taylor expanded in x around 0 81.7%
Taylor expanded in c around 0 66.3%
Taylor expanded in t around 0 58.6%
*-commutative58.6%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
if -1.6e178 < a < -2.20000000000000015e137 or -1.75000000000000005e102 < a < 2.45000000000000001e38Initial program 96.2%
Taylor expanded in x around inf 62.1%
Final simplification60.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))))
(if (<= a -3.5e+92)
t_1
(if (<= a -2.02e-280)
c
(if (<= a 6.2e-222) (* z (* t 0.0625)) (if (<= a 1.15e-97) c t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (a <= -3.5e+92) {
tmp = t_1;
} else if (a <= -2.02e-280) {
tmp = c;
} else if (a <= 6.2e-222) {
tmp = z * (t * 0.0625);
} else if (a <= 1.15e-97) {
tmp = c;
} 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 = a * (b * (-0.25d0))
if (a <= (-3.5d+92)) then
tmp = t_1
else if (a <= (-2.02d-280)) then
tmp = c
else if (a <= 6.2d-222) then
tmp = z * (t * 0.0625d0)
else if (a <= 1.15d-97) then
tmp = c
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 = a * (b * -0.25);
double tmp;
if (a <= -3.5e+92) {
tmp = t_1;
} else if (a <= -2.02e-280) {
tmp = c;
} else if (a <= 6.2e-222) {
tmp = z * (t * 0.0625);
} else if (a <= 1.15e-97) {
tmp = c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) tmp = 0 if a <= -3.5e+92: tmp = t_1 elif a <= -2.02e-280: tmp = c elif a <= 6.2e-222: tmp = z * (t * 0.0625) elif a <= 1.15e-97: tmp = c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (a <= -3.5e+92) tmp = t_1; elseif (a <= -2.02e-280) tmp = c; elseif (a <= 6.2e-222) tmp = Float64(z * Float64(t * 0.0625)); elseif (a <= 1.15e-97) tmp = c; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a * (b * -0.25); tmp = 0.0; if (a <= -3.5e+92) tmp = t_1; elseif (a <= -2.02e-280) tmp = c; elseif (a <= 6.2e-222) tmp = z * (t * 0.0625); elseif (a <= 1.15e-97) tmp = c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+92], t$95$1, If[LessEqual[a, -2.02e-280], c, If[LessEqual[a, 6.2e-222], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-97], c, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.02 \cdot 10^{-280}:\\
\;\;\;\;c\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-222}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-97}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.49999999999999986e92 or 1.14999999999999997e-97 < a Initial program 95.8%
Taylor expanded in x around 0 73.6%
Taylor expanded in c around 0 58.3%
Taylor expanded in t around 0 47.2%
*-commutative47.2%
associate-*l*47.2%
*-commutative47.2%
Simplified47.2%
if -3.49999999999999986e92 < a < -2.0199999999999999e-280 or 6.19999999999999959e-222 < a < 1.14999999999999997e-97Initial program 97.9%
Taylor expanded in x around inf 62.0%
Taylor expanded in x around 0 38.7%
if -2.0199999999999999e-280 < a < 6.19999999999999959e-222Initial program 94.7%
Taylor expanded in z around inf 64.4%
Taylor expanded in t around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
Simplified43.7%
Final simplification43.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* b -0.25))))
(if (<= b -8e+89)
t_1
(if (<= b 2.1e+150) (+ c (+ (* x y) (* 0.0625 (* z t)))) (+ c t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (b * -0.25);
double tmp;
if (b <= -8e+89) {
tmp = t_1;
} else if (b <= 2.1e+150) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + 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 = a * (b * (-0.25d0))
if (b <= (-8d+89)) then
tmp = t_1
else if (b <= 2.1d+150) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + 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 = a * (b * -0.25);
double tmp;
if (b <= -8e+89) {
tmp = t_1;
} else if (b <= 2.1e+150) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = a * (b * -0.25) tmp = 0 if b <= -8e+89: tmp = t_1 elif b <= 2.1e+150: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (b <= -8e+89) tmp = t_1; elseif (b <= 2.1e+150) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = a * (b * -0.25); tmp = 0.0; if (b <= -8e+89) tmp = t_1; elseif (b <= 2.1e+150) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8e+89], t$95$1, If[LessEqual[b, 2.1e+150], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;b \leq -8 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{+150}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + t\_1\\
\end{array}
\end{array}
if b < -7.99999999999999996e89Initial program 93.5%
Taylor expanded in x around 0 80.7%
Taylor expanded in c around 0 75.3%
Taylor expanded in t around 0 60.7%
*-commutative60.7%
associate-*l*60.7%
*-commutative60.7%
Simplified60.7%
if -7.99999999999999996e89 < b < 2.09999999999999998e150Initial program 98.8%
Taylor expanded in a around 0 84.4%
if 2.09999999999999998e150 < b Initial program 89.5%
Taylor expanded in a around inf 71.3%
*-commutative71.3%
associate-*r*71.3%
Simplified71.3%
Final simplification78.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= a -3.5e+92) (not (<= a 4e-97))) (* a (* b -0.25)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -3.5e+92) || !(a <= 4e-97)) {
tmp = a * (b * -0.25);
} else {
tmp = c;
}
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 <= (-3.5d+92)) .or. (.not. (a <= 4d-97))) then
tmp = a * (b * (-0.25d0))
else
tmp = c
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 <= -3.5e+92) || !(a <= 4e-97)) {
tmp = a * (b * -0.25);
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -3.5e+92) or not (a <= 4e-97): tmp = a * (b * -0.25) else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -3.5e+92) || !(a <= 4e-97)) tmp = Float64(a * Float64(b * -0.25)); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a <= -3.5e+92) || ~((a <= 4e-97))) tmp = a * (b * -0.25); else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -3.5e+92], N[Not[LessEqual[a, 4e-97]], $MachinePrecision]], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+92} \lor \neg \left(a \leq 4 \cdot 10^{-97}\right):\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if a < -3.49999999999999986e92 or 4.00000000000000014e-97 < a Initial program 95.8%
Taylor expanded in x around 0 73.6%
Taylor expanded in c around 0 58.3%
Taylor expanded in t around 0 47.2%
*-commutative47.2%
associate-*l*47.2%
*-commutative47.2%
Simplified47.2%
if -3.49999999999999986e92 < a < 4.00000000000000014e-97Initial program 97.4%
Taylor expanded in x around inf 61.5%
Taylor expanded in x around 0 36.1%
Final simplification42.3%
(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 96.5%
Taylor expanded in x around inf 49.9%
Taylor expanded in x around 0 24.8%
Final simplification24.8%
herbie shell --seed 2024055
(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))