
(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 17 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))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(fma
(* j c)
a
(fma
(* (- j) y)
i
(fma (- (* y x) (* c b)) z (* (- (* b i) (* 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 = ((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 = fma((j * c), a, fma((-j * y), i, fma(((y * x) - (c * b)), z, (((b * i) - (a * x)) * t))));
}
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 = fma(Float64(j * c), a, fma(Float64(Float64(-j) * y), i, fma(Float64(Float64(y * x) - Float64(c * b)), z, Float64(Float64(Float64(b * i) - Float64(a * x)) * t)))); end return 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[(N[(j * c), $MachinePrecision] * a + N[(N[((-j) * y), $MachinePrecision] * i + N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z + N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $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}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(\left(-j\right) \cdot y, i, \mathsf{fma}\left(y \cdot x - c \cdot b, z, \left(b \cdot i - a \cdot x\right) \cdot t\right)\right)\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.5%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 73.5%
Applied rewrites73.7%
Applied rewrites75.7%
(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.5%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* b i) (* a x)) t)))
(if (<= t -2.9e+128)
t_1
(if (<= t 1.1e+126)
(- (* j (- (* a c) (* i y))) (* z (- (* b c) (* x y))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((b * i) - (a * x)) * t;
double tmp;
if (t <= -2.9e+128) {
tmp = t_1;
} else if (t <= 1.1e+126) {
tmp = (j * ((a * c) - (i * y))) - (z * ((b * c) - (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((b * i) - (a * x)) * t
if (t <= (-2.9d+128)) then
tmp = t_1
else if (t <= 1.1d+126) then
tmp = (j * ((a * c) - (i * y))) - (z * ((b * c) - (x * y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((b * i) - (a * x)) * t;
double tmp;
if (t <= -2.9e+128) {
tmp = t_1;
} else if (t <= 1.1e+126) {
tmp = (j * ((a * c) - (i * y))) - (z * ((b * c) - (x * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((b * i) - (a * x)) * t tmp = 0 if t <= -2.9e+128: tmp = t_1 elif t <= 1.1e+126: tmp = (j * ((a * c) - (i * y))) - (z * ((b * c) - (x * y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(b * i) - Float64(a * x)) * t) tmp = 0.0 if (t <= -2.9e+128) tmp = t_1; elseif (t <= 1.1e+126) tmp = Float64(Float64(j * Float64(Float64(a * c) - Float64(i * y))) - Float64(z * Float64(Float64(b * c) - Float64(x * y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((b * i) - (a * x)) * t; tmp = 0.0; if (t <= -2.9e+128) tmp = t_1; elseif (t <= 1.1e+126) tmp = (j * ((a * c) - (i * y))) - (z * ((b * c) - (x * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.9e+128], t$95$1, If[LessEqual[t, 1.1e+126], N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(N[(b * c), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+126}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right) - z \cdot \left(b \cdot c - x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.9e128 or 1.09999999999999999e126 < t Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-signN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
lower-*.f6440.3
Applied rewrites40.0%
if -2.9e128 < t < 1.09999999999999999e126Initial program 73.5%
Applied rewrites73.7%
Taylor expanded in t around 0
lower--.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.3
Applied rewrites58.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -1.3e+219)
t_1
(if (<= c -5.5e+54)
(* j (- (* a c) (* i y)))
(if (<= c -3.9e+28)
(- (* (* z x) y) (* (* c z) b))
(if (<= c 1.5e-266)
(* (- (* b i) (* a x)) t)
(if (<= c 54000000000.0) (* (- (* z x) (* j i)) y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.3e+219) {
tmp = t_1;
} else if (c <= -5.5e+54) {
tmp = j * ((a * c) - (i * y));
} else if (c <= -3.9e+28) {
tmp = ((z * x) * y) - ((c * z) * b);
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 54000000000.0) {
tmp = ((z * x) - (j * i)) * y;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a * j) - (b * z))
if (c <= (-1.3d+219)) then
tmp = t_1
else if (c <= (-5.5d+54)) then
tmp = j * ((a * c) - (i * y))
else if (c <= (-3.9d+28)) then
tmp = ((z * x) * y) - ((c * z) * b)
else if (c <= 1.5d-266) then
tmp = ((b * i) - (a * x)) * t
else if (c <= 54000000000.0d0) then
tmp = ((z * x) - (j * i)) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.3e+219) {
tmp = t_1;
} else if (c <= -5.5e+54) {
tmp = j * ((a * c) - (i * y));
} else if (c <= -3.9e+28) {
tmp = ((z * x) * y) - ((c * z) * b);
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 54000000000.0) {
tmp = ((z * x) - (j * i)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((a * j) - (b * z)) tmp = 0 if c <= -1.3e+219: tmp = t_1 elif c <= -5.5e+54: tmp = j * ((a * c) - (i * y)) elif c <= -3.9e+28: tmp = ((z * x) * y) - ((c * z) * b) elif c <= 1.5e-266: tmp = ((b * i) - (a * x)) * t elif c <= 54000000000.0: tmp = ((z * x) - (j * i)) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -1.3e+219) tmp = t_1; elseif (c <= -5.5e+54) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); elseif (c <= -3.9e+28) tmp = Float64(Float64(Float64(z * x) * y) - Float64(Float64(c * z) * b)); elseif (c <= 1.5e-266) tmp = Float64(Float64(Float64(b * i) - Float64(a * x)) * t); elseif (c <= 54000000000.0) tmp = Float64(Float64(Float64(z * x) - Float64(j * i)) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((a * j) - (b * z)); tmp = 0.0; if (c <= -1.3e+219) tmp = t_1; elseif (c <= -5.5e+54) tmp = j * ((a * c) - (i * y)); elseif (c <= -3.9e+28) tmp = ((z * x) * y) - ((c * z) * b); elseif (c <= 1.5e-266) tmp = ((b * i) - (a * x)) * t; elseif (c <= 54000000000.0) tmp = ((z * x) - (j * i)) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.3e+219], t$95$1, If[LessEqual[c, -5.5e+54], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.9e+28], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.5e-266], N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 54000000000.0], N[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -1.3 \cdot 10^{+219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -5.5 \cdot 10^{+54}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{elif}\;c \leq -3.9 \cdot 10^{+28}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y - \left(c \cdot z\right) \cdot b\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{-266}:\\
\;\;\;\;\left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{elif}\;c \leq 54000000000:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.3e219 or 5.4e10 < c Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -1.3e219 < c < -5.50000000000000026e54Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
if -5.50000000000000026e54 < c < -3.8999999999999999e28Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-outN/A
sub-flip-reverseN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.9
Applied rewrites34.9%
if -3.8999999999999999e28 < c < 1.5e-266Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-signN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
lower-*.f6440.3
Applied rewrites40.0%
if 1.5e-266 < c < 5.4e10Initial program 73.5%
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
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -1.3e+23)
t_1
(if (<= b 6.4e-79)
(+ (* x (* y z)) (* j (- (* c a) (* y i))))
(if (<= b 2.9e+56) (- (* j (- (* a c) (* i y))) (* z (* b 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -1.3e+23) {
tmp = t_1;
} else if (b <= 6.4e-79) {
tmp = (x * (y * z)) + (j * ((c * a) - (y * i)));
} else if (b <= 2.9e+56) {
tmp = (j * ((a * c) - (i * y))) - (z * (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((i * t) - (c * z))
if (b <= (-1.3d+23)) then
tmp = t_1
else if (b <= 6.4d-79) then
tmp = (x * (y * z)) + (j * ((c * a) - (y * i)))
else if (b <= 2.9d+56) then
tmp = (j * ((a * c) - (i * y))) - (z * (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (b <= -1.3e+23) {
tmp = t_1;
} else if (b <= 6.4e-79) {
tmp = (x * (y * z)) + (j * ((c * a) - (y * i)));
} else if (b <= 2.9e+56) {
tmp = (j * ((a * c) - (i * y))) - (z * (b * c));
} 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.3e+23: tmp = t_1 elif b <= 6.4e-79: tmp = (x * (y * z)) + (j * ((c * a) - (y * i))) elif b <= 2.9e+56: tmp = (j * ((a * c) - (i * y))) - (z * (b * c)) 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.3e+23) tmp = t_1; elseif (b <= 6.4e-79) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (b <= 2.9e+56) tmp = Float64(Float64(j * Float64(Float64(a * c) - Float64(i * y))) - Float64(z * Float64(b * c))); 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.3e+23) tmp = t_1; elseif (b <= 6.4e-79) tmp = (x * (y * z)) + (j * ((c * a) - (y * i))); elseif (b <= 2.9e+56) tmp = (j * ((a * c) - (i * y))) - (z * (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+23], t$95$1, If[LessEqual[b, 6.4e-79], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e+56], N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.4 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+56}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right) - z \cdot \left(b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.29999999999999996e23 or 2.90000000000000007e56 < b Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
if -1.29999999999999996e23 < b < 6.39999999999999975e-79Initial program 73.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6448.2
Applied rewrites48.2%
if 6.39999999999999975e-79 < b < 2.90000000000000007e56Initial program 73.5%
Applied rewrites73.7%
Taylor expanded in t around 0
lower--.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.3
Applied rewrites58.3%
Taylor expanded in x around 0
lower-*.f6448.8
Applied rewrites48.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* j (- (* a c) (* i y))) (* z (* b c)))))
(if (<= c -4.8e+24)
t_1
(if (<= c 1.5e-266)
(* (- (* b i) (* a x)) t)
(if (<= c 9e-119)
(* (- (* z x) (* j i)) y)
(if (<= c 9e+129) 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 = (j * ((a * c) - (i * y))) - (z * (b * c));
double tmp;
if (c <= -4.8e+24) {
tmp = t_1;
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 9e-119) {
tmp = ((z * x) - (j * i)) * y;
} else if (c <= 9e+129) {
tmp = t_1;
} else {
tmp = c * ((a * j) - (b * z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (j * ((a * c) - (i * y))) - (z * (b * c))
if (c <= (-4.8d+24)) then
tmp = t_1
else if (c <= 1.5d-266) then
tmp = ((b * i) - (a * x)) * t
else if (c <= 9d-119) then
tmp = ((z * x) - (j * i)) * y
else if (c <= 9d+129) then
tmp = t_1
else
tmp = c * ((a * j) - (b * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * ((a * c) - (i * y))) - (z * (b * c));
double tmp;
if (c <= -4.8e+24) {
tmp = t_1;
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 9e-119) {
tmp = ((z * x) - (j * i)) * y;
} else if (c <= 9e+129) {
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 = (j * ((a * c) - (i * y))) - (z * (b * c)) tmp = 0 if c <= -4.8e+24: tmp = t_1 elif c <= 1.5e-266: tmp = ((b * i) - (a * x)) * t elif c <= 9e-119: tmp = ((z * x) - (j * i)) * y elif c <= 9e+129: 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(j * Float64(Float64(a * c) - Float64(i * y))) - Float64(z * Float64(b * c))) tmp = 0.0 if (c <= -4.8e+24) tmp = t_1; elseif (c <= 1.5e-266) tmp = Float64(Float64(Float64(b * i) - Float64(a * x)) * t); elseif (c <= 9e-119) tmp = Float64(Float64(Float64(z * x) - Float64(j * i)) * y); elseif (c <= 9e+129) 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 = (j * ((a * c) - (i * y))) - (z * (b * c)); tmp = 0.0; if (c <= -4.8e+24) tmp = t_1; elseif (c <= 1.5e-266) tmp = ((b * i) - (a * x)) * t; elseif (c <= 9e-119) tmp = ((z * x) - (j * i)) * y; elseif (c <= 9e+129) 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[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.8e+24], t$95$1, If[LessEqual[c, 1.5e-266], N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 9e-119], N[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 9e+129], t$95$1, N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right) - z \cdot \left(b \cdot c\right)\\
\mathbf{if}\;c \leq -4.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{-266}:\\
\;\;\;\;\left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{elif}\;c \leq 9 \cdot 10^{-119}:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{elif}\;c \leq 9 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\end{array}
\end{array}
if c < -4.8000000000000001e24 or 9.0000000000000005e-119 < c < 9.0000000000000003e129Initial program 73.5%
Applied rewrites73.7%
Taylor expanded in t around 0
lower--.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.3
Applied rewrites58.3%
Taylor expanded in x around 0
lower-*.f6448.8
Applied rewrites48.8%
if -4.8000000000000001e24 < c < 1.5e-266Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-signN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
lower-*.f6440.3
Applied rewrites40.0%
if 1.5e-266 < c < 9.0000000000000005e-119Initial program 73.5%
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
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
if 9.0000000000000003e129 < c Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -1.75e+33)
t_1
(if (<= c 1.5e-266)
(* (- (* b i) (* a x)) t)
(if (<= c 54000000000.0) (* (- (* z x) (* j i)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.75e+33) {
tmp = t_1;
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 54000000000.0) {
tmp = ((z * x) - (j * i)) * y;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a * j) - (b * z))
if (c <= (-1.75d+33)) then
tmp = t_1
else if (c <= 1.5d-266) then
tmp = ((b * i) - (a * x)) * t
else if (c <= 54000000000.0d0) then
tmp = ((z * x) - (j * i)) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.75e+33) {
tmp = t_1;
} else if (c <= 1.5e-266) {
tmp = ((b * i) - (a * x)) * t;
} else if (c <= 54000000000.0) {
tmp = ((z * x) - (j * i)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((a * j) - (b * z)) tmp = 0 if c <= -1.75e+33: tmp = t_1 elif c <= 1.5e-266: tmp = ((b * i) - (a * x)) * t elif c <= 54000000000.0: tmp = ((z * x) - (j * i)) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -1.75e+33) tmp = t_1; elseif (c <= 1.5e-266) tmp = Float64(Float64(Float64(b * i) - Float64(a * x)) * t); elseif (c <= 54000000000.0) tmp = Float64(Float64(Float64(z * x) - Float64(j * i)) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((a * j) - (b * z)); tmp = 0.0; if (c <= -1.75e+33) tmp = t_1; elseif (c <= 1.5e-266) tmp = ((b * i) - (a * x)) * t; elseif (c <= 54000000000.0) tmp = ((z * x) - (j * i)) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.75e+33], t$95$1, If[LessEqual[c, 1.5e-266], N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 54000000000.0], N[(N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -1.75 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{-266}:\\
\;\;\;\;\left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{elif}\;c \leq 54000000000:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.75000000000000005e33 or 5.4e10 < c Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -1.75000000000000005e33 < c < 1.5e-266Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-signN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
lower-*.f6440.3
Applied rewrites40.0%
if 1.5e-266 < c < 5.4e10Initial program 73.5%
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
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.1
Applied rewrites38.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -1.28e+20)
t_1
(if (<= j -3e-66)
(* c (- (* a j) (* b z)))
(if (<= j -6.2e-104)
(* (* z x) y)
(if (<= j 2.3e+16) (* 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 <= -1.28e+20) {
tmp = t_1;
} else if (j <= -3e-66) {
tmp = c * ((a * j) - (b * z));
} else if (j <= -6.2e-104) {
tmp = (z * x) * y;
} else if (j <= 2.3e+16) {
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 <= (-1.28d+20)) then
tmp = t_1
else if (j <= (-3d-66)) then
tmp = c * ((a * j) - (b * z))
else if (j <= (-6.2d-104)) then
tmp = (z * x) * y
else if (j <= 2.3d+16) 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 <= -1.28e+20) {
tmp = t_1;
} else if (j <= -3e-66) {
tmp = c * ((a * j) - (b * z));
} else if (j <= -6.2e-104) {
tmp = (z * x) * y;
} else if (j <= 2.3e+16) {
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 <= -1.28e+20: tmp = t_1 elif j <= -3e-66: tmp = c * ((a * j) - (b * z)) elif j <= -6.2e-104: tmp = (z * x) * y elif j <= 2.3e+16: 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 <= -1.28e+20) tmp = t_1; elseif (j <= -3e-66) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (j <= -6.2e-104) tmp = Float64(Float64(z * x) * y); elseif (j <= 2.3e+16) 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 <= -1.28e+20) tmp = t_1; elseif (j <= -3e-66) tmp = c * ((a * j) - (b * z)); elseif (j <= -6.2e-104) tmp = (z * x) * y; elseif (j <= 2.3e+16) 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, -1.28e+20], t$95$1, If[LessEqual[j, -3e-66], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -6.2e-104], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 2.3e+16], 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 -1.28 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -3 \cdot 10^{-66}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;j \leq -6.2 \cdot 10^{-104}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;j \leq 2.3 \cdot 10^{+16}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.28e20 or 2.3e16 < j Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
if -1.28e20 < j < -3.0000000000000002e-66Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -3.0000000000000002e-66 < j < -6.19999999999999951e-104Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6422.2
Applied rewrites22.2%
if -6.19999999999999951e-104 < j < 2.3e16Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* c (- (* a j) (* b z))))) (if (<= c -1.75e+33) t_1 (if (<= c 98.0) (* (- (* b i) (* 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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.75e+33) {
tmp = t_1;
} else if (c <= 98.0) {
tmp = ((b * i) - (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 = c * ((a * j) - (b * z))
if (c <= (-1.75d+33)) then
tmp = t_1
else if (c <= 98.0d0) then
tmp = ((b * i) - (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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -1.75e+33) {
tmp = t_1;
} else if (c <= 98.0) {
tmp = ((b * i) - (a * x)) * t;
} 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.75e+33: tmp = t_1 elif c <= 98.0: tmp = ((b * i) - (a * x)) * t 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.75e+33) tmp = t_1; elseif (c <= 98.0) tmp = Float64(Float64(Float64(b * i) - 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 = c * ((a * j) - (b * z)); tmp = 0.0; if (c <= -1.75e+33) tmp = t_1; elseif (c <= 98.0) tmp = ((b * i) - (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[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.75e+33], t$95$1, If[LessEqual[c, 98.0], N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $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.75 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 98:\\
\;\;\;\;\left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.75000000000000005e33 or 98 < c Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -1.75000000000000005e33 < c < 98Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
fp-cancel-sub-signN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
lower-*.f6440.3
Applied rewrites40.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -3e+31)
t_1
(if (<= j -1.8e-105)
(* z (- (* x y) (* b c)))
(if (<= j 2.3e+16) (* 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 <= -3e+31) {
tmp = t_1;
} else if (j <= -1.8e-105) {
tmp = z * ((x * y) - (b * c));
} else if (j <= 2.3e+16) {
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 <= (-3d+31)) then
tmp = t_1
else if (j <= (-1.8d-105)) then
tmp = z * ((x * y) - (b * c))
else if (j <= 2.3d+16) 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 <= -3e+31) {
tmp = t_1;
} else if (j <= -1.8e-105) {
tmp = z * ((x * y) - (b * c));
} else if (j <= 2.3e+16) {
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 <= -3e+31: tmp = t_1 elif j <= -1.8e-105: tmp = z * ((x * y) - (b * c)) elif j <= 2.3e+16: 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 <= -3e+31) tmp = t_1; elseif (j <= -1.8e-105) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); elseif (j <= 2.3e+16) 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 <= -3e+31) tmp = t_1; elseif (j <= -1.8e-105) tmp = z * ((x * y) - (b * c)); elseif (j <= 2.3e+16) 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, -3e+31], t$95$1, If[LessEqual[j, -1.8e-105], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.3e+16], 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 -3 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.8 \cdot 10^{-105}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{elif}\;j \leq 2.3 \cdot 10^{+16}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.99999999999999989e31 or 2.3e16 < j Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.1
Applied rewrites38.1%
if -2.99999999999999989e31 < j < -1.79999999999999982e-105Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
if -1.79999999999999982e-105 < j < 2.3e16Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= x -1.25e+130)
t_1
(if (<= x 5.3e+98)
(* c (- (* a j) (* b z)))
(if (<= x 1.42e+228) t_1 (* -1.0 (* a (* t x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.25e+130) {
tmp = t_1;
} else if (x <= 5.3e+98) {
tmp = c * ((a * j) - (b * z));
} else if (x <= 1.42e+228) {
tmp = t_1;
} else {
tmp = -1.0 * (a * (t * x));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-1.25d+130)) then
tmp = t_1
else if (x <= 5.3d+98) then
tmp = c * ((a * j) - (b * z))
else if (x <= 1.42d+228) then
tmp = t_1
else
tmp = (-1.0d0) * (a * (t * x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.25e+130) {
tmp = t_1;
} else if (x <= 5.3e+98) {
tmp = c * ((a * j) - (b * z));
} else if (x <= 1.42e+228) {
tmp = t_1;
} else {
tmp = -1.0 * (a * (t * x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -1.25e+130: tmp = t_1 elif x <= 5.3e+98: tmp = c * ((a * j) - (b * z)) elif x <= 1.42e+228: tmp = t_1 else: tmp = -1.0 * (a * (t * x)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -1.25e+130) tmp = t_1; elseif (x <= 5.3e+98) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (x <= 1.42e+228) tmp = t_1; else tmp = Float64(-1.0 * Float64(a * Float64(t * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -1.25e+130) tmp = t_1; elseif (x <= 5.3e+98) tmp = c * ((a * j) - (b * z)); elseif (x <= 1.42e+228) tmp = t_1; else tmp = -1.0 * (a * (t * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.25e+130], t$95$1, If[LessEqual[x, 5.3e+98], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.42e+228], t$95$1, N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{+98}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -1.2499999999999999e130 or 5.29999999999999997e98 < x < 1.42e228Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -1.2499999999999999e130 < x < 5.29999999999999997e98Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if 1.42e228 < x Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= x -2.5e+178)
t_1
(if (<= x 1.6e+122)
(* b (- (* i t) (* c z)))
(if (<= x 1.42e+228) t_1 (* -1.0 (* a (* t x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -2.5e+178) {
tmp = t_1;
} else if (x <= 1.6e+122) {
tmp = b * ((i * t) - (c * z));
} else if (x <= 1.42e+228) {
tmp = t_1;
} else {
tmp = -1.0 * (a * (t * x));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-2.5d+178)) then
tmp = t_1
else if (x <= 1.6d+122) then
tmp = b * ((i * t) - (c * z))
else if (x <= 1.42d+228) then
tmp = t_1
else
tmp = (-1.0d0) * (a * (t * x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -2.5e+178) {
tmp = t_1;
} else if (x <= 1.6e+122) {
tmp = b * ((i * t) - (c * z));
} else if (x <= 1.42e+228) {
tmp = t_1;
} else {
tmp = -1.0 * (a * (t * x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -2.5e+178: tmp = t_1 elif x <= 1.6e+122: tmp = b * ((i * t) - (c * z)) elif x <= 1.42e+228: tmp = t_1 else: tmp = -1.0 * (a * (t * x)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -2.5e+178) tmp = t_1; elseif (x <= 1.6e+122) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); elseif (x <= 1.42e+228) tmp = t_1; else tmp = Float64(-1.0 * Float64(a * Float64(t * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -2.5e+178) tmp = t_1; elseif (x <= 1.6e+122) tmp = b * ((i * t) - (c * z)); elseif (x <= 1.42e+228) tmp = t_1; else tmp = -1.0 * (a * (t * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+178], t$95$1, If[LessEqual[x, 1.6e+122], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.42e+228], t$95$1, N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+122}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -2.49999999999999995e178 or 1.60000000000000006e122 < x < 1.42e228Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -2.49999999999999995e178 < x < 1.60000000000000006e122Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
if 1.42e228 < x Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) c) b)) (t_2 (* x (* y z))))
(if (<= x -5e+129)
t_2
(if (<= x -2.7e-125)
t_1
(if (<= x 7e-82)
(* -1.0 (* i (* j y)))
(if (<= x 4.5e+98)
t_1
(if (<= x 1.42e+228) t_2 (* -1.0 (* a (* t x))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.7e-125) {
tmp = t_1;
} else if (x <= 7e-82) {
tmp = -1.0 * (i * (j * y));
} else if (x <= 4.5e+98) {
tmp = t_1;
} else if (x <= 1.42e+228) {
tmp = t_2;
} else {
tmp = -1.0 * (a * (t * x));
}
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) :: t_2
real(8) :: tmp
t_1 = (-z * c) * b
t_2 = x * (y * z)
if (x <= (-5d+129)) then
tmp = t_2
else if (x <= (-2.7d-125)) then
tmp = t_1
else if (x <= 7d-82) then
tmp = (-1.0d0) * (i * (j * y))
else if (x <= 4.5d+98) then
tmp = t_1
else if (x <= 1.42d+228) then
tmp = t_2
else
tmp = (-1.0d0) * (a * (t * x))
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 * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.7e-125) {
tmp = t_1;
} else if (x <= 7e-82) {
tmp = -1.0 * (i * (j * y));
} else if (x <= 4.5e+98) {
tmp = t_1;
} else if (x <= 1.42e+228) {
tmp = t_2;
} else {
tmp = -1.0 * (a * (t * x));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-z * c) * b t_2 = x * (y * z) tmp = 0 if x <= -5e+129: tmp = t_2 elif x <= -2.7e-125: tmp = t_1 elif x <= 7e-82: tmp = -1.0 * (i * (j * y)) elif x <= 4.5e+98: tmp = t_1 elif x <= 1.42e+228: tmp = t_2 else: tmp = -1.0 * (a * (t * x)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * c) * b) t_2 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -5e+129) tmp = t_2; elseif (x <= -2.7e-125) tmp = t_1; elseif (x <= 7e-82) tmp = Float64(-1.0 * Float64(i * Float64(j * y))); elseif (x <= 4.5e+98) tmp = t_1; elseif (x <= 1.42e+228) tmp = t_2; else tmp = Float64(-1.0 * Float64(a * Float64(t * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-z * c) * b; t_2 = x * (y * z); tmp = 0.0; if (x <= -5e+129) tmp = t_2; elseif (x <= -2.7e-125) tmp = t_1; elseif (x <= 7e-82) tmp = -1.0 * (i * (j * y)); elseif (x <= 4.5e+98) tmp = t_1; elseif (x <= 1.42e+228) tmp = t_2; else tmp = -1.0 * (a * (t * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+129], t$95$2, If[LessEqual[x, -2.7e-125], t$95$1, If[LessEqual[x, 7e-82], N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+98], t$95$1, If[LessEqual[x, 1.42e+228], t$95$2, N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot c\right) \cdot b\\
t_2 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-82}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{+228}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -5.0000000000000003e129 or 4.5000000000000002e98 < x < 1.42e228Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -5.0000000000000003e129 < x < -2.6999999999999998e-125 or 6.9999999999999997e-82 < x < 4.5000000000000002e98Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.8
Applied rewrites22.8%
if -2.6999999999999998e-125 < x < 6.9999999999999997e-82Initial program 73.5%
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.2
Applied rewrites21.2%
if 1.42e228 < x Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.0
Applied rewrites40.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) c) b)) (t_2 (* x (* y z))))
(if (<= x -5e+129)
t_2
(if (<= x -2.7e-125)
t_1
(if (<= x 7e-82) (* -1.0 (* i (* j y))) (if (<= x 4.5e+98) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.7e-125) {
tmp = t_1;
} else if (x <= 7e-82) {
tmp = -1.0 * (i * (j * y));
} else if (x <= 4.5e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (-z * c) * b
t_2 = x * (y * z)
if (x <= (-5d+129)) then
tmp = t_2
else if (x <= (-2.7d-125)) then
tmp = t_1
else if (x <= 7d-82) then
tmp = (-1.0d0) * (i * (j * y))
else if (x <= 4.5d+98) then
tmp = t_1
else
tmp = t_2
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 * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.7e-125) {
tmp = t_1;
} else if (x <= 7e-82) {
tmp = -1.0 * (i * (j * y));
} else if (x <= 4.5e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-z * c) * b t_2 = x * (y * z) tmp = 0 if x <= -5e+129: tmp = t_2 elif x <= -2.7e-125: tmp = t_1 elif x <= 7e-82: tmp = -1.0 * (i * (j * y)) elif x <= 4.5e+98: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * c) * b) t_2 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -5e+129) tmp = t_2; elseif (x <= -2.7e-125) tmp = t_1; elseif (x <= 7e-82) tmp = Float64(-1.0 * Float64(i * Float64(j * y))); elseif (x <= 4.5e+98) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-z * c) * b; t_2 = x * (y * z); tmp = 0.0; if (x <= -5e+129) tmp = t_2; elseif (x <= -2.7e-125) tmp = t_1; elseif (x <= 7e-82) tmp = -1.0 * (i * (j * y)); elseif (x <= 4.5e+98) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+129], t$95$2, If[LessEqual[x, -2.7e-125], t$95$1, If[LessEqual[x, 7e-82], N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+98], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot c\right) \cdot b\\
t_2 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-82}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.0000000000000003e129 or 4.5000000000000002e98 < x Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -5.0000000000000003e129 < x < -2.6999999999999998e-125 or 6.9999999999999997e-82 < x < 4.5000000000000002e98Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.8
Applied rewrites22.8%
if -2.6999999999999998e-125 < x < 6.9999999999999997e-82Initial program 73.5%
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.2
Applied rewrites21.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) c) b)) (t_2 (* x (* y z))))
(if (<= x -5e+129)
t_2
(if (<= x -2.3e+26)
t_1
(if (<= x 1.5e-194) (* b (* i t)) (if (<= x 4.5e+98) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.3e+26) {
tmp = t_1;
} else if (x <= 1.5e-194) {
tmp = b * (i * t);
} else if (x <= 4.5e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (-z * c) * b
t_2 = x * (y * z)
if (x <= (-5d+129)) then
tmp = t_2
else if (x <= (-2.3d+26)) then
tmp = t_1
else if (x <= 1.5d-194) then
tmp = b * (i * t)
else if (x <= 4.5d+98) then
tmp = t_1
else
tmp = t_2
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 * c) * b;
double t_2 = x * (y * z);
double tmp;
if (x <= -5e+129) {
tmp = t_2;
} else if (x <= -2.3e+26) {
tmp = t_1;
} else if (x <= 1.5e-194) {
tmp = b * (i * t);
} else if (x <= 4.5e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-z * c) * b t_2 = x * (y * z) tmp = 0 if x <= -5e+129: tmp = t_2 elif x <= -2.3e+26: tmp = t_1 elif x <= 1.5e-194: tmp = b * (i * t) elif x <= 4.5e+98: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * c) * b) t_2 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -5e+129) tmp = t_2; elseif (x <= -2.3e+26) tmp = t_1; elseif (x <= 1.5e-194) tmp = Float64(b * Float64(i * t)); elseif (x <= 4.5e+98) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-z * c) * b; t_2 = x * (y * z); tmp = 0.0; if (x <= -5e+129) tmp = t_2; elseif (x <= -2.3e+26) tmp = t_1; elseif (x <= 1.5e-194) tmp = b * (i * t); elseif (x <= 4.5e+98) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+129], t$95$2, If[LessEqual[x, -2.3e+26], t$95$1, If[LessEqual[x, 1.5e-194], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+98], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot c\right) \cdot b\\
t_2 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-194}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -5.0000000000000003e129 or 4.5000000000000002e98 < x Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -5.0000000000000003e129 < x < -2.3000000000000001e26 or 1.5e-194 < x < 4.5000000000000002e98Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.8
Applied rewrites22.8%
if -2.3000000000000001e26 < x < 1.5e-194Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around 0
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= x -3.2e+114) t_1 (if (<= x 1.48e-77) (* 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 = x * (y * z);
double tmp;
if (x <= -3.2e+114) {
tmp = t_1;
} else if (x <= 1.48e-77) {
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 = x * (y * z)
if (x <= (-3.2d+114)) then
tmp = t_1
else if (x <= 1.48d-77) 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 = x * (y * z);
double tmp;
if (x <= -3.2e+114) {
tmp = t_1;
} else if (x <= 1.48e-77) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -3.2e+114: tmp = t_1 elif x <= 1.48e-77: tmp = b * (i * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -3.2e+114) tmp = t_1; elseif (x <= 1.48e-77) 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 = x * (y * z); tmp = 0.0; if (x <= -3.2e+114) tmp = t_1; elseif (x <= 1.48e-77) 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+114], t$95$1, If[LessEqual[x, 1.48e-77], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.48 \cdot 10^{-77}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.2e114 or 1.48000000000000002e-77 < x Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -3.2e114 < x < 1.48000000000000002e-77Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around 0
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.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
herbie shell --seed 2025156
(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)))))