
(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 (+ (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 98.4%
associate--l+98.4%
fma-define99.6%
associate-/l*99.6%
fma-neg100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.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 98.4%
associate-+l-98.4%
*-commutative98.4%
associate-+l-98.4%
fma-define98.8%
*-commutative98.8%
associate-/l*98.8%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* a (* b -0.25)))) (t_2 (+ c (* z (* t 0.0625)))))
(if (<= (* x y) -4.3e+106)
(+ c (* x y))
(if (<= (* x y) -7.6e-147)
t_1
(if (<= (* x y) 5.9e-282)
t_2
(if (<= (* x y) 1.75e-146)
t_1
(if (<= (* x y) 2.5e+18)
t_2
(* b (- (/ (* x y) b) (* a 0.25))))))))))
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 + (z * (t * 0.0625));
double tmp;
if ((x * y) <= -4.3e+106) {
tmp = c + (x * y);
} else if ((x * y) <= -7.6e-147) {
tmp = t_1;
} else if ((x * y) <= 5.9e-282) {
tmp = t_2;
} else if ((x * y) <= 1.75e-146) {
tmp = t_1;
} else if ((x * y) <= 2.5e+18) {
tmp = t_2;
} else {
tmp = b * (((x * y) / 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) :: t_2
real(8) :: tmp
t_1 = c + (a * (b * (-0.25d0)))
t_2 = c + (z * (t * 0.0625d0))
if ((x * y) <= (-4.3d+106)) then
tmp = c + (x * y)
else if ((x * y) <= (-7.6d-147)) then
tmp = t_1
else if ((x * y) <= 5.9d-282) then
tmp = t_2
else if ((x * y) <= 1.75d-146) then
tmp = t_1
else if ((x * y) <= 2.5d+18) then
tmp = t_2
else
tmp = b * (((x * y) / 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 = c + (a * (b * -0.25));
double t_2 = c + (z * (t * 0.0625));
double tmp;
if ((x * y) <= -4.3e+106) {
tmp = c + (x * y);
} else if ((x * y) <= -7.6e-147) {
tmp = t_1;
} else if ((x * y) <= 5.9e-282) {
tmp = t_2;
} else if ((x * y) <= 1.75e-146) {
tmp = t_1;
} else if ((x * y) <= 2.5e+18) {
tmp = t_2;
} else {
tmp = b * (((x * y) / b) - (a * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (a * (b * -0.25)) t_2 = c + (z * (t * 0.0625)) tmp = 0 if (x * y) <= -4.3e+106: tmp = c + (x * y) elif (x * y) <= -7.6e-147: tmp = t_1 elif (x * y) <= 5.9e-282: tmp = t_2 elif (x * y) <= 1.75e-146: tmp = t_1 elif (x * y) <= 2.5e+18: tmp = t_2 else: tmp = b * (((x * y) / b) - (a * 0.25)) 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(z * Float64(t * 0.0625))) tmp = 0.0 if (Float64(x * y) <= -4.3e+106) tmp = Float64(c + Float64(x * y)); elseif (Float64(x * y) <= -7.6e-147) tmp = t_1; elseif (Float64(x * y) <= 5.9e-282) tmp = t_2; elseif (Float64(x * y) <= 1.75e-146) tmp = t_1; elseif (Float64(x * y) <= 2.5e+18) tmp = t_2; else tmp = Float64(b * Float64(Float64(Float64(x * y) / b) - Float64(a * 0.25))); 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 + (z * (t * 0.0625)); tmp = 0.0; if ((x * y) <= -4.3e+106) tmp = c + (x * y); elseif ((x * y) <= -7.6e-147) tmp = t_1; elseif ((x * y) <= 5.9e-282) tmp = t_2; elseif ((x * y) <= 1.75e-146) tmp = t_1; elseif ((x * y) <= 2.5e+18) tmp = t_2; else tmp = b * (((x * y) / b) - (a * 0.25)); 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[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4.3e+106], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -7.6e-147], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5.9e-282], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.75e-146], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.5e+18], t$95$2, N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;x \cdot y \leq -4.3 \cdot 10^{+106}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -7.6 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 5.9 \cdot 10^{-282}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 1.75 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2.5 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -4.3e106Initial program 98.0%
Taylor expanded in x around inf 90.1%
if -4.3e106 < (*.f64 x y) < -7.60000000000000055e-147 or 5.8999999999999997e-282 < (*.f64 x y) < 1.7500000000000001e-146Initial program 98.5%
Taylor expanded in a around inf 79.8%
*-commutative79.8%
associate-*r*79.8%
Simplified79.8%
if -7.60000000000000055e-147 < (*.f64 x y) < 5.8999999999999997e-282 or 1.7500000000000001e-146 < (*.f64 x y) < 2.5e18Initial program 100.0%
Taylor expanded in z around inf 78.9%
*-commutative78.9%
*-commutative78.9%
associate-*r*78.9%
*-commutative78.9%
Simplified78.9%
if 2.5e18 < (*.f64 x y) Initial program 96.4%
Taylor expanded in z around 0 82.8%
Taylor expanded in b around inf 67.8%
Taylor expanded in c around 0 64.1%
Final simplification78.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* a (* b -0.25))))
(t_2 (+ c (* z (* t 0.0625))))
(t_3 (+ c (* x y))))
(if (<= (* x y) -7e+100)
t_3
(if (<= (* x y) -4.2e-147)
t_1
(if (<= (* x y) 1.45e-283)
t_2
(if (<= (* x y) 1.35e-146) t_1 (if (<= (* x y) 4.2e+23) t_2 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 + (z * (t * 0.0625));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -7e+100) {
tmp = t_3;
} else if ((x * y) <= -4.2e-147) {
tmp = t_1;
} else if ((x * y) <= 1.45e-283) {
tmp = t_2;
} else if ((x * y) <= 1.35e-146) {
tmp = t_1;
} else if ((x * y) <= 4.2e+23) {
tmp = t_2;
} 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 + (z * (t * 0.0625d0))
t_3 = c + (x * y)
if ((x * y) <= (-7d+100)) then
tmp = t_3
else if ((x * y) <= (-4.2d-147)) then
tmp = t_1
else if ((x * y) <= 1.45d-283) then
tmp = t_2
else if ((x * y) <= 1.35d-146) then
tmp = t_1
else if ((x * y) <= 4.2d+23) then
tmp = t_2
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 + (z * (t * 0.0625));
double t_3 = c + (x * y);
double tmp;
if ((x * y) <= -7e+100) {
tmp = t_3;
} else if ((x * y) <= -4.2e-147) {
tmp = t_1;
} else if ((x * y) <= 1.45e-283) {
tmp = t_2;
} else if ((x * y) <= 1.35e-146) {
tmp = t_1;
} else if ((x * y) <= 4.2e+23) {
tmp = t_2;
} 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 + (z * (t * 0.0625)) t_3 = c + (x * y) tmp = 0 if (x * y) <= -7e+100: tmp = t_3 elif (x * y) <= -4.2e-147: tmp = t_1 elif (x * y) <= 1.45e-283: tmp = t_2 elif (x * y) <= 1.35e-146: tmp = t_1 elif (x * y) <= 4.2e+23: tmp = t_2 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(z * Float64(t * 0.0625))) t_3 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -7e+100) tmp = t_3; elseif (Float64(x * y) <= -4.2e-147) tmp = t_1; elseif (Float64(x * y) <= 1.45e-283) tmp = t_2; elseif (Float64(x * y) <= 1.35e-146) tmp = t_1; elseif (Float64(x * y) <= 4.2e+23) tmp = t_2; 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 + (z * (t * 0.0625)); t_3 = c + (x * y); tmp = 0.0; if ((x * y) <= -7e+100) tmp = t_3; elseif ((x * y) <= -4.2e-147) tmp = t_1; elseif ((x * y) <= 1.45e-283) tmp = t_2; elseif ((x * y) <= 1.35e-146) tmp = t_1; elseif ((x * y) <= 4.2e+23) tmp = t_2; 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[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -7e+100], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -4.2e-147], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.45e-283], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1.35e-146], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4.2e+23], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\
t_3 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -7 \cdot 10^{+100}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \cdot y \leq -4.2 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 1.45 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq 1.35 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 x y) < -6.99999999999999953e100 or 4.2000000000000003e23 < (*.f64 x y) Initial program 97.1%
Taylor expanded in x around inf 76.7%
if -6.99999999999999953e100 < (*.f64 x y) < -4.2e-147 or 1.44999999999999994e-283 < (*.f64 x y) < 1.34999999999999997e-146Initial program 98.5%
Taylor expanded in a around inf 79.8%
*-commutative79.8%
associate-*r*79.8%
Simplified79.8%
if -4.2e-147 < (*.f64 x y) < 1.44999999999999994e-283 or 1.34999999999999997e-146 < (*.f64 x y) < 4.2000000000000003e23Initial program 100.0%
Taylor expanded in z around inf 78.2%
*-commutative78.2%
*-commutative78.2%
associate-*r*78.2%
*-commutative78.2%
Simplified78.2%
Final simplification78.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* a b) 0.25)))
(if (<= (* x y) -1.05e+90)
(+ c (+ (* x y) t_1))
(if (<= (* x y) 5e+23) (+ c (- t_1 t_2)) (+ c (- (* x y) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((x * y) <= -1.05e+90) {
tmp = c + ((x * y) + t_1);
} else if ((x * y) <= 5e+23) {
tmp = c + (t_1 - t_2);
} else {
tmp = c + ((x * y) - 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 = 0.0625d0 * (z * t)
t_2 = (a * b) * 0.25d0
if ((x * y) <= (-1.05d+90)) then
tmp = c + ((x * y) + t_1)
else if ((x * y) <= 5d+23) then
tmp = c + (t_1 - t_2)
else
tmp = c + ((x * y) - 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 = 0.0625 * (z * t);
double t_2 = (a * b) * 0.25;
double tmp;
if ((x * y) <= -1.05e+90) {
tmp = c + ((x * y) + t_1);
} else if ((x * y) <= 5e+23) {
tmp = c + (t_1 - t_2);
} else {
tmp = c + ((x * y) - t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (a * b) * 0.25 tmp = 0 if (x * y) <= -1.05e+90: tmp = c + ((x * y) + t_1) elif (x * y) <= 5e+23: tmp = c + (t_1 - t_2) else: tmp = c + ((x * y) - t_2) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if (Float64(x * y) <= -1.05e+90) tmp = Float64(c + Float64(Float64(x * y) + t_1)); elseif (Float64(x * y) <= 5e+23) tmp = Float64(c + Float64(t_1 - t_2)); else tmp = Float64(c + Float64(Float64(x * y) - t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (a * b) * 0.25; tmp = 0.0; if ((x * y) <= -1.05e+90) tmp = c + ((x * y) + t_1); elseif ((x * y) <= 5e+23) tmp = c + (t_1 - t_2); else tmp = c + ((x * y) - t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.05e+90], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+23], N[(c + N[(t$95$1 - t$95$2), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;x \cdot y \leq -1.05 \cdot 10^{+90}:\\
\;\;\;\;c + \left(x \cdot y + t\_1\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+23}:\\
\;\;\;\;c + \left(t\_1 - t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y - t\_2\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1.0499999999999999e90Initial program 98.1%
Taylor expanded in a around 0 98.0%
if -1.0499999999999999e90 < (*.f64 x y) < 4.9999999999999999e23Initial program 99.3%
Taylor expanded in x around 0 98.0%
if 4.9999999999999999e23 < (*.f64 x y) Initial program 96.3%
Taylor expanded in z around 0 84.0%
Final simplification95.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -5e+60)
(+ c (- (* x y) (* (* a b) 0.25)))
(if (<= (* a b) 2e+98)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(+ c (* b (- (/ (* x y) b) (* a 0.25)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -5e+60) {
tmp = c + ((x * y) - ((a * b) * 0.25));
} else if ((a * b) <= 2e+98) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (((x * y) / 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 * b) <= (-5d+60)) then
tmp = c + ((x * y) - ((a * b) * 0.25d0))
else if ((a * b) <= 2d+98) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = c + (b * (((x * y) / 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 * b) <= -5e+60) {
tmp = c + ((x * y) - ((a * b) * 0.25));
} else if ((a * b) <= 2e+98) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = c + (b * (((x * y) / b) - (a * 0.25)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -5e+60: tmp = c + ((x * y) - ((a * b) * 0.25)) elif (a * b) <= 2e+98: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = c + (b * (((x * y) / b) - (a * 0.25))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -5e+60) tmp = Float64(c + Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25))); elseif (Float64(a * b) <= 2e+98) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(c + Float64(b * Float64(Float64(Float64(x * y) / 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 * b) <= -5e+60) tmp = c + ((x * y) - ((a * b) * 0.25)); elseif ((a * b) <= 2e+98) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = c + (b * (((x * y) / b) - (a * 0.25))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e+60], N[(c + N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+98], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+60}:\\
\;\;\;\;c + \left(x \cdot y - \left(a \cdot b\right) \cdot 0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+98}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999975e60Initial program 98.1%
Taylor expanded in z around 0 89.3%
if -4.99999999999999975e60 < (*.f64 a b) < 2e98Initial program 99.4%
Taylor expanded in a around 0 95.7%
if 2e98 < (*.f64 a b) Initial program 93.3%
Taylor expanded in z around 0 87.1%
Taylor expanded in b around inf 87.1%
Final simplification93.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -5e+60) (not (<= (* a b) 2e+98))) (+ 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) <= -5e+60) || !((a * b) <= 2e+98)) {
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) <= (-5d+60)) .or. (.not. ((a * b) <= 2d+98))) 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) <= -5e+60) || !((a * b) <= 2e+98)) {
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) <= -5e+60) or not ((a * b) <= 2e+98): 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) <= -5e+60) || !(Float64(a * b) <= 2e+98)) 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) <= -5e+60) || ~(((a * b) <= 2e+98))) 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], -5e+60], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e+98]], $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 -5 \cdot 10^{+60} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{+98}\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) < -4.99999999999999975e60 or 2e98 < (*.f64 a b) Initial program 96.4%
Taylor expanded in z around 0 88.5%
if -4.99999999999999975e60 < (*.f64 a b) < 2e98Initial program 99.4%
Taylor expanded in a around 0 95.7%
Final simplification93.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -5.2e+103) (not (<= (* x y) 3.3e+91))) (+ c (* x y)) (+ c (* a (* b -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -5.2e+103) || !((x * y) <= 3.3e+91)) {
tmp = c + (x * y);
} else {
tmp = c + (a * (b * -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 (((x * y) <= (-5.2d+103)) .or. (.not. ((x * y) <= 3.3d+91))) then
tmp = c + (x * y)
else
tmp = c + (a * (b * (-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 (((x * y) <= -5.2e+103) || !((x * y) <= 3.3e+91)) {
tmp = c + (x * y);
} else {
tmp = c + (a * (b * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -5.2e+103) or not ((x * y) <= 3.3e+91): tmp = c + (x * y) else: tmp = c + (a * (b * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -5.2e+103) || !(Float64(x * y) <= 3.3e+91)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(a * Float64(b * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -5.2e+103) || ~(((x * y) <= 3.3e+91))) tmp = c + (x * y); else tmp = c + (a * (b * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5.2e+103], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.3e+91]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+103} \lor \neg \left(x \cdot y \leq 3.3 \cdot 10^{+91}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -5.2000000000000003e103 or 3.30000000000000017e91 < (*.f64 x y) Initial program 96.7%
Taylor expanded in x around inf 80.7%
if -5.2000000000000003e103 < (*.f64 x y) < 3.30000000000000017e91Initial program 99.4%
Taylor expanded in a around inf 64.6%
*-commutative64.6%
associate-*r*64.6%
Simplified64.6%
Final simplification70.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -1.95e-50)
(+ c (* a (* b -0.25)))
(if (<= b 1.85e+205)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(* b (- (/ (* x y) b) (* a 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.95e-50) {
tmp = c + (a * (b * -0.25));
} else if (b <= 1.85e+205) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((x * y) / 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 <= (-1.95d-50)) then
tmp = c + (a * (b * (-0.25d0)))
else if (b <= 1.85d+205) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = b * (((x * y) / 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 <= -1.95e-50) {
tmp = c + (a * (b * -0.25));
} else if (b <= 1.85e+205) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = b * (((x * y) / b) - (a * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -1.95e-50: tmp = c + (a * (b * -0.25)) elif b <= 1.85e+205: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = b * (((x * y) / b) - (a * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -1.95e-50) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (b <= 1.85e+205) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(b * Float64(Float64(Float64(x * y) / 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 <= -1.95e-50) tmp = c + (a * (b * -0.25)); elseif (b <= 1.85e+205) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = b * (((x * y) / b) - (a * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.95e-50], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.85e+205], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision] - N[(a * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-50}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{+205}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{x \cdot y}{b} - a \cdot 0.25\right)\\
\end{array}
\end{array}
if b < -1.9500000000000001e-50Initial program 97.7%
Taylor expanded in a around inf 51.4%
*-commutative51.4%
associate-*r*51.4%
Simplified51.4%
if -1.9500000000000001e-50 < b < 1.8499999999999999e205Initial program 99.3%
Taylor expanded in a around 0 89.7%
if 1.8499999999999999e205 < b Initial program 95.0%
Taylor expanded in z around 0 85.8%
Taylor expanded in b around inf 85.8%
Taylor expanded in c around 0 81.2%
Final simplification76.0%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* 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 + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
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 + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1.95e-50) (not (<= b 3.2e+189))) (* 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 <= -1.95e-50) || !(b <= 3.2e+189)) {
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 <= (-1.95d-50)) .or. (.not. (b <= 3.2d+189))) 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 <= -1.95e-50) || !(b <= 3.2e+189)) {
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 <= -1.95e-50) or not (b <= 3.2e+189): 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 ((b <= -1.95e-50) || !(b <= 3.2e+189)) tmp = 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 <= -1.95e-50) || ~((b <= 3.2e+189))) 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[b, -1.95e-50], N[Not[LessEqual[b, 3.2e+189]], $MachinePrecision]], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.95 \cdot 10^{-50} \lor \neg \left(b \leq 3.2 \cdot 10^{+189}\right):\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if b < -1.9500000000000001e-50 or 3.2000000000000001e189 < b Initial program 97.3%
Taylor expanded in z around 0 76.9%
Taylor expanded in b around inf 76.9%
Taylor expanded in c around 0 63.8%
Taylor expanded in x around 0 41.7%
if -1.9500000000000001e-50 < b < 3.2000000000000001e189Initial program 99.3%
Taylor expanded in x around inf 63.9%
Final simplification54.3%
(FPCore (x y z t a b c) :precision binary64 (if (<= c -1.35e+73) c (if (<= c 7.6e+87) (* b (* a -0.25)) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= -1.35e+73) {
tmp = c;
} else if (c <= 7.6e+87) {
tmp = b * (a * -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 (c <= (-1.35d+73)) then
tmp = c
else if (c <= 7.6d+87) then
tmp = b * (a * (-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 (c <= -1.35e+73) {
tmp = c;
} else if (c <= 7.6e+87) {
tmp = b * (a * -0.25);
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if c <= -1.35e+73: tmp = c elif c <= 7.6e+87: tmp = b * (a * -0.25) else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= -1.35e+73) tmp = c; elseif (c <= 7.6e+87) tmp = Float64(b * Float64(a * -0.25)); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (c <= -1.35e+73) tmp = c; elseif (c <= 7.6e+87) tmp = b * (a * -0.25); else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.35e+73], c, If[LessEqual[c, 7.6e+87], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], c]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.35 \cdot 10^{+73}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq 7.6 \cdot 10^{+87}:\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if c < -1.35e73 or 7.60000000000000022e87 < c Initial program 100.0%
Taylor expanded in x around inf 76.9%
Taylor expanded in x around 0 52.5%
if -1.35e73 < c < 7.60000000000000022e87Initial program 97.4%
Taylor expanded in z around 0 65.3%
Taylor expanded in b around inf 59.8%
Taylor expanded in c around 0 54.1%
Taylor expanded in x around 0 31.7%
Final simplification40.1%
(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.4%
Taylor expanded in x around inf 53.2%
Taylor expanded in x around 0 25.6%
herbie shell --seed 2024096
(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))