
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* c z) (* t i)))) (t_2 (* j (- (* c a) (* y i)))))
(if (<= (+ (- (* x (- (* y z) (* t a))) t_1) t_2) INFINITY)
(+ (- (* x (fma z y (* (- t) a))) t_1) t_2)
(* (- (* y x) (* c 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 = b * ((c * z) - (t * i));
double t_2 = j * ((c * a) - (y * i));
double tmp;
if ((((x * ((y * z) - (t * a))) - t_1) + t_2) <= ((double) INFINITY)) {
tmp = ((x * fma(z, y, (-t * a))) - t_1) + t_2;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(c * z) - Float64(t * i))) t_2 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - t_1) + t_2) <= Inf) tmp = Float64(Float64(Float64(x * fma(z, y, Float64(Float64(-t) * a))) - t_1) + t_2); else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], Infinity], N[(N[(N[(x * N[(z * y + N[((-t) * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(c \cdot z - t \cdot i\right)\\
t_2 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - t\_1\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(x \cdot \mathsf{fma}\left(z, y, \left(-t\right) \cdot a\right) - t\_1\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.0%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6491.0
Applied rewrites91.0%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* (- (* y x) (* c b)) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = ((y * x) - (c * b)) * z return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = ((y * x) - (c * b)) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.0%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) x (* j c)) a)))
(if (<= a -1e+162)
t_1
(if (<= a 4.2e+110)
(- (* (- (* c a) (* i y)) j) (* (- (* c z) (* i t)) b))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, x, (j * c)) * a;
double tmp;
if (a <= -1e+162) {
tmp = t_1;
} else if (a <= 4.2e+110) {
tmp = (((c * a) - (i * y)) * j) - (((c * z) - (i * t)) * b);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -1e+162) tmp = t_1; elseif (a <= 4.2e+110) tmp = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1e+162], t$95$1, If[LessEqual[a, 4.2e+110], N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -1 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+110}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j - \left(c \cdot z - i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.9999999999999994e161 or 4.2000000000000003e110 < a Initial program 59.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites69.3%
if -9.9999999999999994e161 < a < 4.2000000000000003e110Initial program 77.8%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))) (t_2 (* (- (* y x) (* c b)) z)))
(if (<= z -7.6e+86)
t_2
(if (<= z -6.4e-108)
(* (- t) (- (* a x) (* i b)))
(if (<= z -4.4e-293)
(+ (* (* i t) b) t_1)
(if (<= z 6.5e+60) (+ (* (- a) (* t x)) 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 = j * ((c * a) - (y * i));
double t_2 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -7.6e+86) {
tmp = t_2;
} else if (z <= -6.4e-108) {
tmp = -t * ((a * x) - (i * b));
} else if (z <= -4.4e-293) {
tmp = ((i * t) * b) + t_1;
} else if (z <= 6.5e+60) {
tmp = (-a * (t * x)) + 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 = j * ((c * a) - (y * i))
t_2 = ((y * x) - (c * b)) * z
if (z <= (-7.6d+86)) then
tmp = t_2
else if (z <= (-6.4d-108)) then
tmp = -t * ((a * x) - (i * b))
else if (z <= (-4.4d-293)) then
tmp = ((i * t) * b) + t_1
else if (z <= 6.5d+60) then
tmp = (-a * (t * x)) + 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 = j * ((c * a) - (y * i));
double t_2 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -7.6e+86) {
tmp = t_2;
} else if (z <= -6.4e-108) {
tmp = -t * ((a * x) - (i * b));
} else if (z <= -4.4e-293) {
tmp = ((i * t) * b) + t_1;
} else if (z <= 6.5e+60) {
tmp = (-a * (t * x)) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((y * x) - (c * b)) * z tmp = 0 if z <= -7.6e+86: tmp = t_2 elif z <= -6.4e-108: tmp = -t * ((a * x) - (i * b)) elif z <= -4.4e-293: tmp = ((i * t) * b) + t_1 elif z <= 6.5e+60: tmp = (-a * (t * x)) + t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -7.6e+86) tmp = t_2; elseif (z <= -6.4e-108) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (z <= -4.4e-293) tmp = Float64(Float64(Float64(i * t) * b) + t_1); elseif (z <= 6.5e+60) tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + 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 = j * ((c * a) - (y * i)); t_2 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -7.6e+86) tmp = t_2; elseif (z <= -6.4e-108) tmp = -t * ((a * x) - (i * b)); elseif (z <= -4.4e-293) tmp = ((i * t) * b) + t_1; elseif (z <= 6.5e+60) tmp = (-a * (t * x)) + 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[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.6e+86], t$95$2, If[LessEqual[z, -6.4e-108], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-293], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 6.5e+60], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+86}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-108}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-293}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b + t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.59999999999999956e86 or 6.49999999999999931e60 < z Initial program 62.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
if -7.59999999999999956e86 < z < -6.3999999999999999e-108Initial program 78.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.0
Applied rewrites42.0%
if -6.3999999999999999e-108 < z < -4.4e-293Initial program 80.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
if -4.4e-293 < z < 6.49999999999999931e60Initial program 79.3%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6456.2
Applied rewrites56.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -7.6e+86)
t_1
(if (<= z -3.2e-107)
(* (- t) (- (* a x) (* i b)))
(if (<= z 6.5e+60)
(* (fma i t (/ (* j (- (* a c) (* i y))) b)) b)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -7.6e+86) {
tmp = t_1;
} else if (z <= -3.2e-107) {
tmp = -t * ((a * x) - (i * b));
} else if (z <= 6.5e+60) {
tmp = fma(i, t, ((j * ((a * c) - (i * y))) / b)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -7.6e+86) tmp = t_1; elseif (z <= -3.2e-107) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (z <= 6.5e+60) tmp = Float64(fma(i, t, Float64(Float64(j * Float64(Float64(a * c) - Float64(i * y))) / b)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.6e+86], t$95$1, If[LessEqual[z, -3.2e-107], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+60], N[(N[(i * t + N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-107}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\mathsf{fma}\left(i, t, \frac{j \cdot \left(a \cdot c - i \cdot y\right)}{b}\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.59999999999999956e86 or 6.49999999999999931e60 < z Initial program 62.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
if -7.59999999999999956e86 < z < -3.20000000000000013e-107Initial program 78.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6441.9
Applied rewrites41.9%
if -3.20000000000000013e-107 < z < 6.49999999999999931e60Initial program 79.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites76.6%
Taylor expanded in j around -inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6457.1
Applied rewrites57.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -7.6e+86)
t_1
(if (<= z -6.4e-108)
(* (- t) (- (* a x) (* i b)))
(if (<= z 6.5e+60) (+ (* (* i t) b) (* j (- (* c a) (* y i)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -7.6e+86) {
tmp = t_1;
} else if (z <= -6.4e-108) {
tmp = -t * ((a * x) - (i * b));
} else if (z <= 6.5e+60) {
tmp = ((i * t) * b) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((y * x) - (c * b)) * z
if (z <= (-7.6d+86)) then
tmp = t_1
else if (z <= (-6.4d-108)) then
tmp = -t * ((a * x) - (i * b))
else if (z <= 6.5d+60) then
tmp = ((i * t) * b) + (j * ((c * a) - (y * i)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -7.6e+86) {
tmp = t_1;
} else if (z <= -6.4e-108) {
tmp = -t * ((a * x) - (i * b));
} else if (z <= 6.5e+60) {
tmp = ((i * t) * b) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((y * x) - (c * b)) * z tmp = 0 if z <= -7.6e+86: tmp = t_1 elif z <= -6.4e-108: tmp = -t * ((a * x) - (i * b)) elif z <= 6.5e+60: tmp = ((i * t) * b) + (j * ((c * a) - (y * i))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -7.6e+86) tmp = t_1; elseif (z <= -6.4e-108) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); elseif (z <= 6.5e+60) tmp = Float64(Float64(Float64(i * t) * b) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -7.6e+86) tmp = t_1; elseif (z <= -6.4e-108) tmp = -t * ((a * x) - (i * b)); elseif (z <= 6.5e+60) tmp = ((i * t) * b) + (j * ((c * a) - (y * i))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.6e+86], t$95$1, If[LessEqual[z, -6.4e-108], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+60], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-108}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.59999999999999956e86 or 6.49999999999999931e60 < z Initial program 62.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
if -7.59999999999999956e86 < z < -6.3999999999999999e-108Initial program 78.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.0
Applied rewrites42.0%
if -6.3999999999999999e-108 < z < 6.49999999999999931e60Initial program 79.6%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.1
Applied rewrites58.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -8.8e+86)
t_1
(if (<= z -3.8e-185)
(* (fma (- t) x (* j c)) a)
(if (<= z -5.6e-293)
(* (- i) (- (* j y) (* b t)))
(if (<= z 6.5e+60) (* (- (* c a) (* i y)) j) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -8.8e+86) {
tmp = t_1;
} else if (z <= -3.8e-185) {
tmp = fma(-t, x, (j * c)) * a;
} else if (z <= -5.6e-293) {
tmp = -i * ((j * y) - (b * t));
} else if (z <= 6.5e+60) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -8.8e+86) tmp = t_1; elseif (z <= -3.8e-185) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (z <= -5.6e-293) tmp = Float64(Float64(-i) * Float64(Float64(j * y) - Float64(b * t))); elseif (z <= 6.5e+60) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8.8e+86], t$95$1, If[LessEqual[z, -3.8e-185], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -5.6e-293], N[((-i) * N[(N[(j * y), $MachinePrecision] - N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+60], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-185}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-293}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y - b \cdot t\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.80000000000000013e86 or 6.49999999999999931e60 < z Initial program 62.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
if -8.80000000000000013e86 < z < -3.7999999999999999e-185Initial program 78.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.4
Applied rewrites41.4%
if -3.7999999999999999e-185 < z < -5.60000000000000051e-293Initial program 80.6%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.7
Applied rewrites50.7%
if -5.60000000000000051e-293 < z < 6.49999999999999931e60Initial program 79.3%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.7
Applied rewrites42.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* j a) (* b z)) c)))
(if (<= c -6.2e-62)
t_1
(if (<= c 9.8e+30) (* (- t) (fma a x (* (- i) b))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -6.2e-62) {
tmp = t_1;
} else if (c <= 9.8e+30) {
tmp = -t * fma(a, x, (-i * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * a) - Float64(b * z)) * c) tmp = 0.0 if (c <= -6.2e-62) tmp = t_1; elseif (c <= 9.8e+30) tmp = Float64(Float64(-t) * fma(a, x, Float64(Float64(-i) * b))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.2e-62], t$95$1, If[LessEqual[c, 9.8e+30], N[((-t) * N[(a * x + N[((-i) * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -6.2 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.8 \cdot 10^{+30}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-i\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.1999999999999999e-62 or 9.79999999999999969e30 < c Initial program 66.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6457.4
Applied rewrites57.4%
if -6.1999999999999999e-62 < c < 9.79999999999999969e30Initial program 80.1%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.2
Applied rewrites46.2%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
lower-fma.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6446.5
Applied rewrites46.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* j a) (* b z)) c)))
(if (<= c -6.2e-62)
t_1
(if (<= c 9.8e+30) (* (- t) (- (* a x) (* i b))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -6.2e-62) {
tmp = t_1;
} else if (c <= 9.8e+30) {
tmp = -t * ((a * x) - (i * b));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((j * a) - (b * z)) * c
if (c <= (-6.2d-62)) then
tmp = t_1
else if (c <= 9.8d+30) then
tmp = -t * ((a * x) - (i * b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -6.2e-62) {
tmp = t_1;
} else if (c <= 9.8e+30) {
tmp = -t * ((a * x) - (i * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((j * a) - (b * z)) * c tmp = 0 if c <= -6.2e-62: tmp = t_1 elif c <= 9.8e+30: tmp = -t * ((a * x) - (i * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * a) - Float64(b * z)) * c) tmp = 0.0 if (c <= -6.2e-62) tmp = t_1; elseif (c <= 9.8e+30) tmp = Float64(Float64(-t) * Float64(Float64(a * x) - Float64(i * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((j * a) - (b * z)) * c; tmp = 0.0; if (c <= -6.2e-62) tmp = t_1; elseif (c <= 9.8e+30) tmp = -t * ((a * x) - (i * b)); 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[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.2e-62], t$95$1, If[LessEqual[c, 9.8e+30], N[((-t) * N[(N[(a * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -6.2 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.8 \cdot 10^{+30}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.1999999999999999e-62 or 9.79999999999999969e30 < c Initial program 66.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6457.4
Applied rewrites57.4%
if -6.1999999999999999e-62 < c < 9.79999999999999969e30Initial program 80.1%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.2
Applied rewrites46.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -8.8e+86)
t_1
(if (<= z -9.5e-186)
(* (fma (- t) x (* j c)) a)
(if (<= z 6.5e+60) (* (- (* c a) (* i y)) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -8.8e+86) {
tmp = t_1;
} else if (z <= -9.5e-186) {
tmp = fma(-t, x, (j * c)) * a;
} else if (z <= 6.5e+60) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -8.8e+86) tmp = t_1; elseif (z <= -9.5e-186) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (z <= 6.5e+60) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8.8e+86], t$95$1, If[LessEqual[z, -9.5e-186], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 6.5e+60], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-186}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.80000000000000013e86 or 6.49999999999999931e60 < z Initial program 62.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
if -8.80000000000000013e86 < z < -9.4999999999999998e-186Initial program 78.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.5
Applied rewrites41.5%
if -9.4999999999999998e-186 < z < 6.49999999999999931e60Initial program 79.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
Applied rewrites43.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* j a) (* b z)) c)))
(if (<= c -7.2e+19)
t_1
(if (<= c 1.2e+31) (* (fma z y (* (- a) t)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -7.2e+19) {
tmp = t_1;
} else if (c <= 1.2e+31) {
tmp = fma(z, y, (-a * t)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * a) - Float64(b * z)) * c) tmp = 0.0 if (c <= -7.2e+19) tmp = t_1; elseif (c <= 1.2e+31) tmp = Float64(fma(z, y, Float64(Float64(-a) * t)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -7.2e+19], t$95$1, If[LessEqual[c, 1.2e+31], N[(N[(z * y + N[((-a) * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(z, y, \left(-a\right) \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.2e19 or 1.19999999999999991e31 < c Initial program 64.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.9
Applied rewrites60.9%
if -7.2e19 < c < 1.19999999999999991e31Initial program 79.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.0
Applied rewrites46.0%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6446.6
Applied rewrites46.6%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* j a) (* b z)) c))) (if (<= c -7.2e+19) t_1 (if (<= c 1.2e+31) (* (- (* z y) (* a t)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -7.2e+19) {
tmp = t_1;
} else if (c <= 1.2e+31) {
tmp = ((z * y) - (a * t)) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((j * a) - (b * z)) * c
if (c <= (-7.2d+19)) then
tmp = t_1
else if (c <= 1.2d+31) then
tmp = ((z * y) - (a * t)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * a) - (b * z)) * c;
double tmp;
if (c <= -7.2e+19) {
tmp = t_1;
} else if (c <= 1.2e+31) {
tmp = ((z * y) - (a * t)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((j * a) - (b * z)) * c tmp = 0 if c <= -7.2e+19: tmp = t_1 elif c <= 1.2e+31: tmp = ((z * y) - (a * t)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * a) - Float64(b * z)) * c) tmp = 0.0 if (c <= -7.2e+19) tmp = t_1; elseif (c <= 1.2e+31) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((j * a) - (b * z)) * c; tmp = 0.0; if (c <= -7.2e+19) tmp = t_1; elseif (c <= 1.2e+31) tmp = ((z * y) - (a * t)) * x; 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[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -7.2e+19], t$95$1, If[LessEqual[c, 1.2e+31], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.2e19 or 1.19999999999999991e31 < c Initial program 64.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.9
Applied rewrites60.9%
if -7.2e19 < c < 1.19999999999999991e31Initial program 79.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.0
Applied rewrites46.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* y x) (* c b)) z))) (if (<= z -3.2e+18) t_1 (if (<= z 6.5e+60) (* (- (* c a) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -3.2e+18) {
tmp = t_1;
} else if (z <= 6.5e+60) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((y * x) - (c * b)) * z
if (z <= (-3.2d+18)) then
tmp = t_1
else if (z <= 6.5d+60) then
tmp = ((c * a) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -3.2e+18) {
tmp = t_1;
} else if (z <= 6.5e+60) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((y * x) - (c * b)) * z tmp = 0 if z <= -3.2e+18: tmp = t_1 elif z <= 6.5e+60: tmp = ((c * a) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -3.2e+18) tmp = t_1; elseif (z <= 6.5e+60) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -3.2e+18) tmp = t_1; elseif (z <= 6.5e+60) tmp = ((c * a) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.2e+18], t$95$1, If[LessEqual[z, 6.5e+60], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2e18 or 6.49999999999999931e60 < z Initial program 63.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.5
Applied rewrites61.5%
if -3.2e18 < z < 6.49999999999999931e60Initial program 79.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
Applied rewrites43.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* i t) (* c z)) b))) (if (<= b -3.5e-26) t_1 (if (<= b 4.5e-64) (* (- (* c a) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -3.5e-26) {
tmp = t_1;
} else if (b <= 4.5e-64) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-3.5d-26)) then
tmp = t_1
else if (b <= 4.5d-64) then
tmp = ((c * a) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -3.5e-26) {
tmp = t_1;
} else if (b <= 4.5e-64) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -3.5e-26: tmp = t_1 elif b <= 4.5e-64: tmp = ((c * a) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -3.5e-26) tmp = t_1; elseif (b <= 4.5e-64) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -3.5e-26) tmp = t_1; elseif (b <= 4.5e-64) tmp = ((c * a) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.5e-26], t$95$1, If[LessEqual[b, 4.5e-64], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-64}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.49999999999999985e-26 or 4.5000000000000001e-64 < b Initial program 73.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6455.8
Applied rewrites55.8%
if -3.49999999999999985e-26 < b < 4.5000000000000001e-64Initial program 71.1%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.4
Applied rewrites45.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- t) (* a x))))
(if (<= x -1.35e+113)
t_1
(if (<= x 1.85e+156)
(* (- (* c a) (* i y)) j)
(if (<= x 8.4e+276) (* (* z x) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -t * (a * x);
double tmp;
if (x <= -1.35e+113) {
tmp = t_1;
} else if (x <= 1.85e+156) {
tmp = ((c * a) - (i * y)) * j;
} else if (x <= 8.4e+276) {
tmp = (z * x) * y;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = -t * (a * x)
if (x <= (-1.35d+113)) then
tmp = t_1
else if (x <= 1.85d+156) then
tmp = ((c * a) - (i * y)) * j
else if (x <= 8.4d+276) then
tmp = (z * x) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -t * (a * x);
double tmp;
if (x <= -1.35e+113) {
tmp = t_1;
} else if (x <= 1.85e+156) {
tmp = ((c * a) - (i * y)) * j;
} else if (x <= 8.4e+276) {
tmp = (z * x) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -t * (a * x) tmp = 0 if x <= -1.35e+113: tmp = t_1 elif x <= 1.85e+156: tmp = ((c * a) - (i * y)) * j elif x <= 8.4e+276: tmp = (z * x) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-t) * Float64(a * x)) tmp = 0.0 if (x <= -1.35e+113) tmp = t_1; elseif (x <= 1.85e+156) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); elseif (x <= 8.4e+276) tmp = Float64(Float64(z * x) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -t * (a * x); tmp = 0.0; if (x <= -1.35e+113) tmp = t_1; elseif (x <= 1.85e+156) tmp = ((c * a) - (i * y)) * j; elseif (x <= 8.4e+276) tmp = (z * x) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e+113], t$95$1, If[LessEqual[x, 1.85e+156], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 8.4e+276], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+156}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{+276}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.35000000000000006e113 or 8.4000000000000003e276 < x Initial program 71.4%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.2
Applied rewrites49.2%
Taylor expanded in x around inf
lift-*.f6443.2
Applied rewrites43.2%
if -1.35000000000000006e113 < x < 1.85000000000000001e156Initial program 73.0%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6441.7
Applied rewrites41.7%
if 1.85000000000000001e156 < x < 8.4000000000000003e276Initial program 72.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.8
Applied rewrites47.8%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* a t)) x)))
(if (<= z -8.2e+86)
(* (* y z) x)
(if (<= z -1.5e-108)
t_1
(if (<= z 1.1e+61)
(- (* i (* j y)))
(if (<= z 5.4e+185) t_1 (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -(a * t) * x;
double tmp;
if (z <= -8.2e+86) {
tmp = (y * z) * x;
} else if (z <= -1.5e-108) {
tmp = t_1;
} else if (z <= 1.1e+61) {
tmp = -(i * (j * y));
} else if (z <= 5.4e+185) {
tmp = t_1;
} else {
tmp = (z * x) * y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = -(a * t) * x
if (z <= (-8.2d+86)) then
tmp = (y * z) * x
else if (z <= (-1.5d-108)) then
tmp = t_1
else if (z <= 1.1d+61) then
tmp = -(i * (j * y))
else if (z <= 5.4d+185) then
tmp = t_1
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -(a * t) * x;
double tmp;
if (z <= -8.2e+86) {
tmp = (y * z) * x;
} else if (z <= -1.5e-108) {
tmp = t_1;
} else if (z <= 1.1e+61) {
tmp = -(i * (j * y));
} else if (z <= 5.4e+185) {
tmp = t_1;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -(a * t) * x tmp = 0 if z <= -8.2e+86: tmp = (y * z) * x elif z <= -1.5e-108: tmp = t_1 elif z <= 1.1e+61: tmp = -(i * (j * y)) elif z <= 5.4e+185: tmp = t_1 else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-Float64(a * t)) * x) tmp = 0.0 if (z <= -8.2e+86) tmp = Float64(Float64(y * z) * x); elseif (z <= -1.5e-108) tmp = t_1; elseif (z <= 1.1e+61) tmp = Float64(-Float64(i * Float64(j * y))); elseif (z <= 5.4e+185) tmp = t_1; else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -(a * t) * x; tmp = 0.0; if (z <= -8.2e+86) tmp = (y * z) * x; elseif (z <= -1.5e-108) tmp = t_1; elseif (z <= 1.1e+61) tmp = -(i * (j * y)); elseif (z <= 5.4e+185) tmp = t_1; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-N[(a * t), $MachinePrecision]) * x), $MachinePrecision]}, If[LessEqual[z, -8.2e+86], N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -1.5e-108], t$95$1, If[LessEqual[z, 1.1e+61], (-N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 5.4e+185], t$95$1, N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a \cdot t\right) \cdot x\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+86}:\\
\;\;\;\;\left(y \cdot z\right) \cdot x\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+61}:\\
\;\;\;\;-i \cdot \left(j \cdot y\right)\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if z < -8.1999999999999998e86Initial program 61.4%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in y around inf
lower-*.f6437.7
Applied rewrites37.7%
if -8.1999999999999998e86 < z < -1.49999999999999996e-108 or 1.1e61 < z < 5.40000000000000013e185Initial program 73.6%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6441.5
Applied rewrites41.5%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f64N/A
lift-*.f6423.3
Applied rewrites23.3%
if -1.49999999999999996e-108 < z < 1.1e61Initial program 79.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.0
Applied rewrites44.0%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lower-*.f6425.5
Applied rewrites25.5%
if 5.40000000000000013e185 < z Initial program 58.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6443.0
Applied rewrites43.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -2.8e+62)
t_1
(if (<= z -2e-185)
(* b (* i t))
(if (<= z 6.5e+60) (- (* i (* j 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 = (z * x) * y;
double tmp;
if (z <= -2.8e+62) {
tmp = t_1;
} else if (z <= -2e-185) {
tmp = b * (i * t);
} else if (z <= 6.5e+60) {
tmp = -(i * (j * 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 = (z * x) * y
if (z <= (-2.8d+62)) then
tmp = t_1
else if (z <= (-2d-185)) then
tmp = b * (i * t)
else if (z <= 6.5d+60) then
tmp = -(i * (j * 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 = (z * x) * y;
double tmp;
if (z <= -2.8e+62) {
tmp = t_1;
} else if (z <= -2e-185) {
tmp = b * (i * t);
} else if (z <= 6.5e+60) {
tmp = -(i * (j * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -2.8e+62: tmp = t_1 elif z <= -2e-185: tmp = b * (i * t) elif z <= 6.5e+60: tmp = -(i * (j * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -2.8e+62) tmp = t_1; elseif (z <= -2e-185) tmp = Float64(b * Float64(i * t)); elseif (z <= 6.5e+60) tmp = Float64(-Float64(i * Float64(j * y))); 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; tmp = 0.0; if (z <= -2.8e+62) tmp = t_1; elseif (z <= -2e-185) tmp = b * (i * t); elseif (z <= 6.5e+60) tmp = -(i * (j * 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[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -2.8e+62], t$95$1, If[LessEqual[z, -2e-185], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+60], (-N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-185}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;-i \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.80000000000000014e62 or 6.49999999999999931e60 < z Initial program 62.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.5
Applied rewrites46.5%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6437.1
Applied rewrites37.1%
if -2.80000000000000014e62 < z < -2e-185Initial program 79.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.1
Applied rewrites43.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6424.6
Applied rewrites24.6%
if -2e-185 < z < 6.49999999999999931e60Initial program 79.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.8
Applied rewrites43.8%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lower-*.f6425.2
Applied rewrites25.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -4.3e-35)
(* (* a c) j)
(if (<= c 1.6e-161)
(* (* z x) y)
(if (<= c 3e+30) (* b (* i t)) (* a (* c j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -4.3e-35) {
tmp = (a * c) * j;
} else if (c <= 1.6e-161) {
tmp = (z * x) * y;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = a * (c * j);
}
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 <= (-4.3d-35)) then
tmp = (a * c) * j
else if (c <= 1.6d-161) then
tmp = (z * x) * y
else if (c <= 3d+30) then
tmp = b * (i * t)
else
tmp = a * (c * j)
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 <= -4.3e-35) {
tmp = (a * c) * j;
} else if (c <= 1.6e-161) {
tmp = (z * x) * y;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = a * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -4.3e-35: tmp = (a * c) * j elif c <= 1.6e-161: tmp = (z * x) * y elif c <= 3e+30: tmp = b * (i * t) else: tmp = a * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -4.3e-35) tmp = Float64(Float64(a * c) * j); elseif (c <= 1.6e-161) tmp = Float64(Float64(z * x) * y); elseif (c <= 3e+30) tmp = Float64(b * Float64(i * t)); else tmp = Float64(a * Float64(c * j)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -4.3e-35) tmp = (a * c) * j; elseif (c <= 1.6e-161) tmp = (z * x) * y; elseif (c <= 3e+30) tmp = b * (i * t); else tmp = a * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -4.3e-35], N[(N[(a * c), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[c, 1.6e-161], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 3e+30], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.3 \cdot 10^{-35}:\\
\;\;\;\;\left(a \cdot c\right) \cdot j\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{-161}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;c \leq 3 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if c < -4.3000000000000002e-35Initial program 66.2%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.1
Applied rewrites43.1%
Taylor expanded in y around 0
lower-*.f6432.7
Applied rewrites32.7%
if -4.3000000000000002e-35 < c < 1.59999999999999993e-161Initial program 80.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6427.5
Applied rewrites27.5%
if 1.59999999999999993e-161 < c < 2.99999999999999978e30Initial program 77.6%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
if 2.99999999999999978e30 < c Initial program 65.0%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.3
Applied rewrites46.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6434.8
Applied rewrites34.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (* c j))))
(if (<= c -4.3e-35)
t_1
(if (<= c 1.6e-161) (* (* z x) y) (if (<= c 3e+30) (* b (* i t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -4.3e-35) {
tmp = t_1;
} else if (c <= 1.6e-161) {
tmp = (z * x) * y;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * (c * j)
if (c <= (-4.3d-35)) then
tmp = t_1
else if (c <= 1.6d-161) then
tmp = (z * x) * y
else if (c <= 3d+30) then
tmp = b * (i * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -4.3e-35) {
tmp = t_1;
} else if (c <= 1.6e-161) {
tmp = (z * x) * y;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (c * j) tmp = 0 if c <= -4.3e-35: tmp = t_1 elif c <= 1.6e-161: tmp = (z * x) * y elif c <= 3e+30: tmp = b * (i * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(c * j)) tmp = 0.0 if (c <= -4.3e-35) tmp = t_1; elseif (c <= 1.6e-161) tmp = Float64(Float64(z * x) * y); elseif (c <= 3e+30) tmp = Float64(b * Float64(i * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (c * j); tmp = 0.0; if (c <= -4.3e-35) tmp = t_1; elseif (c <= 1.6e-161) tmp = (z * x) * y; elseif (c <= 3e+30) tmp = b * (i * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.3e-35], t$95$1, If[LessEqual[c, 1.6e-161], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 3e+30], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;c \leq -4.3 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{-161}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;c \leq 3 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.3000000000000002e-35 or 2.99999999999999978e30 < c Initial program 65.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6433.8
Applied rewrites33.8%
if -4.3000000000000002e-35 < c < 1.59999999999999993e-161Initial program 80.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6427.5
Applied rewrites27.5%
if 1.59999999999999993e-161 < c < 2.99999999999999978e30Initial program 77.6%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* c j)))) (if (<= c -6.8e-35) t_1 (if (<= c 3e+30) (* b (* i t)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -6.8e-35) {
tmp = t_1;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * (c * j)
if (c <= (-6.8d-35)) then
tmp = t_1
else if (c <= 3d+30) then
tmp = b * (i * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (c * j);
double tmp;
if (c <= -6.8e-35) {
tmp = t_1;
} else if (c <= 3e+30) {
tmp = b * (i * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (c * j) tmp = 0 if c <= -6.8e-35: tmp = t_1 elif c <= 3e+30: tmp = b * (i * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(c * j)) tmp = 0.0 if (c <= -6.8e-35) tmp = t_1; elseif (c <= 3e+30) tmp = Float64(b * Float64(i * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (c * j); tmp = 0.0; if (c <= -6.8e-35) tmp = t_1; elseif (c <= 3e+30) tmp = b * (i * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.8e-35], t$95$1, If[LessEqual[c, 3e+30], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;c \leq -6.8 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 3 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.8000000000000005e-35 or 2.99999999999999978e30 < c Initial program 65.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6433.8
Applied rewrites33.8%
if -6.8000000000000005e-35 < c < 2.99999999999999978e30Initial program 79.9%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.3
Applied rewrites46.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j) :precision binary64 (* b (* i t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return b * (i * t);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = b * (i * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return b * (i * t);
}
def code(x, y, z, t, a, b, c, i, j): return b * (i * t)
function code(x, y, z, t, a, b, c, i, j) return Float64(b * Float64(i * t)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = b * (i * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(i \cdot t\right)
\end{array}
Initial program 72.7%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
herbie shell --seed 2025114
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))