
(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 14 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 (if (<= (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) INFINITY) (+ c (- (+ (* x y) (* z (* t 0.0625))) (* a (/ b 4.0)))) (+ c (* (* z t) 0.0625))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= ((double) INFINITY)) {
tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0)));
} else {
tmp = c + ((z * t) * 0.0625);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= Double.POSITIVE_INFINITY) {
tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0)));
} else {
tmp = c + ((z * t) * 0.0625);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= math.inf: tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0))) else: tmp = c + ((z * t) * 0.0625) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) <= Inf) tmp = Float64(c + Float64(Float64(Float64(x * y) + Float64(z * Float64(t * 0.0625))) - Float64(a * Float64(b / 4.0)))); else tmp = Float64(c + Float64(Float64(z * t) * 0.0625)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) <= Inf) tmp = c + (((x * y) + (z * (t * 0.0625))) - (a * (b / 4.0))); else tmp = c + ((z * t) * 0.0625); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4} \leq \infty:\\
\;\;\;\;c + \left(\left(x \cdot y + z \cdot \left(t \cdot 0.0625\right)\right) - a \cdot \frac{b}{4}\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 99.6%
associate-+l-99.6%
+-commutative99.6%
*-commutative99.6%
+-commutative99.6%
associate-+l-99.6%
fma-define99.6%
*-commutative99.6%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
fma-undefine100.0%
associate-*r/99.6%
+-commutative99.6%
associate-*r/100.0%
div-inv100.0%
metadata-eval100.0%
Applied egg-rr100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
Taylor expanded in a around 0 20.0%
Taylor expanded in x around 0 80.0%
Final simplification99.6%
(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 97.7%
associate--l+97.7%
fma-define98.9%
associate-/l*99.2%
fmm-def99.2%
distribute-neg-frac299.2%
metadata-eval99.2%
Simplified99.2%
(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 97.7%
associate-+l-97.7%
+-commutative97.7%
*-commutative97.7%
+-commutative97.7%
associate-+l-97.7%
fma-define98.9%
*-commutative98.9%
associate-/l*99.2%
associate-/l*99.2%
Simplified99.2%
Final simplification99.2%
(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 (* (* z t) 0.0625)))))
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 + ((z * t) * 0.0625);
}
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 + ((z * t) * 0.0625);
}
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 + ((z * t) * 0.0625) 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(Float64(z * t) * 0.0625)); 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 + ((z * t) * 0.0625); 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[(N[(z * t), $MachinePrecision] * 0.0625), $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 + \left(z \cdot t\right) \cdot 0.0625\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) < +inf.0Initial program 99.6%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) #s(literal 16 binary64))) (/.f64 (*.f64 a b) #s(literal 4 binary64))) Initial program 0.0%
Taylor expanded in a around 0 20.0%
Taylor expanded in x around 0 80.0%
Final simplification99.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (* a -0.25))))
(if (<= (* x y) -5.1e+85)
(* x y)
(if (<= (* x y) -1.1e-252)
t_1
(if (<= (* x y) 1e-255) c (if (<= (* x y) 1.18e+106) t_1 (* 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 tmp;
if ((x * y) <= -5.1e+85) {
tmp = x * y;
} else if ((x * y) <= -1.1e-252) {
tmp = t_1;
} else if ((x * y) <= 1e-255) {
tmp = c;
} else if ((x * y) <= 1.18e+106) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = b * (a * (-0.25d0))
if ((x * y) <= (-5.1d+85)) then
tmp = x * y
else if ((x * y) <= (-1.1d-252)) then
tmp = t_1
else if ((x * y) <= 1d-255) then
tmp = c
else if ((x * y) <= 1.18d+106) then
tmp = t_1
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 t_1 = b * (a * -0.25);
double tmp;
if ((x * y) <= -5.1e+85) {
tmp = x * y;
} else if ((x * y) <= -1.1e-252) {
tmp = t_1;
} else if ((x * y) <= 1e-255) {
tmp = c;
} else if ((x * y) <= 1.18e+106) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b * (a * -0.25) tmp = 0 if (x * y) <= -5.1e+85: tmp = x * y elif (x * y) <= -1.1e-252: tmp = t_1 elif (x * y) <= 1e-255: tmp = c elif (x * y) <= 1.18e+106: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(a * -0.25)) tmp = 0.0 if (Float64(x * y) <= -5.1e+85) tmp = Float64(x * y); elseif (Float64(x * y) <= -1.1e-252) tmp = t_1; elseif (Float64(x * y) <= 1e-255) tmp = c; elseif (Float64(x * y) <= 1.18e+106) tmp = t_1; else tmp = Float64(x * y); 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 ((x * y) <= -5.1e+85) tmp = x * y; elseif ((x * y) <= -1.1e-252) tmp = t_1; elseif ((x * y) <= 1e-255) tmp = c; elseif ((x * y) <= 1.18e+106) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5.1e+85], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.1e-252], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-255], c, If[LessEqual[N[(x * y), $MachinePrecision], 1.18e+106], t$95$1, N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -5.1 \cdot 10^{+85}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq -1.1 \cdot 10^{-252}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-255}:\\
\;\;\;\;c\\
\mathbf{elif}\;x \cdot y \leq 1.18 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -5.0999999999999998e85 or 1.17999999999999993e106 < (*.f64 x y) Initial program 93.6%
Taylor expanded in a around 0 83.7%
Taylor expanded in t around 0 68.6%
+-commutative68.6%
Simplified68.6%
Taylor expanded in x around inf 64.2%
if -5.0999999999999998e85 < (*.f64 x y) < -1.09999999999999995e-252 or 1e-255 < (*.f64 x y) < 1.17999999999999993e106Initial program 100.0%
Taylor expanded in x around 0 93.4%
Taylor expanded in t around 0 61.9%
Taylor expanded in c around 0 40.3%
metadata-eval40.3%
distribute-lft-neg-in40.3%
associate-*r*40.3%
*-commutative40.3%
distribute-rgt-neg-in40.3%
distribute-lft-neg-in40.3%
metadata-eval40.3%
Simplified40.3%
if -1.09999999999999995e-252 < (*.f64 x y) < 1e-255Initial program 97.7%
Taylor expanded in c around inf 46.0%
Final simplification48.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)) (t_2 (* (* z t) 0.0625)))
(if (<= (* a b) -5e+110)
(- (* t (* z 0.0625)) t_1)
(if (<= (* a b) 1e+19) (+ c (+ (* x y) t_2)) (- (+ c t_2) 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 t_2 = (z * t) * 0.0625;
double tmp;
if ((a * b) <= -5e+110) {
tmp = (t * (z * 0.0625)) - t_1;
} else if ((a * b) <= 1e+19) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + t_2) - 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) :: t_2
real(8) :: tmp
t_1 = (a * b) * 0.25d0
t_2 = (z * t) * 0.0625d0
if ((a * b) <= (-5d+110)) then
tmp = (t * (z * 0.0625d0)) - t_1
else if ((a * b) <= 1d+19) then
tmp = c + ((x * y) + t_2)
else
tmp = (c + t_2) - 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 t_2 = (z * t) * 0.0625;
double tmp;
if ((a * b) <= -5e+110) {
tmp = (t * (z * 0.0625)) - t_1;
} else if ((a * b) <= 1e+19) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (c + t_2) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = (z * t) * 0.0625 tmp = 0 if (a * b) <= -5e+110: tmp = (t * (z * 0.0625)) - t_1 elif (a * b) <= 1e+19: tmp = c + ((x * y) + t_2) else: tmp = (c + t_2) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(Float64(z * t) * 0.0625) tmp = 0.0 if (Float64(a * b) <= -5e+110) tmp = Float64(Float64(t * Float64(z * 0.0625)) - t_1); elseif (Float64(a * b) <= 1e+19) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(Float64(c + t_2) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; t_2 = (z * t) * 0.0625; tmp = 0.0; if ((a * b) <= -5e+110) tmp = (t * (z * 0.0625)) - t_1; elseif ((a * b) <= 1e+19) tmp = c + ((x * y) + t_2); else tmp = (c + t_2) - 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]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -5e+110], N[(N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+19], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(c + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := \left(z \cdot t\right) \cdot 0.0625\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+110}:\\
\;\;\;\;t \cdot \left(z \cdot 0.0625\right) - t\_1\\
\mathbf{elif}\;a \cdot b \leq 10^{+19}:\\
\;\;\;\;c + \left(x \cdot y + t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + t\_2\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999978e110Initial program 97.9%
Taylor expanded in x around 0 92.9%
Taylor expanded in t around inf 87.7%
Taylor expanded in z around inf 94.7%
if -4.99999999999999978e110 < (*.f64 a b) < 1e19Initial program 98.6%
Taylor expanded in a around 0 94.7%
if 1e19 < (*.f64 a b) Initial program 95.5%
Taylor expanded in x around 0 88.8%
Final simplification93.1%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -5e+110) (not (<= (* a b) 5e+114))) (- (* t (* z 0.0625)) (* (* a b) 0.25)) (+ c (+ (* x y) (* (* z t) 0.0625)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -5e+110) || !((a * b) <= 5e+114)) {
tmp = (t * (z * 0.0625)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + ((z * t) * 0.0625));
}
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+110)) .or. (.not. ((a * b) <= 5d+114))) then
tmp = (t * (z * 0.0625d0)) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + ((z * t) * 0.0625d0))
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+110) || !((a * b) <= 5e+114)) {
tmp = (t * (z * 0.0625)) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + ((z * t) * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -5e+110) or not ((a * b) <= 5e+114): tmp = (t * (z * 0.0625)) - ((a * b) * 0.25) else: tmp = c + ((x * y) + ((z * t) * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -5e+110) || !(Float64(a * b) <= 5e+114)) tmp = Float64(Float64(t * Float64(z * 0.0625)) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(Float64(z * t) * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -5e+110) || ~(((a * b) <= 5e+114))) tmp = (t * (z * 0.0625)) - ((a * b) * 0.25); else tmp = c + ((x * y) + ((z * t) * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -5e+110], N[Not[LessEqual[N[(a * b), $MachinePrecision], 5e+114]], $MachinePrecision]], N[(N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+110} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+114}\right):\\
\;\;\;\;t \cdot \left(z \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999978e110 or 5.0000000000000001e114 < (*.f64 a b) Initial program 95.6%
Taylor expanded in x around 0 92.3%
Taylor expanded in t around inf 85.5%
Taylor expanded in z around inf 89.4%
if -4.99999999999999978e110 < (*.f64 a b) < 5.0000000000000001e114Initial program 98.8%
Taylor expanded in a around 0 92.5%
Final simplification91.4%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -5e+110)
(+ c (* a (* b -0.25)))
(if (<= (* a b) 5e+114)
(+ c (+ (* x y) (* (* z t) 0.0625)))
(* a (- (/ c a) (* b 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -5e+110) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 5e+114) {
tmp = c + ((x * y) + ((z * t) * 0.0625));
} else {
tmp = a * ((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 ((a * b) <= (-5d+110)) then
tmp = c + (a * (b * (-0.25d0)))
else if ((a * b) <= 5d+114) then
tmp = c + ((x * y) + ((z * t) * 0.0625d0))
else
tmp = a * ((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 ((a * b) <= -5e+110) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 5e+114) {
tmp = c + ((x * y) + ((z * t) * 0.0625));
} else {
tmp = a * ((c / a) - (b * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -5e+110: tmp = c + (a * (b * -0.25)) elif (a * b) <= 5e+114: tmp = c + ((x * y) + ((z * t) * 0.0625)) else: tmp = a * ((c / a) - (b * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -5e+110) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (Float64(a * b) <= 5e+114) tmp = Float64(c + Float64(Float64(x * y) + Float64(Float64(z * t) * 0.0625))); else tmp = Float64(a * Float64(Float64(c / a) - Float64(b * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -5e+110) tmp = c + (a * (b * -0.25)); elseif ((a * b) <= 5e+114) tmp = c + ((x * y) + ((z * t) * 0.0625)); else tmp = a * ((c / a) - (b * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e+110], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+114], N[(c + N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(c / a), $MachinePrecision] - N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+110}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+114}:\\
\;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{c}{a} - b \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999978e110Initial program 97.9%
associate--l+97.9%
fma-define97.9%
associate-/l*100.0%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
if -4.99999999999999978e110 < (*.f64 a b) < 5.0000000000000001e114Initial program 98.8%
Taylor expanded in a around 0 92.5%
if 5.0000000000000001e114 < (*.f64 a b) Initial program 93.6%
Taylor expanded in x around 0 91.7%
Taylor expanded in t around 0 73.2%
Taylor expanded in a around inf 75.2%
Final simplification87.2%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -5e+110)
(+ c (* a (* b -0.25)))
(if (<= (* a b) 2e+99)
(+ c (* (* z t) 0.0625))
(* a (- (/ c a) (* b 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -5e+110) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 2e+99) {
tmp = c + ((z * t) * 0.0625);
} else {
tmp = a * ((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 ((a * b) <= (-5d+110)) then
tmp = c + (a * (b * (-0.25d0)))
else if ((a * b) <= 2d+99) then
tmp = c + ((z * t) * 0.0625d0)
else
tmp = a * ((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 ((a * b) <= -5e+110) {
tmp = c + (a * (b * -0.25));
} else if ((a * b) <= 2e+99) {
tmp = c + ((z * t) * 0.0625);
} else {
tmp = a * ((c / a) - (b * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -5e+110: tmp = c + (a * (b * -0.25)) elif (a * b) <= 2e+99: tmp = c + ((z * t) * 0.0625) else: tmp = a * ((c / a) - (b * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -5e+110) tmp = Float64(c + Float64(a * Float64(b * -0.25))); elseif (Float64(a * b) <= 2e+99) tmp = Float64(c + Float64(Float64(z * t) * 0.0625)); else tmp = Float64(a * Float64(Float64(c / a) - Float64(b * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -5e+110) tmp = c + (a * (b * -0.25)); elseif ((a * b) <= 2e+99) tmp = c + ((z * t) * 0.0625); else tmp = a * ((c / a) - (b * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e+110], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2e+99], N[(c + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(c / a), $MachinePrecision] - N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+110}:\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+99}:\\
\;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{c}{a} - b \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999978e110Initial program 97.9%
associate--l+97.9%
fma-define97.9%
associate-/l*100.0%
fmm-def100.0%
distribute-neg-frac2100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
if -4.99999999999999978e110 < (*.f64 a b) < 1.9999999999999999e99Initial program 98.8%
Taylor expanded in a around 0 93.0%
Taylor expanded in x around 0 67.0%
if 1.9999999999999999e99 < (*.f64 a b) Initial program 93.8%
Taylor expanded in x around 0 90.1%
Taylor expanded in t around 0 72.3%
Taylor expanded in a around inf 74.2%
Final simplification70.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -5e+110) (not (<= (* a b) 2e+99))) (+ c (* a (* b -0.25))) (+ c (* (* z t) 0.0625))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -5e+110) || !((a * b) <= 2e+99)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = c + ((z * t) * 0.0625);
}
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+110)) .or. (.not. ((a * b) <= 2d+99))) then
tmp = c + (a * (b * (-0.25d0)))
else
tmp = c + ((z * t) * 0.0625d0)
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+110) || !((a * b) <= 2e+99)) {
tmp = c + (a * (b * -0.25));
} else {
tmp = c + ((z * t) * 0.0625);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -5e+110) or not ((a * b) <= 2e+99): tmp = c + (a * (b * -0.25)) else: tmp = c + ((z * t) * 0.0625) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -5e+110) || !(Float64(a * b) <= 2e+99)) tmp = Float64(c + Float64(a * Float64(b * -0.25))); else tmp = Float64(c + Float64(Float64(z * t) * 0.0625)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -5e+110) || ~(((a * b) <= 2e+99))) tmp = c + (a * (b * -0.25)); else tmp = c + ((z * t) * 0.0625); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -5e+110], N[Not[LessEqual[N[(a * b), $MachinePrecision], 2e+99]], $MachinePrecision]], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+110} \lor \neg \left(a \cdot b \leq 2 \cdot 10^{+99}\right):\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\
\end{array}
\end{array}
if (*.f64 a b) < -4.99999999999999978e110 or 1.9999999999999999e99 < (*.f64 a b) Initial program 95.7%
associate--l+95.7%
fma-define96.8%
associate-/l*97.7%
fmm-def97.7%
distribute-neg-frac297.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in a around inf 75.5%
*-commutative75.5%
associate-*r*75.5%
Simplified75.5%
if -4.99999999999999978e110 < (*.f64 a b) < 1.9999999999999999e99Initial program 98.8%
Taylor expanded in a around 0 93.0%
Taylor expanded in x around 0 67.0%
Final simplification69.9%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1e+82) (not (<= (* x y) 2e+23))) (+ c (* x y)) (+ c (* (* z t) 0.0625))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1e+82) || !((x * y) <= 2e+23)) {
tmp = c + (x * y);
} else {
tmp = c + ((z * t) * 0.0625);
}
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) <= (-1d+82)) .or. (.not. ((x * y) <= 2d+23))) then
tmp = c + (x * y)
else
tmp = c + ((z * t) * 0.0625d0)
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) <= -1e+82) || !((x * y) <= 2e+23)) {
tmp = c + (x * y);
} else {
tmp = c + ((z * t) * 0.0625);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -1e+82) or not ((x * y) <= 2e+23): tmp = c + (x * y) else: tmp = c + ((z * t) * 0.0625) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1e+82) || !(Float64(x * y) <= 2e+23)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(Float64(z * t) * 0.0625)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -1e+82) || ~(((x * y) <= 2e+23))) tmp = c + (x * y); else tmp = c + ((z * t) * 0.0625); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1e+82], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e+23]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+82} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+23}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\
\end{array}
\end{array}
if (*.f64 x y) < -9.9999999999999996e81 or 1.9999999999999998e23 < (*.f64 x y) Initial program 94.5%
Taylor expanded in a around 0 79.5%
Taylor expanded in t around 0 64.9%
+-commutative64.9%
Simplified64.9%
if -9.9999999999999996e81 < (*.f64 x y) < 1.9999999999999998e23Initial program 99.4%
Taylor expanded in a around 0 67.5%
Taylor expanded in x around 0 64.5%
Final simplification64.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -3.1e-10) (not (<= (* x y) 1.6e+24))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -3.1e-10) || !((x * y) <= 1.6e+24)) {
tmp = x * y;
} 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 (((x * y) <= (-3.1d-10)) .or. (.not. ((x * y) <= 1.6d+24))) then
tmp = x * y
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 (((x * y) <= -3.1e-10) || !((x * y) <= 1.6e+24)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -3.1e-10) or not ((x * y) <= 1.6e+24): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -3.1e-10) || !(Float64(x * y) <= 1.6e+24)) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -3.1e-10) || ~(((x * y) <= 1.6e+24))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -3.1e-10], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1.6e+24]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -3.1 \cdot 10^{-10} \lor \neg \left(x \cdot y \leq 1.6 \cdot 10^{+24}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -3.10000000000000015e-10 or 1.5999999999999999e24 < (*.f64 x y) Initial program 95.5%
Taylor expanded in a around 0 74.8%
Taylor expanded in t around 0 57.5%
+-commutative57.5%
Simplified57.5%
Taylor expanded in x around inf 51.7%
if -3.10000000000000015e-10 < (*.f64 x y) < 1.5999999999999999e24Initial program 99.3%
Taylor expanded in c around inf 32.8%
Final simplification40.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= b -4.8e-105) (not (<= b 1.4e+188))) (* 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 <= -4.8e-105) || !(b <= 1.4e+188)) {
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 <= (-4.8d-105)) .or. (.not. (b <= 1.4d+188))) 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 <= -4.8e-105) || !(b <= 1.4e+188)) {
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 <= -4.8e-105) or not (b <= 1.4e+188): 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 <= -4.8e-105) || !(b <= 1.4e+188)) 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 <= -4.8e-105) || ~((b <= 1.4e+188))) 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, -4.8e-105], N[Not[LessEqual[b, 1.4e+188]], $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 -4.8 \cdot 10^{-105} \lor \neg \left(b \leq 1.4 \cdot 10^{+188}\right):\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if b < -4.8000000000000003e-105 or 1.3999999999999999e188 < b Initial program 98.2%
Taylor expanded in x around 0 89.2%
Taylor expanded in t around 0 63.6%
Taylor expanded in c around 0 49.2%
metadata-eval49.2%
distribute-lft-neg-in49.2%
associate-*r*49.2%
*-commutative49.2%
distribute-rgt-neg-in49.2%
distribute-lft-neg-in49.2%
metadata-eval49.2%
Simplified49.2%
if -4.8000000000000003e-105 < b < 1.3999999999999999e188Initial program 97.3%
Taylor expanded in a around 0 83.5%
Taylor expanded in t around 0 55.7%
+-commutative55.7%
Simplified55.7%
Final simplification52.9%
(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 97.7%
Taylor expanded in c around inf 22.4%
herbie shell --seed 2024180
(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))