
(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 19 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
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
INFINITY)
(fma
(- (* c a) (* i y))
j
(fma (- (* i t) (* c z)) b (* (- (* z y) (* a t)) x)))
(* c (- (* a j) (* b z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = fma(((c * a) - (i * y)), j, fma(((i * t) - (c * z)), b, (((z * y) - (a * t)) * x)));
} else {
tmp = c * ((a * j) - (b * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (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)))) <= Inf) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(Float64(z * y) - Float64(a * t)) * x))); else tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[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], Infinity], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(z \cdot y - a \cdot t\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\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.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
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.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c a) (* i y))))
(if (<= j -1.6e+88)
(fma t_1 j (* x (* y z)))
(if (<= j 2.2e-80)
(fma (- (* z y) (* t a)) x (fma b (- (* t i) (* z c)) (* j (* a c))))
(fma t_1 j (* b (- (* i t) (* c z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * a) - (i * y);
double tmp;
if (j <= -1.6e+88) {
tmp = fma(t_1, j, (x * (y * z)));
} else if (j <= 2.2e-80) {
tmp = fma(((z * y) - (t * a)), x, fma(b, ((t * i) - (z * c)), (j * (a * c))));
} else {
tmp = fma(t_1, j, (b * ((i * t) - (c * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * a) - Float64(i * y)) tmp = 0.0 if (j <= -1.6e+88) tmp = fma(t_1, j, Float64(x * Float64(y * z))); elseif (j <= 2.2e-80) tmp = fma(Float64(Float64(z * y) - Float64(t * a)), x, fma(b, Float64(Float64(t * i) - Float64(z * c)), Float64(j * Float64(a * c)))); else tmp = fma(t_1, j, Float64(b * Float64(Float64(i * t) - Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.6e+88], N[(t$95$1 * j + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.2e-80], N[(N[(N[(z * y), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision] * x + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * j + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot a - i \cdot y\\
\mathbf{if}\;j \leq -1.6 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, j, x \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 2.2 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - t \cdot a, x, \mathsf{fma}\left(b, t \cdot i - z \cdot c, j \cdot \left(a \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, j, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\end{array}
\end{array}
if j < -1.5999999999999999e88Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.7
Applied rewrites49.7%
if -1.5999999999999999e88 < j < 2.2000000000000001e-80Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in y around 0
lower-*.f6467.7
Applied rewrites67.7%
if 2.2000000000000001e-80 < j Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7
Applied rewrites60.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -3.2e+91)
(fma (- (* c a) (* i y)) j t_1)
(if (<= b -3.7e-54)
(fma a (* c j) (* x (- (* y z) (* a t))))
(if (<= b 3.15e-27)
(fma (* x z) y (fma (* (- x) a) t (* j (- (* a c) (* y i)))))
(if (<= b 7.2e+76)
(- (fma j (- (* a c) (* i y)) (* x (* y z))) (* b (* c 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.2e+91) {
tmp = fma(((c * a) - (i * y)), j, t_1);
} else if (b <= -3.7e-54) {
tmp = fma(a, (c * j), (x * ((y * z) - (a * t))));
} else if (b <= 3.15e-27) {
tmp = fma((x * z), y, fma((-x * a), t, (j * ((a * c) - (y * i)))));
} else if (b <= 7.2e+76) {
tmp = fma(j, ((a * c) - (i * y)), (x * (y * z))) - (b * (c * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.2e+91) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, t_1); elseif (b <= -3.7e-54) tmp = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (b <= 3.15e-27) tmp = fma(Float64(x * z), y, fma(Float64(Float64(-x) * a), t, Float64(j * Float64(Float64(a * c) - Float64(y * i))))); elseif (b <= 7.2e+76) tmp = Float64(fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(y * z))) - Float64(b * Float64(c * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+91], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + t$95$1), $MachinePrecision], If[LessEqual[b, -3.7e-54], N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.15e-27], N[(N[(x * z), $MachinePrecision] * y + N[(N[((-x) * a), $MachinePrecision] * t + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e+76], N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, t\_1\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 3.15 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot z, y, \mathsf{fma}\left(\left(-x\right) \cdot a, t, j \cdot \left(a \cdot c - y \cdot i\right)\right)\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.19999999999999989e91Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7
Applied rewrites60.7%
if -3.19999999999999989e91 < b < -3.7000000000000003e-54Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
if -3.7000000000000003e-54 < b < 3.15000000000000005e-27Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Applied rewrites59.4%
if 3.15000000000000005e-27 < b < 7.2000000000000006e76Initial program 72.9%
Taylor expanded in t around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6456.4
Applied rewrites56.4%
if 7.2000000000000006e76 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -5.6e+91)
(fma (- (* c a) (* i y)) j t_1)
(if (<= b 1.45e-27)
(fma (- (* z y) (* t a)) x (* j (- (* a c) (* y i))))
(if (<= b 7.2e+76)
(- (fma j (- (* a c) (* i y)) (* x (* y z))) (* b (* c 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -5.6e+91) {
tmp = fma(((c * a) - (i * y)), j, t_1);
} else if (b <= 1.45e-27) {
tmp = fma(((z * y) - (t * a)), x, (j * ((a * c) - (y * i))));
} else if (b <= 7.2e+76) {
tmp = fma(j, ((a * c) - (i * y)), (x * (y * z))) - (b * (c * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -5.6e+91) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, t_1); elseif (b <= 1.45e-27) tmp = fma(Float64(Float64(z * y) - Float64(t * a)), x, Float64(j * Float64(Float64(a * c) - Float64(y * i)))); elseif (b <= 7.2e+76) tmp = Float64(fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(y * z))) - Float64(b * Float64(c * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.6e+91], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + t$95$1), $MachinePrecision], If[LessEqual[b, 1.45e-27], N[(N[(N[(z * y), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision] * x + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e+76], N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -5.6 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, t\_1\right)\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - t \cdot a, x, j \cdot \left(a \cdot c - y \cdot i\right)\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.5999999999999997e91Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7
Applied rewrites60.7%
if -5.5999999999999997e91 < b < 1.45000000000000002e-27Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
if 1.45000000000000002e-27 < b < 7.2000000000000006e76Initial program 72.9%
Taylor expanded in t around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6456.4
Applied rewrites56.4%
if 7.2000000000000006e76 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- (* c a) (* i y)) j (* b (- (* i t) (* c z))))))
(if (<= b -5.6e+91)
t_1
(if (<= b 8.2e-104)
(fma (- (* z y) (* t a)) x (* j (- (* a c) (* 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 = fma(((c * a) - (i * y)), j, (b * ((i * t) - (c * z))));
double tmp;
if (b <= -5.6e+91) {
tmp = t_1;
} else if (b <= 8.2e-104) {
tmp = fma(((z * y) - (t * a)), x, (j * ((a * c) - (y * i))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(b * Float64(Float64(i * t) - Float64(c * z)))) tmp = 0.0 if (b <= -5.6e+91) tmp = t_1; elseif (b <= 8.2e-104) tmp = fma(Float64(Float64(z * y) - Float64(t * a)), x, Float64(j * Float64(Float64(a * c) - Float64(y * i)))); 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[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.6e+91], t$95$1, If[LessEqual[b, 8.2e-104], N[(N[(N[(z * y), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision] * x + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c \cdot a - i \cdot y, j, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\mathbf{if}\;b \leq -5.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-104}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - t \cdot a, x, j \cdot \left(a \cdot c - y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.5999999999999997e91 or 8.19999999999999968e-104 < b Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7
Applied rewrites60.7%
if -5.5999999999999997e91 < b < 8.19999999999999968e-104Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -8.5e+130)
t_1
(if (<= b 2.5e+77)
(fma (- (* z y) (* t a)) x (* j (- (* a c) (* 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -8.5e+130) {
tmp = t_1;
} else if (b <= 2.5e+77) {
tmp = fma(((z * y) - (t * a)), x, (j * ((a * c) - (y * i))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -8.5e+130) tmp = t_1; elseif (b <= 2.5e+77) tmp = fma(Float64(Float64(z * y) - Float64(t * a)), x, Float64(j * Float64(Float64(a * c) - Float64(y * i)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+130], t$95$1, If[LessEqual[b, 2.5e+77], N[(N[(N[(z * y), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision] * x + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - t \cdot a, x, j \cdot \left(a \cdot c - y \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.49999999999999965e130 or 2.50000000000000002e77 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -8.49999999999999965e130 < b < 2.50000000000000002e77Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
lift-fma.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -3.4e+128)
t_1
(if (<= b 2e+62)
(fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))
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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.4e+128) {
tmp = t_1;
} else if (b <= 2e+62) {
tmp = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.4e+128) tmp = t_1; elseif (b <= 2e+62) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e+128], t$95$1, If[LessEqual[b, 2e+62], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.3999999999999999e128 or 2.00000000000000007e62 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -3.3999999999999999e128 < b < 2.00000000000000007e62Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/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 (* b (- (* i t) (* c z)))))
(if (<= b -3.3e+91)
t_1
(if (<= b -8.5e-223)
(fma a (* c j) (* x (- (* y z) (* a t))))
(if (<= b 2e+62) (fma (- (* c a) (* i y)) j (* x (* 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.3e+91) {
tmp = t_1;
} else if (b <= -8.5e-223) {
tmp = fma(a, (c * j), (x * ((y * z) - (a * t))));
} else if (b <= 2e+62) {
tmp = fma(((c * a) - (i * y)), j, (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.3e+91) tmp = t_1; elseif (b <= -8.5e-223) tmp = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (b <= 2e+62) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(x * Float64(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[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e+91], t$95$1, If[LessEqual[b, -8.5e-223], N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+62], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -8.5 \cdot 10^{-223}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, x \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.30000000000000017e91 or 2.00000000000000007e62 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -3.30000000000000017e91 < b < -8.5000000000000003e-223Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
if -8.5000000000000003e-223 < b < 2.00000000000000007e62Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.7
Applied rewrites49.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -3.3e+91)
t_1
(if (<= b 3.2e-266)
(fma a (* c j) (* x (- (* y z) (* a t))))
(if (<= b 1e-30) (* j (- (* a c) (* i 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.3e+91) {
tmp = t_1;
} else if (b <= 3.2e-266) {
tmp = fma(a, (c * j), (x * ((y * z) - (a * t))));
} else if (b <= 1e-30) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.3e+91) tmp = t_1; elseif (b <= 3.2e-266) tmp = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (b <= 1e-30) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e+91], t$95$1, If[LessEqual[b, 3.2e-266], N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e-30], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-266}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 10^{-30}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.30000000000000017e91 or 1e-30 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -3.30000000000000017e91 < b < 3.2e-266Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
if 3.2e-266 < b < 1e-30Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -4.8e+59)
t_1
(if (<= b -3.6e-222)
(* x (- (* y z) (* a t)))
(if (<= b 1e-30) (* j (- (* a c) (* i 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -4.8e+59) {
tmp = t_1;
} else if (b <= -3.6e-222) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 1e-30) {
tmp = j * ((a * c) - (i * y));
} 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 = b * ((i * t) - (c * z))
if (b <= (-4.8d+59)) then
tmp = t_1
else if (b <= (-3.6d-222)) then
tmp = x * ((y * z) - (a * t))
else if (b <= 1d-30) then
tmp = j * ((a * c) - (i * y))
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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -4.8e+59) {
tmp = t_1;
} else if (b <= -3.6e-222) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 1e-30) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((i * t) - (c * z)) tmp = 0 if b <= -4.8e+59: tmp = t_1 elif b <= -3.6e-222: tmp = x * ((y * z) - (a * t)) elif b <= 1e-30: tmp = j * ((a * c) - (i * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -4.8e+59) tmp = t_1; elseif (b <= -3.6e-222) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 1e-30) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((i * t) - (c * z)); tmp = 0.0; if (b <= -4.8e+59) tmp = t_1; elseif (b <= -3.6e-222) tmp = x * ((y * z) - (a * t)); elseif (b <= 1e-30) tmp = j * ((a * c) - (i * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.8e+59], t$95$1, If[LessEqual[b, -3.6e-222], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e-30], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.6 \cdot 10^{-222}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 10^{-30}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.8000000000000004e59 or 1e-30 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -4.8000000000000004e59 < b < -3.59999999999999974e-222Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -3.59999999999999974e-222 < b < 1e-30Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -1.65e+123)
t_1
(if (<= c 8.5e+17) (* y (fma (- j) i (* x 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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.65e+123) {
tmp = t_1;
} else if (c <= 8.5e+17) {
tmp = y * fma(-j, i, (x * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -1.65e+123) tmp = t_1; elseif (c <= 8.5e+17) tmp = Float64(y * fma(Float64(-j), i, Float64(x * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+123], t$95$1, If[LessEqual[c, 8.5e+17], N[(y * N[((-j) * i + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-j, i, x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.65000000000000001e123 or 8.5e17 < c Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7
Applied rewrites38.7%
if -1.65000000000000001e123 < c < 8.5e17Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
lift-fma.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.8
Applied rewrites39.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -1.65e+123)
t_1
(if (<= c 8.5e+17) (* (- (* x z) (* j i)) 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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.65e+123) {
tmp = t_1;
} else if (c <= 8.5e+17) {
tmp = ((x * z) - (j * i)) * y;
} 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 = c * ((a * j) - (b * z))
if (c <= (-1.65d+123)) then
tmp = t_1
else if (c <= 8.5d+17) then
tmp = ((x * z) - (j * i)) * y
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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.65e+123) {
tmp = t_1;
} else if (c <= 8.5e+17) {
tmp = ((x * z) - (j * i)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((a * j) - (b * z)) tmp = 0 if c <= -1.65e+123: tmp = t_1 elif c <= 8.5e+17: tmp = ((x * z) - (j * i)) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -1.65e+123) tmp = t_1; elseif (c <= 8.5e+17) tmp = Float64(Float64(Float64(x * z) - Float64(j * i)) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((a * j) - (b * z)); tmp = 0.0; if (c <= -1.65e+123) tmp = t_1; elseif (c <= 8.5e+17) tmp = ((x * z) - (j * i)) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+123], t$95$1, If[LessEqual[c, 8.5e+17], N[(N[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;\left(x \cdot z - j \cdot i\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.65000000000000001e123 or 8.5e17 < c Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7
Applied rewrites38.7%
if -1.65000000000000001e123 < c < 8.5e17Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.4
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity39.4
lift-*.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 (* j (- (* a c) (* i y))))) (if (<= j -8.4e-44) t_1 (if (<= j 4.6e-74) (* x (- (* y z) (* a t))) 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -8.4e-44) {
tmp = t_1;
} else if (j <= 4.6e-74) {
tmp = x * ((y * z) - (a * t));
} 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 = j * ((a * c) - (i * y))
if (j <= (-8.4d-44)) then
tmp = t_1
else if (j <= 4.6d-74) then
tmp = x * ((y * z) - (a * t))
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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -8.4e-44) {
tmp = t_1;
} else if (j <= 4.6e-74) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (i * y)) tmp = 0 if j <= -8.4e-44: tmp = t_1 elif j <= 4.6e-74: tmp = x * ((y * z) - (a * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -8.4e-44) tmp = t_1; elseif (j <= 4.6e-74) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -8.4e-44) tmp = t_1; elseif (j <= 4.6e-74) tmp = x * ((y * z) - (a * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.4e-44], t$95$1, If[LessEqual[j, 4.6e-74], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -8.4 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 4.6 \cdot 10^{-74}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -8.40000000000000005e-44 or 4.59999999999999961e-74 < j Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if -8.40000000000000005e-44 < j < 4.59999999999999961e-74Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -3.6e+200) (* z (* -1.0 (* b c))) (if (<= c 2.8e+105) (* x (- (* y z) (* a t))) (* (* (- c) z) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -3.6e+200) {
tmp = z * (-1.0 * (b * c));
} else if (c <= 2.8e+105) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = (-c * z) * 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 (c <= (-3.6d+200)) then
tmp = z * ((-1.0d0) * (b * c))
else if (c <= 2.8d+105) then
tmp = x * ((y * z) - (a * t))
else
tmp = (-c * z) * 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 (c <= -3.6e+200) {
tmp = z * (-1.0 * (b * c));
} else if (c <= 2.8e+105) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = (-c * z) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -3.6e+200: tmp = z * (-1.0 * (b * c)) elif c <= 2.8e+105: tmp = x * ((y * z) - (a * t)) else: tmp = (-c * z) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -3.6e+200) tmp = Float64(z * Float64(-1.0 * Float64(b * c))); elseif (c <= 2.8e+105) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); else tmp = Float64(Float64(Float64(-c) * z) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -3.6e+200) tmp = z * (-1.0 * (b * c)); elseif (c <= 2.8e+105) tmp = x * ((y * z) - (a * t)); else tmp = (-c * z) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -3.6e+200], N[(z * N[(-1.0 * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+105], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.6 \cdot 10^{+200}:\\
\;\;\;\;z \cdot \left(-1 \cdot \left(b \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\end{array}
\end{array}
if c < -3.5999999999999998e200Initial program 72.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -3.5999999999999998e200 < c < 2.8000000000000001e105Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if 2.8000000000000001e105 < c Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.2
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6422.2
Applied rewrites22.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* x z) y)))
(if (<= x -4.2e+112)
t_1
(if (<= x 3.45e-102)
(* (* (- c) z) b)
(if (<= x 7e+30) (* 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 * z) * y;
double tmp;
if (x <= -4.2e+112) {
tmp = t_1;
} else if (x <= 3.45e-102) {
tmp = (-c * z) * b;
} else if (x <= 7e+30) {
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 * z) * y
if (x <= (-4.2d+112)) then
tmp = t_1
else if (x <= 3.45d-102) then
tmp = (-c * z) * b
else if (x <= 7d+30) 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 * z) * y;
double tmp;
if (x <= -4.2e+112) {
tmp = t_1;
} else if (x <= 3.45e-102) {
tmp = (-c * z) * b;
} else if (x <= 7e+30) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (x * z) * y tmp = 0 if x <= -4.2e+112: tmp = t_1 elif x <= 3.45e-102: tmp = (-c * z) * b elif x <= 7e+30: 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(x * z) * y) tmp = 0.0 if (x <= -4.2e+112) tmp = t_1; elseif (x <= 3.45e-102) tmp = Float64(Float64(Float64(-c) * z) * b); elseif (x <= 7e+30) tmp = Float64(a * Float64(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 * z) * y; tmp = 0.0; if (x <= -4.2e+112) tmp = t_1; elseif (x <= 3.45e-102) tmp = (-c * z) * b; elseif (x <= 7e+30) 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[(x * z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -4.2e+112], t$95$1, If[LessEqual[x, 3.45e-102], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 7e+30], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot z\right) \cdot y\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.45 \cdot 10^{-102}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+30}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.1999999999999998e112 or 7.00000000000000042e30 < x Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
if -4.1999999999999998e112 < x < 3.45e-102Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.2
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6422.2
Applied rewrites22.2%
if 3.45e-102 < x < 7.00000000000000042e30Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -1.3e+98) (* (* x z) y) (if (<= z 2.9e+27) (* a (* c j)) (* x (* y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.3e+98) {
tmp = (x * z) * y;
} else if (z <= 2.9e+27) {
tmp = a * (c * j);
} else {
tmp = x * (y * 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, 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 (z <= (-1.3d+98)) then
tmp = (x * z) * y
else if (z <= 2.9d+27) then
tmp = a * (c * j)
else
tmp = x * (y * 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 j) {
double tmp;
if (z <= -1.3e+98) {
tmp = (x * z) * y;
} else if (z <= 2.9e+27) {
tmp = a * (c * j);
} else {
tmp = x * (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.3e+98: tmp = (x * z) * y elif z <= 2.9e+27: tmp = a * (c * j) else: tmp = x * (y * z) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.3e+98) tmp = Float64(Float64(x * z) * y); elseif (z <= 2.9e+27) tmp = Float64(a * Float64(c * j)); else tmp = Float64(x * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.3e+98) tmp = (x * z) * y; elseif (z <= 2.9e+27) tmp = a * (c * j); else tmp = x * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.3e+98], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 2.9e+27], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+98}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+27}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.3e98Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
if -1.3e98 < z < 2.9000000000000001e27Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x around 0
lower-*.f6421.9
Applied rewrites21.9%
if 2.9000000000000001e27 < z Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -4.6e+39) (* (* x z) y) (if (<= z 1.15e-89) (* i (* b t)) (* x (* y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -4.6e+39) {
tmp = (x * z) * y;
} else if (z <= 1.15e-89) {
tmp = i * (b * t);
} else {
tmp = x * (y * 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, 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 (z <= (-4.6d+39)) then
tmp = (x * z) * y
else if (z <= 1.15d-89) then
tmp = i * (b * t)
else
tmp = x * (y * 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 j) {
double tmp;
if (z <= -4.6e+39) {
tmp = (x * z) * y;
} else if (z <= 1.15e-89) {
tmp = i * (b * t);
} else {
tmp = x * (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -4.6e+39: tmp = (x * z) * y elif z <= 1.15e-89: tmp = i * (b * t) else: tmp = x * (y * z) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -4.6e+39) tmp = Float64(Float64(x * z) * y); elseif (z <= 1.15e-89) tmp = Float64(i * Float64(b * t)); else tmp = Float64(x * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -4.6e+39) tmp = (x * z) * y; elseif (z <= 1.15e-89) tmp = i * (b * t); else tmp = x * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -4.6e+39], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.15e-89], N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+39}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-89}:\\
\;\;\;\;i \cdot \left(b \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -4.60000000000000024e39Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
if -4.60000000000000024e39 < z < 1.15e-89Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in y around 0
lower-*.f6422.3
Applied rewrites22.3%
if 1.15e-89 < z Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= y -6e-72) t_1 (if (<= y 1.15e-41) (* i (* b t)) 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 <= -6e-72) {
tmp = t_1;
} else if (y <= 1.15e-41) {
tmp = i * (b * t);
} 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 <= (-6d-72)) then
tmp = t_1
else if (y <= 1.15d-41) then
tmp = i * (b * t)
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 <= -6e-72) {
tmp = t_1;
} else if (y <= 1.15e-41) {
tmp = i * (b * t);
} 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 <= -6e-72: tmp = t_1 elif y <= 1.15e-41: tmp = i * (b * t) 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 <= -6e-72) tmp = t_1; elseif (y <= 1.15e-41) tmp = Float64(i * Float64(b * t)); 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 <= -6e-72) tmp = t_1; elseif (y <= 1.15e-41) tmp = i * (b * t); 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, -6e-72], t$95$1, If[LessEqual[y, 1.15e-41], N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-41}:\\
\;\;\;\;i \cdot \left(b \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6e-72 or 1.15000000000000005e-41 < y Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -6e-72 < y < 1.15000000000000005e-41Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in y around 0
lower-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j) :precision binary64 (* i (* b t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return i * (b * t);
}
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 = i * (b * t)
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 i * (b * t);
}
def code(x, y, z, t, a, b, c, i, j): return i * (b * t)
function code(x, y, z, t, a, b, c, i, j) return Float64(i * Float64(b * t)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = i * (b * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot \left(b \cdot t\right)
\end{array}
Initial program 72.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites76.0%
Applied rewrites75.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in y around 0
lower-*.f6422.3
Applied rewrites22.3%
herbie shell --seed 2025155
(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)))))