
(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 21 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 (- y) i (* c a))))
(* 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 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(-y, i, (c * a)));
} else {
tmp = c * ((a * j) - (b * z));
}
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(-y), i, Float64(c * a)))); 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_] := 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[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $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(-y, i, c \cdot a\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 73.2%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f6473.4
Applied rewrites73.4%
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 73.2%
Taylor expanded in c around inf
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
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* 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 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 = c * ((a * j) - (b * z));
}
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 = c * ((a * j) - (b * z));
}
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 = c * ((a * j) - (b * z)) 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(c * Float64(Float64(a * j) - Float64(b * z))); 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 = c * ((a * j) - (b * z)); 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[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $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}:\\
\;\;\;\;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 73.2%
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 73.2%
Taylor expanded in c around inf
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 (fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))))
(if (<= j -1.6e+70)
t_1
(if (<= j 1.8e+83)
(+
(* b (fma (- z) c (fma i t (* (- (* z y) (* a t)) (/ x b)))))
(* j (* a 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 = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
double tmp;
if (j <= -1.6e+70) {
tmp = t_1;
} else if (j <= 1.8e+83) {
tmp = (b * fma(-z, c, fma(i, t, (((z * y) - (a * t)) * (x / b))))) + (j * (a * c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (j <= -1.6e+70) tmp = t_1; elseif (j <= 1.8e+83) tmp = Float64(Float64(b * fma(Float64(-z), c, fma(i, t, Float64(Float64(Float64(z * y) - Float64(a * t)) * Float64(x / b))))) + Float64(j * Float64(a * c))); else tmp = t_1; end return 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] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.6e+70], t$95$1, If[LessEqual[j, 1.8e+83], N[(N[(b * N[((-z) * c + N[(i * t + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;j \leq -1.6 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.8 \cdot 10^{+83}:\\
\;\;\;\;b \cdot \mathsf{fma}\left(-z, c, \mathsf{fma}\left(i, t, \left(z \cdot y - a \cdot t\right) \cdot \frac{x}{b}\right)\right) + j \cdot \left(a \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.6000000000000001e70 or 1.7999999999999999e83 < j Initial program 73.2%
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.9
Applied rewrites60.9%
if -1.6000000000000001e70 < j < 1.7999999999999999e83Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6471.5
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6469.8
Applied rewrites69.8%
Taylor expanded in y around 0
lower-*.f6465.1
Applied rewrites65.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))))
(if (<= j -1.4e+70)
t_1
(if (<= j 1.55e-18)
(fma (- (* i t) (* c z)) b (- (* (* j c) a) (* (* t x) 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 = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
double tmp;
if (j <= -1.4e+70) {
tmp = t_1;
} else if (j <= 1.55e-18) {
tmp = fma(((i * t) - (c * z)), b, (((j * c) * a) - ((t * x) * a)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (j <= -1.4e+70) tmp = t_1; elseif (j <= 1.55e-18) tmp = fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(Float64(j * c) * a) - Float64(Float64(t * x) * a))); else tmp = t_1; end return 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] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.4e+70], t$95$1, If[LessEqual[j, 1.55e-18], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision] - N[(N[(t * x), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;j \leq -1.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.55 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(j \cdot c\right) \cdot a - \left(t \cdot x\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.39999999999999995e70 or 1.55000000000000003e-18 < j Initial program 73.2%
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.9
Applied rewrites60.9%
if -1.39999999999999995e70 < j < 1.55000000000000003e-18Initial program 73.2%
Taylor expanded in y 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-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
lift--.f64N/A
sub-flipN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites59.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -3.3e+50)
(* -1.0 (* t (* b (- (/ (* a x) b) i))))
(if (<= t 1.06e+69)
(fma (- (* c a) (* i y)) j (* z (- (* y x) (* c b))))
(* (- (* i b) (* a x)) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -3.3e+50) {
tmp = -1.0 * (t * (b * (((a * x) / b) - i)));
} else if (t <= 1.06e+69) {
tmp = fma(((c * a) - (i * y)), j, (z * ((y * x) - (c * b))));
} else {
tmp = ((i * b) - (a * x)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -3.3e+50) tmp = Float64(-1.0 * Float64(t * Float64(b * Float64(Float64(Float64(a * x) / b) - i)))); elseif (t <= 1.06e+69) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(z * Float64(Float64(y * x) - Float64(c * b)))); else tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -3.3e+50], N[(-1.0 * N[(t * N[(b * N[(N[(N[(a * x), $MachinePrecision] / b), $MachinePrecision] - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e+69], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(z * N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+50}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(b \cdot \left(\frac{a \cdot x}{b} - i\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, z \cdot \left(y \cdot x - c \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\end{array}
\end{array}
if t < -3.3e50Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6440.1
Applied rewrites40.1%
if -3.3e50 < t < 1.06000000000000004e69Initial program 73.2%
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.6
Applied rewrites56.6%
lift--.f64N/A
lift-fma.f64N/A
associate--l+N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites59.8%
if 1.06000000000000004e69 < t Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* j (- (* a c) (* i y))) (* b (* c z)))))
(if (<= t -3.3e+50)
(* -1.0 (* t (* b (- (/ (* a x) b) i))))
(if (<= t -1.15e-55)
(fma -1.0 (* i (* j y)) (* x (- (* y z) (* a t))))
(if (<= t -2.1e-216)
t_1
(if (<= t 3.1e-100)
(+ (* x (* y z)) (* j (fma (- y) i (* c a))))
(if (<= t 7.2e+67) t_1 (* (- (* i b) (* a x)) t))))))))
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))) - (b * (c * z));
double tmp;
if (t <= -3.3e+50) {
tmp = -1.0 * (t * (b * (((a * x) / b) - i)));
} else if (t <= -1.15e-55) {
tmp = fma(-1.0, (i * (j * y)), (x * ((y * z) - (a * t))));
} else if (t <= -2.1e-216) {
tmp = t_1;
} else if (t <= 3.1e-100) {
tmp = (x * (y * z)) + (j * fma(-y, i, (c * a)));
} else if (t <= 7.2e+67) {
tmp = t_1;
} else {
tmp = ((i * b) - (a * x)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * Float64(Float64(a * c) - Float64(i * y))) - Float64(b * Float64(c * z))) tmp = 0.0 if (t <= -3.3e+50) tmp = Float64(-1.0 * Float64(t * Float64(b * Float64(Float64(Float64(a * x) / b) - i)))); elseif (t <= -1.15e-55) tmp = fma(-1.0, Float64(i * Float64(j * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (t <= -2.1e-216) tmp = t_1; elseif (t <= 3.1e-100) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * fma(Float64(-y), i, Float64(c * a)))); elseif (t <= 7.2e+67) tmp = t_1; else tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+50], N[(-1.0 * N[(t * N[(b * N[(N[(N[(a * x), $MachinePrecision] / b), $MachinePrecision] - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.15e-55], N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-216], t$95$1, If[LessEqual[t, 3.1e-100], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e+67], t$95$1, N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+50}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(b \cdot \left(\frac{a \cdot x}{b} - i\right)\right)\right)\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-55}:\\
\;\;\;\;\mathsf{fma}\left(-1, i \cdot \left(j \cdot y\right), x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-100}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \mathsf{fma}\left(-y, i, c \cdot a\right)\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\end{array}
\end{array}
if t < -3.3e50Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6440.1
Applied rewrites40.1%
if -3.3e50 < t < -1.15000000000000006e-55Initial program 73.2%
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.9
Applied rewrites60.9%
Taylor expanded in c around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.8
Applied rewrites49.8%
if -1.15000000000000006e-55 < t < -2.1000000000000002e-216 or 3.0999999999999999e-100 < t < 7.1999999999999998e67Initial program 73.2%
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.6
Applied rewrites56.6%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.6
Applied rewrites48.6%
if -2.1000000000000002e-216 < t < 3.0999999999999999e-100Initial program 73.2%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f6473.4
Applied rewrites73.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.4
Applied rewrites49.4%
if 7.1999999999999998e67 < t Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- (* i t) (* c z)) b (* (* j c) a))))
(if (<= b -4.7e-35)
t_1
(if (<= b 2.7e-35)
(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 = fma(((i * t) - (c * z)), b, ((j * c) * a));
double tmp;
if (b <= -4.7e-35) {
tmp = t_1;
} else if (b <= 2.7e-35) {
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 = fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(j * c) * a)) tmp = 0.0 if (b <= -4.7e-35) tmp = t_1; elseif (b <= 2.7e-35) 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[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.7e-35], t$95$1, If[LessEqual[b, 2.7e-35], 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 := \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{if}\;b \leq -4.7 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{-35}:\\
\;\;\;\;\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 < -4.7e-35 or 2.6999999999999997e-35 < b Initial program 73.2%
Taylor expanded in y 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-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6449.5
Applied rewrites49.5%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites50.0%
if -4.7e-35 < b < 2.6999999999999997e-35Initial program 73.2%
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.9
Applied rewrites60.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z x) (* j i)) y)))
(if (<= y -1.6e+80)
t_1
(if (<= y -3.8e+31)
(* c (- (* a j) (* b z)))
(if (<= y 1.9e-206)
(* -1.0 (* t (* b (- (/ (* a x) b) i))))
(if (<= y 7.2e+129)
(fma a (* c j) (* 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 = ((z * x) - (j * i)) * y;
double tmp;
if (y <= -1.6e+80) {
tmp = t_1;
} else if (y <= -3.8e+31) {
tmp = c * ((a * j) - (b * z));
} else if (y <= 1.9e-206) {
tmp = -1.0 * (t * (b * (((a * x) / b) - i)));
} else if (y <= 7.2e+129) {
tmp = fma(a, (c * j), (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(Float64(Float64(z * x) - Float64(j * i)) * y) tmp = 0.0 if (y <= -1.6e+80) tmp = t_1; elseif (y <= -3.8e+31) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (y <= 1.9e-206) tmp = Float64(-1.0 * Float64(t * Float64(b * Float64(Float64(Float64(a * x) / b) - i)))); elseif (y <= 7.2e+129) tmp = fma(a, Float64(c * j), 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[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.6e+80], t$95$1, If[LessEqual[y, -3.8e+31], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-206], N[(-1.0 * N[(t * N[(b * N[(N[(N[(a * x), $MachinePrecision] / b), $MachinePrecision] - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+129], N[(a * N[(c * j), $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 := \left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-206}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(b \cdot \left(\frac{a \cdot x}{b} - i\right)\right)\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+129}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.59999999999999995e80 or 7.2000000000000002e129 < y Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
if -1.59999999999999995e80 < y < -3.8000000000000001e31Initial program 73.2%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if -3.8000000000000001e31 < y < 1.90000000000000001e-206Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6440.1
Applied rewrites40.1%
if 1.90000000000000001e-206 < y < 7.2000000000000002e129Initial program 73.2%
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.9
Applied rewrites60.9%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma a (* c j) (* x (- (* y z) (* a t))))))
(if (<= x -2.15e-16)
t_1
(if (<= x 4.7e+36) (fma (- (* i t) (* c z)) b (* (* j 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 = fma(a, (c * j), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -2.15e-16) {
tmp = t_1;
} else if (x <= 4.7e+36) {
tmp = fma(((i * t) - (c * z)), b, ((j * c) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -2.15e-16) tmp = t_1; elseif (x <= 4.7e+36) tmp = fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(j * 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[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.15e-16], t$95$1, If[LessEqual[x, 4.7e+36], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.1499999999999999e-16 or 4.69999999999999989e36 < x Initial program 73.2%
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.9
Applied rewrites60.9%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
if -2.1499999999999999e-16 < x < 4.69999999999999989e36Initial program 73.2%
Taylor expanded in y 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-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6449.5
Applied rewrites49.5%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites50.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z x) (* j i)) y)))
(if (<= y -1.6e+80)
t_1
(if (<= y -3.8e+31)
(* c (- (* a j) (* b z)))
(if (<= y 3.4) (* -1.0 (* t (* b (- (/ (* a x) b) 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 = ((z * x) - (j * i)) * y;
double tmp;
if (y <= -1.6e+80) {
tmp = t_1;
} else if (y <= -3.8e+31) {
tmp = c * ((a * j) - (b * z));
} else if (y <= 3.4) {
tmp = -1.0 * (t * (b * (((a * x) / b) - 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 = ((z * x) - (j * i)) * y
if (y <= (-1.6d+80)) then
tmp = t_1
else if (y <= (-3.8d+31)) then
tmp = c * ((a * j) - (b * z))
else if (y <= 3.4d0) then
tmp = (-1.0d0) * (t * (b * (((a * x) / b) - 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 = ((z * x) - (j * i)) * y;
double tmp;
if (y <= -1.6e+80) {
tmp = t_1;
} else if (y <= -3.8e+31) {
tmp = c * ((a * j) - (b * z));
} else if (y <= 3.4) {
tmp = -1.0 * (t * (b * (((a * x) / b) - i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((z * x) - (j * i)) * y tmp = 0 if y <= -1.6e+80: tmp = t_1 elif y <= -3.8e+31: tmp = c * ((a * j) - (b * z)) elif y <= 3.4: tmp = -1.0 * (t * (b * (((a * x) / b) - i))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * x) - Float64(j * i)) * y) tmp = 0.0 if (y <= -1.6e+80) tmp = t_1; elseif (y <= -3.8e+31) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (y <= 3.4) tmp = Float64(-1.0 * Float64(t * Float64(b * Float64(Float64(Float64(a * x) / b) - i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((z * x) - (j * i)) * y; tmp = 0.0; if (y <= -1.6e+80) tmp = t_1; elseif (y <= -3.8e+31) tmp = c * ((a * j) - (b * z)); elseif (y <= 3.4) tmp = -1.0 * (t * (b * (((a * x) / b) - 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[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.6e+80], t$95$1, If[LessEqual[y, -3.8e+31], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4], N[(-1.0 * N[(t * N[(b * N[(N[(N[(a * x), $MachinePrecision] / b), $MachinePrecision] - i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;y \leq 3.4:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(b \cdot \left(\frac{a \cdot x}{b} - i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.59999999999999995e80 or 3.39999999999999991 < y Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
if -1.59999999999999995e80 < y < -3.8000000000000001e31Initial program 73.2%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if -3.8000000000000001e31 < y < 3.39999999999999991Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6440.1
Applied rewrites40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z x) (* j i)) y)))
(if (<= y -1.6e+80)
t_1
(if (<= y -4.2e+31)
(* c (- (* a j) (* b z)))
(if (<= y 7.7) (* (- (* i b) (* a x)) 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 = ((z * x) - (j * i)) * y;
double tmp;
if (y <= -1.6e+80) {
tmp = t_1;
} else if (y <= -4.2e+31) {
tmp = c * ((a * j) - (b * z));
} else if (y <= 7.7) {
tmp = ((i * b) - (a * x)) * 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 = ((z * x) - (j * i)) * y
if (y <= (-1.6d+80)) then
tmp = t_1
else if (y <= (-4.2d+31)) then
tmp = c * ((a * j) - (b * z))
else if (y <= 7.7d0) then
tmp = ((i * b) - (a * x)) * 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 = ((z * x) - (j * i)) * y;
double tmp;
if (y <= -1.6e+80) {
tmp = t_1;
} else if (y <= -4.2e+31) {
tmp = c * ((a * j) - (b * z));
} else if (y <= 7.7) {
tmp = ((i * b) - (a * x)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((z * x) - (j * i)) * y tmp = 0 if y <= -1.6e+80: tmp = t_1 elif y <= -4.2e+31: tmp = c * ((a * j) - (b * z)) elif y <= 7.7: tmp = ((i * b) - (a * x)) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * x) - Float64(j * i)) * y) tmp = 0.0 if (y <= -1.6e+80) tmp = t_1; elseif (y <= -4.2e+31) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (y <= 7.7) tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((z * x) - (j * i)) * y; tmp = 0.0; if (y <= -1.6e+80) tmp = t_1; elseif (y <= -4.2e+31) tmp = c * ((a * j) - (b * z)); elseif (y <= 7.7) tmp = ((i * b) - (a * x)) * 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[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.6e+80], t$95$1, If[LessEqual[y, -4.2e+31], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.7], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+31}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;y \leq 7.7:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.59999999999999995e80 or 7.70000000000000018 < y Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
if -1.59999999999999995e80 < y < -4.19999999999999958e31Initial program 73.2%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if -4.19999999999999958e31 < y < 7.70000000000000018Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -5.7e+60)
t_1
(if (<= j 1.55e-260)
(* b (- (* i t) (* c z)))
(if (<= j 7e+86) (* (- (* i b) (* a x)) 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 <= -5.7e+60) {
tmp = t_1;
} else if (j <= 1.55e-260) {
tmp = b * ((i * t) - (c * z));
} else if (j <= 7e+86) {
tmp = ((i * b) - (a * x)) * 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 <= (-5.7d+60)) then
tmp = t_1
else if (j <= 1.55d-260) then
tmp = b * ((i * t) - (c * z))
else if (j <= 7d+86) then
tmp = ((i * b) - (a * x)) * 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 <= -5.7e+60) {
tmp = t_1;
} else if (j <= 1.55e-260) {
tmp = b * ((i * t) - (c * z));
} else if (j <= 7e+86) {
tmp = ((i * b) - (a * x)) * 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 <= -5.7e+60: tmp = t_1 elif j <= 1.55e-260: tmp = b * ((i * t) - (c * z)) elif j <= 7e+86: tmp = ((i * b) - (a * x)) * 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 <= -5.7e+60) tmp = t_1; elseif (j <= 1.55e-260) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); elseif (j <= 7e+86) tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * 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 <= -5.7e+60) tmp = t_1; elseif (j <= 1.55e-260) tmp = b * ((i * t) - (c * z)); elseif (j <= 7e+86) tmp = ((i * b) - (a * x)) * 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, -5.7e+60], t$95$1, If[LessEqual[j, 1.55e-260], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7e+86], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $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 -5.7 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.55 \cdot 10^{-260}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{elif}\;j \leq 7 \cdot 10^{+86}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.69999999999999978e60 or 7.00000000000000038e86 < j Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -5.69999999999999978e60 < j < 1.54999999999999991e-260Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 1.54999999999999991e-260 < j < 7.00000000000000038e86Initial program 73.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.6
Applied rewrites39.6%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* z (- (* x y) (* b c)))))
(if (<= z -4.1e+144)
t_1
(if (<= z 1.35e-105)
(* j (- (* a c) (* i y)))
(if (<= z 2.8e+83) (* b (- (* i t) (* 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 = z * ((x * y) - (b * c));
double tmp;
if (z <= -4.1e+144) {
tmp = t_1;
} else if (z <= 1.35e-105) {
tmp = j * ((a * c) - (i * y));
} else if (z <= 2.8e+83) {
tmp = b * ((i * t) - (c * z));
} 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 = z * ((x * y) - (b * c))
if (z <= (-4.1d+144)) then
tmp = t_1
else if (z <= 1.35d-105) then
tmp = j * ((a * c) - (i * y))
else if (z <= 2.8d+83) then
tmp = b * ((i * t) - (c * z))
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 = z * ((x * y) - (b * c));
double tmp;
if (z <= -4.1e+144) {
tmp = t_1;
} else if (z <= 1.35e-105) {
tmp = j * ((a * c) - (i * y));
} else if (z <= 2.8e+83) {
tmp = b * ((i * t) - (c * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = z * ((x * y) - (b * c)) tmp = 0 if z <= -4.1e+144: tmp = t_1 elif z <= 1.35e-105: tmp = j * ((a * c) - (i * y)) elif z <= 2.8e+83: tmp = b * ((i * t) - (c * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(z * Float64(Float64(x * y) - Float64(b * c))) tmp = 0.0 if (z <= -4.1e+144) tmp = t_1; elseif (z <= 1.35e-105) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); elseif (z <= 2.8e+83) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = z * ((x * y) - (b * c)); tmp = 0.0; if (z <= -4.1e+144) tmp = t_1; elseif (z <= 1.35e-105) tmp = j * ((a * c) - (i * y)); elseif (z <= 2.8e+83) tmp = b * ((i * t) - (c * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+144], t$95$1, If[LessEqual[z, 1.35e-105], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+83], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-105}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+83}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.10000000000000001e144 or 2.8e83 < z Initial program 73.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -4.10000000000000001e144 < z < 1.34999999999999996e-105Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if 1.34999999999999996e-105 < z < 2.8e83Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* j (- (* a c) (* i y))))) (if (<= j -5.7e+60) t_1 (if (<= j 3e+79) (* b (- (* i t) (* 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -5.7e+60) {
tmp = t_1;
} else if (j <= 3e+79) {
tmp = b * ((i * t) - (c * z));
} 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 <= (-5.7d+60)) then
tmp = t_1
else if (j <= 3d+79) then
tmp = b * ((i * t) - (c * z))
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 <= -5.7e+60) {
tmp = t_1;
} else if (j <= 3e+79) {
tmp = b * ((i * t) - (c * z));
} 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 <= -5.7e+60: tmp = t_1 elif j <= 3e+79: tmp = b * ((i * t) - (c * z)) 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 <= -5.7e+60) tmp = t_1; elseif (j <= 3e+79) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); 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 <= -5.7e+60) tmp = t_1; elseif (j <= 3e+79) tmp = b * ((i * t) - (c * z)); 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, -5.7e+60], t$95$1, If[LessEqual[j, 3e+79], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $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 -5.7 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 3 \cdot 10^{+79}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.69999999999999978e60 or 2.99999999999999974e79 < j Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -5.69999999999999978e60 < j < 2.99999999999999974e79Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -1.22e+61)
t_1
(if (<= c 7.8e-13) (* b (- (* i t) (* 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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.22e+61) {
tmp = t_1;
} else if (c <= 7.8e-13) {
tmp = b * ((i * t) - (c * z));
} 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.22d+61)) then
tmp = t_1
else if (c <= 7.8d-13) then
tmp = b * ((i * t) - (c * z))
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.22e+61) {
tmp = t_1;
} else if (c <= 7.8e-13) {
tmp = b * ((i * t) - (c * z));
} 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.22e+61: tmp = t_1 elif c <= 7.8e-13: tmp = b * ((i * t) - (c * 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.22e+61) tmp = t_1; elseif (c <= 7.8e-13) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); 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.22e+61) tmp = t_1; elseif (c <= 7.8e-13) tmp = b * ((i * t) - (c * z)); 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.22e+61], t$95$1, If[LessEqual[c, 7.8e-13], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * 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.22 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{-13}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.22e61 or 7.80000000000000009e-13 < c Initial program 73.2%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if -1.22e61 < c < 7.80000000000000009e-13Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -1.35e-83)
t_1
(if (<= b -2.9e-306)
(* -1.0 (* i (* j y)))
(if (<= b 4e-93) (* 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -1.35e-83) {
tmp = t_1;
} else if (b <= -2.9e-306) {
tmp = -1.0 * (i * (j * y));
} else if (b <= 4e-93) {
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 = b * ((i * t) - (c * z))
if (b <= (-1.35d-83)) then
tmp = t_1
else if (b <= (-2.9d-306)) then
tmp = (-1.0d0) * (i * (j * y))
else if (b <= 4d-93) 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -1.35e-83) {
tmp = t_1;
} else if (b <= -2.9e-306) {
tmp = -1.0 * (i * (j * y));
} else if (b <= 4e-93) {
tmp = a * (c * j);
} 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 <= -1.35e-83: tmp = t_1 elif b <= -2.9e-306: tmp = -1.0 * (i * (j * y)) elif b <= 4e-93: tmp = a * (c * j) 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 <= -1.35e-83) tmp = t_1; elseif (b <= -2.9e-306) tmp = Float64(-1.0 * Float64(i * Float64(j * y))); elseif (b <= 4e-93) 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 = b * ((i * t) - (c * z)); tmp = 0.0; if (b <= -1.35e-83) tmp = t_1; elseif (b <= -2.9e-306) tmp = -1.0 * (i * (j * y)); elseif (b <= 4e-93) 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[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.35e-83], t$95$1, If[LessEqual[b, -2.9e-306], N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e-93], N[(a * N[(c * j), $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 -1.35 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.9 \cdot 10^{-306}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-93}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.34999999999999996e-83 or 3.9999999999999996e-93 < b Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -1.34999999999999996e-83 < b < -2.8999999999999999e-306Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.6
Applied rewrites21.6%
if -2.8999999999999999e-306 < b < 3.9999999999999996e-93Initial program 73.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* y (* -1.0 (* i j)))))
(if (<= y -6.5e+21)
t_1
(if (<= y 1.9e-206)
(* b (* i t))
(if (<= y 3e-65)
(* a (* c j))
(if (<= y 7.5e+192) (* 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 = y * (-1.0 * (i * j));
double tmp;
if (y <= -6.5e+21) {
tmp = t_1;
} else if (y <= 1.9e-206) {
tmp = b * (i * t);
} else if (y <= 3e-65) {
tmp = a * (c * j);
} else if (y <= 7.5e+192) {
tmp = x * (y * z);
} 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 = y * ((-1.0d0) * (i * j))
if (y <= (-6.5d+21)) then
tmp = t_1
else if (y <= 1.9d-206) then
tmp = b * (i * t)
else if (y <= 3d-65) then
tmp = a * (c * j)
else if (y <= 7.5d+192) then
tmp = x * (y * z)
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 = y * (-1.0 * (i * j));
double tmp;
if (y <= -6.5e+21) {
tmp = t_1;
} else if (y <= 1.9e-206) {
tmp = b * (i * t);
} else if (y <= 3e-65) {
tmp = a * (c * j);
} else if (y <= 7.5e+192) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = y * (-1.0 * (i * j)) tmp = 0 if y <= -6.5e+21: tmp = t_1 elif y <= 1.9e-206: tmp = b * (i * t) elif y <= 3e-65: tmp = a * (c * j) elif y <= 7.5e+192: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(y * Float64(-1.0 * Float64(i * j))) tmp = 0.0 if (y <= -6.5e+21) tmp = t_1; elseif (y <= 1.9e-206) tmp = Float64(b * Float64(i * t)); elseif (y <= 3e-65) tmp = Float64(a * Float64(c * j)); elseif (y <= 7.5e+192) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = y * (-1.0 * (i * j)); tmp = 0.0; if (y <= -6.5e+21) tmp = t_1; elseif (y <= 1.9e-206) tmp = b * (i * t); elseif (y <= 3e-65) tmp = a * (c * j); elseif (y <= 7.5e+192) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(y * N[(-1.0 * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+21], t$95$1, If[LessEqual[y, 1.9e-206], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-65], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+192], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-1 \cdot \left(i \cdot j\right)\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-206}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-65}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+192}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5e21 or 7.5e192 < y Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.7
Applied rewrites21.7%
if -6.5e21 < y < 1.90000000000000001e-206Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
lower-*.f6422.1
Applied rewrites22.1%
if 1.90000000000000001e-206 < y < 2.99999999999999998e-65Initial program 73.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if 2.99999999999999998e-65 < y < 7.5e192Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* -1.0 (* i (* j y)))))
(if (<= y -6.2e+21)
t_1
(if (<= y 1.9e-206)
(* b (* i t))
(if (<= y 3e-65)
(* a (* c j))
(if (<= y 3.3e+192) (* 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 = -1.0 * (i * (j * y));
double tmp;
if (y <= -6.2e+21) {
tmp = t_1;
} else if (y <= 1.9e-206) {
tmp = b * (i * t);
} else if (y <= 3e-65) {
tmp = a * (c * j);
} else if (y <= 3.3e+192) {
tmp = x * (y * z);
} 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 = (-1.0d0) * (i * (j * y))
if (y <= (-6.2d+21)) then
tmp = t_1
else if (y <= 1.9d-206) then
tmp = b * (i * t)
else if (y <= 3d-65) then
tmp = a * (c * j)
else if (y <= 3.3d+192) then
tmp = x * (y * z)
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 = -1.0 * (i * (j * y));
double tmp;
if (y <= -6.2e+21) {
tmp = t_1;
} else if (y <= 1.9e-206) {
tmp = b * (i * t);
} else if (y <= 3e-65) {
tmp = a * (c * j);
} else if (y <= 3.3e+192) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -1.0 * (i * (j * y)) tmp = 0 if y <= -6.2e+21: tmp = t_1 elif y <= 1.9e-206: tmp = b * (i * t) elif y <= 3e-65: tmp = a * (c * j) elif y <= 3.3e+192: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(-1.0 * Float64(i * Float64(j * y))) tmp = 0.0 if (y <= -6.2e+21) tmp = t_1; elseif (y <= 1.9e-206) tmp = Float64(b * Float64(i * t)); elseif (y <= 3e-65) tmp = Float64(a * Float64(c * j)); elseif (y <= 3.3e+192) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -1.0 * (i * (j * y)); tmp = 0.0; if (y <= -6.2e+21) tmp = t_1; elseif (y <= 1.9e-206) tmp = b * (i * t); elseif (y <= 3e-65) tmp = a * (c * j); elseif (y <= 3.3e+192) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+21], t$95$1, If[LessEqual[y, 1.9e-206], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-65], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+192], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-206}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-65}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+192}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.2e21 or 3.3000000000000001e192 < y Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.6
Applied rewrites21.6%
if -6.2e21 < y < 1.90000000000000001e-206Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
lower-*.f6422.1
Applied rewrites22.1%
if 1.90000000000000001e-206 < y < 2.99999999999999998e-65Initial program 73.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if 2.99999999999999998e-65 < y < 3.3000000000000001e192Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (* c j))))
(if (<= c -6.8e+30)
t_1
(if (<= c -1.4e-205)
(* x (* y z))
(if (<= c 7.8e-13) (* b (* i 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 = a * (c * j);
double tmp;
if (c <= -6.8e+30) {
tmp = t_1;
} else if (c <= -1.4e-205) {
tmp = x * (y * z);
} else if (c <= 7.8e-13) {
tmp = b * (i * 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 = a * (c * j)
if (c <= (-6.8d+30)) then
tmp = t_1
else if (c <= (-1.4d-205)) then
tmp = x * (y * z)
else if (c <= 7.8d-13) then
tmp = b * (i * 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 = a * (c * j);
double tmp;
if (c <= -6.8e+30) {
tmp = t_1;
} else if (c <= -1.4e-205) {
tmp = x * (y * z);
} else if (c <= 7.8e-13) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (c * j) tmp = 0 if c <= -6.8e+30: tmp = t_1 elif c <= -1.4e-205: tmp = x * (y * z) elif c <= 7.8e-13: tmp = b * (i * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(c * j)) tmp = 0.0 if (c <= -6.8e+30) tmp = t_1; elseif (c <= -1.4e-205) tmp = Float64(x * Float64(y * z)); elseif (c <= 7.8e-13) tmp = Float64(b * Float64(i * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (c * j); tmp = 0.0; if (c <= -6.8e+30) tmp = t_1; elseif (c <= -1.4e-205) tmp = x * (y * z); elseif (c <= 7.8e-13) tmp = b * (i * 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[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.8e+30], t$95$1, If[LessEqual[c, -1.4e-205], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.8e-13], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;c \leq -6.8 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-205}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{-13}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.8000000000000005e30 or 7.80000000000000009e-13 < c Initial program 73.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if -6.8000000000000005e30 < c < -1.39999999999999996e-205Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
if -1.39999999999999996e-205 < c < 7.80000000000000009e-13Initial program 73.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* c j)))) (if (<= c -6.8e+30) t_1 (if (<= c 2.5e-65) (* 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 = a * (c * j);
double tmp;
if (c <= -6.8e+30) {
tmp = t_1;
} else if (c <= 2.5e-65) {
tmp = x * (y * z);
} 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 = a * (c * j)
if (c <= (-6.8d+30)) then
tmp = t_1
else if (c <= 2.5d-65) then
tmp = x * (y * z)
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 = a * (c * j);
double tmp;
if (c <= -6.8e+30) {
tmp = t_1;
} else if (c <= 2.5e-65) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (c * j) tmp = 0 if c <= -6.8e+30: tmp = t_1 elif c <= 2.5e-65: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(c * j)) tmp = 0.0 if (c <= -6.8e+30) tmp = t_1; elseif (c <= 2.5e-65) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (c * j); tmp = 0.0; if (c <= -6.8e+30) tmp = t_1; elseif (c <= 2.5e-65) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.8e+30], t$95$1, If[LessEqual[c, 2.5e-65], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;c \leq -6.8 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{-65}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.8000000000000005e30 or 2.49999999999999991e-65 < c Initial program 73.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if -6.8000000000000005e30 < c < 2.49999999999999991e-65Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j) :precision binary64 (* x (* y z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return x * (y * z);
}
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)
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);
}
def code(x, y, z, t, a, b, c, i, j): return x * (y * z)
function code(x, y, z, t, a, b, c, i, j) return Float64(x * Float64(y * z)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = x * (y * z); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y \cdot z\right)
\end{array}
Initial program 73.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
herbie shell --seed 2025148
(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)))))