
(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 9 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 (+ c (- (+ (* y x) (/ (* t z) 16.0)) (/ (* b a) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((y * x) + ((t * z) / 16.0)) - ((b * a) / 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 + (((y * x) + ((t * z) / 16.0d0)) - ((b * a) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((y * x) + ((t * z) / 16.0)) - ((b * a) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((y * x) + ((t * z) / 16.0)) - ((b * a) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(y * x) + Float64(Float64(t * z) / 16.0)) - Float64(Float64(b * a) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((y * x) + ((t * z) / 16.0)) - ((b * a) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(y * x), $MachinePrecision] + N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(y \cdot x + \frac{t \cdot z}{16}\right) - \frac{b \cdot a}{4}\right)
\end{array}
Initial program 98.0%
Final simplification98.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* t z) 0.0625 c)))
(if (<= (* t z) -4e+93)
t_1
(if (<= (* t z) -5e-207)
(fma y x c)
(if (<= (* t z) 2e+138) (fma -0.25 (* b a) (* y x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((t * z), 0.0625, c);
double tmp;
if ((t * z) <= -4e+93) {
tmp = t_1;
} else if ((t * z) <= -5e-207) {
tmp = fma(y, x, c);
} else if ((t * z) <= 2e+138) {
tmp = fma(-0.25, (b * a), (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(t * z), 0.0625, c) tmp = 0.0 if (Float64(t * z) <= -4e+93) tmp = t_1; elseif (Float64(t * z) <= -5e-207) tmp = fma(y, x, c); elseif (Float64(t * z) <= 2e+138) tmp = fma(-0.25, Float64(b * a), Float64(y * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -4e+93], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], -5e-207], N[(y * x + c), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 2e+138], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\\
\mathbf{if}\;t \cdot z \leq -4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq -5 \cdot 10^{-207}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.00000000000000017e93 or 2.0000000000000001e138 < (*.f64 z t) Initial program 94.4%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6490.2
Applied rewrites90.2%
Taylor expanded in x around 0
Applied rewrites77.3%
if -4.00000000000000017e93 < (*.f64 z t) < -5.00000000000000014e-207Initial program 100.0%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6482.0
Applied rewrites82.0%
Taylor expanded in x around 0
Applied rewrites40.6%
Taylor expanded in z around 0
Applied rewrites75.0%
if -5.00000000000000014e-207 < (*.f64 z t) < 2.0000000000000001e138Initial program 100.0%
Taylor expanded in z around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6497.4
Applied rewrites97.4%
Taylor expanded in c around 0
Applied rewrites72.8%
Final simplification74.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma y x (fma (* t z) 0.0625 c))))
(if (<= (* t z) -4e+93)
t_1
(if (<= (* t z) 5e+66) (fma -0.25 (* b a) (fma y x c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(y, x, fma((t * z), 0.0625, c));
double tmp;
if ((t * z) <= -4e+93) {
tmp = t_1;
} else if ((t * z) <= 5e+66) {
tmp = fma(-0.25, (b * a), fma(y, x, c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(y, x, fma(Float64(t * z), 0.0625, c)) tmp = 0.0 if (Float64(t * z) <= -4e+93) tmp = t_1; elseif (Float64(t * z) <= 5e+66) tmp = fma(-0.25, Float64(b * a), fma(y, x, c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * x + N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -4e+93], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+66], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, x, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)\\
\mathbf{if}\;t \cdot z \leq -4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+66}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.00000000000000017e93 or 4.99999999999999991e66 < (*.f64 z t) Initial program 94.9%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6491.1
Applied rewrites91.1%
if -4.00000000000000017e93 < (*.f64 z t) < 4.99999999999999991e66Initial program 100.0%
Taylor expanded in z around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.9
Applied rewrites96.9%
Final simplification94.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* t z) 0.0625 c)))
(if (<= (* t z) -4e+93)
t_1
(if (<= (* t z) 1e+253) (fma -0.25 (* b a) (fma y x c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((t * z), 0.0625, c);
double tmp;
if ((t * z) <= -4e+93) {
tmp = t_1;
} else if ((t * z) <= 1e+253) {
tmp = fma(-0.25, (b * a), fma(y, x, c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(t * z), 0.0625, c) tmp = 0.0 if (Float64(t * z) <= -4e+93) tmp = t_1; elseif (Float64(t * z) <= 1e+253) tmp = fma(-0.25, Float64(b * a), fma(y, x, c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -4e+93], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 1e+253], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x + c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\\
\mathbf{if}\;t \cdot z \leq -4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 10^{+253}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.00000000000000017e93 or 9.9999999999999994e252 < (*.f64 z t) Initial program 94.8%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6492.5
Applied rewrites92.5%
Taylor expanded in x around 0
Applied rewrites81.1%
if -4.00000000000000017e93 < (*.f64 z t) < 9.9999999999999994e252Initial program 99.4%
Taylor expanded in z around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6494.5
Applied rewrites94.5%
Final simplification90.5%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (fma (* t z) 0.0625 c))) (if (<= (* t z) -4e+93) t_1 (if (<= (* t z) 2e+167) (fma y x c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((t * z), 0.0625, c);
double tmp;
if ((t * z) <= -4e+93) {
tmp = t_1;
} else if ((t * z) <= 2e+167) {
tmp = fma(y, x, c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(t * z), 0.0625, c) tmp = 0.0 if (Float64(t * z) <= -4e+93) tmp = t_1; elseif (Float64(t * z) <= 2e+167) tmp = fma(y, x, c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -4e+93], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 2e+167], N[(y * x + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\\
\mathbf{if}\;t \cdot z \leq -4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 2 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -4.00000000000000017e93 or 2.0000000000000001e167 < (*.f64 z t) Initial program 95.3%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6490.9
Applied rewrites90.9%
Taylor expanded in x around 0
Applied rewrites78.4%
if -4.00000000000000017e93 < (*.f64 z t) < 2.0000000000000001e167Initial program 99.4%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6472.5
Applied rewrites72.5%
Taylor expanded in x around 0
Applied rewrites33.7%
Taylor expanded in z around 0
Applied rewrites68.5%
Final simplification71.8%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* 0.0625 (* t z)))) (if (<= (* t z) -1e+203) t_1 (if (<= (* t z) 1e+253) (fma y x c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (t * z);
double tmp;
if ((t * z) <= -1e+203) {
tmp = t_1;
} else if ((t * z) <= 1e+253) {
tmp = fma(y, x, c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(t * z)) tmp = 0.0 if (Float64(t * z) <= -1e+203) tmp = t_1; elseif (Float64(t * z) <= 1e+253) tmp = fma(y, x, c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -1e+203], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 1e+253], N[(y * x + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;t \cdot z \leq -1 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot z \leq 10^{+253}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -9.9999999999999999e202 or 9.9999999999999994e252 < (*.f64 z t) Initial program 93.4%
Taylor expanded in a around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f647.9
Applied rewrites7.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6480.8
Applied rewrites80.8%
if -9.9999999999999999e202 < (*.f64 z t) < 9.9999999999999994e252Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6474.4
Applied rewrites74.4%
Taylor expanded in x around 0
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites66.2%
Final simplification69.7%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* b a) -0.25))) (if (<= (* b a) -2e+228) t_1 (if (<= (* b a) 2e+215) (fma y x c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -2e+228) {
tmp = t_1;
} else if ((b * a) <= 2e+215) {
tmp = fma(y, x, c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -2e+228) tmp = t_1; elseif (Float64(b * a) <= 2e+215) tmp = fma(y, x, c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -2e+228], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2e+215], N[(y * x + c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999998e228 or 1.99999999999999981e215 < (*.f64 a b) Initial program 92.9%
Taylor expanded in a around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6488.3
Applied rewrites88.3%
if -1.9999999999999998e228 < (*.f64 a b) < 1.99999999999999981e215Initial program 99.1%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6489.1
Applied rewrites89.1%
Taylor expanded in x around 0
Applied rewrites55.7%
Taylor expanded in z around 0
Applied rewrites61.6%
Final simplification66.0%
(FPCore (x y z t a b c) :precision binary64 (fma y x c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(y, x, c);
}
function code(x, y, z, t, a, b, c) return fma(y, x, c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(y * x + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, c\right)
\end{array}
Initial program 98.0%
Taylor expanded in a around 0
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6478.6
Applied rewrites78.6%
Taylor expanded in x around 0
Applied rewrites48.5%
Taylor expanded in z around 0
Applied rewrites54.0%
(FPCore (x y z t a b c) :precision binary64 (* y x))
double code(double x, double y, double z, double t, double a, double b, double c) {
return y * x;
}
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 = y * x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return y * x;
}
def code(x, y, z, t, a, b, c): return y * x
function code(x, y, z, t, a, b, c) return Float64(y * x) end
function tmp = code(x, y, z, t, a, b, c) tmp = y * x; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(y * x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot x
\end{array}
Initial program 98.0%
Taylor expanded in a around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6433.2
Applied rewrites33.2%
herbie shell --seed 2024304
(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))