
(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]
\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)
Herbie found 23 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]
\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)
(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)
(* c (fma j a (* z (- b)))))))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 = c * fma(j, a, (z * -b));
}
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(c * fma(j, a, Float64(z * Float64(-b)))); 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[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 72.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6473.0%
Applied rewrites73.0%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* c (fma j a (* z (- b)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = c * fma(j, a, (z * -b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(c * fma(j, a, Float64(z * Float64(-b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 72.9%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* a c) (* i y))))
(if (<= j -1.35e+41)
(fma j t_1 (* x (- (* y z) (* a t))))
(if (<= j 4.8e-70)
(- (* x (fma z y (* (- a) t))) (* b (- (* c z) (* i t))))
(- (fma j t_1 (* x (* y z))) (* b (* c z)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (a * c) - (i * y);
double tmp;
if (j <= -1.35e+41) {
tmp = fma(j, t_1, (x * ((y * z) - (a * t))));
} else if (j <= 4.8e-70) {
tmp = (x * fma(z, y, (-a * t))) - (b * ((c * z) - (i * t)));
} else {
tmp = fma(j, t_1, (x * (y * z))) - (b * (c * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(a * c) - Float64(i * y)) tmp = 0.0 if (j <= -1.35e+41) tmp = fma(j, t_1, Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (j <= 4.8e-70) tmp = Float64(Float64(x * fma(z, y, Float64(Float64(-a) * t))) - Float64(b * Float64(Float64(c * z) - Float64(i * t)))); else tmp = Float64(fma(j, t_1, Float64(x * Float64(y * z))) - Float64(b * Float64(c * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.35e+41], N[(j * t$95$1 + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.8e-70], N[(N[(x * N[(z * y + N[((-a) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * t$95$1 + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := a \cdot c - i \cdot y\\
\mathbf{if}\;j \leq -1.35 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_1, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;j \leq 4.8 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z, y, \left(-a\right) \cdot t\right) - b \cdot \left(c \cdot z - i \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_1, x \cdot \left(y \cdot z\right)\right) - b \cdot \left(c \cdot z\right)\\
\end{array}
if j < -1.35e41Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
if -1.35e41 < j < 4.8000000000000002e-70Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
lift--.f64N/A
sub-flipN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6459.4%
Applied rewrites59.4%
if 4.8000000000000002e-70 < j Initial program 72.9%
Taylor expanded in t around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6456.9%
Applied rewrites56.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))) (t_2 (* b (- (* c z) (* i t)))))
(if (<= b -3.8e+25)
(- (* x (fma z y (* (- a) t))) t_2)
(if (<= b 1.6e-11) (fma j (- (* a c) (* i y)) t_1) (- t_1 t_2)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = b * ((c * z) - (i * t));
double tmp;
if (b <= -3.8e+25) {
tmp = (x * fma(z, y, (-a * t))) - t_2;
} else if (b <= 1.6e-11) {
tmp = fma(j, ((a * c) - (i * y)), t_1);
} else {
tmp = t_1 - t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = Float64(b * Float64(Float64(c * z) - Float64(i * t))) tmp = 0.0 if (b <= -3.8e+25) tmp = Float64(Float64(x * fma(z, y, Float64(Float64(-a) * t))) - t_2); elseif (b <= 1.6e-11) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), t_1); else tmp = Float64(t_1 - t_2); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.8e+25], N[(N[(x * N[(z * y + N[((-a) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[b, 1.6e-11], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := b \cdot \left(c \cdot z - i \cdot t\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z, y, \left(-a\right) \cdot t\right) - t\_2\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_2\\
\end{array}
if b < -3.8e25Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
lift--.f64N/A
sub-flipN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6459.4%
Applied rewrites59.4%
if -3.8e25 < b < 1.6e-11Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
if 1.6e-11 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t))))
(t_2 (- t_1 (* b (- (* c z) (* i t))))))
(if (<= b -3.8e+25)
t_2
(if (<= b 1.6e-11) (fma j (- (* a c) (* i y)) t_1) t_2))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = t_1 - (b * ((c * z) - (i * t)));
double tmp;
if (b <= -3.8e+25) {
tmp = t_2;
} else if (b <= 1.6e-11) {
tmp = fma(j, ((a * c) - (i * y)), t_1);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = Float64(t_1 - Float64(b * Float64(Float64(c * z) - Float64(i * t)))) tmp = 0.0 if (b <= -3.8e+25) tmp = t_2; elseif (b <= 1.6e-11) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), t_1); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.8e+25], t$95$2, If[LessEqual[b, 1.6e-11], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := t\_1 - b \cdot \left(c \cdot z - i \cdot t\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if b < -3.8e25 or 1.6e-11 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
if -3.8e25 < b < 1.6e-11Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))) (t_2 (fma j (- (* a c) (* i y)) t_1)))
(if (<= x -6.7e+184)
(fma a (* c j) t_1)
(if (<= x -7.6e-50)
t_2
(if (<= x 3.7e+40)
(+ (* -1.0 (* b (* c z))) (* j (- (* c a) (* y i))))
t_2)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = fma(j, ((a * c) - (i * y)), t_1);
double tmp;
if (x <= -6.7e+184) {
tmp = fma(a, (c * j), t_1);
} else if (x <= -7.6e-50) {
tmp = t_2;
} else if (x <= 3.7e+40) {
tmp = (-1.0 * (b * (c * z))) + (j * ((c * a) - (y * i)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = fma(j, Float64(Float64(a * c) - Float64(i * y)), t_1) tmp = 0.0 if (x <= -6.7e+184) tmp = fma(a, Float64(c * j), t_1); elseif (x <= -7.6e-50) tmp = t_2; elseif (x <= 3.7e+40) tmp = Float64(Float64(-1.0 * Float64(b * Float64(c * z))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[x, -6.7e+184], N[(a * N[(c * j), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, -7.6e-50], t$95$2, If[LessEqual[x, 3.7e+40], N[(N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, t\_1\right)\\
\mathbf{if}\;x \leq -6.7 \cdot 10^{+184}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, t\_1\right)\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+40}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if x < -6.7e184Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -6.7e184 < x < -7.5999999999999998e-50 or 3.7e40 < x Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
if -7.5999999999999998e-50 < x < 3.7e40Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma a (* c j) (* x (- (* y z) (* a t))))))
(if (<= x -1.7e+41)
t_1
(if (<= x 3.7e+40)
(+ (* -1.0 (* b (* c z))) (* 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 = fma(a, (c * j), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -1.7e+41) {
tmp = t_1;
} else if (x <= 3.7e+40) {
tmp = (-1.0 * (b * (c * z))) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -1.7e+41) tmp = t_1; elseif (x <= 3.7e+40) tmp = Float64(Float64(-1.0 * Float64(b * Float64(c * z))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+41], t$95$1, If[LessEqual[x, 3.7e+40], N[(N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+40}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -1.7e41 or 3.7e40 < x Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -1.7e41 < x < 3.7e40Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma a (* c j) (* x (- (* y z) (* a t))))))
(if (<= x -2.35e+160)
t_1
(if (<= x -4.3e-141)
(fma j (- (* a c) (* i y)) (* x (* y z)))
(if (<= x 3.7e+40) (* c (fma j a (* z (- 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(a, (c * j), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -2.35e+160) {
tmp = t_1;
} else if (x <= -4.3e-141) {
tmp = fma(j, ((a * c) - (i * y)), (x * (y * z)));
} else if (x <= 3.7e+40) {
tmp = c * fma(j, a, (z * -b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -2.35e+160) tmp = t_1; elseif (x <= -4.3e-141) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(y * z))); elseif (x <= 3.7e+40) tmp = Float64(c * fma(j, a, Float64(z * Float64(-b)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.35e+160], t$95$1, If[LessEqual[x, -4.3e-141], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+40], N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -2.35 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-141}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+40}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -2.3499999999999999e160 or 3.7e40 < x Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -2.3499999999999999e160 < x < -4.2999999999999997e-141Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in t around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6450.0%
Applied rewrites50.0%
if -4.2999999999999997e-141 < x < 3.7e40Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma a (* c j) (* x (- (* y z) (* a t))))))
(if (<= x -6.6e-7)
t_1
(if (<= x -9.2e-72)
(* (- (* t b) (* j y)) i)
(if (<= x 3.7e+40) (* c (fma j a (* z (- 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(a, (c * j), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -6.6e-7) {
tmp = t_1;
} else if (x <= -9.2e-72) {
tmp = ((t * b) - (j * y)) * i;
} else if (x <= 3.7e+40) {
tmp = c * fma(j, a, (z * -b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -6.6e-7) tmp = t_1; elseif (x <= -9.2e-72) tmp = Float64(Float64(Float64(t * b) - Float64(j * y)) * i); elseif (x <= 3.7e+40) tmp = Float64(c * fma(j, a, Float64(z * Float64(-b)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.6e-7], t$95$1, If[LessEqual[x, -9.2e-72], N[(N[(N[(t * b), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[x, 3.7e+40], N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -6.6 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{-72}:\\
\;\;\;\;\left(t \cdot b - j \cdot y\right) \cdot i\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+40}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -6.6000000000000003e-7 or 3.7e40 < x Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in i around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -6.6000000000000003e-7 < x < -9.1999999999999998e-72Initial program 72.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.6%
Applied rewrites38.6%
if -9.1999999999999998e-72 < x < 3.7e40Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (fma j a (* z (- b))))))
(if (<= c -30000.0)
t_1
(if (<= c -6.4e-146)
(fma (* i t) b (* (* (- t) x) a))
(if (<= c 7.5e-298)
(* y (fma -1.0 (* i j) (* x z)))
(if (<= c 9.2e+49) (* (- (* i b) (* a x)) t) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(j, a, (z * -b));
double tmp;
if (c <= -30000.0) {
tmp = t_1;
} else if (c <= -6.4e-146) {
tmp = fma((i * t), b, ((-t * x) * a));
} else if (c <= 7.5e-298) {
tmp = y * fma(-1.0, (i * j), (x * z));
} else if (c <= 9.2e+49) {
tmp = ((i * b) - (a * x)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(j, a, Float64(z * Float64(-b)))) tmp = 0.0 if (c <= -30000.0) tmp = t_1; elseif (c <= -6.4e-146) tmp = fma(Float64(i * t), b, Float64(Float64(Float64(-t) * x) * a)); elseif (c <= 7.5e-298) tmp = Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))); elseif (c <= 9.2e+49) tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -30000.0], t$95$1, If[LessEqual[c, -6.4e-146], N[(N[(i * t), $MachinePrecision] * b + N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.5e-298], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e+49], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\mathbf{if}\;c \leq -30000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -6.4 \cdot 10^{-146}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t, b, \left(\left(-t\right) \cdot x\right) \cdot a\right)\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{-298}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+49}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -3e4 or 9.2000000000000001e49 < c Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
if -3e4 < c < -6.3999999999999998e-146Initial program 72.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9%
Applied rewrites38.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
sub-flipN/A
distribute-lft-inN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
associate-*l*N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
mul-1-negN/A
lower-fma.f64N/A
lower-*.f64N/A
Applied rewrites35.3%
if -6.3999999999999998e-146 < c < 7.4999999999999999e-298Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if 7.4999999999999999e-298 < c < 9.2000000000000001e49Initial program 72.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9%
Applied rewrites38.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9%
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* y (fma -1.0 (* i j) (* x z)))))
(if (<= y -1.75e+165)
t_1
(if (<= y -1.05e-141)
(- (* (* j c) a) (* (* a t) x))
(if (<= y 6.8e-253)
(* b (- (* i t) (* c z)))
(if (<= y 4.1e+70) (* c (fma j a (* z (- 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 * fma(-1.0, (i * j), (x * z));
double tmp;
if (y <= -1.75e+165) {
tmp = t_1;
} else if (y <= -1.05e-141) {
tmp = ((j * c) * a) - ((a * t) * x);
} else if (y <= 6.8e-253) {
tmp = b * ((i * t) - (c * z));
} else if (y <= 4.1e+70) {
tmp = c * fma(j, a, (z * -b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))) tmp = 0.0 if (y <= -1.75e+165) tmp = t_1; elseif (y <= -1.05e-141) tmp = Float64(Float64(Float64(j * c) * a) - Float64(Float64(a * t) * x)); elseif (y <= 6.8e-253) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); elseif (y <= 4.1e+70) tmp = Float64(c * fma(j, a, Float64(z * Float64(-b)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+165], t$95$1, If[LessEqual[y, -1.05e-141], N[(N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-253], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+70], N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-141}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a - \left(a \cdot t\right) \cdot x\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-253}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+70}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.75e165 or 4.1000000000000002e70 < y Initial program 72.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -1.75e165 < y < -1.05e-141Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
lift-*.f64N/A
lift-fma.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-neg.f64N/A
associate-*r*N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-outN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
Applied rewrites35.9%
if -1.05e-141 < y < 6.7999999999999997e-253Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
if 6.7999999999999997e-253 < y < 4.1000000000000002e70Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* c (fma j a (* z (- b)))))) (if (<= c -30000.0) t_1 (if (<= c 9.2e+49) (* (- (* i b) (* a x)) t) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(j, a, (z * -b));
double tmp;
if (c <= -30000.0) {
tmp = t_1;
} else if (c <= 9.2e+49) {
tmp = ((i * b) - (a * x)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(j, a, Float64(z * Float64(-b)))) tmp = 0.0 if (c <= -30000.0) tmp = t_1; elseif (c <= 9.2e+49) tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * a + N[(z * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -30000.0], t$95$1, If[LessEqual[c, 9.2e+49], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(j, a, z \cdot \left(-b\right)\right)\\
\mathbf{if}\;c \leq -30000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+49}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -3e4 or 9.2000000000000001e49 < c Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-fma.f6440.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.1%
Applied rewrites40.1%
if -3e4 < c < 9.2000000000000001e49Initial program 72.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9%
Applied rewrites38.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9%
Applied rewrites38.9%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* c (- (* a j) (* b z))))) (if (<= c -30000.0) t_1 (if (<= c 9.2e+49) (* (- (* i b) (* a x)) t) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -30000.0) {
tmp = t_1;
} else if (c <= 9.2e+49) {
tmp = ((i * b) - (a * x)) * t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((a * j) - (b * z))
if (c <= (-30000.0d0)) then
tmp = t_1
else if (c <= 9.2d+49) then
tmp = ((i * b) - (a * x)) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((a * j) - (b * z));
double tmp;
if (c <= -30000.0) {
tmp = t_1;
} else if (c <= 9.2e+49) {
tmp = ((i * b) - (a * x)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((a * j) - (b * z)) tmp = 0 if c <= -30000.0: tmp = t_1 elif c <= 9.2e+49: tmp = ((i * b) - (a * x)) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -30000.0) tmp = t_1; elseif (c <= 9.2e+49) tmp = Float64(Float64(Float64(i * b) - Float64(a * x)) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((a * j) - (b * z)); tmp = 0.0; if (c <= -30000.0) tmp = t_1; elseif (c <= 9.2e+49) tmp = ((i * b) - (a * x)) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -30000.0], t$95$1, If[LessEqual[c, 9.2e+49], N[(N[(N[(i * b), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -30000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{+49}:\\
\;\;\;\;\left(i \cdot b - a \cdot x\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -3e4 or 9.2000000000000001e49 < c Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
if -3e4 < c < 9.2000000000000001e49Initial program 72.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9%
Applied rewrites38.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6438.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9%
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* z (- (* x y) (* b c)))))
(if (<= z -4.6e+31)
t_1
(if (<= z 1.75e-78) (* j (- (* a c) (* i y))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = z * ((x * y) - (b * c));
double tmp;
if (z <= -4.6e+31) {
tmp = t_1;
} else if (z <= 1.75e-78) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = z * ((x * y) - (b * c))
if (z <= (-4.6d+31)) then
tmp = t_1
else if (z <= 1.75d-78) then
tmp = j * ((a * c) - (i * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = z * ((x * y) - (b * c));
double tmp;
if (z <= -4.6e+31) {
tmp = t_1;
} else if (z <= 1.75e-78) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = z * ((x * y) - (b * c)) tmp = 0 if z <= -4.6e+31: tmp = t_1 elif z <= 1.75e-78: tmp = j * ((a * c) - (i * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(z * Float64(Float64(x * y) - Float64(b * c))) tmp = 0.0 if (z <= -4.6e+31) tmp = t_1; elseif (z <= 1.75e-78) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = z * ((x * y) - (b * c)); tmp = 0.0; if (z <= -4.6e+31) tmp = t_1; elseif (z <= 1.75e-78) tmp = j * ((a * c) - (i * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+31], t$95$1, If[LessEqual[z, 1.75e-78], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-78}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -4.5999999999999999e31 or 1.75e-78 < z Initial program 72.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
if -4.5999999999999999e31 < z < 1.75e-78Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* b (- (* i t) (* c z))))) (if (<= b -3.4e-43) t_1 (if (<= b 24000.0) (* j (- (* a c) (* i y))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.4e-43) {
tmp = t_1;
} else if (b <= 24000.0) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((i * t) - (c * z))
if (b <= (-3.4d-43)) then
tmp = t_1
else if (b <= 24000.0d0) then
tmp = j * ((a * c) - (i * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.4e-43) {
tmp = t_1;
} else if (b <= 24000.0) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((i * t) - (c * z)) tmp = 0 if b <= -3.4e-43: tmp = t_1 elif b <= 24000.0: tmp = j * ((a * c) - (i * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.4e-43) tmp = t_1; elseif (b <= 24000.0) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((i * t) - (c * z)); tmp = 0.0; if (b <= -3.4e-43) tmp = t_1; elseif (b <= 24000.0) tmp = j * ((a * c) - (i * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e-43], t$95$1, If[LessEqual[b, 24000.0], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 24000:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -3.4000000000000001e-43 or 24000 < b Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
if -3.4000000000000001e-43 < b < 24000Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (* -1.0 (* t x)))))
(if (<= x -4e+158)
t_1
(if (<= x 6.6e+128)
(* j (- (* a c) (* i y)))
(if (<= x 2.8e+200) (* x (* y z)) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (-1.0 * (t * x));
double tmp;
if (x <= -4e+158) {
tmp = t_1;
} else if (x <= 6.6e+128) {
tmp = j * ((a * c) - (i * y));
} else if (x <= 2.8e+200) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((-1.0d0) * (t * x))
if (x <= (-4d+158)) then
tmp = t_1
else if (x <= 6.6d+128) then
tmp = j * ((a * c) - (i * y))
else if (x <= 2.8d+200) then
tmp = x * (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (-1.0 * (t * x));
double tmp;
if (x <= -4e+158) {
tmp = t_1;
} else if (x <= 6.6e+128) {
tmp = j * ((a * c) - (i * y));
} else if (x <= 2.8e+200) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (-1.0 * (t * x)) tmp = 0 if x <= -4e+158: tmp = t_1 elif x <= 6.6e+128: tmp = j * ((a * c) - (i * y)) elif x <= 2.8e+200: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(-1.0 * Float64(t * x))) tmp = 0.0 if (x <= -4e+158) tmp = t_1; elseif (x <= 6.6e+128) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); elseif (x <= 2.8e+200) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (-1.0 * (t * x)); tmp = 0.0; if (x <= -4e+158) tmp = t_1; elseif (x <= 6.6e+128) tmp = j * ((a * c) - (i * y)); elseif (x <= 2.8e+200) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+158], t$95$1, If[LessEqual[x, 6.6e+128], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+200], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+128}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+200}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -3.9999999999999998e158 or 2.7999999999999998e200 < x Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.3%
Applied rewrites21.3%
if -3.9999999999999998e158 < x < 6.6000000000000001e128Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
if 6.6000000000000001e128 < x < 2.7999999999999998e200Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -8.6e+88)
t_1
(if (<= y -5.4e-201)
(* a (* -1.0 (* t x)))
(if (<= y 6.8e-253)
(* b (* i t))
(if (<= y 6.2e-63)
(* c (* a j))
(if (<= y 3.5e+260) t_1 (* -1.0 (* i (* j y))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -8.6e+88) {
tmp = t_1;
} else if (y <= -5.4e-201) {
tmp = a * (-1.0 * (t * x));
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else if (y <= 3.5e+260) {
tmp = t_1;
} else {
tmp = -1.0 * (i * (j * 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 = x * (y * z)
if (y <= (-8.6d+88)) then
tmp = t_1
else if (y <= (-5.4d-201)) then
tmp = a * ((-1.0d0) * (t * x))
else if (y <= 6.8d-253) then
tmp = b * (i * t)
else if (y <= 6.2d-63) then
tmp = c * (a * j)
else if (y <= 3.5d+260) then
tmp = t_1
else
tmp = (-1.0d0) * (i * (j * 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 = x * (y * z);
double tmp;
if (y <= -8.6e+88) {
tmp = t_1;
} else if (y <= -5.4e-201) {
tmp = a * (-1.0 * (t * x));
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else if (y <= 3.5e+260) {
tmp = t_1;
} else {
tmp = -1.0 * (i * (j * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -8.6e+88: tmp = t_1 elif y <= -5.4e-201: tmp = a * (-1.0 * (t * x)) elif y <= 6.8e-253: tmp = b * (i * t) elif y <= 6.2e-63: tmp = c * (a * j) elif y <= 3.5e+260: tmp = t_1 else: tmp = -1.0 * (i * (j * y)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -8.6e+88) tmp = t_1; elseif (y <= -5.4e-201) tmp = Float64(a * Float64(-1.0 * Float64(t * x))); elseif (y <= 6.8e-253) tmp = Float64(b * Float64(i * t)); elseif (y <= 6.2e-63) tmp = Float64(c * Float64(a * j)); elseif (y <= 3.5e+260) tmp = t_1; else tmp = Float64(-1.0 * Float64(i * Float64(j * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -8.6e+88) tmp = t_1; elseif (y <= -5.4e-201) tmp = a * (-1.0 * (t * x)); elseif (y <= 6.8e-253) tmp = b * (i * t); elseif (y <= 6.2e-63) tmp = c * (a * j); elseif (y <= 3.5e+260) tmp = t_1; else tmp = -1.0 * (i * (j * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.6e+88], t$95$1, If[LessEqual[y, -5.4e-201], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-253], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-63], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+260], t$95$1, N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -8.6 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-201}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-253}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+260}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\end{array}
if y < -8.5999999999999995e88 or 6.1999999999999997e-63 < y < 3.4999999999999998e260Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -8.5999999999999995e88 < y < -5.4000000000000001e-201Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.3%
Applied rewrites21.3%
if -5.4000000000000001e-201 < y < 6.7999999999999997e-253Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in z around 0
lower-*.f6422.8%
Applied rewrites22.8%
if 6.7999999999999997e-253 < y < 6.1999999999999997e-63Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
Taylor expanded in z around 0
lower-*.f6422.6%
Applied rewrites22.6%
if 3.4999999999999998e260 < y Initial program 72.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.7%
Applied rewrites21.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -1.5e+92)
t_1
(if (<= y -1.3e-143)
(* j (* a c))
(if (<= y 6.8e-253)
(* b (* i t))
(if (<= y 6.2e-63)
(* c (* a j))
(if (<= y 3.5e+260) t_1 (* -1.0 (* i (* j y))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else if (y <= 3.5e+260) {
tmp = t_1;
} else {
tmp = -1.0 * (i * (j * 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 = x * (y * z)
if (y <= (-1.5d+92)) then
tmp = t_1
else if (y <= (-1.3d-143)) then
tmp = j * (a * c)
else if (y <= 6.8d-253) then
tmp = b * (i * t)
else if (y <= 6.2d-63) then
tmp = c * (a * j)
else if (y <= 3.5d+260) then
tmp = t_1
else
tmp = (-1.0d0) * (i * (j * 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 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else if (y <= 3.5e+260) {
tmp = t_1;
} else {
tmp = -1.0 * (i * (j * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -1.5e+92: tmp = t_1 elif y <= -1.3e-143: tmp = j * (a * c) elif y <= 6.8e-253: tmp = b * (i * t) elif y <= 6.2e-63: tmp = c * (a * j) elif y <= 3.5e+260: tmp = t_1 else: tmp = -1.0 * (i * (j * y)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = Float64(j * Float64(a * c)); elseif (y <= 6.8e-253) tmp = Float64(b * Float64(i * t)); elseif (y <= 6.2e-63) tmp = Float64(c * Float64(a * j)); elseif (y <= 3.5e+260) tmp = t_1; else tmp = Float64(-1.0 * Float64(i * Float64(j * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = j * (a * c); elseif (y <= 6.8e-253) tmp = b * (i * t); elseif (y <= 6.2e-63) tmp = c * (a * j); elseif (y <= 3.5e+260) tmp = t_1; else tmp = -1.0 * (i * (j * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+92], t$95$1, If[LessEqual[y, -1.3e-143], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-253], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-63], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+260], t$95$1, N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-143}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-253}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+260}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\end{array}
if y < -1.5000000000000001e92 or 6.1999999999999997e-63 < y < 3.4999999999999998e260Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -1.5000000000000001e92 < y < -1.2999999999999999e-143Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in y around 0
lower-*.f6422.9%
Applied rewrites22.9%
if -1.2999999999999999e-143 < y < 6.7999999999999997e-253Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in z around 0
lower-*.f6422.8%
Applied rewrites22.8%
if 6.7999999999999997e-253 < y < 6.1999999999999997e-63Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
Taylor expanded in z around 0
lower-*.f6422.6%
Applied rewrites22.6%
if 3.4999999999999998e260 < y Initial program 72.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.7%
Applied rewrites21.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -1.5e+92)
t_1
(if (<= y -1.3e-143)
(* j (* a c))
(if (<= y 6.8e-253)
(* b (* i t))
(if (<= y 6.2e-63) (* c (* a j)) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (y <= (-1.5d+92)) then
tmp = t_1
else if (y <= (-1.3d-143)) then
tmp = j * (a * c)
else if (y <= 6.8d-253) then
tmp = b * (i * t)
else if (y <= 6.2d-63) then
tmp = c * (a * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 6.8e-253) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = c * (a * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -1.5e+92: tmp = t_1 elif y <= -1.3e-143: tmp = j * (a * c) elif y <= 6.8e-253: tmp = b * (i * t) elif y <= 6.2e-63: tmp = c * (a * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = Float64(j * Float64(a * c)); elseif (y <= 6.8e-253) tmp = Float64(b * Float64(i * t)); elseif (y <= 6.2e-63) tmp = Float64(c * Float64(a * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = j * (a * c); elseif (y <= 6.8e-253) tmp = b * (i * t); elseif (y <= 6.2e-63) tmp = c * (a * 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+92], t$95$1, If[LessEqual[y, -1.3e-143], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-253], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-63], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-143}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-253}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.5000000000000001e92 or 6.1999999999999997e-63 < y Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -1.5000000000000001e92 < y < -1.2999999999999999e-143Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in y around 0
lower-*.f6422.9%
Applied rewrites22.9%
if -1.2999999999999999e-143 < y < 6.7999999999999997e-253Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in z around 0
lower-*.f6422.8%
Applied rewrites22.8%
if 6.7999999999999997e-253 < y < 6.1999999999999997e-63Initial program 72.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
Taylor expanded in z around 0
lower-*.f6422.6%
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= y -1.5e+92)
t_1
(if (<= y -1.3e-143)
(* j (* a c))
(if (<= y 9.5e-237)
(* b (* i t))
(if (<= y 6.2e-63) (* a (* c j)) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 9.5e-237) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (y <= (-1.5d+92)) then
tmp = t_1
else if (y <= (-1.3d-143)) then
tmp = j * (a * c)
else if (y <= 9.5d-237) then
tmp = b * (i * t)
else if (y <= 6.2d-63) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (y <= -1.5e+92) {
tmp = t_1;
} else if (y <= -1.3e-143) {
tmp = j * (a * c);
} else if (y <= 9.5e-237) {
tmp = b * (i * t);
} else if (y <= 6.2e-63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if y <= -1.5e+92: tmp = t_1 elif y <= -1.3e-143: tmp = j * (a * c) elif y <= 9.5e-237: tmp = b * (i * t) elif y <= 6.2e-63: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = Float64(j * Float64(a * c)); elseif (y <= 9.5e-237) tmp = Float64(b * Float64(i * t)); elseif (y <= 6.2e-63) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (y <= -1.5e+92) tmp = t_1; elseif (y <= -1.3e-143) tmp = j * (a * c); elseif (y <= 9.5e-237) tmp = b * (i * t); elseif (y <= 6.2e-63) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+92], t$95$1, If[LessEqual[y, -1.3e-143], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-237], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-143}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-237}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.5000000000000001e92 or 6.1999999999999997e-63 < y Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -1.5000000000000001e92 < y < -1.2999999999999999e-143Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in y around 0
lower-*.f6422.9%
Applied rewrites22.9%
if -1.2999999999999999e-143 < y < 9.4999999999999998e-237Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in z around 0
lower-*.f6422.8%
Applied rewrites22.8%
if 9.4999999999999998e-237 < y < 6.1999999999999997e-63Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in x around 0
lower-*.f6422.7%
Applied rewrites22.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= x -3.4e+141) t_1 (if (<= x 1.25e+33) (* a (* c j)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -3.4e+141) {
tmp = t_1;
} else if (x <= 1.25e+33) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (x <= (-3.4d+141)) then
tmp = t_1
else if (x <= 1.25d+33) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -3.4e+141) {
tmp = t_1;
} else if (x <= 1.25e+33) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -3.4e+141: tmp = t_1 elif x <= 1.25e+33: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -3.4e+141) tmp = t_1; elseif (x <= 1.25e+33) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -3.4e+141) tmp = t_1; elseif (x <= 1.25e+33) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+141], t$95$1, If[LessEqual[x, 1.25e+33], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+33}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -3.3999999999999998e141 or 1.2499999999999999e33 < x Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -3.3999999999999998e141 < x < 1.2499999999999999e33Initial program 72.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in x around 0
lower-*.f6422.7%
Applied rewrites22.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* x (* y z)))) (if (<= z -1.55e+66) t_1 (if (<= z 1.2e+95) (* j (* a c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (z <= -1.55e+66) {
tmp = t_1;
} else if (z <= 1.2e+95) {
tmp = j * (a * c);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (z <= (-1.55d+66)) then
tmp = t_1
else if (z <= 1.2d+95) then
tmp = j * (a * c)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (z <= -1.55e+66) {
tmp = t_1;
} else if (z <= 1.2e+95) {
tmp = j * (a * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if z <= -1.55e+66: tmp = t_1 elif z <= 1.2e+95: tmp = j * (a * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (z <= -1.55e+66) tmp = t_1; elseif (z <= 1.2e+95) tmp = Float64(j * Float64(a * c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (z <= -1.55e+66) tmp = t_1; elseif (z <= 1.2e+95) tmp = j * (a * c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+66], t$95$1, If[LessEqual[z, 1.2e+95], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -1.5500000000000001e66 or 1.2e95 < z Initial program 72.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.9%
Applied rewrites39.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
if -1.5500000000000001e66 < z < 1.2e95Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in y around 0
lower-*.f6422.9%
Applied rewrites22.9%
(FPCore (x y z t a b c i j) :precision binary64 (* j (* a c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return j * (a * c);
}
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 = j * (a * c)
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 j * (a * c);
}
def code(x, y, z, t, a, b, c, i, j): return j * (a * c)
function code(x, y, z, t, a, b, c, i, j) return Float64(j * Float64(a * c)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = j * (a * c); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision]
j \cdot \left(a \cdot c\right)
Initial program 72.9%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.3%
Applied rewrites60.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in y around 0
lower-*.f6422.9%
Applied rewrites22.9%
herbie shell --seed 2025201
(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)))))