
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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) - (i * a)))) + (j * ((c * t) - (i * y)))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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) - (i * a)))) + (j * ((c * t) - (i * y)))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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) (* i a))))
(* j (- (* c t) (* i y))))))
(if (<= t_1 INFINITY) t_1 (* c (- (* j t) (* 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) - (i * a)))) + (j * ((c * t) - (i * y)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = c * ((j * t) - (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) - (i * a)))) + (j * ((c * t) - (i * y)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = c * ((j * t) - (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) - (i * a)))) + (j * ((c * t) - (i * y))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = c * ((j * t) - (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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(c * Float64(Float64(j * t) - 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) - (i * a)))) + (j * ((c * t) - (i * y))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = c * ((j * t) - (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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(c * N[(N[(j * t), $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 - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(j \cdot t - 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 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 73.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -6.2e+138)
(* b (- (* a i) (* c z)))
(if (<= c 1.4e+76)
(fma j (- (* c t) (* i y)) (* x (- (* y z) (* a t))))
(* c (- (* j t) (* b z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -6.2e+138) {
tmp = b * ((a * i) - (c * z));
} else if (c <= 1.4e+76) {
tmp = fma(j, ((c * t) - (i * y)), (x * ((y * z) - (a * t))));
} else {
tmp = c * ((j * t) - (b * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -6.2e+138) tmp = Float64(b * Float64(Float64(a * i) - Float64(c * z))); elseif (c <= 1.4e+76) tmp = fma(j, Float64(Float64(c * t) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); else tmp = Float64(c * Float64(Float64(j * t) - Float64(b * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -6.2e+138], N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.4e+76], N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.2 \cdot 10^{+138}:\\
\;\;\;\;b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{elif}\;c \leq 1.4 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(j \cdot t - b \cdot z\right)\\
\end{array}
\end{array}
if c < -6.1999999999999995e138Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -6.1999999999999995e138 < c < 1.3999999999999999e76Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
if 1.3999999999999999e76 < c Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i b) (* x t)) a)))
(if (<= a -1.42e+22)
t_1
(if (<= a 7e+56) (+ (* x (* y z)) (* j (- (* c t) (* 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 = ((i * b) - (x * t)) * a;
double tmp;
if (a <= -1.42e+22) {
tmp = t_1;
} else if (a <= 7e+56) {
tmp = (x * (y * z)) + (j * ((c * t) - (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 = ((i * b) - (x * t)) * a
if (a <= (-1.42d+22)) then
tmp = t_1
else if (a <= 7d+56) then
tmp = (x * (y * z)) + (j * ((c * t) - (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 = ((i * b) - (x * t)) * a;
double tmp;
if (a <= -1.42e+22) {
tmp = t_1;
} else if (a <= 7e+56) {
tmp = (x * (y * z)) + (j * ((c * t) - (i * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * b) - (x * t)) * a tmp = 0 if a <= -1.42e+22: tmp = t_1 elif a <= 7e+56: tmp = (x * (y * z)) + (j * ((c * t) - (i * y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * b) - Float64(x * t)) * a) tmp = 0.0 if (a <= -1.42e+22) tmp = t_1; elseif (a <= 7e+56) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * b) - (x * t)) * a; tmp = 0.0; if (a <= -1.42e+22) tmp = t_1; elseif (a <= 7e+56) tmp = (x * (y * z)) + (j * ((c * t) - (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[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1.42e+22], t$95$1, If[LessEqual[a, 7e+56], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{if}\;a \leq -1.42 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.42e22 or 6.99999999999999999e56 < a Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if -1.42e22 < a < 6.99999999999999999e56Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6448.6
Applied rewrites48.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* j t) (* b z)))))
(if (<= c -3.4e+87)
t_1
(if (<= c -1.4e+31)
(* (- (* x z) (* j i)) y)
(if (<= c 8.5e-267)
(* (- (* i b) (* x t)) a)
(if (<= c 40.0) (- (* (* x z) y) (* (* 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 * ((j * t) - (b * z));
double tmp;
if (c <= -3.4e+87) {
tmp = t_1;
} else if (c <= -1.4e+31) {
tmp = ((x * z) - (j * i)) * y;
} else if (c <= 8.5e-267) {
tmp = ((i * b) - (x * t)) * a;
} else if (c <= 40.0) {
tmp = ((x * z) * y) - ((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 * ((j * t) - (b * z))
if (c <= (-3.4d+87)) then
tmp = t_1
else if (c <= (-1.4d+31)) then
tmp = ((x * z) - (j * i)) * y
else if (c <= 8.5d-267) then
tmp = ((i * b) - (x * t)) * a
else if (c <= 40.0d0) then
tmp = ((x * z) * y) - ((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 * ((j * t) - (b * z));
double tmp;
if (c <= -3.4e+87) {
tmp = t_1;
} else if (c <= -1.4e+31) {
tmp = ((x * z) - (j * i)) * y;
} else if (c <= 8.5e-267) {
tmp = ((i * b) - (x * t)) * a;
} else if (c <= 40.0) {
tmp = ((x * z) * y) - ((j * i) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((j * t) - (b * z)) tmp = 0 if c <= -3.4e+87: tmp = t_1 elif c <= -1.4e+31: tmp = ((x * z) - (j * i)) * y elif c <= 8.5e-267: tmp = ((i * b) - (x * t)) * a elif c <= 40.0: tmp = ((x * z) * y) - ((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(j * t) - Float64(b * z))) tmp = 0.0 if (c <= -3.4e+87) tmp = t_1; elseif (c <= -1.4e+31) tmp = Float64(Float64(Float64(x * z) - Float64(j * i)) * y); elseif (c <= 8.5e-267) tmp = Float64(Float64(Float64(i * b) - Float64(x * t)) * a); elseif (c <= 40.0) tmp = Float64(Float64(Float64(x * z) * y) - Float64(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 * ((j * t) - (b * z)); tmp = 0.0; if (c <= -3.4e+87) tmp = t_1; elseif (c <= -1.4e+31) tmp = ((x * z) - (j * i)) * y; elseif (c <= 8.5e-267) tmp = ((i * b) - (x * t)) * a; elseif (c <= 40.0) tmp = ((x * z) * y) - ((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[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.4e+87], t$95$1, If[LessEqual[c, -1.4e+31], N[(N[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 8.5e-267], N[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 40.0], N[(N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision] - N[(N[(j * i), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t - b \cdot z\right)\\
\mathbf{if}\;c \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{+31}:\\
\;\;\;\;\left(x \cdot z - j \cdot i\right) \cdot y\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{-267}:\\
\;\;\;\;\left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{elif}\;c \leq 40:\\
\;\;\;\;\left(x \cdot z\right) \cdot y - \left(j \cdot i\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.4000000000000002e87 or 40 < c Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
if -3.4000000000000002e87 < c < -1.40000000000000008e31Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
if -1.40000000000000008e31 < c < 8.49999999999999987e-267Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if 8.49999999999999987e-267 < c < 40Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
lift-*.f64N/A
lift-fma.f64N/A
+-commutativeN/A
distribute-lft-inN/A
add-flipN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity36.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.3
Applied rewrites36.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* x z) (* j i)) y)) (t_2 (* c (- (* j t) (* b z)))))
(if (<= c -3.4e+87)
t_2
(if (<= c -1.4e+31)
t_1
(if (<= c 8e-267)
(* (- (* i b) (* x t)) a)
(if (<= c 40.0) 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 = ((x * z) - (j * i)) * y;
double t_2 = c * ((j * t) - (b * z));
double tmp;
if (c <= -3.4e+87) {
tmp = t_2;
} else if (c <= -1.4e+31) {
tmp = t_1;
} else if (c <= 8e-267) {
tmp = ((i * b) - (x * t)) * a;
} else if (c <= 40.0) {
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 = ((x * z) - (j * i)) * y
t_2 = c * ((j * t) - (b * z))
if (c <= (-3.4d+87)) then
tmp = t_2
else if (c <= (-1.4d+31)) then
tmp = t_1
else if (c <= 8d-267) then
tmp = ((i * b) - (x * t)) * a
else if (c <= 40.0d0) 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 = ((x * z) - (j * i)) * y;
double t_2 = c * ((j * t) - (b * z));
double tmp;
if (c <= -3.4e+87) {
tmp = t_2;
} else if (c <= -1.4e+31) {
tmp = t_1;
} else if (c <= 8e-267) {
tmp = ((i * b) - (x * t)) * a;
} else if (c <= 40.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * z) - (j * i)) * y t_2 = c * ((j * t) - (b * z)) tmp = 0 if c <= -3.4e+87: tmp = t_2 elif c <= -1.4e+31: tmp = t_1 elif c <= 8e-267: tmp = ((i * b) - (x * t)) * a elif c <= 40.0: 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(x * z) - Float64(j * i)) * y) t_2 = Float64(c * Float64(Float64(j * t) - Float64(b * z))) tmp = 0.0 if (c <= -3.4e+87) tmp = t_2; elseif (c <= -1.4e+31) tmp = t_1; elseif (c <= 8e-267) tmp = Float64(Float64(Float64(i * b) - Float64(x * t)) * a); elseif (c <= 40.0) 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 = ((x * z) - (j * i)) * y; t_2 = c * ((j * t) - (b * z)); tmp = 0.0; if (c <= -3.4e+87) tmp = t_2; elseif (c <= -1.4e+31) tmp = t_1; elseif (c <= 8e-267) tmp = ((i * b) - (x * t)) * a; elseif (c <= 40.0) 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[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.4e+87], t$95$2, If[LessEqual[c, -1.4e+31], t$95$1, If[LessEqual[c, 8e-267], N[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 40.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot z - j \cdot i\right) \cdot y\\
t_2 := c \cdot \left(j \cdot t - b \cdot z\right)\\
\mathbf{if}\;c \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-267}:\\
\;\;\;\;\left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{elif}\;c \leq 40:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -3.4000000000000002e87 or 40 < c Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
if -3.4000000000000002e87 < c < -1.40000000000000008e31 or 7.9999999999999999e-267 < c < 40Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.3
Applied rewrites38.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
if -1.40000000000000008e31 < c < 7.9999999999999999e-267Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i b) (* x t)) a)) (t_2 (* j (- (* c t) (* i y)))))
(if (<= j -5.8e+67)
t_2
(if (<= j -380000000.0)
t_1
(if (<= j -1.36e-65)
(* c (- (* j t) (* b z)))
(if (<= j -1.55e-103) (* (* x z) y) (if (<= j 3.2e+77) 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 = ((i * b) - (x * t)) * a;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (j <= -5.8e+67) {
tmp = t_2;
} else if (j <= -380000000.0) {
tmp = t_1;
} else if (j <= -1.36e-65) {
tmp = c * ((j * t) - (b * z));
} else if (j <= -1.55e-103) {
tmp = (x * z) * y;
} else if (j <= 3.2e+77) {
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 = ((i * b) - (x * t)) * a
t_2 = j * ((c * t) - (i * y))
if (j <= (-5.8d+67)) then
tmp = t_2
else if (j <= (-380000000.0d0)) then
tmp = t_1
else if (j <= (-1.36d-65)) then
tmp = c * ((j * t) - (b * z))
else if (j <= (-1.55d-103)) then
tmp = (x * z) * y
else if (j <= 3.2d+77) 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 = ((i * b) - (x * t)) * a;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (j <= -5.8e+67) {
tmp = t_2;
} else if (j <= -380000000.0) {
tmp = t_1;
} else if (j <= -1.36e-65) {
tmp = c * ((j * t) - (b * z));
} else if (j <= -1.55e-103) {
tmp = (x * z) * y;
} else if (j <= 3.2e+77) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * b) - (x * t)) * a t_2 = j * ((c * t) - (i * y)) tmp = 0 if j <= -5.8e+67: tmp = t_2 elif j <= -380000000.0: tmp = t_1 elif j <= -1.36e-65: tmp = c * ((j * t) - (b * z)) elif j <= -1.55e-103: tmp = (x * z) * y elif j <= 3.2e+77: 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(i * b) - Float64(x * t)) * a) t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (j <= -5.8e+67) tmp = t_2; elseif (j <= -380000000.0) tmp = t_1; elseif (j <= -1.36e-65) tmp = Float64(c * Float64(Float64(j * t) - Float64(b * z))); elseif (j <= -1.55e-103) tmp = Float64(Float64(x * z) * y); elseif (j <= 3.2e+77) 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 = ((i * b) - (x * t)) * a; t_2 = j * ((c * t) - (i * y)); tmp = 0.0; if (j <= -5.8e+67) tmp = t_2; elseif (j <= -380000000.0) tmp = t_1; elseif (j <= -1.36e-65) tmp = c * ((j * t) - (b * z)); elseif (j <= -1.55e-103) tmp = (x * z) * y; elseif (j <= 3.2e+77) 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[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.8e+67], t$95$2, If[LessEqual[j, -380000000.0], t$95$1, If[LessEqual[j, -1.36e-65], N[(c * N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.55e-103], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 3.2e+77], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b - x \cdot t\right) \cdot a\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -5.8 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -380000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.36 \cdot 10^{-65}:\\
\;\;\;\;c \cdot \left(j \cdot t - b \cdot z\right)\\
\mathbf{elif}\;j \leq -1.55 \cdot 10^{-103}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;j \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -5.80000000000000047e67 or 3.2000000000000002e77 < j Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -5.80000000000000047e67 < j < -3.8e8 or -1.5500000000000001e-103 < j < 3.2000000000000002e77Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if -3.8e8 < j < -1.35999999999999999e-65Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
if -1.35999999999999999e-65 < j < -1.5500000000000001e-103Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* z (- (* x y) (* b c)))))
(if (<= z -5.1e+51)
t_1
(if (<= z 9e-144)
(* (- (* i b) (* x t)) a)
(if (<= z 1.06e-30)
(* (- (* j c) (* x a)) t)
(if (<= z 1.15e+72) (* (- (* a b) (* j y)) i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = z * ((x * y) - (b * c));
double tmp;
if (z <= -5.1e+51) {
tmp = t_1;
} else if (z <= 9e-144) {
tmp = ((i * b) - (x * t)) * a;
} else if (z <= 1.06e-30) {
tmp = ((j * c) - (x * a)) * t;
} else if (z <= 1.15e+72) {
tmp = ((a * b) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = z * ((x * y) - (b * c))
if (z <= (-5.1d+51)) then
tmp = t_1
else if (z <= 9d-144) then
tmp = ((i * b) - (x * t)) * a
else if (z <= 1.06d-30) then
tmp = ((j * c) - (x * a)) * t
else if (z <= 1.15d+72) then
tmp = ((a * b) - (j * y)) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = z * ((x * y) - (b * c));
double tmp;
if (z <= -5.1e+51) {
tmp = t_1;
} else if (z <= 9e-144) {
tmp = ((i * b) - (x * t)) * a;
} else if (z <= 1.06e-30) {
tmp = ((j * c) - (x * a)) * t;
} else if (z <= 1.15e+72) {
tmp = ((a * b) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = z * ((x * y) - (b * c)) tmp = 0 if z <= -5.1e+51: tmp = t_1 elif z <= 9e-144: tmp = ((i * b) - (x * t)) * a elif z <= 1.06e-30: tmp = ((j * c) - (x * a)) * t elif z <= 1.15e+72: tmp = ((a * b) - (j * y)) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(z * Float64(Float64(x * y) - Float64(b * c))) tmp = 0.0 if (z <= -5.1e+51) tmp = t_1; elseif (z <= 9e-144) tmp = Float64(Float64(Float64(i * b) - Float64(x * t)) * a); elseif (z <= 1.06e-30) tmp = Float64(Float64(Float64(j * c) - Float64(x * a)) * t); elseif (z <= 1.15e+72) tmp = Float64(Float64(Float64(a * b) - Float64(j * y)) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = z * ((x * y) - (b * c)); tmp = 0.0; if (z <= -5.1e+51) tmp = t_1; elseif (z <= 9e-144) tmp = ((i * b) - (x * t)) * a; elseif (z <= 1.06e-30) tmp = ((j * c) - (x * a)) * t; elseif (z <= 1.15e+72) tmp = ((a * b) - (j * y)) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+51], t$95$1, If[LessEqual[z, 9e-144], N[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.06e-30], N[(N[(N[(j * c), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.15e+72], N[(N[(N[(a * b), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-144}:\\
\;\;\;\;\left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-30}:\\
\;\;\;\;\left(j \cdot c - x \cdot a\right) \cdot t\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+72}:\\
\;\;\;\;\left(a \cdot b - j \cdot y\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.1000000000000001e51 or 1.15e72 < z Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -5.1000000000000001e51 < z < 8.9999999999999996e-144Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if 8.9999999999999996e-144 < z < 1.06e-30Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.3
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-identity40.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
if 1.06e-30 < z < 1.15e72Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.0
Applied rewrites38.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i b) (* x t)) a)) (t_2 (* j (- (* c t) (* i y)))))
(if (<= j -5.8e+67)
t_2
(if (<= j -9e-66)
t_1
(if (<= j -1.55e-103) (* (* x z) y) (if (<= j 3.2e+77) 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 = ((i * b) - (x * t)) * a;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (j <= -5.8e+67) {
tmp = t_2;
} else if (j <= -9e-66) {
tmp = t_1;
} else if (j <= -1.55e-103) {
tmp = (x * z) * y;
} else if (j <= 3.2e+77) {
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 = ((i * b) - (x * t)) * a
t_2 = j * ((c * t) - (i * y))
if (j <= (-5.8d+67)) then
tmp = t_2
else if (j <= (-9d-66)) then
tmp = t_1
else if (j <= (-1.55d-103)) then
tmp = (x * z) * y
else if (j <= 3.2d+77) 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 = ((i * b) - (x * t)) * a;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (j <= -5.8e+67) {
tmp = t_2;
} else if (j <= -9e-66) {
tmp = t_1;
} else if (j <= -1.55e-103) {
tmp = (x * z) * y;
} else if (j <= 3.2e+77) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * b) - (x * t)) * a t_2 = j * ((c * t) - (i * y)) tmp = 0 if j <= -5.8e+67: tmp = t_2 elif j <= -9e-66: tmp = t_1 elif j <= -1.55e-103: tmp = (x * z) * y elif j <= 3.2e+77: 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(i * b) - Float64(x * t)) * a) t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (j <= -5.8e+67) tmp = t_2; elseif (j <= -9e-66) tmp = t_1; elseif (j <= -1.55e-103) tmp = Float64(Float64(x * z) * y); elseif (j <= 3.2e+77) 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 = ((i * b) - (x * t)) * a; t_2 = j * ((c * t) - (i * y)); tmp = 0.0; if (j <= -5.8e+67) tmp = t_2; elseif (j <= -9e-66) tmp = t_1; elseif (j <= -1.55e-103) tmp = (x * z) * y; elseif (j <= 3.2e+77) 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[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.8e+67], t$95$2, If[LessEqual[j, -9e-66], t$95$1, If[LessEqual[j, -1.55e-103], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 3.2e+77], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b - x \cdot t\right) \cdot a\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -5.8 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -9 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.55 \cdot 10^{-103}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;j \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -5.80000000000000047e67 or 3.2000000000000002e77 < j Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -5.80000000000000047e67 < j < -8.9999999999999995e-66 or -1.5500000000000001e-103 < j < 3.2000000000000002e77Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if -8.9999999999999995e-66 < j < -1.5500000000000001e-103Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c t) (* i y)))))
(if (<= j -1.16e+66)
t_1
(if (<= j -1.1e-105)
(* z (- (* x y) (* b c)))
(if (<= j 3.2e+77) (* (- (* i b) (* x t)) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * t) - (i * y));
double tmp;
if (j <= -1.16e+66) {
tmp = t_1;
} else if (j <= -1.1e-105) {
tmp = z * ((x * y) - (b * c));
} else if (j <= 3.2e+77) {
tmp = ((i * b) - (x * t)) * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((c * t) - (i * y))
if (j <= (-1.16d+66)) then
tmp = t_1
else if (j <= (-1.1d-105)) then
tmp = z * ((x * y) - (b * c))
else if (j <= 3.2d+77) then
tmp = ((i * b) - (x * t)) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * t) - (i * y));
double tmp;
if (j <= -1.16e+66) {
tmp = t_1;
} else if (j <= -1.1e-105) {
tmp = z * ((x * y) - (b * c));
} else if (j <= 3.2e+77) {
tmp = ((i * b) - (x * t)) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * t) - (i * y)) tmp = 0 if j <= -1.16e+66: tmp = t_1 elif j <= -1.1e-105: tmp = z * ((x * y) - (b * c)) elif j <= 3.2e+77: tmp = ((i * b) - (x * t)) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (j <= -1.16e+66) tmp = t_1; elseif (j <= -1.1e-105) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); elseif (j <= 3.2e+77) tmp = Float64(Float64(Float64(i * b) - Float64(x * t)) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * t) - (i * y)); tmp = 0.0; if (j <= -1.16e+66) tmp = t_1; elseif (j <= -1.1e-105) tmp = z * ((x * y) - (b * c)); elseif (j <= 3.2e+77) tmp = ((i * b) - (x * t)) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.16e+66], t$95$1, If[LessEqual[j, -1.1e-105], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.2e+77], N[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -1.16 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.1 \cdot 10^{-105}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{elif}\;j \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;\left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.16e66 or 3.2000000000000002e77 < j Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -1.16e66 < j < -1.10000000000000002e-105Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -1.10000000000000002e-105 < j < 3.2000000000000002e77Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i b) (* x t)) a)))
(if (<= a -5.4e-24)
t_1
(if (<= a -3.55e-152)
(* j (* -1.0 (* i y)))
(if (<= a -1.24e-219)
(* z (* -1.0 (* b c)))
(if (<= a 1.36e-251)
(* (* x z) y)
(if (<= a 5.2e-74) (* j (* c 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 = ((i * b) - (x * t)) * a;
double tmp;
if (a <= -5.4e-24) {
tmp = t_1;
} else if (a <= -3.55e-152) {
tmp = j * (-1.0 * (i * y));
} else if (a <= -1.24e-219) {
tmp = z * (-1.0 * (b * c));
} else if (a <= 1.36e-251) {
tmp = (x * z) * y;
} else if (a <= 5.2e-74) {
tmp = j * (c * 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 = ((i * b) - (x * t)) * a
if (a <= (-5.4d-24)) then
tmp = t_1
else if (a <= (-3.55d-152)) then
tmp = j * ((-1.0d0) * (i * y))
else if (a <= (-1.24d-219)) then
tmp = z * ((-1.0d0) * (b * c))
else if (a <= 1.36d-251) then
tmp = (x * z) * y
else if (a <= 5.2d-74) then
tmp = j * (c * 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 = ((i * b) - (x * t)) * a;
double tmp;
if (a <= -5.4e-24) {
tmp = t_1;
} else if (a <= -3.55e-152) {
tmp = j * (-1.0 * (i * y));
} else if (a <= -1.24e-219) {
tmp = z * (-1.0 * (b * c));
} else if (a <= 1.36e-251) {
tmp = (x * z) * y;
} else if (a <= 5.2e-74) {
tmp = j * (c * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * b) - (x * t)) * a tmp = 0 if a <= -5.4e-24: tmp = t_1 elif a <= -3.55e-152: tmp = j * (-1.0 * (i * y)) elif a <= -1.24e-219: tmp = z * (-1.0 * (b * c)) elif a <= 1.36e-251: tmp = (x * z) * y elif a <= 5.2e-74: tmp = j * (c * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * b) - Float64(x * t)) * a) tmp = 0.0 if (a <= -5.4e-24) tmp = t_1; elseif (a <= -3.55e-152) tmp = Float64(j * Float64(-1.0 * Float64(i * y))); elseif (a <= -1.24e-219) tmp = Float64(z * Float64(-1.0 * Float64(b * c))); elseif (a <= 1.36e-251) tmp = Float64(Float64(x * z) * y); elseif (a <= 5.2e-74) tmp = Float64(j * Float64(c * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * b) - (x * t)) * a; tmp = 0.0; if (a <= -5.4e-24) tmp = t_1; elseif (a <= -3.55e-152) tmp = j * (-1.0 * (i * y)); elseif (a <= -1.24e-219) tmp = z * (-1.0 * (b * c)); elseif (a <= 1.36e-251) tmp = (x * z) * y; elseif (a <= 5.2e-74) tmp = j * (c * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * b), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -5.4e-24], t$95$1, If[LessEqual[a, -3.55e-152], N[(j * N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.24e-219], N[(z * N[(-1.0 * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.36e-251], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 5.2e-74], N[(j * N[(c * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b - x \cdot t\right) \cdot a\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.55 \cdot 10^{-152}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(i \cdot y\right)\right)\\
\mathbf{elif}\;a \leq -1.24 \cdot 10^{-219}:\\
\;\;\;\;z \cdot \left(-1 \cdot \left(b \cdot c\right)\right)\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-251}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-74}:\\
\;\;\;\;j \cdot \left(c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.40000000000000014e-24 or 5.2000000000000002e-74 < a Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
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-identity39.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if -5.40000000000000014e-24 < a < -3.55000000000000005e-152Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.3
Applied rewrites21.3%
if -3.55000000000000005e-152 < a < -1.24000000000000005e-219Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
if -1.24000000000000005e-219 < a < 1.36e-251Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
if 1.36e-251 < a < 5.2000000000000002e-74Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around 0
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -3.2e+138)
(* z (* -1.0 (* b c)))
(if (<= c -1.65e+49)
(* t (* c j))
(if (<= c 6.4e-271)
(* a (* -1.0 (* t x)))
(if (<= c 4.4e-17)
(* x (* y z))
(if (<= c 3.1e+124) (* j (* c t)) (* (* (- z) c) b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -3.2e+138) {
tmp = z * (-1.0 * (b * c));
} else if (c <= -1.65e+49) {
tmp = t * (c * j);
} else if (c <= 6.4e-271) {
tmp = a * (-1.0 * (t * x));
} else if (c <= 4.4e-17) {
tmp = x * (y * z);
} else if (c <= 3.1e+124) {
tmp = j * (c * t);
} else {
tmp = (-z * c) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-3.2d+138)) then
tmp = z * ((-1.0d0) * (b * c))
else if (c <= (-1.65d+49)) then
tmp = t * (c * j)
else if (c <= 6.4d-271) then
tmp = a * ((-1.0d0) * (t * x))
else if (c <= 4.4d-17) then
tmp = x * (y * z)
else if (c <= 3.1d+124) then
tmp = j * (c * t)
else
tmp = (-z * c) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -3.2e+138) {
tmp = z * (-1.0 * (b * c));
} else if (c <= -1.65e+49) {
tmp = t * (c * j);
} else if (c <= 6.4e-271) {
tmp = a * (-1.0 * (t * x));
} else if (c <= 4.4e-17) {
tmp = x * (y * z);
} else if (c <= 3.1e+124) {
tmp = j * (c * t);
} else {
tmp = (-z * c) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -3.2e+138: tmp = z * (-1.0 * (b * c)) elif c <= -1.65e+49: tmp = t * (c * j) elif c <= 6.4e-271: tmp = a * (-1.0 * (t * x)) elif c <= 4.4e-17: tmp = x * (y * z) elif c <= 3.1e+124: tmp = j * (c * t) else: tmp = (-z * c) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -3.2e+138) tmp = Float64(z * Float64(-1.0 * Float64(b * c))); elseif (c <= -1.65e+49) tmp = Float64(t * Float64(c * j)); elseif (c <= 6.4e-271) tmp = Float64(a * Float64(-1.0 * Float64(t * x))); elseif (c <= 4.4e-17) tmp = Float64(x * Float64(y * z)); elseif (c <= 3.1e+124) tmp = Float64(j * Float64(c * t)); else tmp = Float64(Float64(Float64(-z) * c) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -3.2e+138) tmp = z * (-1.0 * (b * c)); elseif (c <= -1.65e+49) tmp = t * (c * j); elseif (c <= 6.4e-271) tmp = a * (-1.0 * (t * x)); elseif (c <= 4.4e-17) tmp = x * (y * z); elseif (c <= 3.1e+124) tmp = j * (c * t); else tmp = (-z * c) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -3.2e+138], N[(z * N[(-1.0 * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.65e+49], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.4e-271], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.4e-17], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.1e+124], N[(j * N[(c * t), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.2 \cdot 10^{+138}:\\
\;\;\;\;z \cdot \left(-1 \cdot \left(b \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -1.65 \cdot 10^{+49}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{-271}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;c \leq 4.4 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{+124}:\\
\;\;\;\;j \cdot \left(c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\end{array}
\end{array}
if c < -3.2000000000000001e138Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
if -3.2000000000000001e138 < c < -1.6499999999999999e49Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in x around 0
lower-*.f6422.6
Applied rewrites22.6%
if -1.6499999999999999e49 < c < 6.39999999999999955e-271Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
if 6.39999999999999955e-271 < c < 4.4e-17Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if 4.4e-17 < c < 3.1000000000000002e124Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around 0
lower-*.f6422.7
Applied rewrites22.7%
if 3.1000000000000002e124 < c Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.3
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (* c t))))
(if (<= c -1.65e+49)
t_1
(if (<= c 6.4e-271)
(* a (* -1.0 (* t x)))
(if (<= c 4.4e-17)
(* x (* y z))
(if (<= c 3.1e+124) t_1 (* (* (- z) c) b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * (c * t);
double tmp;
if (c <= -1.65e+49) {
tmp = t_1;
} else if (c <= 6.4e-271) {
tmp = a * (-1.0 * (t * x));
} else if (c <= 4.4e-17) {
tmp = x * (y * z);
} else if (c <= 3.1e+124) {
tmp = t_1;
} else {
tmp = (-z * c) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * (c * t)
if (c <= (-1.65d+49)) then
tmp = t_1
else if (c <= 6.4d-271) then
tmp = a * ((-1.0d0) * (t * x))
else if (c <= 4.4d-17) then
tmp = x * (y * z)
else if (c <= 3.1d+124) then
tmp = t_1
else
tmp = (-z * c) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * (c * t);
double tmp;
if (c <= -1.65e+49) {
tmp = t_1;
} else if (c <= 6.4e-271) {
tmp = a * (-1.0 * (t * x));
} else if (c <= 4.4e-17) {
tmp = x * (y * z);
} else if (c <= 3.1e+124) {
tmp = t_1;
} else {
tmp = (-z * c) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * (c * t) tmp = 0 if c <= -1.65e+49: tmp = t_1 elif c <= 6.4e-271: tmp = a * (-1.0 * (t * x)) elif c <= 4.4e-17: tmp = x * (y * z) elif c <= 3.1e+124: tmp = t_1 else: tmp = (-z * c) * b return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(c * t)) tmp = 0.0 if (c <= -1.65e+49) tmp = t_1; elseif (c <= 6.4e-271) tmp = Float64(a * Float64(-1.0 * Float64(t * x))); elseif (c <= 4.4e-17) tmp = Float64(x * Float64(y * z)); elseif (c <= 3.1e+124) tmp = t_1; else tmp = Float64(Float64(Float64(-z) * c) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * (c * t); tmp = 0.0; if (c <= -1.65e+49) tmp = t_1; elseif (c <= 6.4e-271) tmp = a * (-1.0 * (t * x)); elseif (c <= 4.4e-17) tmp = x * (y * z); elseif (c <= 3.1e+124) tmp = t_1; else tmp = (-z * c) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(c * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+49], t$95$1, If[LessEqual[c, 6.4e-271], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.4e-17], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.1e+124], t$95$1, N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{-271}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;c \leq 4.4 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\end{array}
\end{array}
if c < -1.6499999999999999e49 or 4.4e-17 < c < 3.1000000000000002e124Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around 0
lower-*.f6422.7
Applied rewrites22.7%
if -1.6499999999999999e49 < c < 6.39999999999999955e-271Initial program 73.7%
Applied rewrites74.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
if 6.39999999999999955e-271 < c < 4.4e-17Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if 3.1000000000000002e124 < c Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.3
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (* c t))))
(if (<= c -4.2e+55)
t_1
(if (<= c -1.7e+31)
(* (* x z) y)
(if (<= c -1.3e-185)
(* (* a b) i)
(if (<= c 4.4e-17)
(* (* x y) z)
(if (<= c 3.1e+124) t_1 (* (* (- z) c) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * (c * t);
double tmp;
if (c <= -4.2e+55) {
tmp = t_1;
} else if (c <= -1.7e+31) {
tmp = (x * z) * y;
} else if (c <= -1.3e-185) {
tmp = (a * b) * i;
} else if (c <= 4.4e-17) {
tmp = (x * y) * z;
} else if (c <= 3.1e+124) {
tmp = t_1;
} else {
tmp = (-z * c) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * (c * t)
if (c <= (-4.2d+55)) then
tmp = t_1
else if (c <= (-1.7d+31)) then
tmp = (x * z) * y
else if (c <= (-1.3d-185)) then
tmp = (a * b) * i
else if (c <= 4.4d-17) then
tmp = (x * y) * z
else if (c <= 3.1d+124) then
tmp = t_1
else
tmp = (-z * c) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * (c * t);
double tmp;
if (c <= -4.2e+55) {
tmp = t_1;
} else if (c <= -1.7e+31) {
tmp = (x * z) * y;
} else if (c <= -1.3e-185) {
tmp = (a * b) * i;
} else if (c <= 4.4e-17) {
tmp = (x * y) * z;
} else if (c <= 3.1e+124) {
tmp = t_1;
} else {
tmp = (-z * c) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * (c * t) tmp = 0 if c <= -4.2e+55: tmp = t_1 elif c <= -1.7e+31: tmp = (x * z) * y elif c <= -1.3e-185: tmp = (a * b) * i elif c <= 4.4e-17: tmp = (x * y) * z elif c <= 3.1e+124: tmp = t_1 else: tmp = (-z * c) * b return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(c * t)) tmp = 0.0 if (c <= -4.2e+55) tmp = t_1; elseif (c <= -1.7e+31) tmp = Float64(Float64(x * z) * y); elseif (c <= -1.3e-185) tmp = Float64(Float64(a * b) * i); elseif (c <= 4.4e-17) tmp = Float64(Float64(x * y) * z); elseif (c <= 3.1e+124) tmp = t_1; else tmp = Float64(Float64(Float64(-z) * c) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * (c * t); tmp = 0.0; if (c <= -4.2e+55) tmp = t_1; elseif (c <= -1.7e+31) tmp = (x * z) * y; elseif (c <= -1.3e-185) tmp = (a * b) * i; elseif (c <= 4.4e-17) tmp = (x * y) * z; elseif (c <= 3.1e+124) tmp = t_1; else tmp = (-z * c) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(c * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.2e+55], t$95$1, If[LessEqual[c, -1.7e+31], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, -1.3e-185], N[(N[(a * b), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[c, 4.4e-17], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 3.1e+124], t$95$1, N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t\right)\\
\mathbf{if}\;c \leq -4.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.7 \cdot 10^{+31}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;c \leq -1.3 \cdot 10^{-185}:\\
\;\;\;\;\left(a \cdot b\right) \cdot i\\
\mathbf{elif}\;c \leq 4.4 \cdot 10^{-17}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{elif}\;c \leq 3.1 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\end{array}
\end{array}
if c < -4.2000000000000001e55 or 4.4e-17 < c < 3.1000000000000002e124Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around 0
lower-*.f6422.7
Applied rewrites22.7%
if -4.2000000000000001e55 < c < -1.6999999999999999e31Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
if -1.6999999999999999e31 < c < -1.29999999999999992e-185Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.0
Applied rewrites38.0%
Taylor expanded in y around 0
lower-*.f6421.7
Applied rewrites21.7%
if -1.29999999999999992e-185 < c < 4.4e-17Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
if 3.1000000000000002e124 < c Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.3
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (* j t))))
(if (<= j -5.4e+66)
t_1
(if (<= j -2.8e-105)
(* (* x z) y)
(if (<= j -4.05e-258)
(* (* a b) i)
(if (<= j 6.4e+88) (* (* x y) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (j <= -5.4e+66) {
tmp = t_1;
} else if (j <= -2.8e-105) {
tmp = (x * z) * y;
} else if (j <= -4.05e-258) {
tmp = (a * b) * i;
} else if (j <= 6.4e+88) {
tmp = (x * y) * z;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * (j * t)
if (j <= (-5.4d+66)) then
tmp = t_1
else if (j <= (-2.8d-105)) then
tmp = (x * z) * y
else if (j <= (-4.05d-258)) then
tmp = (a * b) * i
else if (j <= 6.4d+88) then
tmp = (x * y) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (j <= -5.4e+66) {
tmp = t_1;
} else if (j <= -2.8e-105) {
tmp = (x * z) * y;
} else if (j <= -4.05e-258) {
tmp = (a * b) * i;
} else if (j <= 6.4e+88) {
tmp = (x * y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * (j * t) tmp = 0 if j <= -5.4e+66: tmp = t_1 elif j <= -2.8e-105: tmp = (x * z) * y elif j <= -4.05e-258: tmp = (a * b) * i elif j <= 6.4e+88: tmp = (x * y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(j * t)) tmp = 0.0 if (j <= -5.4e+66) tmp = t_1; elseif (j <= -2.8e-105) tmp = Float64(Float64(x * z) * y); elseif (j <= -4.05e-258) tmp = Float64(Float64(a * b) * i); elseif (j <= 6.4e+88) tmp = Float64(Float64(x * y) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * (j * t); tmp = 0.0; if (j <= -5.4e+66) tmp = t_1; elseif (j <= -2.8e-105) tmp = (x * z) * y; elseif (j <= -4.05e-258) tmp = (a * b) * i; elseif (j <= 6.4e+88) tmp = (x * y) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.4e+66], t$95$1, If[LessEqual[j, -2.8e-105], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, -4.05e-258], N[(N[(a * b), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[j, 6.4e+88], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;j \leq -5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -2.8 \cdot 10^{-105}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;j \leq -4.05 \cdot 10^{-258}:\\
\;\;\;\;\left(a \cdot b\right) \cdot i\\
\mathbf{elif}\;j \leq 6.4 \cdot 10^{+88}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.4e66 or 6.3999999999999997e88 < j Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
if -5.4e66 < j < -2.8e-105Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
if -2.8e-105 < j < -4.0500000000000002e-258Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.0
Applied rewrites38.0%
Taylor expanded in y around 0
lower-*.f6421.7
Applied rewrites21.7%
if -4.0500000000000002e-258 < j < 6.3999999999999997e88Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (* j t))))
(if (<= j -5.4e+66)
t_1
(if (<= j -2.8e-105)
(* (* x z) y)
(if (<= j -4.05e-258)
(* a (* b i))
(if (<= j 6.4e+88) (* (* x y) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (j <= -5.4e+66) {
tmp = t_1;
} else if (j <= -2.8e-105) {
tmp = (x * z) * y;
} else if (j <= -4.05e-258) {
tmp = a * (b * i);
} else if (j <= 6.4e+88) {
tmp = (x * y) * z;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * (j * t)
if (j <= (-5.4d+66)) then
tmp = t_1
else if (j <= (-2.8d-105)) then
tmp = (x * z) * y
else if (j <= (-4.05d-258)) then
tmp = a * (b * i)
else if (j <= 6.4d+88) then
tmp = (x * y) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (j <= -5.4e+66) {
tmp = t_1;
} else if (j <= -2.8e-105) {
tmp = (x * z) * y;
} else if (j <= -4.05e-258) {
tmp = a * (b * i);
} else if (j <= 6.4e+88) {
tmp = (x * y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * (j * t) tmp = 0 if j <= -5.4e+66: tmp = t_1 elif j <= -2.8e-105: tmp = (x * z) * y elif j <= -4.05e-258: tmp = a * (b * i) elif j <= 6.4e+88: tmp = (x * y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(j * t)) tmp = 0.0 if (j <= -5.4e+66) tmp = t_1; elseif (j <= -2.8e-105) tmp = Float64(Float64(x * z) * y); elseif (j <= -4.05e-258) tmp = Float64(a * Float64(b * i)); elseif (j <= 6.4e+88) tmp = Float64(Float64(x * y) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * (j * t); tmp = 0.0; if (j <= -5.4e+66) tmp = t_1; elseif (j <= -2.8e-105) tmp = (x * z) * y; elseif (j <= -4.05e-258) tmp = a * (b * i); elseif (j <= 6.4e+88) tmp = (x * y) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.4e+66], t$95$1, If[LessEqual[j, -2.8e-105], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, -4.05e-258], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 6.4e+88], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;j \leq -5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -2.8 \cdot 10^{-105}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;j \leq -4.05 \cdot 10^{-258}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;j \leq 6.4 \cdot 10^{+88}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.4e66 or 6.3999999999999997e88 < j Initial program 73.7%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
if -5.4e66 < j < -2.8e-105Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
if -2.8e-105 < j < -4.0500000000000002e-258Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -4.0500000000000002e-258 < j < 6.3999999999999997e88Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= x -1.45e+115) t_1 (if (<= x 7.5e+115) (* a (* b i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.45e+115) {
tmp = t_1;
} else if (x <= 7.5e+115) {
tmp = a * (b * i);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-1.45d+115)) then
tmp = t_1
else if (x <= 7.5d+115) then
tmp = a * (b * i)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -1.45e+115) {
tmp = t_1;
} else if (x <= 7.5e+115) {
tmp = a * (b * i);
} 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 <= -1.45e+115: tmp = t_1 elif x <= 7.5e+115: tmp = a * (b * i) 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 <= -1.45e+115) tmp = t_1; elseif (x <= 7.5e+115) tmp = Float64(a * Float64(b * i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -1.45e+115) tmp = t_1; elseif (x <= 7.5e+115) tmp = a * (b * i); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+115], t$95$1, If[LessEqual[x, 7.5e+115], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+115}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.45000000000000002e115 or 7.4999999999999997e115 < x Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -1.45000000000000002e115 < x < 7.4999999999999997e115Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * 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 = a * (b * 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 a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j): return a * (b * i)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(b * i)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (b * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(b \cdot i\right)
\end{array}
Initial program 73.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
herbie shell --seed 2025156
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))