
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(* j (- (* c t) (* i y))))))
(if (<= t_1 INFINITY) t_1 (* (fma (- i) j (* z x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-i, j, (z * x)) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.6%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))) (t_2 (* t_1 x)))
(if (<= y -1.2e+110)
(* (fma (- i) j (* z x)) y)
(if (<= y 4e-287)
(- (fma t_1 x (* (* j t) c)) (* (* c b) z))
(if (<= y 8.6e-75)
(- t_2 (* (- (* c z) (* i a)) b))
(if (<= y 4.4e+147)
(fma (- i) (* j y) (- t_2 (* (- a) (* i b))))
(fma (* (- i) j) y (* (* z x) y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double t_2 = t_1 * x;
double tmp;
if (y <= -1.2e+110) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 4e-287) {
tmp = fma(t_1, x, ((j * t) * c)) - ((c * b) * z);
} else if (y <= 8.6e-75) {
tmp = t_2 - (((c * z) - (i * a)) * b);
} else if (y <= 4.4e+147) {
tmp = fma(-i, (j * y), (t_2 - (-a * (i * b))));
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) t_2 = Float64(t_1 * x) tmp = 0.0 if (y <= -1.2e+110) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 4e-287) tmp = Float64(fma(t_1, x, Float64(Float64(j * t) * c)) - Float64(Float64(c * b) * z)); elseif (y <= 8.6e-75) tmp = Float64(t_2 - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); elseif (y <= 4.4e+147) tmp = fma(Float64(-i), Float64(j * y), Float64(t_2 - Float64(Float64(-a) * Float64(i * b)))); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * x), $MachinePrecision]}, If[LessEqual[y, -1.2e+110], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4e-287], N[(N[(t$95$1 * x + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e-75], N[(t$95$2 - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+147], N[((-i) * N[(j * y), $MachinePrecision] + N[(t$95$2 - N[((-a) * N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
t_2 := t\_1 \cdot x\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-287}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-75}:\\
\;\;\;\;t\_2 - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t\_2 - \left(-a\right) \cdot \left(i \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -1.20000000000000006e110Initial program 63.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
if -1.20000000000000006e110 < y < 4.00000000000000009e-287Initial program 79.0%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.6
Applied rewrites61.6%
if 4.00000000000000009e-287 < y < 8.5999999999999998e-75Initial program 80.7%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6465.3
Applied rewrites65.3%
if 8.5999999999999998e-75 < y < 4.4000000000000003e147Initial program 77.2%
Taylor expanded in c around 0
associate--l+N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 4.4000000000000003e147 < y Initial program 60.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6469.7
Applied rewrites69.7%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6466.9
Applied rewrites66.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= y -1.2e+110)
(* (fma (- i) j (* z x)) y)
(if (<= y 4e-287)
(- (fma t_1 x (* (* j t) c)) (* (* c b) z))
(if (<= y 9.6e+76)
(- (* t_1 x) (* (- (* c z) (* i a)) b))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (y <= -1.2e+110) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 4e-287) {
tmp = fma(t_1, x, ((j * t) * c)) - ((c * b) * z);
} else if (y <= 9.6e+76) {
tmp = (t_1 * x) - (((c * z) - (i * a)) * b);
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (y <= -1.2e+110) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 4e-287) tmp = Float64(fma(t_1, x, Float64(Float64(j * t) * c)) - Float64(Float64(c * b) * z)); elseif (y <= 9.6e+76) tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+110], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4e-287], N[(N[(t$95$1 * x + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+76], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-287}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+76}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -1.20000000000000006e110Initial program 63.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
if -1.20000000000000006e110 < y < 4.00000000000000009e-287Initial program 79.0%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.6
Applied rewrites61.6%
if 4.00000000000000009e-287 < y < 9.5999999999999999e76Initial program 79.9%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6462.7
Applied rewrites62.7%
if 9.5999999999999999e76 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.1
Applied rewrites64.1%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= y -1.2e+110)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.7e-291)
(- (fma t_1 x (* (* j t) c)) (* c (* b z)))
(if (<= y 9.6e+76)
(- (* t_1 x) (* (- (* c z) (* i a)) b))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (y <= -1.2e+110) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.7e-291) {
tmp = fma(t_1, x, ((j * t) * c)) - (c * (b * z));
} else if (y <= 9.6e+76) {
tmp = (t_1 * x) - (((c * z) - (i * a)) * b);
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (y <= -1.2e+110) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.7e-291) tmp = Float64(fma(t_1, x, Float64(Float64(j * t) * c)) - Float64(c * Float64(b * z))); elseif (y <= 9.6e+76) tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+110], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.7e-291], N[(N[(t$95$1 * x + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] - N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+76], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-291}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(j \cdot t\right) \cdot c\right) - c \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+76}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -1.20000000000000006e110Initial program 63.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
if -1.20000000000000006e110 < y < 1.70000000000000013e-291Initial program 78.9%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.5
Applied rewrites61.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6461.7
Applied rewrites61.7%
if 1.70000000000000013e-291 < y < 9.5999999999999999e76Initial program 80.1%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6462.6
Applied rewrites62.6%
if 9.5999999999999999e76 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.1
Applied rewrites64.1%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a)))) (t_2 (* j (- (* c t) (* i y)))))
(if (<= (+ (- t_1 (* b (- (* c z) (* i a)))) t_2) INFINITY)
(+ (- t_1 (* (* c b) z)) t_2)
(* (fma (- i) j (* z x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (t * a));
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (((t_1 - (b * ((c * z) - (i * a)))) + t_2) <= ((double) INFINITY)) {
tmp = (t_1 - ((c * b) * z)) + t_2;
} else {
tmp = fma(-i, j, (z * x)) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (Float64(Float64(t_1 - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + t_2) <= Inf) tmp = Float64(Float64(t_1 - Float64(Float64(c * b) * z)) + t_2); else tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], Infinity], N[(N[(t$95$1 - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;\left(t\_1 - b \cdot \left(c \cdot z - i \cdot a\right)\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(t\_1 - \left(c \cdot b\right) \cdot z\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.6%
Taylor expanded in z around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6478.9
Applied rewrites78.9%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -6.5e+70)
(* (fma (- i) j (* z x)) y)
(if (<= y 4.5e-286)
(- (* (fma (- a) x (* j c)) t) (* c (* b z)))
(if (<= y 9.6e+76)
(- (* (- (* z y) (* a t)) x) (* (- (* c z) (* i a)) b))
(fma (* (- i) j) y (* (* z x) y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -6.5e+70) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 4.5e-286) {
tmp = (fma(-a, x, (j * c)) * t) - (c * (b * z));
} else if (y <= 9.6e+76) {
tmp = (((z * y) - (a * t)) * x) - (((c * z) - (i * a)) * b);
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -6.5e+70) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 4.5e-286) tmp = Float64(Float64(fma(Float64(-a), x, Float64(j * c)) * t) - Float64(c * Float64(b * z))); elseif (y <= 9.6e+76) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -6.5e+70], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4.5e-286], N[(N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+76], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t - c \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+76}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -6.49999999999999978e70Initial program 65.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.2
Applied rewrites65.2%
if -6.49999999999999978e70 < y < 4.50000000000000005e-286Initial program 79.3%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.1
Applied rewrites62.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in t around inf
*-commutativeN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f64N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6458.8
Applied rewrites58.8%
if 4.50000000000000005e-286 < y < 9.5999999999999999e76Initial program 80.0%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6462.7
Applied rewrites62.7%
if 9.5999999999999999e76 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.1
Applied rewrites64.1%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6461.9
Applied rewrites61.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* j c)) t)))
(if (<= y -6.5e+70)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.8e-232)
(- t_1 (* c (* b z)))
(if (<= y 9.8e-86)
(* (- (* i a) (* c z)) b)
(if (<= y 7.5e+78)
(- t_1 (* (* c b) z))
(fma (* (- i) j) y (* (* z x) y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (j * c)) * t;
double tmp;
if (y <= -6.5e+70) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.8e-232) {
tmp = t_1 - (c * (b * z));
} else if (y <= 9.8e-86) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 7.5e+78) {
tmp = t_1 - ((c * b) * z);
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), x, Float64(j * c)) * t) tmp = 0.0 if (y <= -6.5e+70) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.8e-232) tmp = Float64(t_1 - Float64(c * Float64(b * z))); elseif (y <= 9.8e-86) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 7.5e+78) tmp = Float64(t_1 - Float64(Float64(c * b) * z)); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -6.5e+70], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.8e-232], N[(t$95$1 - N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-86], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 7.5e+78], N[(t$95$1 - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-232}:\\
\;\;\;\;t\_1 - c \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-86}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+78}:\\
\;\;\;\;t\_1 - \left(c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -6.49999999999999978e70Initial program 65.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.2
Applied rewrites65.2%
if -6.49999999999999978e70 < y < 1.80000000000000008e-232Initial program 79.5%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in t around inf
*-commutativeN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f64N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6458.9
Applied rewrites58.9%
if 1.80000000000000008e-232 < y < 9.79999999999999944e-86Initial program 80.7%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6443.8
Applied rewrites43.8%
if 9.79999999999999944e-86 < y < 7.49999999999999934e78Initial program 78.7%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.9
Applied rewrites50.9%
if 7.49999999999999934e78 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -6.5e+70)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.8e-232)
(- (* (fma (- a) x (* j c)) t) (* c (* b z)))
(if (<= y 8.2e-75)
(* (- (* i a) (* c z)) b)
(if (<= y 6.8e+78)
(* (- a) (- (* t x) (* i b)))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -6.5e+70) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.8e-232) {
tmp = (fma(-a, x, (j * c)) * t) - (c * (b * z));
} else if (y <= 8.2e-75) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 6.8e+78) {
tmp = -a * ((t * x) - (i * b));
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -6.5e+70) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.8e-232) tmp = Float64(Float64(fma(Float64(-a), x, Float64(j * c)) * t) - Float64(c * Float64(b * z))); elseif (y <= 8.2e-75) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 6.8e+78) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -6.5e+70], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.8e-232], N[(N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(c * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-232}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t - c \cdot \left(b \cdot z\right)\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -6.49999999999999978e70Initial program 65.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.2
Applied rewrites65.2%
if -6.49999999999999978e70 < y < 1.80000000000000008e-232Initial program 79.5%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in t around inf
*-commutativeN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lift-neg.f64N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6458.9
Applied rewrites58.9%
if 1.80000000000000008e-232 < y < 8.20000000000000005e-75Initial program 80.6%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6444.0
Applied rewrites44.0%
if 8.20000000000000005e-75 < y < 6.80000000000000014e78Initial program 78.7%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
if 6.80000000000000014e78 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1e+69)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.95e-286)
(* (* t (+ c (- (/ (* a x) j)))) j)
(if (<= y 8.2e-75)
(* (- (* i a) (* c z)) b)
(if (<= y 6.8e+78)
(* (- a) (- (* t x) (* i b)))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1e+69) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.95e-286) {
tmp = (t * (c + -((a * x) / j))) * j;
} else if (y <= 8.2e-75) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 6.8e+78) {
tmp = -a * ((t * x) - (i * b));
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1e+69) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.95e-286) tmp = Float64(Float64(t * Float64(c + Float64(-Float64(Float64(a * x) / j)))) * j); elseif (y <= 8.2e-75) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 6.8e+78) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1e+69], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.95e-286], N[(N[(t * N[(c + (-N[(N[(a * x), $MachinePrecision] / j), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\left(t \cdot \left(c + \left(-\frac{a \cdot x}{j}\right)\right)\right) \cdot j\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -1.0000000000000001e69Initial program 65.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
if -1.0000000000000001e69 < y < 1.94999999999999998e-286Initial program 79.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
if 1.94999999999999998e-286 < y < 8.20000000000000005e-75Initial program 80.9%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6445.7
Applied rewrites45.7%
if 8.20000000000000005e-75 < y < 6.80000000000000014e78Initial program 78.7%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
if 6.80000000000000014e78 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -5.2e+68)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.95e-286)
(* (* c (+ j (- (/ (* a x) c)))) t)
(if (<= y 8.2e-75)
(* (- (* i a) (* c z)) b)
(if (<= y 6.8e+78)
(* (- a) (- (* t x) (* i b)))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -5.2e+68) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.95e-286) {
tmp = (c * (j + -((a * x) / c))) * t;
} else if (y <= 8.2e-75) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 6.8e+78) {
tmp = -a * ((t * x) - (i * b));
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -5.2e+68) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.95e-286) tmp = Float64(Float64(c * Float64(j + Float64(-Float64(Float64(a * x) / c)))) * t); elseif (y <= 8.2e-75) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 6.8e+78) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -5.2e+68], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.95e-286], N[(N[(c * N[(j + (-N[(N[(a * x), $MachinePrecision] / c), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\left(c \cdot \left(j + \left(-\frac{a \cdot x}{c}\right)\right)\right) \cdot t\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -5.1999999999999996e68Initial program 65.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
if -5.1999999999999996e68 < y < 1.94999999999999998e-286Initial program 79.4%
Taylor expanded in t 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%
Taylor expanded in c around inf
lower-*.f64N/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f6443.7
Applied rewrites43.7%
if 1.94999999999999998e-286 < y < 8.20000000000000005e-75Initial program 80.9%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6445.7
Applied rewrites45.7%
if 8.20000000000000005e-75 < y < 6.80000000000000014e78Initial program 78.7%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
if 6.80000000000000014e78 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.06e+68)
(* (fma (- i) j (* z x)) y)
(if (<= y 1.95e-286)
(* (fma (- a) x (* j c)) t)
(if (<= y 8.2e-75)
(* (- (* i a) (* c z)) b)
(if (<= y 6.8e+78)
(* (- a) (- (* t x) (* i b)))
(fma (* (- i) j) y (* (* z x) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.06e+68) {
tmp = fma(-i, j, (z * x)) * y;
} else if (y <= 1.95e-286) {
tmp = fma(-a, x, (j * c)) * t;
} else if (y <= 8.2e-75) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 6.8e+78) {
tmp = -a * ((t * x) - (i * b));
} else {
tmp = fma((-i * j), y, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1.06e+68) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (y <= 1.95e-286) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (y <= 8.2e-75) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 6.8e+78) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); else tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.06e+68], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if y < -1.06e68Initial program 65.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
if -1.06e68 < y < 1.94999999999999998e-286Initial program 79.4%
Taylor expanded in t 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 1.94999999999999998e-286 < y < 8.20000000000000005e-75Initial program 80.9%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6445.7
Applied rewrites45.7%
if 8.20000000000000005e-75 < y < 6.80000000000000014e78Initial program 78.7%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
if 6.80000000000000014e78 < y Initial program 64.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6462.0
Applied rewrites62.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.06e+68)
t_1
(if (<= y 1.95e-286)
(* (fma (- a) x (* j c)) t)
(if (<= y 8.2e-75)
(* (- (* i a) (* c z)) b)
(if (<= y 6.8e+78) (* (- a) (- (* t x) (* i b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -1.06e+68) {
tmp = t_1;
} else if (y <= 1.95e-286) {
tmp = fma(-a, x, (j * c)) * t;
} else if (y <= 8.2e-75) {
tmp = ((i * a) - (c * z)) * b;
} else if (y <= 6.8e+78) {
tmp = -a * ((t * x) - (i * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -1.06e+68) tmp = t_1; elseif (y <= 1.95e-286) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (y <= 8.2e-75) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (y <= 6.8e+78) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.06e+68], t$95$1, If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.06e68 or 6.80000000000000014e78 < y Initial program 65.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.6
Applied rewrites64.6%
if -1.06e68 < y < 1.94999999999999998e-286Initial program 79.4%
Taylor expanded in t 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 1.94999999999999998e-286 < y < 8.20000000000000005e-75Initial program 80.9%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6445.7
Applied rewrites45.7%
if 8.20000000000000005e-75 < y < 6.80000000000000014e78Initial program 78.7%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c t) (* i y)))))
(if (<= j -6.2e-26)
(+ (* (* z y) x) t_1)
(if (<= j 2.45e+50)
(- (* (- (* z y) (* a t)) x) (* (* c b) z))
(+ (* (* i b) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * t) - (i * y));
double tmp;
if (j <= -6.2e-26) {
tmp = ((z * y) * x) + t_1;
} else if (j <= 2.45e+50) {
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
} else {
tmp = ((i * b) * a) + t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((c * t) - (i * y))
if (j <= (-6.2d-26)) then
tmp = ((z * y) * x) + t_1
else if (j <= 2.45d+50) then
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
else
tmp = ((i * b) * a) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * t) - (i * y));
double tmp;
if (j <= -6.2e-26) {
tmp = ((z * y) * x) + t_1;
} else if (j <= 2.45e+50) {
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
} else {
tmp = ((i * b) * a) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * t) - (i * y)) tmp = 0 if j <= -6.2e-26: tmp = ((z * y) * x) + t_1 elif j <= 2.45e+50: tmp = (((z * y) - (a * t)) * x) - ((c * b) * z) else: tmp = ((i * b) * a) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (j <= -6.2e-26) tmp = Float64(Float64(Float64(z * y) * x) + t_1); elseif (j <= 2.45e+50) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * b) * z)); else tmp = Float64(Float64(Float64(i * b) * a) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * t) - (i * y)); tmp = 0.0; if (j <= -6.2e-26) tmp = ((z * y) * x) + t_1; elseif (j <= 2.45e+50) tmp = (((z * y) - (a * t)) * x) - ((c * b) * z); else tmp = ((i * b) * a) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -6.2e-26], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[j, 2.45e+50], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -6.2 \cdot 10^{-26}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\
\mathbf{elif}\;j \leq 2.45 \cdot 10^{+50}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_1\\
\end{array}
\end{array}
if j < -6.19999999999999966e-26Initial program 75.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.8
Applied rewrites61.8%
if -6.19999999999999966e-26 < j < 2.4500000000000001e50Initial program 73.6%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6459.1
Applied rewrites59.1%
if 2.4500000000000001e50 < j Initial program 73.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6464.2
Applied rewrites64.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.8e+86)
(* (- (* y x) (* c b)) z)
(if (<= z 2.15e-144)
(+ (* (* i b) a) (* j (- (* c t) (* i y))))
(- (* (- (* z y) (* a t)) x) (* (* c b) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.8e+86) {
tmp = ((y * x) - (c * b)) * z;
} else if (z <= 2.15e-144) {
tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
} else {
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.8d+86)) then
tmp = ((y * x) - (c * b)) * z
else if (z <= 2.15d-144) then
tmp = ((i * b) * a) + (j * ((c * t) - (i * y)))
else
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.8e+86) {
tmp = ((y * x) - (c * b)) * z;
} else if (z <= 2.15e-144) {
tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
} else {
tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.8e+86: tmp = ((y * x) - (c * b)) * z elif z <= 2.15e-144: tmp = ((i * b) * a) + (j * ((c * t) - (i * y))) else: tmp = (((z * y) - (a * t)) * x) - ((c * b) * z) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.8e+86) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); elseif (z <= 2.15e-144) tmp = Float64(Float64(Float64(i * b) * a) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); else tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * b) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.8e+86) tmp = ((y * x) - (c * b)) * z; elseif (z <= 2.15e-144) tmp = ((i * b) * a) + (j * ((c * t) - (i * y))); else tmp = (((z * y) - (a * t)) * x) - ((c * b) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.8e+86], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.15e-144], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-144}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -1.80000000000000003e86Initial program 63.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.7
Applied rewrites65.7%
if -1.80000000000000003e86 < z < 2.14999999999999995e-144Initial program 80.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6458.9
Applied rewrites58.9%
if 2.14999999999999995e-144 < z Initial program 71.2%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.4
Applied rewrites63.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6457.3
Applied rewrites57.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.06e+68)
t_1
(if (<= y 1.95e-286)
(* (fma (- a) x (* j c)) t)
(if (<= y 1.12e+76) (* (- (* i a) (* 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(-i, j, (z * x)) * y;
double tmp;
if (y <= -1.06e+68) {
tmp = t_1;
} else if (y <= 1.95e-286) {
tmp = fma(-a, x, (j * c)) * t;
} else if (y <= 1.12e+76) {
tmp = ((i * a) - (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(-i), j, Float64(z * x)) * y) tmp = 0.0 if (y <= -1.06e+68) tmp = t_1; elseif (y <= 1.95e-286) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (y <= 1.12e+76) tmp = Float64(Float64(Float64(i * a) - 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[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.06e+68], t$95$1, If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 1.12e+76], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+76}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.06e68 or 1.12000000000000005e76 < y Initial program 65.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.5
Applied rewrites64.5%
if -1.06e68 < y < 1.94999999999999998e-286Initial program 79.4%
Taylor expanded in t 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 1.94999999999999998e-286 < y < 1.12000000000000005e76Initial program 80.0%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6442.2
Applied rewrites42.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -1.8e+86)
t_1
(if (<= z 2.45e-293)
(* (fma (- a) x (* j c)) t)
(if (<= z 2.9e-34) (* (- (* c t) (* i y)) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -1.8e+86) {
tmp = t_1;
} else if (z <= 2.45e-293) {
tmp = fma(-a, x, (j * c)) * t;
} else if (z <= 2.9e-34) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -1.8e+86) tmp = t_1; elseif (z <= 2.45e-293) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (z <= 2.9e-34) tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.8e+86], t$95$1, If[LessEqual[z, 2.45e-293], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.9e-34], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-293}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.80000000000000003e86 or 2.9000000000000002e-34 < z Initial program 66.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6461.5
Applied rewrites61.5%
if -1.80000000000000003e86 < z < 2.45e-293Initial program 80.7%
Taylor expanded in t 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.0
Applied rewrites44.0%
if 2.45e-293 < z < 2.9000000000000002e-34Initial program 81.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6447.0
Applied rewrites47.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* y x) (* c b)) z))) (if (<= z -1.3e+49) t_1 (if (<= z 2.9e-34) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -1.3e+49) {
tmp = t_1;
} else if (z <= 2.9e-34) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((y * x) - (c * b)) * z
if (z <= (-1.3d+49)) then
tmp = t_1
else if (z <= 2.9d-34) then
tmp = ((c * t) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -1.3e+49) {
tmp = t_1;
} else if (z <= 2.9e-34) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((y * x) - (c * b)) * z tmp = 0 if z <= -1.3e+49: tmp = t_1 elif z <= 2.9e-34: tmp = ((c * t) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -1.3e+49) tmp = t_1; elseif (z <= 2.9e-34) tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -1.3e+49) tmp = t_1; elseif (z <= 2.9e-34) tmp = ((c * t) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.3e+49], t$95$1, If[LessEqual[z, 2.9e-34], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.29999999999999994e49 or 2.9000000000000002e-34 < z Initial program 66.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
if -1.29999999999999994e49 < z < 2.9000000000000002e-34Initial program 81.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.5
Applied rewrites45.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* c t) (* i y)) j)))
(if (<= j -2.6e-25)
t_1
(if (<= j 2.25e-57) (* (- (* i a) (* 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 = ((c * t) - (i * y)) * j;
double tmp;
if (j <= -2.6e-25) {
tmp = t_1;
} else if (j <= 2.25e-57) {
tmp = ((i * a) - (c * z)) * 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 = ((c * t) - (i * y)) * j
if (j <= (-2.6d-25)) then
tmp = t_1
else if (j <= 2.25d-57) then
tmp = ((i * a) - (c * z)) * 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 = ((c * t) - (i * y)) * j;
double tmp;
if (j <= -2.6e-25) {
tmp = t_1;
} else if (j <= 2.25e-57) {
tmp = ((i * a) - (c * z)) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((c * t) - (i * y)) * j tmp = 0 if j <= -2.6e-25: tmp = t_1 elif j <= 2.25e-57: tmp = ((i * a) - (c * z)) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(c * t) - Float64(i * y)) * j) tmp = 0.0 if (j <= -2.6e-25) tmp = t_1; elseif (j <= 2.25e-57) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((c * t) - (i * y)) * j; tmp = 0.0; if (j <= -2.6e-25) tmp = t_1; elseif (j <= 2.25e-57) tmp = ((i * a) - (c * z)) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -2.6e-25], t$95$1, If[LessEqual[j, 2.25e-57], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -2.6 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.25 \cdot 10^{-57}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.6e-25 or 2.24999999999999986e-57 < j Initial program 74.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6454.9
Applied rewrites54.9%
if -2.6e-25 < j < 2.24999999999999986e-57Initial program 73.4%
Taylor expanded in b around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6446.0
Applied rewrites46.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z y) x))) (if (<= z -2.4e+90) t_1 (if (<= z 1.2e-40) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.4e+90) {
tmp = t_1;
} else if (z <= 1.2e-40) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-2.4d+90)) then
tmp = t_1
else if (z <= 1.2d-40) then
tmp = ((c * t) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.4e+90) {
tmp = t_1;
} else if (z <= 1.2e-40) {
tmp = ((c * t) - (i * y)) * j;
} 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.4e+90: tmp = t_1 elif z <= 1.2e-40: tmp = ((c * t) - (i * y)) * j 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.4e+90) tmp = t_1; elseif (z <= 1.2e-40) tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -2.4e+90) tmp = t_1; elseif (z <= 1.2e-40) tmp = ((c * t) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.4e+90], t$95$1, If[LessEqual[z, 1.2e-40], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-40}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4000000000000001e90 or 1.19999999999999996e-40 < z Initial program 66.1%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.2
Applied rewrites65.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.0
Applied rewrites35.0%
if -2.4000000000000001e90 < z < 1.19999999999999996e-40Initial program 80.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.0
Applied rewrites45.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -1.3e+133)
(* (* z y) x)
(if (<= x -7.2e-153)
(* (* (- i) y) j)
(if (<= x -5.8e-286)
(* (* i b) a)
(if (<= x 65000.0)
(* (- b) (* c z))
(if (<= x 5.6e+42) (* (* c j) t) (* (* (- a) x) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -1.3e+133) {
tmp = (z * y) * x;
} else if (x <= -7.2e-153) {
tmp = (-i * y) * j;
} else if (x <= -5.8e-286) {
tmp = (i * b) * a;
} else if (x <= 65000.0) {
tmp = -b * (c * z);
} else if (x <= 5.6e+42) {
tmp = (c * j) * t;
} else {
tmp = (-a * x) * t;
}
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 <= (-1.3d+133)) then
tmp = (z * y) * x
else if (x <= (-7.2d-153)) then
tmp = (-i * y) * j
else if (x <= (-5.8d-286)) then
tmp = (i * b) * a
else if (x <= 65000.0d0) then
tmp = -b * (c * z)
else if (x <= 5.6d+42) then
tmp = (c * j) * t
else
tmp = (-a * x) * t
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 <= -1.3e+133) {
tmp = (z * y) * x;
} else if (x <= -7.2e-153) {
tmp = (-i * y) * j;
} else if (x <= -5.8e-286) {
tmp = (i * b) * a;
} else if (x <= 65000.0) {
tmp = -b * (c * z);
} else if (x <= 5.6e+42) {
tmp = (c * j) * t;
} else {
tmp = (-a * x) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -1.3e+133: tmp = (z * y) * x elif x <= -7.2e-153: tmp = (-i * y) * j elif x <= -5.8e-286: tmp = (i * b) * a elif x <= 65000.0: tmp = -b * (c * z) elif x <= 5.6e+42: tmp = (c * j) * t else: tmp = (-a * x) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -1.3e+133) tmp = Float64(Float64(z * y) * x); elseif (x <= -7.2e-153) tmp = Float64(Float64(Float64(-i) * y) * j); elseif (x <= -5.8e-286) tmp = Float64(Float64(i * b) * a); elseif (x <= 65000.0) tmp = Float64(Float64(-b) * Float64(c * z)); elseif (x <= 5.6e+42) tmp = Float64(Float64(c * j) * t); else tmp = Float64(Float64(Float64(-a) * x) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -1.3e+133) tmp = (z * y) * x; elseif (x <= -7.2e-153) tmp = (-i * y) * j; elseif (x <= -5.8e-286) tmp = (i * b) * a; elseif (x <= 65000.0) tmp = -b * (c * z); elseif (x <= 5.6e+42) tmp = (c * j) * t; else tmp = (-a * x) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -1.3e+133], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -7.2e-153], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, -5.8e-286], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 65000.0], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+42], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+133}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-286}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;x \leq 65000:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
\end{array}
\end{array}
if x < -1.2999999999999999e133Initial program 73.2%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.6
Applied rewrites71.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6440.8
Applied rewrites40.8%
if -1.2999999999999999e133 < x < -7.1999999999999995e-153Initial program 76.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6440.3
Applied rewrites40.3%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -7.1999999999999995e-153 < x < -5.7999999999999996e-286Initial program 73.4%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6429.1
Applied rewrites29.1%
if -5.7999999999999996e-286 < x < 65000Initial program 72.5%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.3
Applied rewrites49.3%
Taylor expanded in b around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6427.1
Applied rewrites27.1%
if 65000 < x < 5.5999999999999999e42Initial program 80.6%
Taylor expanded in t 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.4
Applied rewrites43.4%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if 5.5999999999999999e42 < x Initial program 73.0%
Taylor expanded in t 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.6
Applied rewrites45.6%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -6.5e+103)
(* (* z y) x)
(if (<= x 5.5e-304)
(* (* (- i) j) y)
(if (<= x 65000.0)
(* (- b) (* c z))
(if (<= x 5.6e+42) (* (* c j) t) (* (* (- a) x) t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -6.5e+103) {
tmp = (z * y) * x;
} else if (x <= 5.5e-304) {
tmp = (-i * j) * y;
} else if (x <= 65000.0) {
tmp = -b * (c * z);
} else if (x <= 5.6e+42) {
tmp = (c * j) * t;
} else {
tmp = (-a * x) * t;
}
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 <= (-6.5d+103)) then
tmp = (z * y) * x
else if (x <= 5.5d-304) then
tmp = (-i * j) * y
else if (x <= 65000.0d0) then
tmp = -b * (c * z)
else if (x <= 5.6d+42) then
tmp = (c * j) * t
else
tmp = (-a * x) * t
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 <= -6.5e+103) {
tmp = (z * y) * x;
} else if (x <= 5.5e-304) {
tmp = (-i * j) * y;
} else if (x <= 65000.0) {
tmp = -b * (c * z);
} else if (x <= 5.6e+42) {
tmp = (c * j) * t;
} else {
tmp = (-a * x) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -6.5e+103: tmp = (z * y) * x elif x <= 5.5e-304: tmp = (-i * j) * y elif x <= 65000.0: tmp = -b * (c * z) elif x <= 5.6e+42: tmp = (c * j) * t else: tmp = (-a * x) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -6.5e+103) tmp = Float64(Float64(z * y) * x); elseif (x <= 5.5e-304) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (x <= 65000.0) tmp = Float64(Float64(-b) * Float64(c * z)); elseif (x <= 5.6e+42) tmp = Float64(Float64(c * j) * t); else tmp = Float64(Float64(Float64(-a) * x) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -6.5e+103) tmp = (z * y) * x; elseif (x <= 5.5e-304) tmp = (-i * j) * y; elseif (x <= 65000.0) tmp = -b * (c * z); elseif (x <= 5.6e+42) tmp = (c * j) * t; else tmp = (-a * x) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -6.5e+103], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 5.5e-304], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 65000.0], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+42], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+103}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-304}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;x \leq 65000:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
\end{array}
\end{array}
if x < -6.50000000000000001e103Initial program 73.6%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.1
Applied rewrites71.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6438.8
Applied rewrites38.8%
if -6.50000000000000001e103 < x < 5.50000000000000035e-304Initial program 75.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6433.2
Applied rewrites33.2%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6423.4
Applied rewrites23.4%
if 5.50000000000000035e-304 < x < 65000Initial program 73.2%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.5
Applied rewrites49.5%
Taylor expanded in b around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6427.2
Applied rewrites27.2%
if 65000 < x < 5.5999999999999999e42Initial program 80.6%
Taylor expanded in t 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.4
Applied rewrites43.4%
Taylor expanded in x around 0
lower-*.f6423.0
Applied rewrites23.0%
if 5.5999999999999999e42 < x Initial program 73.0%
Taylor expanded in t 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.6
Applied rewrites45.6%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= z -7.2e+90)
t_1
(if (<= z -8e-129)
(* (* i b) a)
(if (<= z -6.9e-233)
(* (* (- a) x) t)
(if (<= z 1.12e-67) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -7.2e+90) {
tmp = t_1;
} else if (z <= -8e-129) {
tmp = (i * b) * a;
} else if (z <= -6.9e-233) {
tmp = (-a * x) * t;
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-7.2d+90)) then
tmp = t_1
else if (z <= (-8d-129)) then
tmp = (i * b) * a
else if (z <= (-6.9d-233)) then
tmp = (-a * x) * t
else if (z <= 1.12d-67) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -7.2e+90) {
tmp = t_1;
} else if (z <= -8e-129) {
tmp = (i * b) * a;
} else if (z <= -6.9e-233) {
tmp = (-a * x) * t;
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} 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 <= -7.2e+90: tmp = t_1 elif z <= -8e-129: tmp = (i * b) * a elif z <= -6.9e-233: tmp = (-a * x) * t elif z <= 1.12e-67: tmp = (j * t) * c 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 <= -7.2e+90) tmp = t_1; elseif (z <= -8e-129) tmp = Float64(Float64(i * b) * a); elseif (z <= -6.9e-233) tmp = Float64(Float64(Float64(-a) * x) * t); elseif (z <= 1.12e-67) tmp = Float64(Float64(j * t) * c); 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 <= -7.2e+90) tmp = t_1; elseif (z <= -8e-129) tmp = (i * b) * a; elseif (z <= -6.9e-233) tmp = (-a * x) * t; elseif (z <= 1.12e-67) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -7.2e+90], t$95$1, If[LessEqual[z, -8e-129], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -6.9e-233], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-129}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;z \leq -6.9 \cdot 10^{-233}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2e90 or 1.12e-67 < z Initial program 66.6%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6434.4
Applied rewrites34.4%
if -7.2e90 < z < -7.9999999999999994e-129Initial program 78.0%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.3
Applied rewrites23.3%
if -7.9999999999999994e-129 < z < -6.8999999999999997e-233Initial program 83.1%
Taylor expanded in t 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.6
Applied rewrites45.6%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6422.8
Applied rewrites22.8%
if -6.8999999999999997e-233 < z < 1.12e-67Initial program 82.2%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
Taylor expanded in j around inf
*-commutativeN/A
lift-*.f64N/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 -7.2e+90)
t_1
(if (<= z -3.4e-129)
(* (* i b) a)
(if (<= z -7e-233)
(* (- a) (* t x))
(if (<= z 1.12e-67) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -7.2e+90) {
tmp = t_1;
} else if (z <= -3.4e-129) {
tmp = (i * b) * a;
} else if (z <= -7e-233) {
tmp = -a * (t * x);
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-7.2d+90)) then
tmp = t_1
else if (z <= (-3.4d-129)) then
tmp = (i * b) * a
else if (z <= (-7d-233)) then
tmp = -a * (t * x)
else if (z <= 1.12d-67) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -7.2e+90) {
tmp = t_1;
} else if (z <= -3.4e-129) {
tmp = (i * b) * a;
} else if (z <= -7e-233) {
tmp = -a * (t * x);
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} 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 <= -7.2e+90: tmp = t_1 elif z <= -3.4e-129: tmp = (i * b) * a elif z <= -7e-233: tmp = -a * (t * x) elif z <= 1.12e-67: tmp = (j * t) * c 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 <= -7.2e+90) tmp = t_1; elseif (z <= -3.4e-129) tmp = Float64(Float64(i * b) * a); elseif (z <= -7e-233) tmp = Float64(Float64(-a) * Float64(t * x)); elseif (z <= 1.12e-67) tmp = Float64(Float64(j * t) * c); 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 <= -7.2e+90) tmp = t_1; elseif (z <= -3.4e-129) tmp = (i * b) * a; elseif (z <= -7e-233) tmp = -a * (t * x); elseif (z <= 1.12e-67) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -7.2e+90], t$95$1, If[LessEqual[z, -3.4e-129], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -7e-233], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-129}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-233}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2e90 or 1.12e-67 < z Initial program 66.6%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6434.4
Applied rewrites34.4%
if -7.2e90 < z < -3.40000000000000013e-129Initial program 78.0%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.3
Applied rewrites23.3%
if -3.40000000000000013e-129 < z < -6.99999999999999982e-233Initial program 83.1%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6424.8
Applied rewrites24.8%
if -6.99999999999999982e-233 < z < 1.12e-67Initial program 82.2%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
Taylor expanded in j around inf
*-commutativeN/A
lift-*.f64N/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 -1.05e+90) t_1 (if (<= z 1.12e-67) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -1.05e+90) {
tmp = t_1;
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-1.05d+90)) then
tmp = t_1
else if (z <= 1.12d-67) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -1.05e+90) {
tmp = t_1;
} else if (z <= 1.12e-67) {
tmp = (j * t) * c;
} 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 <= -1.05e+90: tmp = t_1 elif z <= 1.12e-67: tmp = (j * t) * c 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 <= -1.05e+90) tmp = t_1; elseif (z <= 1.12e-67) tmp = Float64(Float64(j * t) * c); 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 <= -1.05e+90) tmp = t_1; elseif (z <= 1.12e-67) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.05e+90], t$95$1, If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0499999999999999e90 or 1.12e-67 < z Initial program 66.6%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6434.4
Applied rewrites34.4%
if -1.0499999999999999e90 < z < 1.12e-67Initial program 81.0%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6453.8
Applied rewrites53.8%
Taylor expanded in j around inf
*-commutativeN/A
lift-*.f64N/A
lift-*.f6425.7
Applied rewrites25.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j t) c))) (if (<= j -1.42e-24) t_1 (if (<= j 3.5e+133) (* (* i b) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * t) * c;
double tmp;
if (j <= -1.42e-24) {
tmp = t_1;
} else if (j <= 3.5e+133) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (j * t) * c
if (j <= (-1.42d-24)) then
tmp = t_1
else if (j <= 3.5d+133) then
tmp = (i * b) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * t) * c;
double tmp;
if (j <= -1.42e-24) {
tmp = t_1;
} else if (j <= 3.5e+133) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * t) * c tmp = 0 if j <= -1.42e-24: tmp = t_1 elif j <= 3.5e+133: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * t) * c) tmp = 0.0 if (j <= -1.42e-24) tmp = t_1; elseif (j <= 3.5e+133) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * t) * c; tmp = 0.0; if (j <= -1.42e-24) tmp = t_1; elseif (j <= 3.5e+133) tmp = (i * b) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -1.42e-24], t$95$1, If[LessEqual[j, 3.5e+133], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;j \leq -1.42 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 3.5 \cdot 10^{+133}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.42e-24 or 3.4999999999999998e133 < j Initial program 74.4%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6453.9
Applied rewrites53.9%
Taylor expanded in j around inf
*-commutativeN/A
lift-*.f64N/A
lift-*.f6434.9
Applied rewrites34.9%
if -1.42e-24 < j < 3.4999999999999998e133Initial program 73.9%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6433.5
Applied rewrites33.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.7
Applied rewrites24.7%
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (i * b) * a;
}
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 = (i * b) * a
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 (i * b) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (i * b) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(i * b) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (i * b) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(i \cdot b\right) \cdot a
\end{array}
Initial program 74.1%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
herbie shell --seed 2025110
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))