
(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 22 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 (- (* c z) (* i a)))
(t_2 (* (fma (- i) j (* z x)) y))
(t_3
(+
(- (* x (- (* y z) (* t a))) (* b t_1))
(* j (- (* c t) (* i y))))))
(if (<= t_3 -1e+279)
(- (fma (- a) (* t x) (fma (* j c) t t_2)) (* t_1 b))
(if (<= t_3 INFINITY) t_3 t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * z) - (i * a);
double t_2 = fma(-i, j, (z * x)) * y;
double t_3 = ((x * ((y * z) - (t * a))) - (b * t_1)) + (j * ((c * t) - (i * y)));
double tmp;
if (t_3 <= -1e+279) {
tmp = fma(-a, (t * x), fma((j * c), t, t_2)) - (t_1 * b);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * z) - Float64(i * a)) t_2 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) t_3 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * t_1)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) tmp = 0.0 if (t_3 <= -1e+279) tmp = Float64(fma(Float64(-a), Float64(t * x), fma(Float64(j * c), t, t_2)) - Float64(t_1 * b)); elseif (t_3 <= Inf) tmp = t_3; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+279], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * c), $MachinePrecision] * t + t$95$2), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot z - i \cdot a\\
t_2 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
t_3 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot t\_1\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+279}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, t\_2\right)\right) - t\_1 \cdot b\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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)))) < -1.00000000000000006e279Initial program 86.8%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites82.5%
if -1.00000000000000006e279 < (+.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 92.8%
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
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.2
Applied rewrites44.2%
(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.0%
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
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.2
Applied rewrites44.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* (- (* z y) (* a t)) x) (* (- (* c z) (* i a)) b))))
(if (<= b -1.02e-75)
t_1
(if (<= b 3.4e-74)
(- (fma (fma (- i) j (* z x)) y (* (* j t) c)) (* (* c b) z))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((z * y) - (a * t)) * x) - (((c * z) - (i * a)) * b);
double tmp;
if (b <= -1.02e-75) {
tmp = t_1;
} else if (b <= 3.4e-74) {
tmp = fma(fma(-i, j, (z * x)), y, ((j * t) * c)) - ((c * b) * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (b <= -1.02e-75) tmp = t_1; elseif (b <= 3.4e-74) tmp = Float64(fma(fma(Float64(-i), j, Float64(z * x)), y, Float64(Float64(j * t) * c)) - Float64(Float64(c * b) * z)); 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[(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]}, If[LessEqual[b, -1.02e-75], t$95$1, If[LessEqual[b, 3.4e-74], N[(N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, j, z \cdot x\right), y, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.01999999999999997e-75 or 3.4000000000000001e-74 < b Initial program 72.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6464.6
Applied rewrites64.6%
if -1.01999999999999997e-75 < b < 3.4000000000000001e-74Initial program 71.9%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites72.7%
Taylor expanded in a around 0
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower--.f64N/A
Applied rewrites64.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)) (t_2 (* (- (* c z) (* i a)) b)))
(if (<= y -7e+76)
t_1
(if (<= y 9.6e-71) (- (* (- (* z y) (* a t)) x) t_2) (- t_1 t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double t_2 = ((c * z) - (i * a)) * b;
double tmp;
if (y <= -7e+76) {
tmp = t_1;
} else if (y <= 9.6e-71) {
tmp = (((z * y) - (a * t)) * x) - t_2;
} else {
tmp = t_1 - t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) t_2 = Float64(Float64(Float64(c * z) - Float64(i * a)) * b) tmp = 0.0 if (y <= -7e+76) tmp = t_1; elseif (y <= 9.6e-71) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - t_2); else tmp = Float64(t_1 - t_2); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, -7e+76], t$95$1, If[LessEqual[y, 9.6e-71], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - t$95$2), $MachinePrecision], N[(t$95$1 - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
t_2 := \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;y \leq -7 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-71}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_2\\
\end{array}
\end{array}
if y < -7.00000000000000001e76Initial program 62.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.5
Applied rewrites67.5%
if -7.00000000000000001e76 < y < 9.6e-71Initial program 78.9%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6462.9
Applied rewrites62.9%
if 9.6e-71 < y Initial program 67.9%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites69.6%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6465.6
Applied rewrites65.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -7e+76)
t_1
(if (<= y 2.1e+110)
(- (* (- (* z y) (* a t)) x) (* (- (* c z) (* i a)) b))
(- t_1 (* (* (- a) i) b))))))
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 <= -7e+76) {
tmp = t_1;
} else if (y <= 2.1e+110) {
tmp = (((z * y) - (a * t)) * x) - (((c * z) - (i * a)) * b);
} else {
tmp = t_1 - ((-a * i) * b);
}
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 <= -7e+76) tmp = t_1; elseif (y <= 2.1e+110) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); else tmp = Float64(t_1 - Float64(Float64(Float64(-a) * i) * b)); 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, -7e+76], t$95$1, If[LessEqual[y, 2.1e+110], 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[(t$95$1 - N[(N[((-a) * i), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -7 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+110}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(\left(-a\right) \cdot i\right) \cdot b\\
\end{array}
\end{array}
if y < -7.00000000000000001e76Initial program 62.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.5
Applied rewrites67.5%
if -7.00000000000000001e76 < y < 2.10000000000000015e110Initial program 77.7%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6461.5
Applied rewrites61.5%
if 2.10000000000000015e110 < y Initial program 63.1%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites63.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.6
Applied rewrites68.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.8e+76)
t_1
(if (<= y -1.5e-174)
(- (* (- (* z y) (* a t)) x) (* (- a) (* i b)))
(if (<= y 4.8e+109)
(- (* (* j t) c) (* (- (* c z) (* i a)) b))
(- t_1 (* (* (- a) i) b)))))))
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.8e+76) {
tmp = t_1;
} else if (y <= -1.5e-174) {
tmp = (((z * y) - (a * t)) * x) - (-a * (i * b));
} else if (y <= 4.8e+109) {
tmp = ((j * t) * c) - (((c * z) - (i * a)) * b);
} else {
tmp = t_1 - ((-a * i) * b);
}
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.8e+76) tmp = t_1; elseif (y <= -1.5e-174) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(-a) * Float64(i * b))); elseif (y <= 4.8e+109) tmp = Float64(Float64(Float64(j * t) * c) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); else tmp = Float64(t_1 - Float64(Float64(Float64(-a) * i) * b)); 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.8e+76], t$95$1, If[LessEqual[y, -1.5e-174], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[((-a) * N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+109], N[(N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[((-a) * i), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-174}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(-a\right) \cdot \left(i \cdot b\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+109}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(\left(-a\right) \cdot i\right) \cdot b\\
\end{array}
\end{array}
if y < -1.8000000000000001e76Initial program 62.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.4
Applied rewrites67.4%
if -1.8000000000000001e76 < y < -1.50000000000000011e-174Initial program 77.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6460.8
Applied rewrites60.8%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites50.8%
if -1.50000000000000011e-174 < y < 4.79999999999999975e109Initial program 77.8%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites79.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
if 4.79999999999999975e109 < y Initial program 63.1%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites63.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6468.5
Applied rewrites68.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -1.8e+76)
t_1
(if (<= y -1.5e-174)
(- (* (- (* z y) (* a t)) x) (* (- a) (* i b)))
(if (<= y 3.7e+108) (- (* (* j t) c) (* (- (* c z) (* i a)) 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.8e+76) {
tmp = t_1;
} else if (y <= -1.5e-174) {
tmp = (((z * y) - (a * t)) * x) - (-a * (i * b));
} else if (y <= 3.7e+108) {
tmp = ((j * t) * c) - (((c * z) - (i * a)) * 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.8e+76) tmp = t_1; elseif (y <= -1.5e-174) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(-a) * Float64(i * b))); elseif (y <= 3.7e+108) tmp = Float64(Float64(Float64(j * t) * c) - Float64(Float64(Float64(c * z) - Float64(i * a)) * 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.8e+76], t$95$1, If[LessEqual[y, -1.5e-174], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[((-a) * N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+108], N[(N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $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.8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-174}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(-a\right) \cdot \left(i \cdot b\right)\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.8000000000000001e76 or 3.6999999999999998e108 < y Initial program 62.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.6
Applied rewrites67.6%
if -1.8000000000000001e76 < y < -1.50000000000000011e-174Initial program 77.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6460.8
Applied rewrites60.8%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites50.8%
if -1.50000000000000011e-174 < y < 3.6999999999999998e108Initial program 77.9%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites79.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -2.5e+48)
t_1
(if (<= y -1.3e-174)
(- (* (- (* z y) (* a t)) x) (* (* c z) b))
(if (<= y 3.7e+108) (- (* (* j t) c) (* (- (* c z) (* i a)) 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 <= -2.5e+48) {
tmp = t_1;
} else if (y <= -1.3e-174) {
tmp = (((z * y) - (a * t)) * x) - ((c * z) * b);
} else if (y <= 3.7e+108) {
tmp = ((j * t) * c) - (((c * z) - (i * a)) * 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 <= -2.5e+48) tmp = t_1; elseif (y <= -1.3e-174) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * z) * b)); elseif (y <= 3.7e+108) tmp = Float64(Float64(Float64(j * t) * c) - Float64(Float64(Float64(c * z) - Float64(i * a)) * 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, -2.5e+48], t$95$1, If[LessEqual[y, -1.3e-174], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+108], N[(N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $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 -2.5 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-174}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z\right) \cdot b\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.49999999999999987e48 or 3.6999999999999998e108 < y Initial program 62.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
if -2.49999999999999987e48 < y < -1.3000000000000001e-174Initial program 78.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6461.6
Applied rewrites61.6%
Taylor expanded in z around inf
lift-*.f6448.6
Applied rewrites48.6%
if -1.3000000000000001e-174 < y < 3.6999999999999998e108Initial program 77.9%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites79.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -9.2e+75)
t_1
(if (<= y 3.7e+108) (- (* (* j t) c) (* (- (* c z) (* i a)) 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 <= -9.2e+75) {
tmp = t_1;
} else if (y <= 3.7e+108) {
tmp = ((j * t) * c) - (((c * z) - (i * a)) * 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 <= -9.2e+75) tmp = t_1; elseif (y <= 3.7e+108) tmp = Float64(Float64(Float64(j * t) * c) - Float64(Float64(Float64(c * z) - Float64(i * a)) * 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, -9.2e+75], t$95$1, If[LessEqual[y, 3.7e+108], N[(N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $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 -9.2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.1999999999999994e75 or 3.6999999999999998e108 < y Initial program 62.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.6
Applied rewrites67.6%
if -9.1999999999999994e75 < y < 3.6999999999999998e108Initial program 77.7%
Taylor expanded in t around 0
lower--.f64N/A
Applied rewrites79.2%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6456.8
Applied rewrites56.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -9e+47)
t_1
(if (<= y 7.2e-134)
(* (- (* j t) (* b z)) c)
(if (<= y 0.00115)
(* (- a) (- (* t x) (* i b)))
(if (<= y 3.7e+108) (* (- (* y x) (* c b)) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -9e+47) {
tmp = t_1;
} else if (y <= 7.2e-134) {
tmp = ((j * t) - (b * z)) * c;
} else if (y <= 0.00115) {
tmp = -a * ((t * x) - (i * b));
} else if (y <= 3.7e+108) {
tmp = ((y * x) - (c * b)) * z;
} 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 <= -9e+47) tmp = t_1; elseif (y <= 7.2e-134) tmp = Float64(Float64(Float64(j * t) - Float64(b * z)) * c); elseif (y <= 0.00115) tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b))); elseif (y <= 3.7e+108) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); 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, -9e+47], t$95$1, If[LessEqual[y, 7.2e-134], N[(N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.00115], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+108], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $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 -9 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-134}:\\
\;\;\;\;\left(j \cdot t - b \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 0.00115:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.99999999999999958e47 or 3.6999999999999998e108 < y Initial program 62.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
if -8.99999999999999958e47 < y < 7.1999999999999998e-134Initial program 79.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 7.1999999999999998e-134 < y < 0.00115Initial program 77.0%
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-*.f6443.2
Applied rewrites43.2%
if 0.00115 < y < 3.6999999999999998e108Initial program 70.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -9e+47)
t_1
(if (<= y 1.35e-120)
(* (- (* j t) (* b z)) c)
(if (<= y 1.8e+108) (* (- (* 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 <= -9e+47) {
tmp = t_1;
} else if (y <= 1.35e-120) {
tmp = ((j * t) - (b * z)) * c;
} else if (y <= 1.8e+108) {
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 <= -9e+47) tmp = t_1; elseif (y <= 1.35e-120) tmp = Float64(Float64(Float64(j * t) - Float64(b * z)) * c); elseif (y <= 1.8e+108) 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, -9e+47], t$95$1, If[LessEqual[y, 1.35e-120], N[(N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 1.8e+108], 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 -9 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-120}:\\
\;\;\;\;\left(j \cdot t - b \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+108}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.99999999999999958e47 or 1.8e108 < y Initial program 62.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.6
Applied rewrites66.6%
if -8.99999999999999958e47 < y < 1.3499999999999999e-120Initial program 79.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 1.3499999999999999e-120 < y < 1.8e108Initial program 73.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -7.5e+48)
(* (- (* z y) (* a t)) x)
(if (<= t -1.08e-305)
(* (- (* i a) (* c z)) b)
(if (<= t 1.9e+30)
(* (- (* y x) (* c b)) z)
(* (fma (- a) x (* j c)) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -7.5e+48) {
tmp = ((z * y) - (a * t)) * x;
} else if (t <= -1.08e-305) {
tmp = ((i * a) - (c * z)) * b;
} else if (t <= 1.9e+30) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = fma(-a, x, (j * c)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -7.5e+48) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (t <= -1.08e-305) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (t <= 1.9e+30) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); else tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -7.5e+48], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -1.08e-305], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.9e+30], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+48}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;t \leq -1.08 \cdot 10^{-305}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+30}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if t < -7.5000000000000006e48Initial program 63.0%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6446.7
Applied rewrites46.7%
if -7.5000000000000006e48 < t < -1.08000000000000004e-305Initial program 80.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6444.1
Applied rewrites44.1%
if -1.08000000000000004e-305 < t < 1.9000000000000001e30Initial program 78.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
if 1.9000000000000001e30 < t Initial program 62.9%
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-*.f6462.3
Applied rewrites62.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -6.8e+45)
t_1
(if (<= z 3.7e-282)
(* (- (* c t) (* i y)) j)
(if (<= z 2.4e-41) (* (- (* 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 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -6.8e+45) {
tmp = t_1;
} else if (z <= 3.7e-282) {
tmp = ((c * t) - (i * y)) * j;
} else if (z <= 2.4e-41) {
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 = ((y * x) - (c * b)) * z
if (z <= (-6.8d+45)) then
tmp = t_1
else if (z <= 3.7d-282) then
tmp = ((c * t) - (i * y)) * j
else if (z <= 2.4d-41) 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 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -6.8e+45) {
tmp = t_1;
} else if (z <= 3.7e-282) {
tmp = ((c * t) - (i * y)) * j;
} else if (z <= 2.4e-41) {
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 = ((y * x) - (c * b)) * z tmp = 0 if z <= -6.8e+45: tmp = t_1 elif z <= 3.7e-282: tmp = ((c * t) - (i * y)) * j elif z <= 2.4e-41: 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(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -6.8e+45) tmp = t_1; elseif (z <= 3.7e-282) tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j); elseif (z <= 2.4e-41) 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 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -6.8e+45) tmp = t_1; elseif (z <= 3.7e-282) tmp = ((c * t) - (i * y)) * j; elseif (z <= 2.4e-41) 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[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.8e+45], t$95$1, If[LessEqual[z, 3.7e-282], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 2.4e-41], 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(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-282}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-41}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.8e45 or 2.40000000000000022e-41 < z Initial program 64.2%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6458.5
Applied rewrites58.5%
if -6.8e45 < z < 3.7000000000000002e-282Initial program 79.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.0
Applied rewrites45.0%
if 3.7000000000000002e-282 < z < 2.40000000000000022e-41Initial program 80.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* i a) (* c z)) b))) (if (<= b -4.2e+29) t_1 (if (<= b 3.3e-74) (* (- (* 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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -4.2e+29) {
tmp = t_1;
} else if (b <= 3.3e-74) {
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 = ((i * a) - (c * z)) * b
if (b <= (-4.2d+29)) then
tmp = t_1
else if (b <= 3.3d-74) 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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -4.2e+29) {
tmp = t_1;
} else if (b <= 3.3e-74) {
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 = ((i * a) - (c * z)) * b tmp = 0 if b <= -4.2e+29: tmp = t_1 elif b <= 3.3e-74: 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(i * a) - Float64(c * z)) * b) tmp = 0.0 if (b <= -4.2e+29) tmp = t_1; elseif (b <= 3.3e-74) 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 = ((i * a) - (c * z)) * b; tmp = 0.0; if (b <= -4.2e+29) tmp = t_1; elseif (b <= 3.3e-74) 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[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.2e+29], t$95$1, If[LessEqual[b, 3.3e-74], 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(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -4.2 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{-74}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.2000000000000003e29 or 3.29999999999999996e-74 < b Initial program 72.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6455.3
Applied rewrites55.3%
if -4.2000000000000003e29 < b < 3.29999999999999996e-74Initial program 72.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 (* (* b a) i)) (t_2 (* (- (* c t) (* i y)) j)))
(if (<= j -0.046)
t_2
(if (<= j -3.3e-236)
t_1
(if (<= j 3.2e-269) (* (* z y) x) (if (<= j 3e-101) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double t_2 = ((c * t) - (i * y)) * j;
double tmp;
if (j <= -0.046) {
tmp = t_2;
} else if (j <= -3.3e-236) {
tmp = t_1;
} else if (j <= 3.2e-269) {
tmp = (z * y) * x;
} else if (j <= 3e-101) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * i
t_2 = ((c * t) - (i * y)) * j
if (j <= (-0.046d0)) then
tmp = t_2
else if (j <= (-3.3d-236)) then
tmp = t_1
else if (j <= 3.2d-269) then
tmp = (z * y) * x
else if (j <= 3d-101) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double t_2 = ((c * t) - (i * y)) * j;
double tmp;
if (j <= -0.046) {
tmp = t_2;
} else if (j <= -3.3e-236) {
tmp = t_1;
} else if (j <= 3.2e-269) {
tmp = (z * y) * x;
} else if (j <= 3e-101) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (b * a) * i t_2 = ((c * t) - (i * y)) * j tmp = 0 if j <= -0.046: tmp = t_2 elif j <= -3.3e-236: tmp = t_1 elif j <= 3.2e-269: tmp = (z * y) * x elif j <= 3e-101: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(b * a) * i) t_2 = Float64(Float64(Float64(c * t) - Float64(i * y)) * j) tmp = 0.0 if (j <= -0.046) tmp = t_2; elseif (j <= -3.3e-236) tmp = t_1; elseif (j <= 3.2e-269) tmp = Float64(Float64(z * y) * x); elseif (j <= 3e-101) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (b * a) * i; t_2 = ((c * t) - (i * y)) * j; tmp = 0.0; if (j <= -0.046) tmp = t_2; elseif (j <= -3.3e-236) tmp = t_1; elseif (j <= 3.2e-269) tmp = (z * y) * x; elseif (j <= 3e-101) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -0.046], t$95$2, If[LessEqual[j, -3.3e-236], t$95$1, If[LessEqual[j, 3.2e-269], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 3e-101], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
t_2 := \left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -0.046:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -3.3 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 3.2 \cdot 10^{-269}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;j \leq 3 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -0.045999999999999999 or 3.0000000000000003e-101 < j Initial program 72.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6455.7
Applied rewrites55.7%
if -0.045999999999999999 < j < -3.3000000000000001e-236 or 3.2000000000000001e-269 < j < 3.0000000000000003e-101Initial program 73.2%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.1
Applied rewrites34.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.9
Applied rewrites25.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6426.7
Applied rewrites26.7%
if -3.3000000000000001e-236 < j < 3.2000000000000001e-269Initial program 70.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6452.9
Applied rewrites52.9%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6431.2
Applied rewrites31.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* y x) z)))
(if (<= y -2.02e+15)
t_1
(if (<= y -6e-178)
(* (- a) (* t x))
(if (<= y 5.3e-269)
(* (- b) (* c z))
(if (<= y 1.7e-121)
(* (* j t) c)
(if (<= y 0.0032) (* (* b a) i) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (y <= -2.02e+15) {
tmp = t_1;
} else if (y <= -6e-178) {
tmp = -a * (t * x);
} else if (y <= 5.3e-269) {
tmp = -b * (c * z);
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (y * x) * z
if (y <= (-2.02d+15)) then
tmp = t_1
else if (y <= (-6d-178)) then
tmp = -a * (t * x)
else if (y <= 5.3d-269) then
tmp = -b * (c * z)
else if (y <= 1.7d-121) then
tmp = (j * t) * c
else if (y <= 0.0032d0) then
tmp = (b * a) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (y <= -2.02e+15) {
tmp = t_1;
} else if (y <= -6e-178) {
tmp = -a * (t * x);
} else if (y <= 5.3e-269) {
tmp = -b * (c * z);
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (y * x) * z tmp = 0 if y <= -2.02e+15: tmp = t_1 elif y <= -6e-178: tmp = -a * (t * x) elif y <= 5.3e-269: tmp = -b * (c * z) elif y <= 1.7e-121: tmp = (j * t) * c elif y <= 0.0032: tmp = (b * a) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(y * x) * z) tmp = 0.0 if (y <= -2.02e+15) tmp = t_1; elseif (y <= -6e-178) tmp = Float64(Float64(-a) * Float64(t * x)); elseif (y <= 5.3e-269) tmp = Float64(Float64(-b) * Float64(c * z)); elseif (y <= 1.7e-121) tmp = Float64(Float64(j * t) * c); elseif (y <= 0.0032) tmp = Float64(Float64(b * a) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (y * x) * z; tmp = 0.0; if (y <= -2.02e+15) tmp = t_1; elseif (y <= -6e-178) tmp = -a * (t * x); elseif (y <= 5.3e-269) tmp = -b * (c * z); elseif (y <= 1.7e-121) tmp = (j * t) * c; elseif (y <= 0.0032) tmp = (b * a) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[y, -2.02e+15], t$95$1, If[LessEqual[y, -6e-178], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e-269], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-121], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.0032], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x\right) \cdot z\\
\mathbf{if}\;y \leq -2.02 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-178}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-269}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-121}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;y \leq 0.0032:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.02e15 or 0.00320000000000000015 < y Initial program 65.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6445.3
Applied rewrites45.3%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6435.5
Applied rewrites35.5%
if -2.02e15 < y < -5.9999999999999997e-178Initial program 78.8%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.8
Applied rewrites35.8%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
if -5.9999999999999997e-178 < y < 5.2999999999999998e-269Initial program 80.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6464.8
Applied rewrites64.8%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6426.3
Applied rewrites26.3%
if 5.2999999999999998e-269 < y < 1.70000000000000001e-121Initial program 80.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6431.8
Applied rewrites31.8%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if 1.70000000000000001e-121 < y < 0.00320000000000000015Initial program 77.2%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.0
Applied rewrites23.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.7
Applied rewrites24.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* b a) i)) (t_2 (* (* y x) z)))
(if (<= y -2.02e+15)
t_2
(if (<= y -2.35e-178)
(* (- a) (* t x))
(if (<= y 1.18e-278)
t_1
(if (<= y 1.7e-121) (* (* j t) c) (if (<= y 0.0032) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double t_2 = (y * x) * z;
double tmp;
if (y <= -2.02e+15) {
tmp = t_2;
} else if (y <= -2.35e-178) {
tmp = -a * (t * x);
} else if (y <= 1.18e-278) {
tmp = t_1;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * a) * i
t_2 = (y * x) * z
if (y <= (-2.02d+15)) then
tmp = t_2
else if (y <= (-2.35d-178)) then
tmp = -a * (t * x)
else if (y <= 1.18d-278) then
tmp = t_1
else if (y <= 1.7d-121) then
tmp = (j * t) * c
else if (y <= 0.0032d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double t_2 = (y * x) * z;
double tmp;
if (y <= -2.02e+15) {
tmp = t_2;
} else if (y <= -2.35e-178) {
tmp = -a * (t * x);
} else if (y <= 1.18e-278) {
tmp = t_1;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (b * a) * i t_2 = (y * x) * z tmp = 0 if y <= -2.02e+15: tmp = t_2 elif y <= -2.35e-178: tmp = -a * (t * x) elif y <= 1.18e-278: tmp = t_1 elif y <= 1.7e-121: tmp = (j * t) * c elif y <= 0.0032: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(b * a) * i) t_2 = Float64(Float64(y * x) * z) tmp = 0.0 if (y <= -2.02e+15) tmp = t_2; elseif (y <= -2.35e-178) tmp = Float64(Float64(-a) * Float64(t * x)); elseif (y <= 1.18e-278) tmp = t_1; elseif (y <= 1.7e-121) tmp = Float64(Float64(j * t) * c); elseif (y <= 0.0032) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (b * a) * i; t_2 = (y * x) * z; tmp = 0.0; if (y <= -2.02e+15) tmp = t_2; elseif (y <= -2.35e-178) tmp = -a * (t * x); elseif (y <= 1.18e-278) tmp = t_1; elseif (y <= 1.7e-121) tmp = (j * t) * c; elseif (y <= 0.0032) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[y, -2.02e+15], t$95$2, If[LessEqual[y, -2.35e-178], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e-278], t$95$1, If[LessEqual[y, 1.7e-121], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.0032], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
t_2 := \left(y \cdot x\right) \cdot z\\
\mathbf{if}\;y \leq -2.02 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-178}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-121}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;y \leq 0.0032:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.02e15 or 0.00320000000000000015 < y Initial program 65.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6445.3
Applied rewrites45.3%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6435.5
Applied rewrites35.5%
if -2.02e15 < y < -2.35e-178Initial program 78.8%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.7
Applied rewrites35.7%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
if -2.35e-178 < y < 1.18e-278 or 1.70000000000000001e-121 < y < 0.00320000000000000015Initial program 78.9%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6433.1
Applied rewrites33.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.0
Applied rewrites25.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.8
Applied rewrites25.8%
if 1.18e-278 < y < 1.70000000000000001e-121Initial program 80.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6431.4
Applied rewrites31.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.06e-74)
(* (* z x) y)
(if (<= y 1.7e-121)
(* (* j t) c)
(if (<= y 0.0032) (* (* b a) i) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.06e-74) {
tmp = (z * x) * y;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-1.06d-74)) then
tmp = (z * x) * y
else if (y <= 1.7d-121) then
tmp = (j * t) * c
else if (y <= 0.0032d0) then
tmp = (b * a) * i
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.06e-74) {
tmp = (z * x) * y;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -1.06e-74: tmp = (z * x) * y elif y <= 1.7e-121: tmp = (j * t) * c elif y <= 0.0032: tmp = (b * a) * i else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1.06e-74) tmp = Float64(Float64(z * x) * y); elseif (y <= 1.7e-121) tmp = Float64(Float64(j * t) * c); elseif (y <= 0.0032) tmp = Float64(Float64(b * a) * i); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -1.06e-74) tmp = (z * x) * y; elseif (y <= 1.7e-121) tmp = (j * t) * c; elseif (y <= 0.0032) tmp = (b * a) * i; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.06e-74], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.7e-121], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.0032], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-74}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-121}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;y \leq 0.0032:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if y < -1.06e-74Initial program 67.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.1
Applied rewrites31.1%
if -1.06e-74 < y < 1.70000000000000001e-121Initial program 80.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6431.6
Applied rewrites31.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.0
Applied rewrites26.0%
if 1.70000000000000001e-121 < y < 0.00320000000000000015Initial program 77.2%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.0
Applied rewrites23.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.7
Applied rewrites24.7%
if 0.00320000000000000015 < y Initial program 65.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.0
Applied rewrites44.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6434.0
Applied rewrites34.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= y -1.06e-74)
t_1
(if (<= y 1.7e-121) (* (* j t) c) (if (<= y 0.0032) (* (* b a) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (y <= -1.06e-74) {
tmp = t_1;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * x) * y
if (y <= (-1.06d-74)) then
tmp = t_1
else if (y <= 1.7d-121) then
tmp = (j * t) * c
else if (y <= 0.0032d0) then
tmp = (b * a) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (y <= -1.06e-74) {
tmp = t_1;
} else if (y <= 1.7e-121) {
tmp = (j * t) * c;
} else if (y <= 0.0032) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if y <= -1.06e-74: tmp = t_1 elif y <= 1.7e-121: tmp = (j * t) * c elif y <= 0.0032: tmp = (b * a) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (y <= -1.06e-74) tmp = t_1; elseif (y <= 1.7e-121) tmp = Float64(Float64(j * t) * c); elseif (y <= 0.0032) tmp = Float64(Float64(b * a) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (y <= -1.06e-74) tmp = t_1; elseif (y <= 1.7e-121) tmp = (j * t) * c; elseif (y <= 0.0032) tmp = (b * a) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.06e-74], t$95$1, If[LessEqual[y, 1.7e-121], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 0.0032], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-121}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;y \leq 0.0032:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.06e-74 or 0.00320000000000000015 < y Initial program 66.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.0
Applied rewrites57.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.9
Applied rewrites31.9%
if -1.06e-74 < y < 1.70000000000000001e-121Initial program 80.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6431.6
Applied rewrites31.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.0
Applied rewrites26.0%
if 1.70000000000000001e-121 < y < 0.00320000000000000015Initial program 77.2%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.5
Applied rewrites36.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.0
Applied rewrites23.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.7
Applied rewrites24.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= a -1.2e-19) (* b (* i a)) (if (<= a 3.15e-102) (* (* j t) c) (* (* b a) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.2e-19) {
tmp = b * (i * a);
} else if (a <= 3.15e-102) {
tmp = (j * t) * c;
} else {
tmp = (b * a) * i;
}
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 (a <= (-1.2d-19)) then
tmp = b * (i * a)
else if (a <= 3.15d-102) then
tmp = (j * t) * c
else
tmp = (b * a) * i
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 (a <= -1.2e-19) {
tmp = b * (i * a);
} else if (a <= 3.15e-102) {
tmp = (j * t) * c;
} else {
tmp = (b * a) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.2e-19: tmp = b * (i * a) elif a <= 3.15e-102: tmp = (j * t) * c else: tmp = (b * a) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.2e-19) tmp = Float64(b * Float64(i * a)); elseif (a <= 3.15e-102) tmp = Float64(Float64(j * t) * c); else tmp = Float64(Float64(b * a) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.2e-19) tmp = b * (i * a); elseif (a <= 3.15e-102) tmp = (j * t) * c; else tmp = (b * a) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.2e-19], N[(b * N[(i * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.15e-102], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-19}:\\
\;\;\;\;b \cdot \left(i \cdot a\right)\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-102}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\end{array}
\end{array}
if a < -1.20000000000000011e-19Initial program 65.7%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6432.7
Applied rewrites32.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied rewrites33.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6433.5
Applied rewrites33.5%
if -1.20000000000000011e-19 < a < 3.15e-102Initial program 79.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6424.8
Applied rewrites24.8%
if 3.15e-102 < a Initial program 68.9%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6429.6
Applied rewrites29.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6430.7
Applied rewrites30.7%
(FPCore (x y z t a b c i j) :precision binary64 (* (* b a) i))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (b * a) * i;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (b * a) * i
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (b * a) * i;
}
def code(x, y, z, t, a, b, c, i, j): return (b * a) * i
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(b * a) * i) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (b * a) * i; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]
\begin{array}{l}
\\
\left(b \cdot a\right) \cdot i
\end{array}
Initial program 72.3%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
(FPCore (x y z t a b c i j) :precision binary64 (* b (* i a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return b * (i * 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 = b * (i * 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 b * (i * a);
}
def code(x, y, z, t, a, b, c, i, j): return b * (i * a)
function code(x, y, z, t, a, b, c, i, j) return Float64(b * Float64(i * a)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = b * (i * a); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(b * N[(i * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(i \cdot a\right)
\end{array}
Initial program 72.3%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6422.7
Applied rewrites22.7%
herbie shell --seed 2025115
(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)))))