
(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 (if (<= (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) INFINITY) (+ (fma t (* z 0.0625) (* a (* b -0.25))) (+ c (* x y))) (fma x y (+ c (* 0.0625 (* z t))))))
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 = fma(t, (z * 0.0625), (a * (b * -0.25))) + (c + (x * y));
} else {
tmp = fma(x, y, (c + (0.0625 * (z * t))));
}
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(fma(t, Float64(z * 0.0625), Float64(a * Float64(b * -0.25))) + Float64(c + Float64(x * y))); else tmp = fma(x, y, Float64(c + Float64(0.0625 * Float64(z * t)))); end return 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[(N[(t * N[(z * 0.0625), $MachinePrecision] + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y + N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $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:\\
\;\;\;\;\mathsf{fma}\left(t, z \cdot 0.0625, a \cdot \left(b \cdot -0.25\right)\right) + \left(c + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, c + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
fma-def100.0%
associate-/l*99.9%
sub-neg99.9%
associate-/l*99.9%
Simplified99.9%
associate--r-99.9%
fma-udef99.9%
associate-/l*99.9%
associate-/l*100.0%
associate--l+100.0%
+-commutative100.0%
associate-+l+100.0%
Applied egg-rr100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
associate-+l-0.0%
associate--l+0.0%
fma-def28.6%
associate-*l/28.6%
fma-neg28.6%
neg-sub028.6%
associate-+l-28.6%
neg-sub028.6%
associate-/l*28.6%
distribute-frac-neg28.6%
associate-/r/28.6%
fma-def28.6%
neg-mul-128.6%
*-commutative28.6%
associate-/l*28.6%
metadata-eval28.6%
Simplified28.6%
Taylor expanded in a around 0 85.7%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (fma x y (fma (/ z 16.0) t (fma (/ a -4.0) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, fma((z / 16.0), t, fma((a / -4.0), b, c)));
}
function code(x, y, z, t, a, b, c) return fma(x, y, fma(Float64(z / 16.0), t, fma(Float64(a / -4.0), b, c))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(N[(z / 16.0), $MachinePrecision] * t + N[(N[(a / -4.0), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right)
\end{array}
Initial program 97.2%
associate-+l-97.2%
associate--l+97.2%
fma-def98.0%
associate-*l/98.0%
fma-neg98.0%
neg-sub098.0%
associate-+l-98.0%
neg-sub098.0%
associate-/l*98.0%
distribute-frac-neg98.0%
associate-/r/98.0%
fma-def98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
metadata-eval98.0%
Simplified98.0%
Final simplification98.0%
(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) (fma x y (+ c (* 0.0625 (* z t)))))))
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 = fma(x, y, (c + (0.0625 * (z * t))));
}
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 = fma(x, y, Float64(c + Float64(0.0625 * Float64(z * t)))); end return 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[(x * y + N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $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}:\\
\;\;\;\;\mathsf{fma}\left(x, y, c + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
associate-+l-0.0%
associate--l+0.0%
fma-def28.6%
associate-*l/28.6%
fma-neg28.6%
neg-sub028.6%
associate-+l-28.6%
neg-sub028.6%
associate-/l*28.6%
distribute-frac-neg28.6%
associate-/r/28.6%
fma-def28.6%
neg-mul-128.6%
*-commutative28.6%
associate-/l*28.6%
metadata-eval28.6%
Simplified28.6%
Taylor expanded in a around 0 85.7%
Final simplification99.6%
(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(z * Float64(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[(z * N[(t * 0.0625), $MachinePrecision]), $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 + z \cdot \left(t \cdot 0.0625\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0Initial program 100.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) Initial program 0.0%
Taylor expanded in z around inf 73.5%
associate-*r*73.5%
*-commutative73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Final simplification99.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)) (t_2 (* 0.0625 (* z t))))
(if (<= (* x y) -3.3e+60)
(- (+ c (* x y)) t_1)
(if (<= (* x y) 0.8) (- (+ c t_2) t_1) (+ c (+ (* x y) t_2))))))
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 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -3.3e+60) {
tmp = (c + (x * y)) - t_1;
} else if ((x * y) <= 0.8) {
tmp = (c + t_2) - t_1;
} 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 = (a * b) * 0.25d0
t_2 = 0.0625d0 * (z * t)
if ((x * y) <= (-3.3d+60)) then
tmp = (c + (x * y)) - t_1
else if ((x * y) <= 0.8d0) then
tmp = (c + t_2) - t_1
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 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double tmp;
if ((x * y) <= -3.3e+60) {
tmp = (c + (x * y)) - t_1;
} else if ((x * y) <= 0.8) {
tmp = (c + t_2) - t_1;
} else {
tmp = c + ((x * y) + t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = 0.0625 * (z * t) tmp = 0 if (x * y) <= -3.3e+60: tmp = (c + (x * y)) - t_1 elif (x * y) <= 0.8: tmp = (c + t_2) - t_1 else: tmp = c + ((x * y) + t_2) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (Float64(x * y) <= -3.3e+60) tmp = Float64(Float64(c + Float64(x * y)) - t_1); elseif (Float64(x * y) <= 0.8) tmp = Float64(Float64(c + t_2) - t_1); 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 = (a * b) * 0.25; t_2 = 0.0625 * (z * t); tmp = 0.0; if ((x * y) <= -3.3e+60) tmp = (c + (x * y)) - t_1; elseif ((x * y) <= 0.8) tmp = (c + t_2) - t_1; 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[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3.3e+60], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.8], N[(N[(c + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -3.3 \cdot 10^{+60}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\
\mathbf{elif}\;x \cdot y \leq 0.8:\\
\;\;\;\;\left(c + t_2\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -3.2999999999999998e60Initial program 97.7%
associate-+l-97.7%
sub-neg97.7%
fma-def97.7%
associate-/l*97.7%
sub-neg97.7%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around 0 87.8%
if -3.2999999999999998e60 < (*.f64 x y) < 0.80000000000000004Initial program 98.6%
associate-+l-98.6%
sub-neg98.6%
fma-def98.6%
associate-/l*98.5%
sub-neg98.5%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in x around 0 95.2%
if 0.80000000000000004 < (*.f64 x y) Initial program 94.2%
Taylor expanded in a around 0 88.8%
Final simplification92.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (* x y) (* (* a b) 0.25))) (t_2 (+ c (* z (* t 0.0625)))))
(if (<= z -5.4e+88)
t_2
(if (<= z -3.5e-74)
t_1
(if (<= z -1.04e-287)
(+ c (* b (* a -0.25)))
(if (<= z 1.3e-138) (+ c (* x y)) (if (<= z 2.7e+49) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * y) - ((a * b) * 0.25);
double t_2 = c + (z * (t * 0.0625));
double tmp;
if (z <= -5.4e+88) {
tmp = t_2;
} else if (z <= -3.5e-74) {
tmp = t_1;
} else if (z <= -1.04e-287) {
tmp = c + (b * (a * -0.25));
} else if (z <= 1.3e-138) {
tmp = c + (x * y);
} else if (z <= 2.7e+49) {
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 = (x * y) - ((a * b) * 0.25d0)
t_2 = c + (z * (t * 0.0625d0))
if (z <= (-5.4d+88)) then
tmp = t_2
else if (z <= (-3.5d-74)) then
tmp = t_1
else if (z <= (-1.04d-287)) then
tmp = c + (b * (a * (-0.25d0)))
else if (z <= 1.3d-138) then
tmp = c + (x * y)
else if (z <= 2.7d+49) 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 = (x * y) - ((a * b) * 0.25);
double t_2 = c + (z * (t * 0.0625));
double tmp;
if (z <= -5.4e+88) {
tmp = t_2;
} else if (z <= -3.5e-74) {
tmp = t_1;
} else if (z <= -1.04e-287) {
tmp = c + (b * (a * -0.25));
} else if (z <= 1.3e-138) {
tmp = c + (x * y);
} else if (z <= 2.7e+49) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * y) - ((a * b) * 0.25) t_2 = c + (z * (t * 0.0625)) tmp = 0 if z <= -5.4e+88: tmp = t_2 elif z <= -3.5e-74: tmp = t_1 elif z <= -1.04e-287: tmp = c + (b * (a * -0.25)) elif z <= 1.3e-138: tmp = c + (x * y) elif z <= 2.7e+49: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)) t_2 = Float64(c + Float64(z * Float64(t * 0.0625))) tmp = 0.0 if (z <= -5.4e+88) tmp = t_2; elseif (z <= -3.5e-74) tmp = t_1; elseif (z <= -1.04e-287) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (z <= 1.3e-138) tmp = Float64(c + Float64(x * y)); elseif (z <= 2.7e+49) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * y) - ((a * b) * 0.25); t_2 = c + (z * (t * 0.0625)); tmp = 0.0; if (z <= -5.4e+88) tmp = t_2; elseif (z <= -3.5e-74) tmp = t_1; elseif (z <= -1.04e-287) tmp = c + (b * (a * -0.25)); elseif (z <= 1.3e-138) tmp = c + (x * y); elseif (z <= 2.7e+49) 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[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+88], t$95$2, If[LessEqual[z, -3.5e-74], t$95$1, If[LessEqual[z, -1.04e-287], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-138], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+49], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.04 \cdot 10^{-287}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-138}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.40000000000000031e88 or 2.7000000000000001e49 < z Initial program 95.4%
Taylor expanded in z around inf 67.6%
associate-*r*67.6%
*-commutative67.6%
*-commutative67.6%
*-commutative67.6%
Simplified67.6%
if -5.40000000000000031e88 < z < -3.50000000000000015e-74 or 1.3e-138 < z < 2.7000000000000001e49Initial program 97.1%
associate-+l-97.1%
sub-neg97.1%
fma-def97.1%
associate-/l*97.0%
sub-neg97.0%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around 0 71.8%
Taylor expanded in c around 0 58.4%
if -3.50000000000000015e-74 < z < -1.03999999999999996e-287Initial program 100.0%
Taylor expanded in a around inf 84.9%
associate-*r*84.9%
*-commutative84.9%
*-commutative84.9%
Simplified84.9%
if -1.03999999999999996e-287 < z < 1.3e-138Initial program 100.0%
Taylor expanded in x around inf 67.5%
Final simplification68.1%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -2.5e+186)
(+ c (* b (* a -0.25)))
(if (<= (* a b) 1e+214)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(- (* x y) (* (* 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) <= -2.5e+186) {
tmp = c + (b * (a * -0.25));
} else if ((a * b) <= 1e+214) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (x * y) - ((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) <= (-2.5d+186)) then
tmp = c + (b * (a * (-0.25d0)))
else if ((a * b) <= 1d+214) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = (x * y) - ((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) <= -2.5e+186) {
tmp = c + (b * (a * -0.25));
} else if ((a * b) <= 1e+214) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -2.5e+186: tmp = c + (b * (a * -0.25)) elif (a * b) <= 1e+214: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = (x * y) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -2.5e+186) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (Float64(a * b) <= 1e+214) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -2.5e+186) tmp = c + (b * (a * -0.25)); elseif ((a * b) <= 1e+214) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = (x * y) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2.5e+186], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+214], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2.5 \cdot 10^{+186}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;a \cdot b \leq 10^{+214}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -2.49999999999999977e186Initial program 89.1%
Taylor expanded in a around inf 79.5%
associate-*r*79.5%
*-commutative79.5%
*-commutative79.5%
Simplified79.5%
if -2.49999999999999977e186 < (*.f64 a b) < 9.9999999999999995e213Initial program 99.4%
Taylor expanded in a around 0 91.2%
if 9.9999999999999995e213 < (*.f64 a b) Initial program 95.0%
associate-+l-95.0%
sub-neg95.0%
fma-def95.0%
associate-/l*94.9%
sub-neg94.9%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around 0 80.3%
Taylor expanded in c around 0 80.3%
Final simplification88.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (+ c (* z (* t 0.0625)))))
(if (<= z -4.4e+129)
t_2
(if (<= z -1.02e-82)
t_1
(if (<= z -1.22e-287)
(+ c (* b (* a -0.25)))
(if (<= z 2.1e+49) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (z * (t * 0.0625));
double tmp;
if (z <= -4.4e+129) {
tmp = t_2;
} else if (z <= -1.02e-82) {
tmp = t_1;
} else if (z <= -1.22e-287) {
tmp = c + (b * (a * -0.25));
} else if (z <= 2.1e+49) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (x * y)
t_2 = c + (z * (t * 0.0625d0))
if (z <= (-4.4d+129)) then
tmp = t_2
else if (z <= (-1.02d-82)) then
tmp = t_1
else if (z <= (-1.22d-287)) then
tmp = c + (b * (a * (-0.25d0)))
else if (z <= 2.1d+49) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = c + (z * (t * 0.0625));
double tmp;
if (z <= -4.4e+129) {
tmp = t_2;
} else if (z <= -1.02e-82) {
tmp = t_1;
} else if (z <= -1.22e-287) {
tmp = c + (b * (a * -0.25));
} else if (z <= 2.1e+49) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (z * (t * 0.0625)) tmp = 0 if z <= -4.4e+129: tmp = t_2 elif z <= -1.02e-82: tmp = t_1 elif z <= -1.22e-287: tmp = c + (b * (a * -0.25)) elif z <= 2.1e+49: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(z * Float64(t * 0.0625))) tmp = 0.0 if (z <= -4.4e+129) tmp = t_2; elseif (z <= -1.02e-82) tmp = t_1; elseif (z <= -1.22e-287) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (z <= 2.1e+49) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (z * (t * 0.0625)); tmp = 0.0; if (z <= -4.4e+129) tmp = t_2; elseif (z <= -1.02e-82) tmp = t_1; elseif (z <= -1.22e-287) tmp = c + (b * (a * -0.25)); elseif (z <= 2.1e+49) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+129], t$95$2, If[LessEqual[z, -1.02e-82], t$95$1, If[LessEqual[z, -1.22e-287], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+49], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{-287}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.3999999999999999e129 or 2.10000000000000011e49 < z Initial program 95.1%
Taylor expanded in z around inf 67.3%
associate-*r*67.3%
*-commutative67.3%
*-commutative67.3%
*-commutative67.3%
Simplified67.3%
if -4.3999999999999999e129 < z < -1.02000000000000007e-82 or -1.21999999999999996e-287 < z < 2.10000000000000011e49Initial program 98.2%
Taylor expanded in x around inf 60.0%
if -1.02000000000000007e-82 < z < -1.21999999999999996e-287Initial program 100.0%
Taylor expanded in a around inf 86.0%
associate-*r*86.0%
*-commutative86.0%
*-commutative86.0%
Simplified86.0%
Final simplification67.2%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -9.6e+100) (not (<= (* x y) 5.2e+22))) (+ c (* x y)) (+ c (* b (* a -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -9.6e+100) || !((x * y) <= 5.2e+22)) {
tmp = c + (x * y);
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((x * y) <= (-9.6d+100)) .or. (.not. ((x * y) <= 5.2d+22))) then
tmp = c + (x * y)
else
tmp = c + (b * (a * (-0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -9.6e+100) || !((x * y) <= 5.2e+22)) {
tmp = c + (x * y);
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -9.6e+100) or not ((x * y) <= 5.2e+22): tmp = c + (x * y) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -9.6e+100) || !(Float64(x * y) <= 5.2e+22)) tmp = Float64(c + Float64(x * y)); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -9.6e+100) || ~(((x * y) <= 5.2e+22))) tmp = c + (x * y); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -9.6e+100], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5.2e+22]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -9.6 \cdot 10^{+100} \lor \neg \left(x \cdot y \leq 5.2 \cdot 10^{+22}\right):\\
\;\;\;\;c + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -9.60000000000000046e100 or 5.2e22 < (*.f64 x y) Initial program 96.0%
Taylor expanded in x around inf 70.3%
if -9.60000000000000046e100 < (*.f64 x y) < 5.2e22Initial program 98.0%
Taylor expanded in a around inf 61.8%
associate-*r*61.8%
*-commutative61.8%
*-commutative61.8%
Simplified61.8%
Final simplification65.1%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1e+70) (not (<= z 1e-50))) (+ c (+ (* x y) (* 0.0625 (* z t)))) (- (+ c (* x y)) (* (* a b) 0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1e+70) || !(z <= 1e-50)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (x * y)) - ((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 ((z <= (-1d+70)) .or. (.not. (z <= 1d-50))) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = (c + (x * y)) - ((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 ((z <= -1e+70) || !(z <= 1e-50)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (x * y)) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1e+70) or not (z <= 1e-50): tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = (c + (x * y)) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1e+70) || !(z <= 1e-50)) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -1e+70) || ~((z <= 1e-50))) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = (c + (x * y)) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1e+70], N[Not[LessEqual[z, 1e-50]], $MachinePrecision]], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+70} \lor \neg \left(z \leq 10^{-50}\right):\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if z < -1.00000000000000007e70 or 1.00000000000000001e-50 < z Initial program 96.4%
Taylor expanded in a around 0 85.8%
if -1.00000000000000007e70 < z < 1.00000000000000001e-50Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
fma-def98.3%
associate-/l*98.2%
sub-neg98.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in z around 0 88.3%
Final simplification86.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= (* x y) -9.6e+100) (* x y) (if (<= (* x y) 4.5e+98) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -9.6e+100) {
tmp = x * y;
} else if ((x * y) <= 4.5e+98) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x * y) <= (-9.6d+100)) then
tmp = x * y
else if ((x * y) <= 4.5d+98) then
tmp = c
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x * y) <= -9.6e+100) {
tmp = x * y;
} else if ((x * y) <= 4.5e+98) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (x * y) <= -9.6e+100: tmp = x * y elif (x * y) <= 4.5e+98: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(x * y) <= -9.6e+100) tmp = Float64(x * y); elseif (Float64(x * y) <= 4.5e+98) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((x * y) <= -9.6e+100) tmp = x * y; elseif ((x * y) <= 4.5e+98) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(x * y), $MachinePrecision], -9.6e+100], N[(x * y), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4.5e+98], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -9.6 \cdot 10^{+100}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \cdot y \leq 4.5 \cdot 10^{+98}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if (*.f64 x y) < -9.60000000000000046e100 or 4.5000000000000002e98 < (*.f64 x y) Initial program 95.4%
associate-+l-95.4%
sub-neg95.4%
fma-def96.5%
associate-/l*96.5%
sub-neg96.5%
associate-/l*96.5%
Simplified96.5%
associate--r-96.5%
fma-udef95.3%
associate-/l*95.4%
associate-/l*95.4%
associate--l+95.4%
+-commutative95.4%
associate-+l+95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 67.4%
if -9.60000000000000046e100 < (*.f64 x y) < 4.5000000000000002e98Initial program 98.2%
associate-+l-98.2%
sub-neg98.2%
fma-def98.2%
associate-/l*98.1%
sub-neg98.1%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in c around inf 31.0%
Final simplification43.4%
(FPCore (x y z t a b c) :precision binary64 (+ c (* x y)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (x * y);
}
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)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (x * y);
}
def code(x, y, z, t, a, b, c): return c + (x * y)
function code(x, y, z, t, a, b, c) return Float64(c + Float64(x * y)) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (x * y); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + x \cdot y
\end{array}
Initial program 97.2%
Taylor expanded in x around inf 48.5%
Final simplification48.5%
(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.2%
associate-+l-97.2%
sub-neg97.2%
fma-def97.6%
associate-/l*97.6%
sub-neg97.6%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in c around inf 23.3%
Final simplification23.3%
herbie shell --seed 2023297
(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))