
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Herbie found 31 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(*
(- i)
(fma
(/ (fma j y (* (- b) t)) c)
c
(-
(*
c
(/ (- (fma (/ (fma (- a) t (* z y)) c) x (* j a)) (* b z)) i))))))))
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 = -i * fma((fma(j, y, (-b * t)) / c), c, -(c * ((fma((fma(-a, t, (z * y)) / c), x, (j * a)) - (b * z)) / i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-i) * fma(Float64(fma(j, y, Float64(Float64(-b) * t)) / c), c, Float64(-Float64(c * Float64(Float64(fma(Float64(fma(Float64(-a), t, Float64(z * y)) / c), x, Float64(j * a)) - Float64(b * z)) / i))))); 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[((-i) * N[(N[(N[(j * y + N[((-b) * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * c + (-N[(c * N[(N[(N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * x + N[(j * a), $MachinePrecision]), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)}{c}, c, -c \cdot \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(-a, t, z \cdot y\right)}{c}, x, j \cdot a\right) - b \cdot z}{i}\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.4%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites11.6%
Taylor expanded in c around inf
Applied rewrites31.8%
Taylor expanded in i around -inf
Applied rewrites46.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 (* (fma j a (* (- b) z)) c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(j, a, (-b * z)) * c;
}
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(fma(j, a, Float64(Float64(-b) * z)) * c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.4%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6443.6
Applied rewrites43.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
-1e+241)
(* (* y x) z)
(* (* z y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -1e+241) {
tmp = (y * x) * z;
} else {
tmp = (z * y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= (-1d+241)) then
tmp = (y * x) * z
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -1e+241) {
tmp = (y * x) * z;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -1e+241: tmp = (y * x) * z else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (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)))) <= -1e+241) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -1e+241) tmp = (y * x) * z; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[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], -1e+241], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq -1 \cdot 10^{+241}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < -1.0000000000000001e241Initial program 87.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.3
Applied rewrites42.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6423.3
Applied rewrites23.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.1
Applied rewrites24.1%
if -1.0000000000000001e241 < (+.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 68.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.4
Applied rewrites38.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (* j c) a (fma (fma (- a) t (* z y)) x (* (- b) (* c z))))))
(if (<= x -1.35e-145)
t_1
(if (<= x 1.9e+133)
(+ (* (* (- (/ (* y x) c) b) z) c) (* 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((j * c), a, fma(fma(-a, t, (z * y)), x, (-b * (c * z))));
double tmp;
if (x <= -1.35e-145) {
tmp = t_1;
} else if (x <= 1.9e+133) {
tmp = (((((y * x) / c) - b) * z) * c) + (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(Float64(j * c), a, fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(-b) * Float64(c * z)))) tmp = 0.0 if (x <= -1.35e-145) tmp = t_1; elseif (x <= 1.9e+133) tmp = Float64(Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * z) * c) + 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[(N[(j * c), $MachinePrecision] * a + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e-145], t$95$1, If[LessEqual[x, 1.9e+133], N[(N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * z), $MachinePrecision] * c), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \left(c \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+133}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.35e-145 or 1.9000000000000001e133 < x Initial program 73.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6464.4
Applied rewrites64.4%
Taylor expanded in i around 0
associate--l+N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Applied rewrites66.4%
if -1.35e-145 < x < 1.9000000000000001e133Initial program 73.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6460.9
Applied rewrites60.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- t) (* (fma a (/ x b) (- i)) b))))
(if (<= t -1.6e+157)
t_1
(if (<= t -1.1e-75)
(* (fma (- t) x (* j c)) a)
(if (<= t -4.5e-301)
(* (fma (- i) j (* z x)) y)
(if (<= t 2.15e-147)
(* (fma j a (* (- b) z)) c)
(if (<= t 1.3e-62) (* (fma (- i) y (* 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 = -t * (fma(a, (x / b), -i) * b);
double tmp;
if (t <= -1.6e+157) {
tmp = t_1;
} else if (t <= -1.1e-75) {
tmp = fma(-t, x, (j * c)) * a;
} else if (t <= -4.5e-301) {
tmp = fma(-i, j, (z * x)) * y;
} else if (t <= 2.15e-147) {
tmp = fma(j, a, (-b * z)) * c;
} else if (t <= 1.3e-62) {
tmp = fma(-i, y, (c * a)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-t) * Float64(fma(a, Float64(x / b), Float64(-i)) * b)) tmp = 0.0 if (t <= -1.6e+157) tmp = t_1; elseif (t <= -1.1e-75) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (t <= -4.5e-301) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (t <= 2.15e-147) tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c); elseif (t <= 1.3e-62) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-t) * N[(N[(a * N[(x / b), $MachinePrecision] + (-i)), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+157], t$95$1, If[LessEqual[t, -1.1e-75], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, -4.5e-301], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 2.15e-147], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t, 1.3e-62], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-75}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-147}:\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-62}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6e157 or 1.3e-62 < t Initial program 66.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.9
Applied rewrites60.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lift-neg.f6460.0
Applied rewrites60.0%
if -1.6e157 < t < -1.10000000000000003e-75Initial program 75.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
if -1.10000000000000003e-75 < t < -4.5000000000000002e-301Initial program 81.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.9
Applied rewrites46.9%
if -4.5000000000000002e-301 < t < 2.1500000000000001e-147Initial program 78.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.9
Applied rewrites47.9%
if 2.1500000000000001e-147 < t < 1.3e-62Initial program 83.5%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6446.5
Applied rewrites46.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))))
(if (<= t -2.4e+149)
(* (- t) (* (fma a (/ x b) (- i)) b))
(if (<= t 4e-171)
(+ (* (- b) (* c z)) t_1)
(if (<= t 1.25e+38)
(+ (* (* z y) x) t_1)
(* (* c t) (* -1.0 (/ (fma a x (* (- b) i)) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double tmp;
if (t <= -2.4e+149) {
tmp = -t * (fma(a, (x / b), -i) * b);
} else if (t <= 4e-171) {
tmp = (-b * (c * z)) + t_1;
} else if (t <= 1.25e+38) {
tmp = ((z * y) * x) + t_1;
} else {
tmp = (c * t) * (-1.0 * (fma(a, x, (-b * i)) / c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (t <= -2.4e+149) tmp = Float64(Float64(-t) * Float64(fma(a, Float64(x / b), Float64(-i)) * b)); elseif (t <= 4e-171) tmp = Float64(Float64(Float64(-b) * Float64(c * z)) + t_1); elseif (t <= 1.25e+38) tmp = Float64(Float64(Float64(z * y) * x) + t_1); else tmp = Float64(Float64(c * t) * Float64(-1.0 * Float64(fma(a, x, Float64(Float64(-b) * i)) / c))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+149], N[((-t) * N[(N[(a * N[(x / b), $MachinePrecision] + (-i)), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-171], N[(N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.25e+38], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(c * t), $MachinePrecision] * N[(-1.0 * N[(N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-171}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right) + t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot t\right) \cdot \left(-1 \cdot \frac{\mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)}{c}\right)\\
\end{array}
\end{array}
if t < -2.40000000000000012e149Initial program 60.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6470.3
Applied rewrites70.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lift-neg.f6469.2
Applied rewrites69.2%
if -2.40000000000000012e149 < t < 3.9999999999999999e-171Initial program 78.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6475.4
Applied rewrites75.4%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
lift-*.f6455.3
Applied rewrites55.3%
if 3.9999999999999999e-171 < t < 1.24999999999999992e38Initial program 81.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6456.9
Applied rewrites56.9%
if 1.24999999999999992e38 < t Initial program 65.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.7%
Taylor expanded in c around inf
Applied rewrites58.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
distribute-lft-out--N/A
lower-*.f64N/A
sub-divN/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f6462.8
Applied rewrites62.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x))
(t_2 (* (fma (- t) x (* j c)) a))
(t_3 (* (- i) (fma j y (* (- b) t)))))
(if (<= i -1.95e+61)
t_3
(if (<= i -7e-236)
t_2
(if (<= i -6e-286)
t_1
(if (<= i 7.4e-231)
(* (fma j a (* (- b) z)) c)
(if (<= i 6.5e-145) t_1 (if (<= i 3.2e+18) t_2 t_3))))))))
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, t, (z * y)) * x;
double t_2 = fma(-t, x, (j * c)) * a;
double t_3 = -i * fma(j, y, (-b * t));
double tmp;
if (i <= -1.95e+61) {
tmp = t_3;
} else if (i <= -7e-236) {
tmp = t_2;
} else if (i <= -6e-286) {
tmp = t_1;
} else if (i <= 7.4e-231) {
tmp = fma(j, a, (-b * z)) * c;
} else if (i <= 6.5e-145) {
tmp = t_1;
} else if (i <= 3.2e+18) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) t_3 = Float64(Float64(-i) * fma(j, y, Float64(Float64(-b) * t))) tmp = 0.0 if (i <= -1.95e+61) tmp = t_3; elseif (i <= -7e-236) tmp = t_2; elseif (i <= -6e-286) tmp = t_1; elseif (i <= 7.4e-231) tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c); elseif (i <= 6.5e-145) tmp = t_1; elseif (i <= 3.2e+18) tmp = t_2; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$3 = N[((-i) * N[(j * y + N[((-b) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.95e+61], t$95$3, If[LessEqual[i, -7e-236], t$95$2, If[LessEqual[i, -6e-286], t$95$1, If[LessEqual[i, 7.4e-231], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[i, 6.5e-145], t$95$1, If[LessEqual[i, 3.2e+18], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
t_3 := \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)\\
\mathbf{if}\;i \leq -1.95 \cdot 10^{+61}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -7 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq -6 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 7.4 \cdot 10^{-231}:\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;i \leq 6.5 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.2 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if i < -1.94999999999999994e61 or 3.2e18 < i Initial program 64.8%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6463.0
Applied rewrites63.0%
if -1.94999999999999994e61 < i < -6.99999999999999988e-236 or 6.5000000000000002e-145 < i < 3.2e18Initial program 79.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.6
Applied rewrites43.6%
if -6.99999999999999988e-236 < i < -6.0000000000000001e-286 or 7.39999999999999986e-231 < i < 6.5000000000000002e-145Initial program 81.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.8
Applied rewrites48.8%
if -6.0000000000000001e-286 < i < 7.39999999999999986e-231Initial program 81.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6450.3
Applied rewrites50.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- i) (fma j y (* (- b) t)))))
(if (<= i -9.5e+63)
t_1
(if (<= i 1.25e+55)
(fma (* j c) a (fma (fma (- a) t (* z y)) x (* (- b) (* c z))))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -i * fma(j, y, (-b * t));
double tmp;
if (i <= -9.5e+63) {
tmp = t_1;
} else if (i <= 1.25e+55) {
tmp = fma((j * c), a, fma(fma(-a, t, (z * y)), x, (-b * (c * z))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-i) * fma(j, y, Float64(Float64(-b) * t))) tmp = 0.0 if (i <= -9.5e+63) tmp = t_1; elseif (i <= 1.25e+55) tmp = fma(Float64(j * c), a, fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(-b) * Float64(c * z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-i) * N[(j * y + N[((-b) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -9.5e+63], t$95$1, If[LessEqual[i, 1.25e+55], N[(N[(j * c), $MachinePrecision] * a + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right)\\
\mathbf{if}\;i \leq -9.5 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.25 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \left(c \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -9.5000000000000003e63 or 1.25000000000000011e55 < i Initial program 64.0%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6464.6
Applied rewrites64.6%
if -9.5000000000000003e63 < i < 1.25000000000000011e55Initial program 80.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6476.7
Applied rewrites76.7%
Taylor expanded in i around 0
associate--l+N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Applied rewrites69.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -3.5e+99)
(+ (* (* z y) x) (* j (- (* c a) (* y i))))
(if (<= j 1.1e+175)
(- (fma (fma (- a) t (* z y)) x (* (* j c) a)) (* (* c b) z))
(* (fma (- i) y (* c a)) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -3.5e+99) {
tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
} else if (j <= 1.1e+175) {
tmp = fma(fma(-a, t, (z * y)), x, ((j * c) * a)) - ((c * b) * z);
} else {
tmp = fma(-i, y, (c * a)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -3.5e+99) tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (j <= 1.1e+175) tmp = Float64(fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(j * c) * a)) - Float64(Float64(c * b) * z)); else tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -3.5e+99], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.1e+175], N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;j \leq 1.1 \cdot 10^{+175}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(j \cdot c\right) \cdot a\right) - \left(c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if j < -3.4999999999999998e99Initial program 72.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.8
Applied rewrites66.8%
if -3.4999999999999998e99 < j < 1.1e175Initial program 74.2%
Taylor expanded in i around 0
lower--.f64N/A
Applied rewrites63.0%
if 1.1e175 < j Initial program 71.3%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6473.9
Applied rewrites73.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y))
(t_2 (* (- t) (fma a x (* (- b) i)))))
(if (<= t -1.6e+157)
t_2
(if (<= t -1.1e-75)
(* (fma (- t) x (* j c)) a)
(if (<= t -4.5e-301)
t_1
(if (<= t 4.1e-150)
(* (fma j a (* (- b) z)) c)
(if (<= t 8e+14) 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 = fma(-i, j, (z * x)) * y;
double t_2 = -t * fma(a, x, (-b * i));
double tmp;
if (t <= -1.6e+157) {
tmp = t_2;
} else if (t <= -1.1e-75) {
tmp = fma(-t, x, (j * c)) * a;
} else if (t <= -4.5e-301) {
tmp = t_1;
} else if (t <= 4.1e-150) {
tmp = fma(j, a, (-b * z)) * c;
} else if (t <= 8e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) t_2 = Float64(Float64(-t) * fma(a, x, Float64(Float64(-b) * i))) tmp = 0.0 if (t <= -1.6e+157) tmp = t_2; elseif (t <= -1.1e-75) tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); elseif (t <= -4.5e-301) tmp = t_1; elseif (t <= 4.1e-150) tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c); elseif (t <= 8e+14) tmp = 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[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[((-t) * N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+157], t$95$2, If[LessEqual[t, -1.1e-75], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, -4.5e-301], t$95$1, If[LessEqual[t, 4.1e-150], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t, 8e+14], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
t_2 := \left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-75}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-150}:\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.6e157 or 8e14 < t Initial program 64.1%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6465.7
Applied rewrites65.7%
if -1.6e157 < t < -1.10000000000000003e-75Initial program 75.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
if -1.10000000000000003e-75 < t < -4.5000000000000002e-301 or 4.0999999999999998e-150 < t < 8e14Initial program 81.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.5
Applied rewrites44.5%
if -4.5000000000000002e-301 < t < 4.0999999999999998e-150Initial program 78.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6448.1
Applied rewrites48.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))))
(if (<= t -2.4e+149)
(* (- t) (* (fma a (/ x b) (- i)) b))
(if (<= t 4e-171)
(+ (* (- b) (* c z)) t_1)
(if (<= t 1.45e+38)
(+ (* (* z y) x) t_1)
(* (- t) (fma a x (* (- b) i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double tmp;
if (t <= -2.4e+149) {
tmp = -t * (fma(a, (x / b), -i) * b);
} else if (t <= 4e-171) {
tmp = (-b * (c * z)) + t_1;
} else if (t <= 1.45e+38) {
tmp = ((z * y) * x) + t_1;
} else {
tmp = -t * fma(a, x, (-b * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (t <= -2.4e+149) tmp = Float64(Float64(-t) * Float64(fma(a, Float64(x / b), Float64(-i)) * b)); elseif (t <= 4e-171) tmp = Float64(Float64(Float64(-b) * Float64(c * z)) + t_1); elseif (t <= 1.45e+38) tmp = Float64(Float64(Float64(z * y) * x) + t_1); else tmp = Float64(Float64(-t) * fma(a, x, Float64(Float64(-b) * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+149], N[((-t) * N[(N[(a * N[(x / b), $MachinePrecision] + (-i)), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-171], N[(N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.45e+38], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + t$95$1), $MachinePrecision], N[((-t) * N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-171}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right) + t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)\\
\end{array}
\end{array}
if t < -2.40000000000000012e149Initial program 60.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6470.3
Applied rewrites70.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lift-neg.f6469.2
Applied rewrites69.2%
if -2.40000000000000012e149 < t < 3.9999999999999999e-171Initial program 78.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6475.4
Applied rewrites75.4%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
lift-*.f6455.3
Applied rewrites55.3%
if 3.9999999999999999e-171 < t < 1.45000000000000003e38Initial program 81.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6456.9
Applied rewrites56.9%
if 1.45000000000000003e38 < t Initial program 65.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6464.7
Applied rewrites64.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))))
(if (<= t -1.5e+149)
(* (- t) (* (fma a (/ x b) (- i)) b))
(if (<= t 4.1e-171)
(+ (- (* (* c b) z)) t_1)
(if (<= t 1.45e+38)
(+ (* (* z y) x) t_1)
(* (- t) (fma a x (* (- b) i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double tmp;
if (t <= -1.5e+149) {
tmp = -t * (fma(a, (x / b), -i) * b);
} else if (t <= 4.1e-171) {
tmp = -((c * b) * z) + t_1;
} else if (t <= 1.45e+38) {
tmp = ((z * y) * x) + t_1;
} else {
tmp = -t * fma(a, x, (-b * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (t <= -1.5e+149) tmp = Float64(Float64(-t) * Float64(fma(a, Float64(x / b), Float64(-i)) * b)); elseif (t <= 4.1e-171) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + t_1); elseif (t <= 1.45e+38) tmp = Float64(Float64(Float64(z * y) * x) + t_1); else tmp = Float64(Float64(-t) * fma(a, x, Float64(Float64(-b) * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+149], N[((-t) * N[(N[(a * N[(x / b), $MachinePrecision] + (-i)), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-171], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + t$95$1), $MachinePrecision], If[LessEqual[t, 1.45e+38], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + t$95$1), $MachinePrecision], N[((-t) * N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-171}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)\\
\end{array}
\end{array}
if t < -1.50000000000000002e149Initial program 60.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6470.4
Applied rewrites70.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lift-neg.f6469.2
Applied rewrites69.2%
if -1.50000000000000002e149 < t < 4.1e-171Initial program 78.6%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6455.4
Applied rewrites55.4%
if 4.1e-171 < t < 1.45000000000000003e38Initial program 81.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6456.9
Applied rewrites56.9%
if 1.45000000000000003e38 < t Initial program 65.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6464.7
Applied rewrites64.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma j a (* (- b) z)) c)))
(if (<= c -1.4e-117)
t_1
(if (<= c -7e-161)
(* (* (- a) t) x)
(if (<= c -1.8e-254)
(* (fma i t (* (- c) z)) b)
(if (<= c 2e-280)
(* (* z x) y)
(if (<= c 6.4e-40) (* (- t) (* a x)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, a, (-b * z)) * c;
double tmp;
if (c <= -1.4e-117) {
tmp = t_1;
} else if (c <= -7e-161) {
tmp = (-a * t) * x;
} else if (c <= -1.8e-254) {
tmp = fma(i, t, (-c * z)) * b;
} else if (c <= 2e-280) {
tmp = (z * x) * y;
} else if (c <= 6.4e-40) {
tmp = -t * (a * x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -1.4e-117) tmp = t_1; elseif (c <= -7e-161) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (c <= -1.8e-254) tmp = Float64(fma(i, t, Float64(Float64(-c) * z)) * b); elseif (c <= 2e-280) tmp = Float64(Float64(z * x) * y); elseif (c <= 6.4e-40) tmp = Float64(Float64(-t) * Float64(a * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -1.4e-117], t$95$1, If[LessEqual[c, -7e-161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[c, -1.8e-254], N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[c, 2e-280], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 6.4e-40], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -1.4 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -7 \cdot 10^{-161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;c \leq -1.8 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;c \leq 2 \cdot 10^{-280}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.4e-117 or 6.40000000000000004e-40 < c Initial program 69.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6452.7
Applied rewrites52.7%
if -1.4e-117 < c < -7.00000000000000039e-161Initial program 81.5%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.9
Applied rewrites47.9%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f6431.7
Applied rewrites31.7%
if -7.00000000000000039e-161 < c < -1.79999999999999992e-254Initial program 81.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6430.3
Applied rewrites30.3%
if -1.79999999999999992e-254 < c < 1.9999999999999999e-280Initial program 82.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6426.0
Applied rewrites26.0%
if 1.9999999999999999e-280 < c < 6.40000000000000004e-40Initial program 79.1%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6446.4
Applied rewrites46.4%
Taylor expanded in x around inf
lower-*.f6426.0
Applied rewrites26.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma i t (* (- c) z)) b)))
(if (<= b -3.2e+43)
t_1
(if (<= b -1.95e-154)
(* (- t) (* a x))
(if (<= b 2.1e-256)
(* (* c a) j)
(if (<= b 2.25e-156)
(* (* y x) z)
(if (<= b 6e-60) (* (- i) (* j y)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(i, t, (-c * z)) * b;
double tmp;
if (b <= -3.2e+43) {
tmp = t_1;
} else if (b <= -1.95e-154) {
tmp = -t * (a * x);
} else if (b <= 2.1e-256) {
tmp = (c * a) * j;
} else if (b <= 2.25e-156) {
tmp = (y * x) * z;
} else if (b <= 6e-60) {
tmp = -i * (j * y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(i, t, Float64(Float64(-c) * z)) * b) tmp = 0.0 if (b <= -3.2e+43) tmp = t_1; elseif (b <= -1.95e-154) tmp = Float64(Float64(-t) * Float64(a * x)); elseif (b <= 2.1e-256) tmp = Float64(Float64(c * a) * j); elseif (b <= 2.25e-156) tmp = Float64(Float64(y * x) * z); elseif (b <= 6e-60) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.2e+43], t$95$1, If[LessEqual[b, -1.95e-154], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.1e-256], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 2.25e-156], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 6e-60], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.95 \cdot 10^{-154}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-256}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{-156}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-60}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.20000000000000014e43 or 6.00000000000000038e-60 < b Initial program 73.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6457.6
Applied rewrites57.6%
if -3.20000000000000014e43 < b < -1.95000000000000016e-154Initial program 74.8%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6436.4
Applied rewrites36.4%
Taylor expanded in x around inf
lower-*.f6423.9
Applied rewrites23.9%
if -1.95000000000000016e-154 < b < 2.10000000000000003e-256Initial program 73.4%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6449.0
Applied rewrites49.0%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6427.2
Applied rewrites27.2%
if 2.10000000000000003e-256 < b < 2.24999999999999993e-156Initial program 72.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.7
Applied rewrites47.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6427.1
Applied rewrites27.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6427.3
Applied rewrites27.3%
if 2.24999999999999993e-156 < b < 6.00000000000000038e-60Initial program 74.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6423.9
Applied rewrites23.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.65e+69)
(* (fma y x (* (- b) c)) z)
(if (<= z -1e-260)
(* (fma (- i) y (* c a)) j)
(if (<= z 4.2e+17)
(* (- t) (fma a x (* (- b) i)))
(* (* (- (/ (* y x) c) b) z) c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.65e+69) {
tmp = fma(y, x, (-b * c)) * z;
} else if (z <= -1e-260) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 4.2e+17) {
tmp = -t * fma(a, x, (-b * i));
} else {
tmp = ((((y * x) / c) - b) * z) * c;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.65e+69) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z); elseif (z <= -1e-260) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 4.2e+17) tmp = Float64(Float64(-t) * fma(a, x, Float64(Float64(-b) * i))); else tmp = Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * z) * c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.65e+69], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, -1e-260], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 4.2e+17], N[((-t) * N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * z), $MachinePrecision] * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-260}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+17}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c\\
\end{array}
\end{array}
if z < -1.6499999999999999e69Initial program 62.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6464.4
Applied rewrites64.4%
if -1.6499999999999999e69 < z < -9.99999999999999961e-261Initial program 79.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6444.2
Applied rewrites44.2%
if -9.99999999999999961e-261 < z < 4.2e17Initial program 81.8%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6445.5
Applied rewrites45.5%
if 4.2e17 < z Initial program 65.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.2%
Taylor expanded in c around inf
Applied rewrites58.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift-*.f6459.6
Applied rewrites59.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -1.5e+149)
(* (- t) (* (fma a (/ x b) (- i)) b))
(if (<= t 1.45e+38)
(+ (* (* z y) x) (* j (- (* c a) (* y i))))
(* (- t) (fma a x (* (- b) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -1.5e+149) {
tmp = -t * (fma(a, (x / b), -i) * b);
} else if (t <= 1.45e+38) {
tmp = ((z * y) * x) + (j * ((c * a) - (y * i)));
} else {
tmp = -t * fma(a, x, (-b * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -1.5e+149) tmp = Float64(Float64(-t) * Float64(fma(a, Float64(x / b), Float64(-i)) * b)); elseif (t <= 1.45e+38) tmp = Float64(Float64(Float64(z * y) * x) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = Float64(Float64(-t) * fma(a, x, Float64(Float64(-b) * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -1.5e+149], N[((-t) * N[(N[(a * N[(x / b), $MachinePrecision] + (-i)), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+38], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-t) * N[(a * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+149}:\\
\;\;\;\;\left(-t\right) \cdot \left(\mathsf{fma}\left(a, \frac{x}{b}, -i\right) \cdot b\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \mathsf{fma}\left(a, x, \left(-b\right) \cdot i\right)\\
\end{array}
\end{array}
if t < -1.50000000000000002e149Initial program 60.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6470.4
Applied rewrites70.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lift-neg.f6469.2
Applied rewrites69.2%
if -1.50000000000000002e149 < t < 1.45000000000000003e38Initial program 79.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6457.2
Applied rewrites57.2%
if 1.45000000000000003e38 < t Initial program 65.3%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6464.7
Applied rewrites64.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -2e+22)
t_1
(if (<= x -4.8e-157)
(* (fma j a (* (- b) z)) c)
(if (<= x 8.2e-144)
(* (fma (- i) y (* c a)) j)
(if (<= x 2.9e+131) (* (fma (- i) j (* z x)) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -2e+22) {
tmp = t_1;
} else if (x <= -4.8e-157) {
tmp = fma(j, a, (-b * z)) * c;
} else if (x <= 8.2e-144) {
tmp = fma(-i, y, (c * a)) * j;
} else if (x <= 2.9e+131) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -2e+22) tmp = t_1; elseif (x <= -4.8e-157) tmp = Float64(fma(j, a, Float64(Float64(-b) * z)) * c); elseif (x <= 8.2e-144) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (x <= 2.9e+131) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -2e+22], t$95$1, If[LessEqual[x, -4.8e-157], N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 8.2e-144], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 2.9e+131], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-157}:\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2e22 or 2.9000000000000001e131 < x Initial program 73.1%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.5
Applied rewrites65.5%
if -2e22 < x < -4.8e-157Initial program 75.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6440.8
Applied rewrites40.8%
if -4.8e-157 < x < 8.2e-144Initial program 69.9%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6449.8
Applied rewrites49.8%
if 8.2e-144 < x < 2.9000000000000001e131Initial program 77.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+22)
(* (- t) (* a x))
(if (<= x -9.5e-123)
(* (* (- c) z) b)
(if (<= x 4.8e-170)
(* (* c a) j)
(if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = -t * (a * x);
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+22)) then
tmp = -t * (a * x)
else if (x <= (-9.5d-123)) then
tmp = (-c * z) * b
else if (x <= 4.8d-170) then
tmp = (c * a) * j
else if (x <= 9.5d+63) then
tmp = -i * (j * y)
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = -t * (a * x);
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+22: tmp = -t * (a * x) elif x <= -9.5e-123: tmp = (-c * z) * b elif x <= 4.8e-170: tmp = (c * a) * j elif x <= 9.5e+63: tmp = -i * (j * y) else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+22) tmp = Float64(Float64(-t) * Float64(a * x)); elseif (x <= -9.5e-123) tmp = Float64(Float64(Float64(-c) * z) * b); elseif (x <= 4.8e-170) tmp = Float64(Float64(c * a) * j); elseif (x <= 9.5e+63) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+22) tmp = -t * (a * x); elseif (x <= -9.5e-123) tmp = (-c * z) * b; elseif (x <= 4.8e-170) tmp = (c * a) * j; elseif (x <= 9.5e+63) tmp = -i * (j * y); else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.5e-123], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 4.8e-170], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 9.5e+63], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -2e22Initial program 72.4%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.1
Applied rewrites47.1%
Taylor expanded in x around inf
lower-*.f6435.9
Applied rewrites35.9%
if -2e22 < x < -9.5000000000000002e-123Initial program 76.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.6
Applied rewrites43.6%
Taylor expanded in z around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lift-neg.f6421.7
Applied rewrites21.7%
if -9.5000000000000002e-123 < x < 4.7999999999999999e-170Initial program 69.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6448.6
Applied rewrites48.6%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6428.4
Applied rewrites28.4%
if 4.7999999999999999e-170 < x < 9.5000000000000003e63Initial program 76.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6437.4
Applied rewrites37.4%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6423.1
Applied rewrites23.1%
if 9.5000000000000003e63 < x Initial program 75.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.9
Applied rewrites35.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+22)
(* (* (- t) x) a)
(if (<= x -9.5e-123)
(* (* (- c) z) b)
(if (<= x 4.8e-170)
(* (* c a) j)
(if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-t * x) * a;
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+22)) then
tmp = (-t * x) * a
else if (x <= (-9.5d-123)) then
tmp = (-c * z) * b
else if (x <= 4.8d-170) then
tmp = (c * a) * j
else if (x <= 9.5d+63) then
tmp = -i * (j * y)
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-t * x) * a;
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+22: tmp = (-t * x) * a elif x <= -9.5e-123: tmp = (-c * z) * b elif x <= 4.8e-170: tmp = (c * a) * j elif x <= 9.5e+63: tmp = -i * (j * y) else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+22) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (x <= -9.5e-123) tmp = Float64(Float64(Float64(-c) * z) * b); elseif (x <= 4.8e-170) tmp = Float64(Float64(c * a) * j); elseif (x <= 9.5e+63) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+22) tmp = (-t * x) * a; elseif (x <= -9.5e-123) tmp = (-c * z) * b; elseif (x <= 4.8e-170) tmp = (c * a) * j; elseif (x <= 9.5e+63) tmp = -i * (j * y); else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, -9.5e-123], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 4.8e-170], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 9.5e+63], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -2e22Initial program 72.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.2
Applied rewrites46.2%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f6436.2
Applied rewrites36.2%
if -2e22 < x < -9.5000000000000002e-123Initial program 76.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.6
Applied rewrites43.6%
Taylor expanded in z around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lift-neg.f6421.7
Applied rewrites21.7%
if -9.5000000000000002e-123 < x < 4.7999999999999999e-170Initial program 69.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6448.6
Applied rewrites48.6%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6428.4
Applied rewrites28.4%
if 4.7999999999999999e-170 < x < 9.5000000000000003e63Initial program 76.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6437.4
Applied rewrites37.4%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6423.1
Applied rewrites23.1%
if 9.5000000000000003e63 < x Initial program 75.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.9
Applied rewrites35.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+22)
(* (* (- a) t) x)
(if (<= x -9.5e-123)
(* (* (- c) z) b)
(if (<= x 4.8e-170)
(* (* c a) j)
(if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+22)) then
tmp = (-a * t) * x
else if (x <= (-9.5d-123)) then
tmp = (-c * z) * b
else if (x <= 4.8d-170) then
tmp = (c * a) * j
else if (x <= 9.5d+63) then
tmp = -i * (j * y)
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= -9.5e-123) {
tmp = (-c * z) * b;
} else if (x <= 4.8e-170) {
tmp = (c * a) * j;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+22: tmp = (-a * t) * x elif x <= -9.5e-123: tmp = (-c * z) * b elif x <= 4.8e-170: tmp = (c * a) * j elif x <= 9.5e+63: tmp = -i * (j * y) else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+22) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= -9.5e-123) tmp = Float64(Float64(Float64(-c) * z) * b); elseif (x <= 4.8e-170) tmp = Float64(Float64(c * a) * j); elseif (x <= 9.5e+63) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+22) tmp = (-a * t) * x; elseif (x <= -9.5e-123) tmp = (-c * z) * b; elseif (x <= 4.8e-170) tmp = (c * a) * j; elseif (x <= 9.5e+63) tmp = -i * (j * y); else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -9.5e-123], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 4.8e-170], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 9.5e+63], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-123}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -2e22Initial program 72.4%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.1
Applied rewrites47.1%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f6435.2
Applied rewrites35.2%
if -2e22 < x < -9.5000000000000002e-123Initial program 76.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.6
Applied rewrites43.6%
Taylor expanded in z around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lift-neg.f6421.7
Applied rewrites21.7%
if -9.5000000000000002e-123 < x < 4.7999999999999999e-170Initial program 69.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6448.6
Applied rewrites48.6%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6428.4
Applied rewrites28.4%
if 4.7999999999999999e-170 < x < 9.5000000000000003e63Initial program 76.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6437.4
Applied rewrites37.4%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6423.1
Applied rewrites23.1%
if 9.5000000000000003e63 < x Initial program 75.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.9
Applied rewrites35.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) x (* j c)) a)))
(if (<= a -1.35e+153)
t_1
(if (<= a 5.4e-214)
(* (fma (- i) j (* z x)) y)
(if (<= a 2100.0) (* (fma i t (* (- c) 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(-t, x, (j * c)) * a;
double tmp;
if (a <= -1.35e+153) {
tmp = t_1;
} else if (a <= 5.4e-214) {
tmp = fma(-i, j, (z * x)) * y;
} else if (a <= 2100.0) {
tmp = fma(i, t, (-c * z)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -1.35e+153) tmp = t_1; elseif (a <= 5.4e-214) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (a <= 2100.0) tmp = Float64(fma(i, t, Float64(Float64(-c) * z)) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1.35e+153], t$95$1, If[LessEqual[a, 5.4e-214], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 2100.0], N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;a \leq 2100:\\
\;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.35e153 or 2100 < a Initial program 64.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.2
Applied rewrites65.2%
if -1.35e153 < a < 5.4000000000000001e-214Initial program 78.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
if 5.4000000000000001e-214 < a < 2100Initial program 81.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6444.0
Applied rewrites44.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma j a (* (- b) z)) c)))
(if (<= c -2.2e+142)
t_1
(if (<= c 9e-280)
(* (fma (- i) j (* z x)) y)
(if (<= c 1.3e-35) (* (fma (- a) t (* z y)) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, a, (-b * z)) * c;
double tmp;
if (c <= -2.2e+142) {
tmp = t_1;
} else if (c <= 9e-280) {
tmp = fma(-i, j, (z * x)) * y;
} else if (c <= 1.3e-35) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -2.2e+142) tmp = t_1; elseif (c <= 9e-280) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (c <= 1.3e-35) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.2e+142], t$95$1, If[LessEqual[c, 9e-280], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 1.3e-35], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -2.2 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.19999999999999987e142 or 1.30000000000000002e-35 < c Initial program 66.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.8
Applied rewrites60.8%
if -2.19999999999999987e142 < c < 8.9999999999999991e-280Initial program 78.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.1
Applied rewrites43.1%
if 8.9999999999999991e-280 < c < 1.30000000000000002e-35Initial program 79.1%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.9
Applied rewrites46.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma j a (* (- b) z)) c)))
(if (<= c -3.2e-141)
t_1
(if (<= c 1.5e-280)
(* (fma y x (* (- b) c)) z)
(if (<= c 6.4e-40) (* (- t) (* a x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, a, (-b * z)) * c;
double tmp;
if (c <= -3.2e-141) {
tmp = t_1;
} else if (c <= 1.5e-280) {
tmp = fma(y, x, (-b * c)) * z;
} else if (c <= 6.4e-40) {
tmp = -t * (a * x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -3.2e-141) tmp = t_1; elseif (c <= 1.5e-280) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z); elseif (c <= 6.4e-40) tmp = Float64(Float64(-t) * Float64(a * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -3.2e-141], t$95$1, If[LessEqual[c, 1.5e-280], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 6.4e-40], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;c \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.2000000000000001e-141 or 6.40000000000000004e-40 < c Initial program 69.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6451.8
Applied rewrites51.8%
if -3.2000000000000001e-141 < c < 1.49999999999999994e-280Initial program 81.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6432.2
Applied rewrites32.2%
if 1.49999999999999994e-280 < c < 6.40000000000000004e-40Initial program 79.1%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6446.4
Applied rewrites46.4%
Taylor expanded in x around inf
lower-*.f6426.0
Applied rewrites26.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -76000000000000.0)
(* (* c a) j)
(if (<= j 3.7e-305)
(* (* z y) x)
(if (<= j 9e-232)
(* (* i t) b)
(if (<= j 1.25e-43) (* (* y x) z) (* (* j c) a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -76000000000000.0) {
tmp = (c * a) * j;
} else if (j <= 3.7e-305) {
tmp = (z * y) * x;
} else if (j <= 9e-232) {
tmp = (i * t) * b;
} else if (j <= 1.25e-43) {
tmp = (y * x) * z;
} else {
tmp = (j * c) * a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (j <= (-76000000000000.0d0)) then
tmp = (c * a) * j
else if (j <= 3.7d-305) then
tmp = (z * y) * x
else if (j <= 9d-232) then
tmp = (i * t) * b
else if (j <= 1.25d-43) then
tmp = (y * x) * z
else
tmp = (j * c) * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -76000000000000.0) {
tmp = (c * a) * j;
} else if (j <= 3.7e-305) {
tmp = (z * y) * x;
} else if (j <= 9e-232) {
tmp = (i * t) * b;
} else if (j <= 1.25e-43) {
tmp = (y * x) * z;
} else {
tmp = (j * c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -76000000000000.0: tmp = (c * a) * j elif j <= 3.7e-305: tmp = (z * y) * x elif j <= 9e-232: tmp = (i * t) * b elif j <= 1.25e-43: tmp = (y * x) * z else: tmp = (j * c) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -76000000000000.0) tmp = Float64(Float64(c * a) * j); elseif (j <= 3.7e-305) tmp = Float64(Float64(z * y) * x); elseif (j <= 9e-232) tmp = Float64(Float64(i * t) * b); elseif (j <= 1.25e-43) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(j * c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -76000000000000.0) tmp = (c * a) * j; elseif (j <= 3.7e-305) tmp = (z * y) * x; elseif (j <= 9e-232) tmp = (i * t) * b; elseif (j <= 1.25e-43) tmp = (y * x) * z; else tmp = (j * c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -76000000000000.0], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[j, 3.7e-305], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 9e-232], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[j, 1.25e-43], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -76000000000000:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;j \leq 3.7 \cdot 10^{-305}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;j \leq 9 \cdot 10^{-232}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;j \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if j < -7.6e13Initial program 73.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6459.2
Applied rewrites59.2%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6433.7
Applied rewrites33.7%
if -7.6e13 < j < 3.69999999999999977e-305Initial program 73.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6432.3
Applied rewrites32.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6425.5
Applied rewrites25.5%
if 3.69999999999999977e-305 < j < 8.99999999999999933e-232Initial program 70.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6449.1
Applied rewrites49.1%
Taylor expanded in z around 0
lift-*.f6431.0
Applied rewrites31.0%
if 8.99999999999999933e-232 < j < 1.25000000000000005e-43Initial program 73.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6435.4
Applied rewrites35.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6428.0
Applied rewrites28.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.3
Applied rewrites28.3%
if 1.25000000000000005e-43 < j Initial program 74.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.8
Applied rewrites45.8%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6433.3
Applied rewrites33.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+22)
(* (* (- a) t) x)
(if (<= x 1.02e-172)
(* (* j c) a)
(if (<= x 9.5e+63) (* (- i) (* j y)) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= 1.02e-172) {
tmp = (j * c) * a;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+22)) then
tmp = (-a * t) * x
else if (x <= 1.02d-172) then
tmp = (j * c) * a
else if (x <= 9.5d+63) then
tmp = -i * (j * y)
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= 1.02e-172) {
tmp = (j * c) * a;
} else if (x <= 9.5e+63) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+22: tmp = (-a * t) * x elif x <= 1.02e-172: tmp = (j * c) * a elif x <= 9.5e+63: tmp = -i * (j * y) else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+22) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= 1.02e-172) tmp = Float64(Float64(j * c) * a); elseif (x <= 9.5e+63) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+22) tmp = (-a * t) * x; elseif (x <= 1.02e-172) tmp = (j * c) * a; elseif (x <= 9.5e+63) tmp = -i * (j * y); else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 1.02e-172], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 9.5e+63], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-172}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -2e22Initial program 72.4%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.1
Applied rewrites47.1%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f6435.2
Applied rewrites35.2%
if -2e22 < x < 1.02e-172Initial program 71.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6433.5
Applied rewrites33.5%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6427.0
Applied rewrites27.0%
if 1.02e-172 < x < 9.5000000000000003e63Initial program 76.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6437.4
Applied rewrites37.4%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6423.1
Applied rewrites23.1%
if 9.5000000000000003e63 < x Initial program 75.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.9
Applied rewrites35.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma j a (* (- b) z)) c)))
(if (<= c -7.8e+112)
t_1
(if (<= c 1.3e-35) (* (fma (- a) t (* z y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, a, (-b * z)) * c;
double tmp;
if (c <= -7.8e+112) {
tmp = t_1;
} else if (c <= 1.3e-35) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -7.8e+112) tmp = t_1; elseif (c <= 1.3e-35) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -7.8e+112], t$95$1, If[LessEqual[c, 1.3e-35], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -7.8 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.79999999999999937e112 or 1.30000000000000002e-35 < c Initial program 66.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.2
Applied rewrites60.2%
if -7.79999999999999937e112 < c < 1.30000000000000002e-35Initial program 79.4%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.4e+69)
(* (* z x) y)
(if (<= z -3.3e-260)
(* (* c a) j)
(if (<= z 1.05e-184) (* (* i t) b) (* (* z y) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.4e+69) {
tmp = (z * x) * y;
} else if (z <= -3.3e-260) {
tmp = (c * a) * j;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.4d+69)) then
tmp = (z * x) * y
else if (z <= (-3.3d-260)) then
tmp = (c * a) * j
else if (z <= 1.05d-184) then
tmp = (i * t) * b
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.4e+69) {
tmp = (z * x) * y;
} else if (z <= -3.3e-260) {
tmp = (c * a) * j;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.4e+69: tmp = (z * x) * y elif z <= -3.3e-260: tmp = (c * a) * j elif z <= 1.05e-184: tmp = (i * t) * b else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.4e+69) tmp = Float64(Float64(z * x) * y); elseif (z <= -3.3e-260) tmp = Float64(Float64(c * a) * j); elseif (z <= 1.05e-184) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.4e+69) tmp = (z * x) * y; elseif (z <= -3.3e-260) tmp = (c * a) * j; elseif (z <= 1.05e-184) tmp = (i * t) * b; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.4e+69], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -3.3e-260], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-260}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if z < -1.39999999999999991e69Initial program 62.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6437.6
Applied rewrites37.6%
if -1.39999999999999991e69 < z < -3.2999999999999997e-260Initial program 79.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f6444.2
Applied rewrites44.2%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6425.4
Applied rewrites25.4%
if -3.2999999999999997e-260 < z < 1.0499999999999999e-184Initial program 83.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6429.9
Applied rewrites29.9%
Taylor expanded in z around 0
lift-*.f6427.7
Applied rewrites27.7%
if 1.0499999999999999e-184 < z Initial program 71.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.9
Applied rewrites41.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6427.3
Applied rewrites27.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= x -2e+22) (* (* (- a) t) x) (if (<= x 2.1e-88) (* (* j c) a) (* (* y x) z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= 2.1e-88) {
tmp = (j * c) * a;
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+22)) then
tmp = (-a * t) * x
else if (x <= 2.1d-88) then
tmp = (j * c) * a
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+22) {
tmp = (-a * t) * x;
} else if (x <= 2.1e-88) {
tmp = (j * c) * a;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+22: tmp = (-a * t) * x elif x <= 2.1e-88: tmp = (j * c) * a else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+22) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= 2.1e-88) tmp = Float64(Float64(j * c) * a); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+22) tmp = (-a * t) * x; elseif (x <= 2.1e-88) tmp = (j * c) * a; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+22], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 2.1e-88], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-88}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -2e22Initial program 72.4%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.1
Applied rewrites47.1%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f6435.2
Applied rewrites35.2%
if -2e22 < x < 2.1e-88Initial program 72.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6433.5
Applied rewrites33.5%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6427.2
Applied rewrites27.2%
if 2.1e-88 < x Initial program 76.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.9
Applied rewrites42.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6430.2
Applied rewrites30.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -2.9e-61) (* (* z x) y) (if (<= z 1.05e-184) (* (* i t) b) (* (* z y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.9e-61) {
tmp = (z * x) * y;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-2.9d-61)) then
tmp = (z * x) * y
else if (z <= 1.05d-184) then
tmp = (i * t) * b
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.9e-61) {
tmp = (z * x) * y;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.9e-61: tmp = (z * x) * y elif z <= 1.05e-184: tmp = (i * t) * b else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.9e-61) tmp = Float64(Float64(z * x) * y); elseif (z <= 1.05e-184) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.9e-61) tmp = (z * x) * y; elseif (z <= 1.05e-184) tmp = (i * t) * b; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.9e-61], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if z < -2.8999999999999999e-61Initial program 67.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.6
Applied rewrites43.6%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.2
Applied rewrites31.2%
if -2.8999999999999999e-61 < z < 1.0499999999999999e-184Initial program 82.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6431.1
Applied rewrites31.1%
Taylor expanded in z around 0
lift-*.f6427.5
Applied rewrites27.5%
if 1.0499999999999999e-184 < z Initial program 71.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.9
Applied rewrites41.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6427.3
Applied rewrites27.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z y) x))) (if (<= z -2.9e-61) t_1 (if (<= z 1.05e-184) (* (* i t) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.9e-61) {
tmp = t_1;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-2.9d-61)) then
tmp = t_1
else if (z <= 1.05d-184) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.9e-61) {
tmp = t_1;
} else if (z <= 1.05e-184) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -2.9e-61: tmp = t_1 elif z <= 1.05e-184: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -2.9e-61) tmp = t_1; elseif (z <= 1.05e-184) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -2.9e-61) tmp = t_1; elseif (z <= 1.05e-184) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.9e-61], t$95$1, If[LessEqual[z, 1.05e-184], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8999999999999999e-61 or 1.0499999999999999e-184 < z Initial program 69.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.6
Applied rewrites42.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6429.1
Applied rewrites29.1%
if -2.8999999999999999e-61 < z < 1.0499999999999999e-184Initial program 82.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6431.1
Applied rewrites31.1%
Taylor expanded in z around 0
lift-*.f6427.5
Applied rewrites27.5%
(FPCore (x y z t a b c i j) :precision binary64 (* (* y x) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (y * x) * z;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (y * x) * z
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (y * x) * z;
}
def code(x, y, z, t, a, b, c, i, j): return (y * x) * z
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(y * x) * z) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (y * x) * z; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot x\right) \cdot z
\end{array}
Initial program 73.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.5
Applied rewrites39.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2025093
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))