
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (if (<= (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)) INFINITY) (+ (fma y x (fma b a (* t z))) (* c i)) (fma i c (* z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((x * y) + (z * t)) + (a * b)) + (c * i)) <= ((double) INFINITY)) {
tmp = fma(y, x, fma(b, a, (t * z))) + (c * i);
} else {
tmp = fma(i, c, (z * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) <= Inf) tmp = Float64(fma(y, x, fma(b, a, Float64(t * z))) + Float64(c * i)); else tmp = fma(i, c, Float64(z * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * x + N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(i * c + N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a, t \cdot z\right)\right) + c \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, c, z \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64100.0
Applied rewrites100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in z around inf
lower-*.f6458.8
Applied rewrites58.8%
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6458.8
+-commutative58.8
*-commutative58.8
+-commutative58.8
*-commutative58.8
*-commutative58.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.8
Applied rewrites58.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -2e+177)
(fma i c (* y x))
(if (<= (* x y) -2e+92)
(fma b a (* z t))
(if (<= (* x y) 1e+151) (fma i c (* z t)) (fma b a (* x y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -2e+177) {
tmp = fma(i, c, (y * x));
} else if ((x * y) <= -2e+92) {
tmp = fma(b, a, (z * t));
} else if ((x * y) <= 1e+151) {
tmp = fma(i, c, (z * t));
} else {
tmp = fma(b, a, (x * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -2e+177) tmp = fma(i, c, Float64(y * x)); elseif (Float64(x * y) <= -2e+92) tmp = fma(b, a, Float64(z * t)); elseif (Float64(x * y) <= 1e+151) tmp = fma(i, c, Float64(z * t)); else tmp = fma(b, a, Float64(x * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+177], N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e+92], N[(b * a + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+151], N[(i * c + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+177}:\\
\;\;\;\;\mathsf{fma}\left(i, c, y \cdot x\right)\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{+92}:\\
\;\;\;\;\mathsf{fma}\left(b, a, z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{+151}:\\
\;\;\;\;\mathsf{fma}\left(i, c, z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, x \cdot y\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -2e177Initial program 91.6%
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6491.6
Applied rewrites91.6%
Taylor expanded in a around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6494.4
Applied rewrites94.4%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6494.4
Applied rewrites94.4%
if -2e177 < (*.f64 x y) < -2.0000000000000001e92Initial program 84.5%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6484.5
Applied rewrites84.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f6467.9
Applied rewrites67.9%
if -2.0000000000000001e92 < (*.f64 x y) < 1.00000000000000002e151Initial program 97.7%
Taylor expanded in z around inf
lower-*.f6470.8
Applied rewrites70.8%
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6470.8
+-commutative70.8
*-commutative70.8
+-commutative70.8
*-commutative70.8
*-commutative70.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6470.8
Applied rewrites70.8%
if 1.00000000000000002e151 < (*.f64 x y) Initial program 90.9%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.2
Applied rewrites90.2%
Taylor expanded in x around inf
lower-*.f6485.8
Applied rewrites85.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -5e+217) (not (<= (* c i) 1e+95))) (fma i c (* z t)) (fma b a (fma t z (* y x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -5e+217) || !((c * i) <= 1e+95)) {
tmp = fma(i, c, (z * t));
} else {
tmp = fma(b, a, fma(t, z, (y * x)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -5e+217) || !(Float64(c * i) <= 1e+95)) tmp = fma(i, c, Float64(z * t)); else tmp = fma(b, a, fma(t, z, Float64(y * x))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -5e+217], N[Not[LessEqual[N[(c * i), $MachinePrecision], 1e+95]], $MachinePrecision]], N[(i * c + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(b * a + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+217} \lor \neg \left(c \cdot i \leq 10^{+95}\right):\\
\;\;\;\;\mathsf{fma}\left(i, c, z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -5.00000000000000041e217 or 1.00000000000000002e95 < (*.f64 c i) Initial program 91.1%
Taylor expanded in z around inf
lower-*.f6486.1
Applied rewrites86.1%
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6486.1
+-commutative86.1
*-commutative86.1
+-commutative86.1
*-commutative86.1
*-commutative86.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6486.1
Applied rewrites86.1%
if -5.00000000000000041e217 < (*.f64 c i) < 1.00000000000000002e95Initial program 97.2%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6491.2
Applied rewrites91.2%
Final simplification89.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma t z (* y x))))
(if (<= (* c i) -5e+217)
(fma i c (* z t))
(if (<= (* c i) 2e+86) (fma b a t_1) (fma i c t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(t, z, (y * x));
double tmp;
if ((c * i) <= -5e+217) {
tmp = fma(i, c, (z * t));
} else if ((c * i) <= 2e+86) {
tmp = fma(b, a, t_1);
} else {
tmp = fma(i, c, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(t, z, Float64(y * x)) tmp = 0.0 if (Float64(c * i) <= -5e+217) tmp = fma(i, c, Float64(z * t)); elseif (Float64(c * i) <= 2e+86) tmp = fma(b, a, t_1); else tmp = fma(i, c, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -5e+217], N[(i * c + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2e+86], N[(b * a + t$95$1), $MachinePrecision], N[(i * c + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{if}\;c \cdot i \leq -5 \cdot 10^{+217}:\\
\;\;\;\;\mathsf{fma}\left(i, c, z \cdot t\right)\\
\mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(b, a, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, c, t\_1\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -5.00000000000000041e217Initial program 86.8%
Taylor expanded in z around inf
lower-*.f6493.8
Applied rewrites93.8%
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6493.8
+-commutative93.8
*-commutative93.8
+-commutative93.8
*-commutative93.8
*-commutative93.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6493.8
Applied rewrites93.8%
if -5.00000000000000041e217 < (*.f64 c i) < 2e86Initial program 97.1%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6491.1
Applied rewrites91.1%
if 2e86 < (*.f64 c i) Initial program 95.3%
Taylor expanded in a around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.7
Applied rewrites90.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* z t) -2e+93) (* t z) (if (<= (* z t) 1e-105) (* i c) (if (<= (* z t) 2e+123) (* y x) (* t z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z * t) <= -2e+93) {
tmp = t * z;
} else if ((z * t) <= 1e-105) {
tmp = i * c;
} else if ((z * t) <= 2e+123) {
tmp = y * x;
} else {
tmp = t * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
real(8) :: tmp
if ((z * t) <= (-2d+93)) then
tmp = t * z
else if ((z * t) <= 1d-105) then
tmp = i * c
else if ((z * t) <= 2d+123) then
tmp = y * x
else
tmp = t * z
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 i) {
double tmp;
if ((z * t) <= -2e+93) {
tmp = t * z;
} else if ((z * t) <= 1e-105) {
tmp = i * c;
} else if ((z * t) <= 2e+123) {
tmp = y * x;
} else {
tmp = t * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z * t) <= -2e+93: tmp = t * z elif (z * t) <= 1e-105: tmp = i * c elif (z * t) <= 2e+123: tmp = y * x else: tmp = t * z return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(z * t) <= -2e+93) tmp = Float64(t * z); elseif (Float64(z * t) <= 1e-105) tmp = Float64(i * c); elseif (Float64(z * t) <= 2e+123) tmp = Float64(y * x); else tmp = Float64(t * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z * t) <= -2e+93) tmp = t * z; elseif ((z * t) <= 1e-105) tmp = i * c; elseif ((z * t) <= 2e+123) tmp = y * x; else tmp = t * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[(t * z), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e-105], N[(i * c), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+123], N[(y * x), $MachinePrecision], N[(t * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93}:\\
\;\;\;\;t \cdot z\\
\mathbf{elif}\;z \cdot t \leq 10^{-105}:\\
\;\;\;\;i \cdot c\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+123}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot z\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 1.99999999999999996e123 < (*.f64 z t) Initial program 90.9%
Taylor expanded in z around inf
lower-*.f6467.6
Applied rewrites67.6%
if -2.00000000000000009e93 < (*.f64 z t) < 9.99999999999999965e-106Initial program 96.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f6445.3
Applied rewrites45.3%
if 9.99999999999999965e-106 < (*.f64 z t) < 1.99999999999999996e123Initial program 99.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6437.1
Applied rewrites37.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -2e+93) (not (<= (* z t) 3e+190))) (fma b a (* z t)) (fma i c (* y x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((z * t) <= -2e+93) || !((z * t) <= 3e+190)) {
tmp = fma(b, a, (z * t));
} else {
tmp = fma(i, c, (y * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(z * t) <= -2e+93) || !(Float64(z * t) <= 3e+190)) tmp = fma(b, a, Float64(z * t)); else tmp = fma(i, c, Float64(y * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[Not[LessEqual[N[(z * t), $MachinePrecision], 3e+190]], $MachinePrecision]], N[(b * a + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93} \lor \neg \left(z \cdot t \leq 3 \cdot 10^{+190}\right):\\
\;\;\;\;\mathsf{fma}\left(b, a, z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, c, y \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 2.99999999999999982e190 < (*.f64 z t) Initial program 90.1%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6489.7
Applied rewrites89.7%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f6480.3
Applied rewrites80.3%
if -2.00000000000000009e93 < (*.f64 z t) < 2.99999999999999982e190Initial program 97.7%
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6497.7
Applied rewrites97.7%
Taylor expanded in a around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6474.3
Applied rewrites74.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.8
Applied rewrites65.8%
Final simplification70.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -2e+93) (not (<= (* z t) 3e+190))) (* t z) (fma i c (* y x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((z * t) <= -2e+93) || !((z * t) <= 3e+190)) {
tmp = t * z;
} else {
tmp = fma(i, c, (y * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(z * t) <= -2e+93) || !(Float64(z * t) <= 3e+190)) tmp = Float64(t * z); else tmp = fma(i, c, Float64(y * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[Not[LessEqual[N[(z * t), $MachinePrecision], 3e+190]], $MachinePrecision]], N[(t * z), $MachinePrecision], N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93} \lor \neg \left(z \cdot t \leq 3 \cdot 10^{+190}\right):\\
\;\;\;\;t \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, c, y \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 2.99999999999999982e190 < (*.f64 z t) Initial program 90.1%
Taylor expanded in z around inf
lower-*.f6469.6
Applied rewrites69.6%
if -2.00000000000000009e93 < (*.f64 z t) < 2.99999999999999982e190Initial program 97.7%
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6497.7
Applied rewrites97.7%
Taylor expanded in a around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6474.3
Applied rewrites74.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.8
Applied rewrites65.8%
Final simplification67.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* z t) -2e+93) (fma b a (* z t)) (if (<= (* z t) 2e+122) (fma i c (* y x)) (fma x y (* t z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z * t) <= -2e+93) {
tmp = fma(b, a, (z * t));
} else if ((z * t) <= 2e+122) {
tmp = fma(i, c, (y * x));
} else {
tmp = fma(x, y, (t * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(z * t) <= -2e+93) tmp = fma(b, a, Float64(z * t)); elseif (Float64(z * t) <= 2e+122) tmp = fma(i, c, Float64(y * x)); else tmp = fma(x, y, Float64(t * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[(b * a + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+122], N[(i * c + N[(y * x), $MachinePrecision]), $MachinePrecision], N[(x * y + N[(t * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(b, a, z \cdot t\right)\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(i, c, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, t \cdot z\right)\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93Initial program 89.4%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6486.5
Applied rewrites86.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f6478.4
Applied rewrites78.4%
if -2.00000000000000009e93 < (*.f64 z t) < 2.00000000000000003e122Initial program 97.6%
lift-+.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6497.6
Applied rewrites97.6%
Taylor expanded in a around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6473.1
Applied rewrites73.1%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.9
Applied rewrites65.9%
if 2.00000000000000003e122 < (*.f64 z t) Initial program 92.9%
Taylor expanded in c around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.5
Applied rewrites90.5%
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6490.5
Applied rewrites90.5%
Taylor expanded in z around inf
lower-*.f6481.5
Applied rewrites81.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* z t) -2e+93) (not (<= (* z t) 2e+122))) (* t z) (* i c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((z * t) <= -2e+93) || !((z * t) <= 2e+122)) {
tmp = t * z;
} else {
tmp = i * c;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
real(8) :: tmp
if (((z * t) <= (-2d+93)) .or. (.not. ((z * t) <= 2d+122))) then
tmp = t * z
else
tmp = i * 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 i) {
double tmp;
if (((z * t) <= -2e+93) || !((z * t) <= 2e+122)) {
tmp = t * z;
} else {
tmp = i * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((z * t) <= -2e+93) or not ((z * t) <= 2e+122): tmp = t * z else: tmp = i * c return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(z * t) <= -2e+93) || !(Float64(z * t) <= 2e+122)) tmp = Float64(t * z); else tmp = Float64(i * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((z * t) <= -2e+93) || ~(((z * t) <= 2e+122))) tmp = t * z; else tmp = i * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+93], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+122]], $MachinePrecision]], N[(t * z), $MachinePrecision], N[(i * c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+93} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+122}\right):\\
\;\;\;\;t \cdot z\\
\mathbf{else}:\\
\;\;\;\;i \cdot c\\
\end{array}
\end{array}
if (*.f64 z t) < -2.00000000000000009e93 or 2.00000000000000003e122 < (*.f64 z t) Initial program 91.0%
Taylor expanded in z around inf
lower-*.f6466.9
Applied rewrites66.9%
if -2.00000000000000009e93 < (*.f64 z t) < 2.00000000000000003e122Initial program 97.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f6440.1
Applied rewrites40.1%
Final simplification49.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -4e+129) (not (<= (* c i) 2e+90))) (* i c) (* b a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -4e+129) || !((c * i) <= 2e+90)) {
tmp = i * c;
} else {
tmp = b * a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
real(8) :: tmp
if (((c * i) <= (-4d+129)) .or. (.not. ((c * i) <= 2d+90))) then
tmp = i * c
else
tmp = b * a
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 i) {
double tmp;
if (((c * i) <= -4e+129) || !((c * i) <= 2e+90)) {
tmp = i * c;
} else {
tmp = b * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -4e+129) or not ((c * i) <= 2e+90): tmp = i * c else: tmp = b * a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -4e+129) || !(Float64(c * i) <= 2e+90)) tmp = Float64(i * c); else tmp = Float64(b * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -4e+129) || ~(((c * i) <= 2e+90))) tmp = i * c; else tmp = b * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -4e+129], N[Not[LessEqual[N[(c * i), $MachinePrecision], 2e+90]], $MachinePrecision]], N[(i * c), $MachinePrecision], N[(b * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -4 \cdot 10^{+129} \lor \neg \left(c \cdot i \leq 2 \cdot 10^{+90}\right):\\
\;\;\;\;i \cdot c\\
\mathbf{else}:\\
\;\;\;\;b \cdot a\\
\end{array}
\end{array}
if (*.f64 c i) < -4e129 or 1.99999999999999993e90 < (*.f64 c i) Initial program 92.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f6470.4
Applied rewrites70.4%
if -4e129 < (*.f64 c i) < 1.99999999999999993e90Initial program 97.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6431.1
Applied rewrites31.1%
Final simplification44.8%
(FPCore (x y z t a b c i) :precision binary64 (* b a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return b * a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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), intent (in) :: i
code = b * a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return b * a;
}
def code(x, y, z, t, a, b, c, i): return b * a
function code(x, y, z, t, a, b, c, i) return Float64(b * a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = b * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(b * a), $MachinePrecision]
\begin{array}{l}
\\
b \cdot a
\end{array}
Initial program 95.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6423.6
Applied rewrites23.6%
herbie shell --seed 2025037
(FPCore (x y z t a b c i)
:name "Linear.V4:$cdot from linear-1.19.1.3, C"
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))