
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * 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, j)
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), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * 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, j)
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), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))))
(if (<= (+ t_1 (* j (- (* c a) (* y i)))) INFINITY)
(+ t_1 (* j (fma (- i) y (* c a))))
(* (- t) (- (* a x) (* i b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)));
double tmp;
if ((t_1 + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = t_1 + (j * fma(-i, y, (c * a)));
} else {
tmp = -t * ((a * x) - (i * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) tmp = 0.0 if (Float64(t_1 + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = Float64(t_1 + Float64(j * fma(Float64(-i), y, Float64(c * a)))); else tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 + N[(j * N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\\
\mathbf{if}\;t\_1 + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;t\_1 + j \cdot \mathsf{fma}\left(-i, y, c \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 72.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6472.7
Applied rewrites72.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 72.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* (- t) (- (* a x) (* i b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = -t * ((a * x) - (i * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = -t * ((a * x) - (i * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = -t * ((a * x) - (i * b)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = -t * ((a * x) - (i * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 72.5%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 72.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -9.5e+165)
(* (- (* i t) (* c z)) b)
(if (<= b 9.5e+110)
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x))
(- (fma (- a) (* t x) (* (* j c) a)) (* (- (* c z) (* i t)) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -9.5e+165) {
tmp = ((i * t) - (c * z)) * b;
} else if (b <= 9.5e+110) {
tmp = fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x));
} else {
tmp = fma(-a, (t * x), ((j * c) * a)) - (((c * z) - (i * t)) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -9.5e+165) tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); elseif (b <= 9.5e+110) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x)); else tmp = Float64(fma(Float64(-a), Float64(t * x), Float64(Float64(j * c) * a)) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -9.5e+165], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 9.5e+110], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+165}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot z - i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -9.50000000000000017e165Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -9.50000000000000017e165 < b < 9.49999999999999939e110Initial program 72.5%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
if 9.49999999999999939e110 < b Initial program 72.5%
Taylor expanded in y around 0
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -9.5e+165)
t_1
(if (<= b 2.25e+113)
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -9.5e+165) {
tmp = t_1;
} else if (b <= 2.25e+113) {
tmp = fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -9.5e+165) tmp = t_1; elseif (b <= 2.25e+113) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -9.5e+165], t$95$1, If[LessEqual[b, 2.25e+113], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{+113}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.50000000000000017e165 or 2.25e113 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -9.50000000000000017e165 < b < 2.25e113Initial program 72.5%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (- (* (* c b) z)) (* j (- (* c a) (* y i)))))
(t_2 (* (* b t) (+ i (/ (* (- a) x) b)))))
(if (<= t -2.1e+217)
t_2
(if (<= t -2.7e+46)
t_1
(if (<= t -1.42e-33)
(* (- t) (- (* a x) (* i b)))
(if (<= t -5e-173)
(* (fma (- i) j (* z x)) y)
(if (<= t -5.5e-258)
t_1
(if (<= t 820000000.0)
(+ (* x (* y z)) (* j (fma (- i) y (* c a))))
t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -((c * b) * z) + (j * ((c * a) - (y * i)));
double t_2 = (b * t) * (i + ((-a * x) / b));
double tmp;
if (t <= -2.1e+217) {
tmp = t_2;
} else if (t <= -2.7e+46) {
tmp = t_1;
} else if (t <= -1.42e-33) {
tmp = -t * ((a * x) - (i * b));
} else if (t <= -5e-173) {
tmp = fma(-i, j, (z * x)) * y;
} else if (t <= -5.5e-258) {
tmp = t_1;
} else if (t <= 820000000.0) {
tmp = (x * (y * z)) + (j * fma(-i, y, (c * a)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-Float64(Float64(c * b) * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) t_2 = Float64(Float64(b * t) * Float64(i + Float64(Float64(Float64(-a) * x) / b))) tmp = 0.0 if (t <= -2.1e+217) tmp = t_2; elseif (t <= -2.7e+46) tmp = t_1; elseif (t <= -1.42e-33) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (t <= -5e-173) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (t <= -5.5e-258) tmp = t_1; elseif (t <= 820000000.0) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * fma(Float64(-i), y, Float64(c * a)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * t), $MachinePrecision] * N[(i + N[(N[((-a) * x), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+217], t$95$2, If[LessEqual[t, -2.7e+46], t$95$1, If[LessEqual[t, -1.42e-33], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-173], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, -5.5e-258], t$95$1, If[LessEqual[t, 820000000.0], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(b \cdot t\right) \cdot \left(i + \frac{\left(-a\right) \cdot x}{b}\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+217}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.42 \cdot 10^{-33}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-173}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 820000000:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \mathsf{fma}\left(-i, y, c \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.1000000000000001e217 or 8.2e8 < t Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.5%
Taylor expanded in j around inf
lower-*.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6436.3
Applied rewrites36.3%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6437.6
Applied rewrites37.6%
if -2.1000000000000001e217 < t < -2.7000000000000002e46 or -5.0000000000000002e-173 < t < -5.49999999999999969e-258Initial program 72.5%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6450.1
Applied rewrites50.1%
if -2.7000000000000002e46 < t < -1.42000000000000007e-33Initial program 72.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
if -1.42000000000000007e-33 < t < -5.0000000000000002e-173Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if -5.49999999999999969e-258 < t < 8.2e8Initial program 72.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6472.7
Applied rewrites72.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6449.5
Applied rewrites49.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -2.3e+80)
t_1
(if (<= b 6.2e+127) (+ (* x (* y z)) (* j (fma (- i) y (* c a)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -2.3e+80) {
tmp = t_1;
} else if (b <= 6.2e+127) {
tmp = (x * (y * z)) + (j * fma(-i, y, (c * a)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.3e+80) tmp = t_1; elseif (b <= 6.2e+127) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * fma(Float64(-i), y, Float64(c * a)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.3e+80], t$95$1, If[LessEqual[b, 6.2e+127], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \mathsf{fma}\left(-i, y, c \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.30000000000000004e80 or 6.2000000000000005e127 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -2.30000000000000004e80 < b < 6.2000000000000005e127Initial program 72.5%
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6472.7
Applied rewrites72.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6449.5
Applied rewrites49.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -2.3e+80)
t_1
(if (<= b 6.2e+127) (+ (* (* z y) x) (* j (- (* c a) (* y i)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -2.3e+80) {
tmp = t_1;
} else if (b <= 6.2e+127) {
tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-2.3d+80)) then
tmp = t_1
else if (b <= 6.2d+127) then
tmp = ((z * y) * x) + (j * ((c * a) - (y * i)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -2.3e+80) {
tmp = t_1;
} else if (b <= 6.2e+127) {
tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -2.3e+80: tmp = t_1 elif b <= 6.2e+127: tmp = ((z * y) * x) + (j * ((c * a) - (y * i))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.3e+80) tmp = t_1; elseif (b <= 6.2e+127) tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -2.3e+80) tmp = t_1; elseif (b <= 6.2e+127) tmp = ((z * y) * x) + (j * ((c * a) - (y * i))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.3e+80], t$95$1, If[LessEqual[b, 6.2e+127], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+127}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.30000000000000004e80 or 6.2000000000000005e127 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -2.30000000000000004e80 < b < 6.2000000000000005e127Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.2
Applied rewrites49.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.65e+64)
t_1
(if (<= y -9e-175)
(* (- t) (- (* a x) (* i b)))
(if (<= y 7.6e+30)
(* (fma (- t) x (* j c)) a)
(if (<= y 9.4e+123) (* (- (* y x) (* c b)) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -1.65e+64) {
tmp = t_1;
} else if (y <= -9e-175) {
tmp = -t * ((a * x) - (i * b));
} else if (y <= 7.6e+30) {
tmp = fma(-t, x, (j * c)) * a;
} else if (y <= 9.4e+123) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -1.65e+64) tmp = t_1; elseif (y <= -9e-175) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (y <= 7.6e+30) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (y <= 9.4e+123) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+64], t$95$1, If[LessEqual[y, -9e-175], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+30], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 9.4e+123], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-175}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+123}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999994e64 or 9.39999999999999958e123 < y Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if -1.64999999999999994e64 < y < -8.99999999999999996e-175Initial program 72.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
if -8.99999999999999996e-175 < y < 7.6000000000000003e30Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if 7.6000000000000003e30 < y < 9.39999999999999958e123Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.65e+64)
t_1
(if (<= y -9e-175)
(* (- t) (- (* a x) (* i b)))
(if (<= y 7.6e+30)
(* (fma (- t) x (* j c)) a)
(if (<= y 9.4e+123) (* (* y (+ x (/ (* (- b) c) y))) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -1.65e+64) {
tmp = t_1;
} else if (y <= -9e-175) {
tmp = -t * ((a * x) - (i * b));
} else if (y <= 7.6e+30) {
tmp = fma(-t, x, (j * c)) * a;
} else if (y <= 9.4e+123) {
tmp = (y * (x + ((-b * c) / y))) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -1.65e+64) tmp = t_1; elseif (y <= -9e-175) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (y <= 7.6e+30) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (y <= 9.4e+123) tmp = Float64(Float64(y * Float64(x + Float64(Float64(Float64(-b) * c) / y))) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+64], t$95$1, If[LessEqual[y, -9e-175], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+30], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 9.4e+123], N[(N[(y * N[(x + N[(N[((-b) * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-175}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+123}:\\
\;\;\;\;\left(y \cdot \left(x + \frac{\left(-b\right) \cdot c}{y}\right)\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999994e64 or 9.39999999999999958e123 < y Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if -1.64999999999999994e64 < y < -8.99999999999999996e-175Initial program 72.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
if -8.99999999999999996e-175 < y < 7.6000000000000003e30Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if 7.6000000000000003e30 < y < 9.39999999999999958e123Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6439.8
Applied rewrites39.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -8.2e+61)
t_1
(if (<= y -6.2e-157)
(* (- i) (- (* j y) (* b t)))
(if (<= y 7.6e+30)
(* (fma (- t) x (* j c)) a)
(if (<= y 9.4e+123) (* (- (* y x) (* c b)) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -8.2e+61) {
tmp = t_1;
} else if (y <= -6.2e-157) {
tmp = -i * ((j * y) - (b * t));
} else if (y <= 7.6e+30) {
tmp = fma(-t, x, (j * c)) * a;
} else if (y <= 9.4e+123) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -8.2e+61) tmp = t_1; elseif (y <= -6.2e-157) tmp = Float64(Float64(-i) * Float64(Float64(j * y) - Float64(b * t))); elseif (y <= 7.6e+30) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (y <= 9.4e+123) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8.2e+61], t$95$1, If[LessEqual[y, -6.2e-157], N[((-i) * N[(N[(j * y), $MachinePrecision] - N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+30], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 9.4e+123], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-157}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y - b \cdot t\right)\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+123}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.19999999999999944e61 or 9.39999999999999958e123 < y Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if -8.19999999999999944e61 < y < -6.1999999999999996e-157Initial program 72.5%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -6.1999999999999996e-157 < y < 7.6000000000000003e30Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if 7.6000000000000003e30 < y < 9.39999999999999958e123Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -5000000000.0)
t_1
(if (<= y 7.6e+30)
(* (fma (- t) x (* j c)) a)
(if (<= y 9.4e+123) (* (- (* y x) (* c b)) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -5000000000.0) {
tmp = t_1;
} else if (y <= 7.6e+30) {
tmp = fma(-t, x, (j * c)) * a;
} else if (y <= 9.4e+123) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -5000000000.0) tmp = t_1; elseif (y <= 7.6e+30) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (y <= 9.4e+123) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -5000000000.0], t$95$1, If[LessEqual[y, 7.6e+30], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 9.4e+123], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -5000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 9.4 \cdot 10^{+123}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5e9 or 9.39999999999999958e123 < y Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if -5e9 < y < 7.6000000000000003e30Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if 7.6000000000000003e30 < y < 9.39999999999999958e123Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -4.6e+37)
t_1
(if (<= b 2.16e+111) (* (fma (- i) j (* z x)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -4.6e+37) {
tmp = t_1;
} else if (b <= 2.16e+111) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -4.6e+37) tmp = t_1; elseif (b <= 2.16e+111) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.6e+37], t$95$1, If[LessEqual[b, 2.16e+111], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.16 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.60000000000000005e37 or 2.16000000000000008e111 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -4.60000000000000005e37 < b < 2.16000000000000008e111Initial program 72.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -2.9e+165)
t_1
(if (<= b -3.2e-266)
(* (- (* y x) (* c b)) z)
(if (<= b 1.7e-183)
(* (* (- t) x) a)
(if (<= b 4.2e+72) (* (- (* j a) (* b z)) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -2.9e+165) {
tmp = t_1;
} else if (b <= -3.2e-266) {
tmp = ((y * x) - (c * b)) * z;
} else if (b <= 1.7e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.2e+72) {
tmp = ((j * a) - (b * z)) * c;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-2.9d+165)) then
tmp = t_1
else if (b <= (-3.2d-266)) then
tmp = ((y * x) - (c * b)) * z
else if (b <= 1.7d-183) then
tmp = (-t * x) * a
else if (b <= 4.2d+72) then
tmp = ((j * a) - (b * z)) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -2.9e+165) {
tmp = t_1;
} else if (b <= -3.2e-266) {
tmp = ((y * x) - (c * b)) * z;
} else if (b <= 1.7e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.2e+72) {
tmp = ((j * a) - (b * z)) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -2.9e+165: tmp = t_1 elif b <= -3.2e-266: tmp = ((y * x) - (c * b)) * z elif b <= 1.7e-183: tmp = (-t * x) * a elif b <= 4.2e+72: tmp = ((j * a) - (b * z)) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.9e+165) tmp = t_1; elseif (b <= -3.2e-266) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); elseif (b <= 1.7e-183) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 4.2e+72) tmp = Float64(Float64(Float64(j * a) - Float64(b * z)) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -2.9e+165) tmp = t_1; elseif (b <= -3.2e-266) tmp = ((y * x) - (c * b)) * z; elseif (b <= 1.7e-183) tmp = (-t * x) * a; elseif (b <= 4.2e+72) tmp = ((j * a) - (b * z)) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.9e+165], t$95$1, If[LessEqual[b, -3.2e-266], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 1.7e-183], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 4.2e+72], N[(N[(N[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-266}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;\left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.90000000000000006e165 or 4.2000000000000003e72 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -2.90000000000000006e165 < b < -3.2e-266Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
if -3.2e-266 < b < 1.70000000000000007e-183Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
Applied rewrites22.5%
if 1.70000000000000007e-183 < b < 4.2000000000000003e72Initial program 72.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -7.5e+33)
t_1
(if (<= b -1.02e-103)
(* x (* y z))
(if (<= b 1.7e-183)
(* (* (- t) x) a)
(if (<= b 4.2e+72) (* (- (* j a) (* b z)) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -7.5e+33) {
tmp = t_1;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 1.7e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.2e+72) {
tmp = ((j * a) - (b * z)) * c;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-7.5d+33)) then
tmp = t_1
else if (b <= (-1.02d-103)) then
tmp = x * (y * z)
else if (b <= 1.7d-183) then
tmp = (-t * x) * a
else if (b <= 4.2d+72) then
tmp = ((j * a) - (b * z)) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -7.5e+33) {
tmp = t_1;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 1.7e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.2e+72) {
tmp = ((j * a) - (b * z)) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -7.5e+33: tmp = t_1 elif b <= -1.02e-103: tmp = x * (y * z) elif b <= 1.7e-183: tmp = (-t * x) * a elif b <= 4.2e+72: tmp = ((j * a) - (b * z)) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -7.5e+33) tmp = t_1; elseif (b <= -1.02e-103) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.7e-183) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 4.2e+72) tmp = Float64(Float64(Float64(j * a) - Float64(b * z)) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -7.5e+33) tmp = t_1; elseif (b <= -1.02e-103) tmp = x * (y * z); elseif (b <= 1.7e-183) tmp = (-t * x) * a; elseif (b <= 4.2e+72) tmp = ((j * a) - (b * z)) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -7.5e+33], t$95$1, If[LessEqual[b, -1.02e-103], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-183], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 4.2e+72], N[(N[(N[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.02 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;\left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.50000000000000046e33 or 4.2000000000000003e72 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -7.50000000000000046e33 < b < -1.01999999999999998e-103Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f6421.8
Applied rewrites21.8%
if -1.01999999999999998e-103 < b < 1.70000000000000007e-183Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
Applied rewrites22.5%
if 1.70000000000000007e-183 < b < 4.2000000000000003e72Initial program 72.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i t) (* c z)) b)))
(if (<= b -7.5e+33)
t_1
(if (<= b -1.02e-103)
(* x (* y z))
(if (<= b 6.5e-183)
(* (* (- t) x) a)
(if (<= b 4.5e+23) (* (* a c) j) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -7.5e+33) {
tmp = t_1;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 6.5e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.5e+23) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-7.5d+33)) then
tmp = t_1
else if (b <= (-1.02d-103)) then
tmp = x * (y * z)
else if (b <= 6.5d-183) then
tmp = (-t * x) * a
else if (b <= 4.5d+23) then
tmp = (a * c) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -7.5e+33) {
tmp = t_1;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 6.5e-183) {
tmp = (-t * x) * a;
} else if (b <= 4.5e+23) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -7.5e+33: tmp = t_1 elif b <= -1.02e-103: tmp = x * (y * z) elif b <= 6.5e-183: tmp = (-t * x) * a elif b <= 4.5e+23: tmp = (a * c) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -7.5e+33) tmp = t_1; elseif (b <= -1.02e-103) tmp = Float64(x * Float64(y * z)); elseif (b <= 6.5e-183) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 4.5e+23) tmp = Float64(Float64(a * c) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -7.5e+33) tmp = t_1; elseif (b <= -1.02e-103) tmp = x * (y * z); elseif (b <= 6.5e-183) tmp = (-t * x) * a; elseif (b <= 4.5e+23) tmp = (a * c) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -7.5e+33], t$95$1, If[LessEqual[b, -1.02e-103], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-183], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 4.5e+23], N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.02 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+23}:\\
\;\;\;\;\left(a \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.50000000000000046e33 or 4.49999999999999979e23 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -7.50000000000000046e33 < b < -1.01999999999999998e-103Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f6421.8
Applied rewrites21.8%
if -1.01999999999999998e-103 < b < 6.50000000000000014e-183Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
Applied rewrites22.5%
if 6.50000000000000014e-183 < b < 4.49999999999999979e23Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
lift-*.f6422.0
Applied rewrites22.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -9.5e+35)
(* (* (- b) c) z)
(if (<= b -1.02e-103)
(* x (* y z))
(if (<= b 6.5e-183)
(* (* (- t) x) a)
(if (<= b 3.3e-17)
(* (* a c) j)
(if (<= b 1.15e+105) (* (* y x) z) (* (* i t) b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -9.5e+35) {
tmp = (-b * c) * z;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 6.5e-183) {
tmp = (-t * x) * a;
} else if (b <= 3.3e-17) {
tmp = (a * c) * j;
} else if (b <= 1.15e+105) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * b;
}
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, j)
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), intent (in) :: j
real(8) :: tmp
if (b <= (-9.5d+35)) then
tmp = (-b * c) * z
else if (b <= (-1.02d-103)) then
tmp = x * (y * z)
else if (b <= 6.5d-183) then
tmp = (-t * x) * a
else if (b <= 3.3d-17) then
tmp = (a * c) * j
else if (b <= 1.15d+105) then
tmp = (y * x) * z
else
tmp = (i * t) * b
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 j) {
double tmp;
if (b <= -9.5e+35) {
tmp = (-b * c) * z;
} else if (b <= -1.02e-103) {
tmp = x * (y * z);
} else if (b <= 6.5e-183) {
tmp = (-t * x) * a;
} else if (b <= 3.3e-17) {
tmp = (a * c) * j;
} else if (b <= 1.15e+105) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -9.5e+35: tmp = (-b * c) * z elif b <= -1.02e-103: tmp = x * (y * z) elif b <= 6.5e-183: tmp = (-t * x) * a elif b <= 3.3e-17: tmp = (a * c) * j elif b <= 1.15e+105: tmp = (y * x) * z else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -9.5e+35) tmp = Float64(Float64(Float64(-b) * c) * z); elseif (b <= -1.02e-103) tmp = Float64(x * Float64(y * z)); elseif (b <= 6.5e-183) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 3.3e-17) tmp = Float64(Float64(a * c) * j); elseif (b <= 1.15e+105) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -9.5e+35) tmp = (-b * c) * z; elseif (b <= -1.02e-103) tmp = x * (y * z); elseif (b <= 6.5e-183) tmp = (-t * x) * a; elseif (b <= 3.3e-17) tmp = (a * c) * j; elseif (b <= 1.15e+105) tmp = (y * x) * z; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -9.5e+35], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, -1.02e-103], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-183], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.3e-17], N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 1.15e+105], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+35}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;b \leq -1.02 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{-17}:\\
\;\;\;\;\left(a \cdot c\right) \cdot j\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+105}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -9.50000000000000062e35Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around 0
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6422.6
Applied rewrites22.6%
if -9.50000000000000062e35 < b < -1.01999999999999998e-103Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f6421.8
Applied rewrites21.8%
if -1.01999999999999998e-103 < b < 6.50000000000000014e-183Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
Applied rewrites22.5%
if 6.50000000000000014e-183 < b < 3.3e-17Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
lift-*.f6422.0
Applied rewrites22.0%
if 3.3e-17 < b < 1.1499999999999999e105Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around 0
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6422.6
Applied rewrites22.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6421.9
Applied rewrites21.9%
if 1.1499999999999999e105 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in z around 0
lift-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -2.4e+126)
t_1
(if (<= y -3.8e-121)
(* t (* b i))
(if (<= y 1.62e-19) (* (* c j) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -2.4e+126) {
tmp = t_1;
} else if (y <= -3.8e-121) {
tmp = t * (b * i);
} else if (y <= 1.62e-19) {
tmp = (c * j) * a;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (y <= (-2.4d+126)) then
tmp = t_1
else if (y <= (-3.8d-121)) then
tmp = t * (b * i)
else if (y <= 1.62d-19) then
tmp = (c * j) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -2.4e+126) {
tmp = t_1;
} else if (y <= -3.8e-121) {
tmp = t * (b * i);
} else if (y <= 1.62e-19) {
tmp = (c * j) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -2.4e+126: tmp = t_1 elif y <= -3.8e-121: tmp = t * (b * i) elif y <= 1.62e-19: tmp = (c * j) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -2.4e+126) tmp = t_1; elseif (y <= -3.8e-121) tmp = Float64(t * Float64(b * i)); elseif (y <= 1.62e-19) tmp = Float64(Float64(c * j) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -2.4e+126) tmp = t_1; elseif (y <= -3.8e-121) tmp = t * (b * i); elseif (y <= 1.62e-19) tmp = (c * j) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+126], t$95$1, If[LessEqual[y, -3.8e-121], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.62e-19], N[(N[(c * j), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-121}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-19}:\\
\;\;\;\;\left(c \cdot j\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.40000000000000012e126 or 1.62000000000000009e-19 < y Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f6421.8
Applied rewrites21.8%
if -2.40000000000000012e126 < y < -3.8000000000000001e-121Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if -3.8000000000000001e-121 < y < 1.62000000000000009e-19Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -2.4e+126)
t_1
(if (<= y -3.8e-121)
(* t (* b i))
(if (<= y 2.8e-47) (* (* a c) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -2.4e+126) {
tmp = t_1;
} else if (y <= -3.8e-121) {
tmp = t * (b * i);
} else if (y <= 2.8e-47) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (y <= (-2.4d+126)) then
tmp = t_1
else if (y <= (-3.8d-121)) then
tmp = t * (b * i)
else if (y <= 2.8d-47) then
tmp = (a * c) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -2.4e+126) {
tmp = t_1;
} else if (y <= -3.8e-121) {
tmp = t * (b * i);
} else if (y <= 2.8e-47) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -2.4e+126: tmp = t_1 elif y <= -3.8e-121: tmp = t * (b * i) elif y <= 2.8e-47: tmp = (a * c) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -2.4e+126) tmp = t_1; elseif (y <= -3.8e-121) tmp = Float64(t * Float64(b * i)); elseif (y <= 2.8e-47) tmp = Float64(Float64(a * c) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -2.4e+126) tmp = t_1; elseif (y <= -3.8e-121) tmp = t * (b * i); elseif (y <= 2.8e-47) tmp = (a * c) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+126], t$95$1, If[LessEqual[y, -3.8e-121], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-47], N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-121}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-47}:\\
\;\;\;\;\left(a \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.40000000000000012e126 or 2.79999999999999993e-47 < y Initial program 72.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f6421.8
Applied rewrites21.8%
if -2.40000000000000012e126 < y < -3.8000000000000001e-121Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if -3.8000000000000001e-121 < y < 2.79999999999999993e-47Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
lift-*.f6422.0
Applied rewrites22.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* t (* b i)))) (if (<= b -1.42e+155) t_1 (if (<= b 4.2e+72) (* (* a c) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = t * (b * i);
double tmp;
if (b <= -1.42e+155) {
tmp = t_1;
} else if (b <= 4.2e+72) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
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, j)
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), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b * i)
if (b <= (-1.42d+155)) then
tmp = t_1
else if (b <= 4.2d+72) then
tmp = (a * c) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = t * (b * i);
double tmp;
if (b <= -1.42e+155) {
tmp = t_1;
} else if (b <= 4.2e+72) {
tmp = (a * c) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = t * (b * i) tmp = 0 if b <= -1.42e+155: tmp = t_1 elif b <= 4.2e+72: tmp = (a * c) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * Float64(b * i)) tmp = 0.0 if (b <= -1.42e+155) tmp = t_1; elseif (b <= 4.2e+72) tmp = Float64(Float64(a * c) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = t * (b * i); tmp = 0.0; if (b <= -1.42e+155) tmp = t_1; elseif (b <= 4.2e+72) tmp = (a * c) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.42e+155], t$95$1, If[LessEqual[b, 4.2e+72], N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b \cdot i\right)\\
\mathbf{if}\;b \leq -1.42 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;\left(a \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.41999999999999994e155 or 4.2000000000000003e72 < b Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if -1.41999999999999994e155 < b < 4.2000000000000003e72Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
lift-*.f6422.0
Applied rewrites22.0%
(FPCore (x y z t a b c i j) :precision binary64 (* (* a c) j))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (a * c) * j;
}
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, j)
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), intent (in) :: j
code = (a * c) * j
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (a * c) * j;
}
def code(x, y, z, t, a, b, c, i, j): return (a * c) * j
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(a * c) * j) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (a * c) * j; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision]
\begin{array}{l}
\\
\left(a \cdot c\right) \cdot j
\end{array}
Initial program 72.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
lift-*.f6422.0
Applied rewrites22.0%
herbie shell --seed 2025142
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))