
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(* j (- (* c t) (* i y))))))
(if (<= t_1 INFINITY) t_1 (* (* (- z) (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 = (-z * 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(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-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[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-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}:\\
\;\;\;\;\left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\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.7%
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%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6446.6
Applied rewrites46.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(fma (- a) (* t x) (* (fma (- i) j (* z x)) y))
(* (fma (- a) i (* c z)) b))))
(if (<= b -7e-109)
t_1
(if (<= b 3.8e-159)
(fma (fma (- a) t (* z y)) x (* (fma (- i) y (* c t)) 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 = fma(-a, (t * x), (fma(-i, j, (z * x)) * y)) - (fma(-a, i, (c * z)) * b);
double tmp;
if (b <= -7e-109) {
tmp = t_1;
} else if (b <= 3.8e-159) {
tmp = fma(fma(-a, t, (z * y)), x, (fma(-i, y, (c * t)) * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), Float64(t * x), Float64(fma(Float64(-i), j, Float64(z * x)) * y)) - Float64(fma(Float64(-a), i, Float64(c * z)) * b)) tmp = 0.0 if (b <= -7e-109) tmp = t_1; elseif (b <= 3.8e-159) tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * t)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - N[(N[((-a) * i + N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e-109], t$95$1, If[LessEqual[b, 3.8e-159], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \mathsf{fma}\left(-a, i, c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -7 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-159}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7e-109 or 3.8000000000000001e-159 < b Initial program 74.6%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites75.2%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-*.f6470.6
Applied rewrites70.6%
if -7e-109 < b < 3.8000000000000001e-159Initial program 72.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
Applied rewrites76.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y))
(t_2 (* j (- (* c t) (* i y)))))
(if (<= y -1.1e+76)
t_1
(if (<= y -1.9e-189)
(+ (* (* i b) a) t_2)
(if (<= y -4.1e-249)
(* (- a) (fma t x (* (- b) i)))
(if (<= y 3.5e-30)
(+ (- (* (* c b) z)) t_2)
(if (<= y 7.8e+147) (+ (* (- a) (* t x)) t_2) 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 * fma(i, (j / z), -x)) * y;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (y <= -1.1e+76) {
tmp = t_1;
} else if (y <= -1.9e-189) {
tmp = ((i * b) * a) + t_2;
} else if (y <= -4.1e-249) {
tmp = -a * fma(t, x, (-b * i));
} else if (y <= 3.5e-30) {
tmp = -((c * b) * z) + t_2;
} else if (y <= 7.8e+147) {
tmp = (-a * (t * x)) + t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y) t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (y <= -1.1e+76) tmp = t_1; elseif (y <= -1.9e-189) tmp = Float64(Float64(Float64(i * b) * a) + t_2); elseif (y <= -4.1e-249) tmp = Float64(Float64(-a) * fma(t, x, Float64(Float64(-b) * i))); elseif (y <= 3.5e-30) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + t_2); elseif (y <= 7.8e+147) tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + t_2); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+76], t$95$1, If[LessEqual[y, -1.9e-189], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[y, -4.1e-249], N[((-a) * N[(t * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-30], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + t$95$2), $MachinePrecision], If[LessEqual[y, 7.8e+147], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1e76 or 7.80000000000000033e147 < y Initial 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-*.f6466.7
Applied rewrites66.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6466.0
Applied rewrites66.0%
if -1.1e76 < y < -1.90000000000000011e-189Initial program 79.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
if -1.90000000000000011e-189 < y < -4.10000000000000004e-249Initial program 79.1%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6452.5
Applied rewrites52.5%
if -4.10000000000000004e-249 < y < 3.5000000000000003e-30Initial program 81.8%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.4
Applied rewrites49.4%
if 3.5000000000000003e-30 < y < 7.80000000000000033e147Initial program 75.2%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6450.9
Applied rewrites50.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y))
(t_2 (* j (- (* c t) (* i y)))))
(if (<= y -1.1e+76)
t_1
(if (<= y -1.9e-189)
(+ (* (* i b) a) t_2)
(if (<= y -4.1e-249)
(* (- a) (fma t x (* (- b) i)))
(if (<= y 3.5e-30)
(+ (- (* (* c b) z)) t_2)
(if (<= y 7.8e+147)
(fma (fma (- i) y (* c t)) j (* (* (- a) t) x))
t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * fma(i, (j / z), -x)) * y;
double t_2 = j * ((c * t) - (i * y));
double tmp;
if (y <= -1.1e+76) {
tmp = t_1;
} else if (y <= -1.9e-189) {
tmp = ((i * b) * a) + t_2;
} else if (y <= -4.1e-249) {
tmp = -a * fma(t, x, (-b * i));
} else if (y <= 3.5e-30) {
tmp = -((c * b) * z) + t_2;
} else if (y <= 7.8e+147) {
tmp = fma(fma(-i, y, (c * t)), j, ((-a * t) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y) t_2 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (y <= -1.1e+76) tmp = t_1; elseif (y <= -1.9e-189) tmp = Float64(Float64(Float64(i * b) * a) + t_2); elseif (y <= -4.1e-249) tmp = Float64(Float64(-a) * fma(t, x, Float64(Float64(-b) * i))); elseif (y <= 3.5e-30) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + t_2); elseif (y <= 7.8e+147) tmp = fma(fma(Float64(-i), y, Float64(c * t)), j, Float64(Float64(Float64(-a) * t) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+76], t$95$1, If[LessEqual[y, -1.9e-189], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[y, -4.1e-249], N[((-a) * N[(t * x + N[((-b) * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-30], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + t$95$2), $MachinePrecision], If[LessEqual[y, 7.8e+147], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
t_2 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-189}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;\left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(-b\right) \cdot i\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-30}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1e76 or 7.80000000000000033e147 < y Initial 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-*.f6466.7
Applied rewrites66.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6466.0
Applied rewrites66.0%
if -1.1e76 < y < -1.90000000000000011e-189Initial program 79.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
if -1.90000000000000011e-189 < y < -4.10000000000000004e-249Initial program 79.1%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6452.5
Applied rewrites52.5%
if -4.10000000000000004e-249 < y < 3.5000000000000003e-30Initial program 81.8%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.4
Applied rewrites49.4%
if 3.5000000000000003e-30 < y < 7.80000000000000033e147Initial program 75.2%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6450.9
Applied rewrites50.9%
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.85e+176)
(* (fma i a (* (- c) z)) b)
(if (<= b 1.35e-78)
(fma (fma (- a) t (* z y)) x (* (fma (- i) y (* c t)) j))
(- (fma (- a) (* t x) (* (fma (- i) j (* z x)) y)) (* (* c z) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.85e+176) {
tmp = fma(i, a, (-c * z)) * b;
} else if (b <= 1.35e-78) {
tmp = fma(fma(-a, t, (z * y)), x, (fma(-i, y, (c * t)) * j));
} else {
tmp = fma(-a, (t * x), (fma(-i, j, (z * x)) * y)) - ((c * z) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.85e+176) tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b); elseif (b <= 1.35e-78) tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * t)) * j)); else tmp = Float64(fma(Float64(-a), Float64(t * x), Float64(fma(Float64(-i), j, Float64(z * x)) * y)) - Float64(Float64(c * z) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.85e+176], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.35e-78], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{+176}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right) - \left(c \cdot z\right) \cdot b\\
\end{array}
\end{array}
if b < -1.8499999999999999e176Initial program 71.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6472.7
Applied rewrites72.7%
if -1.8499999999999999e176 < b < 1.34999999999999997e-78Initial program 74.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
Applied rewrites68.7%
if 1.34999999999999997e-78 < b Initial program 74.8%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites75.2%
Taylor expanded in y around inf
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
*-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-*.f6472.1
Applied rewrites72.1%
Taylor expanded in z around inf
lift-*.f6459.5
Applied rewrites59.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y)))
(if (<= y -1.1e+76)
t_1
(if (<= y -2.1e-158)
(+ (* (* i b) a) (* j (- (* c t) (* i y))))
(if (<= y 1.08e-246)
(* (fma j t (* (- b) z)) c)
(if (<= y 7.8e+147)
(fma (fma (- i) y (* c t)) j (* (* (- a) t) x))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * fma(i, (j / z), -x)) * y;
double tmp;
if (y <= -1.1e+76) {
tmp = t_1;
} else if (y <= -2.1e-158) {
tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
} else if (y <= 1.08e-246) {
tmp = fma(j, t, (-b * z)) * c;
} else if (y <= 7.8e+147) {
tmp = fma(fma(-i, y, (c * t)), j, ((-a * t) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y) tmp = 0.0 if (y <= -1.1e+76) tmp = t_1; elseif (y <= -2.1e-158) tmp = Float64(Float64(Float64(i * b) * a) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); elseif (y <= 1.08e-246) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); elseif (y <= 7.8e+147) tmp = fma(fma(Float64(-i), y, Float64(c * t)), j, Float64(Float64(Float64(-a) * t) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.1e+76], t$95$1, If[LessEqual[y, -2.1e-158], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e-246], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 7.8e+147], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-246}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+147}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot t\right), j, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1e76 or 7.80000000000000033e147 < y Initial 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-*.f6466.7
Applied rewrites66.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6466.0
Applied rewrites66.0%
if -1.1e76 < y < -2.09999999999999991e-158Initial program 79.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.3
Applied rewrites51.3%
if -2.09999999999999991e-158 < y < 1.08000000000000003e-246Initial program 79.8%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6448.7
Applied rewrites48.7%
if 1.08000000000000003e-246 < y < 7.80000000000000033e147Initial program 79.5%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (* (* i b) a) (* j (- (* c t) (* i y)))))
(t_2 (* (fma y x (* (- b) c)) z)))
(if (<= z -6.3e+24)
t_2
(if (<= z -3.4e-142)
t_1
(if (<= z -6.8e-301)
(+ (* (- a) (* t x)) (* j (* (- i) y)))
(if (<= z 3e+35) 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 = ((i * b) * a) + (j * ((c * t) - (i * y)));
double t_2 = fma(y, x, (-b * c)) * z;
double tmp;
if (z <= -6.3e+24) {
tmp = t_2;
} else if (z <= -3.4e-142) {
tmp = t_1;
} else if (z <= -6.8e-301) {
tmp = (-a * (t * x)) + (j * (-i * y));
} else if (z <= 3e+35) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * b) * a) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) t_2 = Float64(fma(y, x, Float64(Float64(-b) * c)) * z) tmp = 0.0 if (z <= -6.3e+24) tmp = t_2; elseif (z <= -3.4e-142) tmp = t_1; elseif (z <= -6.8e-301) tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + Float64(j * Float64(Float64(-i) * y))); elseif (z <= 3e+35) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.3e+24], t$95$2, If[LessEqual[z, -3.4e-142], t$95$1, If[LessEqual[z, -6.8e-301], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+35], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\
t_2 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{if}\;z \leq -6.3 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-301}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.30000000000000038e24 or 2.99999999999999991e35 < z Initial program 64.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6462.8
Applied rewrites62.8%
if -6.30000000000000038e24 < z < -3.40000000000000029e-142 or -6.8000000000000004e-301 < z < 2.99999999999999991e35Initial program 81.4%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6456.8
Applied rewrites56.8%
if -3.40000000000000029e-142 < z < -6.8000000000000004e-301Initial program 81.9%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6461.4
Applied rewrites61.4%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f6445.3
Applied rewrites45.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- z) (fma i (/ j z) (- x))) y)))
(if (<= y -8e+75)
t_1
(if (<= y -4.5e-158)
(fma (* c t) j (* (* i b) a))
(if (<= y 4.6e-41)
(* (fma j t (* (- b) z)) c)
(if (<= y 5.5e+94) (+ (* (- a) (* t x)) (* j (* (- i) y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-z * fma(i, (j / z), -x)) * y;
double tmp;
if (y <= -8e+75) {
tmp = t_1;
} else if (y <= -4.5e-158) {
tmp = fma((c * t), j, ((i * b) * a));
} else if (y <= 4.6e-41) {
tmp = fma(j, t, (-b * z)) * c;
} else if (y <= 5.5e+94) {
tmp = (-a * (t * x)) + (j * (-i * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-z) * fma(i, Float64(j / z), Float64(-x))) * y) tmp = 0.0 if (y <= -8e+75) tmp = t_1; elseif (y <= -4.5e-158) tmp = fma(Float64(c * t), j, Float64(Float64(i * b) * a)); elseif (y <= 4.6e-41) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); elseif (y <= 5.5e+94) tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + Float64(j * Float64(Float64(-i) * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * N[(i * N[(j / z), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8e+75], t$95$1, If[LessEqual[y, -4.5e-158], N[(N[(c * t), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-41], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 5.5e+94], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot \mathsf{fma}\left(i, \frac{j}{z}, -x\right)\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.99999999999999941e75 or 5.4999999999999997e94 < y Initial program 63.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-*.f6465.4
Applied rewrites65.4%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6464.7
Applied rewrites64.7%
if -7.99999999999999941e75 < y < -4.5e-158Initial program 79.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in y around 0
lift-*.f6441.9
Applied rewrites41.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6442.4
Applied rewrites42.4%
if -4.5e-158 < y < 4.6000000000000002e-41Initial program 81.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.9
Applied rewrites47.9%
if 4.6000000000000002e-41 < y < 5.4999999999999997e94Initial program 76.8%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.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 -8e+75)
t_1
(if (<= y -4.5e-158)
(fma (* c t) j (* (* i b) a))
(if (<= y 4.6e-41)
(* (fma j t (* (- b) z)) c)
(if (<= y 3.4e+94) (+ (* (- a) (* t x)) (* j (* (- i) y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -8e+75) {
tmp = t_1;
} else if (y <= -4.5e-158) {
tmp = fma((c * t), j, ((i * b) * a));
} else if (y <= 4.6e-41) {
tmp = fma(j, t, (-b * z)) * c;
} else if (y <= 3.4e+94) {
tmp = (-a * (t * x)) + (j * (-i * y));
} 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 <= -8e+75) tmp = t_1; elseif (y <= -4.5e-158) tmp = fma(Float64(c * t), j, Float64(Float64(i * b) * a)); elseif (y <= 4.6e-41) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); elseif (y <= 3.4e+94) tmp = Float64(Float64(Float64(-a) * Float64(t * x)) + Float64(j * Float64(Float64(-i) * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8e+75], t$95$1, If[LessEqual[y, -4.5e-158], N[(N[(c * t), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-41], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 3.4e+94], N[(N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(j * N[((-i) * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+94}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right) + j \cdot \left(\left(-i\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.99999999999999941e75 or 3.4000000000000002e94 < y Initial program 63.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-*.f6465.4
Applied rewrites65.4%
if -7.99999999999999941e75 < y < -4.5e-158Initial program 79.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in y around 0
lift-*.f6441.9
Applied rewrites41.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6442.4
Applied rewrites42.4%
if -4.5e-158 < y < 4.6000000000000002e-41Initial program 81.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.9
Applied rewrites47.9%
if 4.6000000000000002e-41 < y < 3.4000000000000002e94Initial program 76.9%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lift-neg.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- a) t (* z y)) x (* (fma (- i) y (* c t)) j))))
(if (<= x -4e+25)
t_1
(if (<= x 8.8e-69) (+ (- (* (* c b) z)) (* j (- (* c t) (* i y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(fma(-a, t, (z * y)), x, (fma(-i, y, (c * t)) * j));
double tmp;
if (x <= -4e+25) {
tmp = t_1;
} else if (x <= 8.8e-69) {
tmp = -((c * b) * z) + (j * ((c * t) - (i * y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * t)) * j)) tmp = 0.0 if (x <= -4e+25) tmp = t_1; elseif (x <= 8.8e-69) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+25], t$95$1, If[LessEqual[x, 8.8e-69], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-69}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.00000000000000036e25 or 8.8000000000000001e-69 < x Initial program 73.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
Applied rewrites69.8%
if -4.00000000000000036e25 < x < 8.8000000000000001e-69Initial program 74.1%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -7.8e+161)
(* (* (- a) t) x)
(if (<= x -1.35e+43)
(* (* z x) y)
(if (<= x -7.5e-241)
(- (* (* c b) z))
(if (<= x 1.45e-268)
(* (* j c) t)
(if (<= x 3.4e+67) (* (- i) (* j y)) (* (* y x) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -1.35e+43) {
tmp = (z * x) * y;
} else if (x <= -7.5e-241) {
tmp = -((c * b) * z);
} else if (x <= 1.45e-268) {
tmp = (j * c) * t;
} else if (x <= 3.4e+67) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-7.8d+161)) then
tmp = (-a * t) * x
else if (x <= (-1.35d+43)) then
tmp = (z * x) * y
else if (x <= (-7.5d-241)) then
tmp = -((c * b) * z)
else if (x <= 1.45d-268) then
tmp = (j * c) * t
else if (x <= 3.4d+67) then
tmp = -i * (j * y)
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -1.35e+43) {
tmp = (z * x) * y;
} else if (x <= -7.5e-241) {
tmp = -((c * b) * z);
} else if (x <= 1.45e-268) {
tmp = (j * c) * t;
} else if (x <= 3.4e+67) {
tmp = -i * (j * y);
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -7.8e+161: tmp = (-a * t) * x elif x <= -1.35e+43: tmp = (z * x) * y elif x <= -7.5e-241: tmp = -((c * b) * z) elif x <= 1.45e-268: tmp = (j * c) * t elif x <= 3.4e+67: tmp = -i * (j * y) else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -7.8e+161) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= -1.35e+43) tmp = Float64(Float64(z * x) * y); elseif (x <= -7.5e-241) tmp = Float64(-Float64(Float64(c * b) * z)); elseif (x <= 1.45e-268) tmp = Float64(Float64(j * c) * t); elseif (x <= 3.4e+67) tmp = Float64(Float64(-i) * Float64(j * y)); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -7.8e+161) tmp = (-a * t) * x; elseif (x <= -1.35e+43) tmp = (z * x) * y; elseif (x <= -7.5e-241) tmp = -((c * b) * z); elseif (x <= 1.45e-268) tmp = (j * c) * t; elseif (x <= 3.4e+67) tmp = -i * (j * y); else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.35e+43], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, -7.5e-241], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[x, 1.45e-268], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 3.4e+67], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-268}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+67}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -7.8000000000000004e161Initial program 71.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6441.7
Applied rewrites41.7%
if -7.8000000000000004e161 < x < -1.3500000000000001e43Initial program 75.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.2
Applied rewrites31.2%
if -1.3500000000000001e43 < x < -7.49999999999999977e-241Initial program 74.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6444.3
Applied rewrites44.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.6
Applied rewrites25.6%
if -7.49999999999999977e-241 < x < 1.4500000000000001e-268Initial program 73.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6432.8
Applied rewrites32.8%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6430.6
Applied rewrites30.6%
if 1.4500000000000001e-268 < x < 3.4000000000000002e67Initial program 75.1%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6442.9
Applied rewrites42.9%
Taylor expanded in y around inf
lower-*.f6424.9
Applied rewrites24.9%
if 3.4000000000000002e67 < x Initial program 72.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-*.f6445.4
Applied rewrites45.4%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6436.2
Applied rewrites36.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -7.8e+161)
(* (* (- a) t) x)
(if (<= x -1.35e+43)
(* (* z x) y)
(if (<= x -7.5e-241)
(- (* (* c b) z))
(if (<= x 1.45e-185)
(* (* j c) t)
(if (<= x 3.2e+46) (* (* 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 (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -1.35e+43) {
tmp = (z * x) * y;
} else if (x <= -7.5e-241) {
tmp = -((c * b) * z);
} else if (x <= 1.45e-185) {
tmp = (j * c) * t;
} else if (x <= 3.2e+46) {
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 (x <= (-7.8d+161)) then
tmp = (-a * t) * x
else if (x <= (-1.35d+43)) then
tmp = (z * x) * y
else if (x <= (-7.5d-241)) then
tmp = -((c * b) * z)
else if (x <= 1.45d-185) then
tmp = (j * c) * t
else if (x <= 3.2d+46) 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 (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -1.35e+43) {
tmp = (z * x) * y;
} else if (x <= -7.5e-241) {
tmp = -((c * b) * z);
} else if (x <= 1.45e-185) {
tmp = (j * c) * t;
} else if (x <= 3.2e+46) {
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 x <= -7.8e+161: tmp = (-a * t) * x elif x <= -1.35e+43: tmp = (z * x) * y elif x <= -7.5e-241: tmp = -((c * b) * z) elif x <= 1.45e-185: tmp = (j * c) * t elif x <= 3.2e+46: 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 (x <= -7.8e+161) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= -1.35e+43) tmp = Float64(Float64(z * x) * y); elseif (x <= -7.5e-241) tmp = Float64(-Float64(Float64(c * b) * z)); elseif (x <= 1.45e-185) tmp = Float64(Float64(j * c) * t); elseif (x <= 3.2e+46) 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 (x <= -7.8e+161) tmp = (-a * t) * x; elseif (x <= -1.35e+43) tmp = (z * x) * y; elseif (x <= -7.5e-241) tmp = -((c * b) * z); elseif (x <= 1.45e-185) tmp = (j * c) * t; elseif (x <= 3.2e+46) 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[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.35e+43], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, -7.5e-241], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[x, 1.45e-185], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 3.2e+46], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{+43}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-241}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-185}:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+46}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -7.8000000000000004e161Initial program 71.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6441.7
Applied rewrites41.7%
if -7.8000000000000004e161 < x < -1.3500000000000001e43Initial program 75.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.2
Applied rewrites31.2%
if -1.3500000000000001e43 < x < -7.49999999999999977e-241Initial program 74.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6444.3
Applied rewrites44.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.6
Applied rewrites25.6%
if -7.49999999999999977e-241 < x < 1.44999999999999997e-185Initial program 73.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6432.0
Applied rewrites32.0%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6429.2
Applied rewrites29.2%
if 1.44999999999999997e-185 < x < 3.1999999999999998e46Initial program 75.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.7
Applied rewrites43.7%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.9
Applied rewrites23.9%
if 3.1999999999999998e46 < x Initial program 72.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6435.6
Applied rewrites35.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.32e+44)
t_1
(if (<= x 1.45e-268)
(* (fma j t (* (- b) z)) c)
(if (<= x 4e+54) (* (- i) (fma j y (* (- 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(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.32e+44) {
tmp = t_1;
} else if (x <= 1.45e-268) {
tmp = fma(j, t, (-b * z)) * c;
} else if (x <= 4e+54) {
tmp = -i * fma(j, y, (-a * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.32e+44) tmp = t_1; elseif (x <= 1.45e-268) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); elseif (x <= 4e+54) tmp = Float64(Float64(-i) * fma(j, y, Float64(Float64(-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[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.32e+44], t$95$1, If[LessEqual[x, 1.45e-268], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 4e+54], N[((-i) * N[(j * y + N[((-a) * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-268}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+54}:\\
\;\;\;\;\left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-a\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.3200000000000001e44 or 4.0000000000000003e54 < x Initial program 72.8%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
if -1.3200000000000001e44 < x < 1.4500000000000001e-268Initial program 74.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6446.8
Applied rewrites46.8%
if 1.4500000000000001e-268 < x < 4.0000000000000003e54Initial program 75.2%
Taylor expanded in i around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6442.8
Applied rewrites42.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -8e+75)
t_1
(if (<= y -4.5e-158)
(fma (* c t) j (* (* i b) a))
(if (<= y 7e+31) (* (fma j t (* (- b) z)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -8e+75) {
tmp = t_1;
} else if (y <= -4.5e-158) {
tmp = fma((c * t), j, ((i * b) * a));
} else if (y <= 7e+31) {
tmp = fma(j, t, (-b * z)) * c;
} 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 <= -8e+75) tmp = t_1; elseif (y <= -4.5e-158) tmp = fma(Float64(c * t), j, Float64(Float64(i * b) * a)); elseif (y <= 7e+31) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); 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, -8e+75], t$95$1, If[LessEqual[y, -4.5e-158], N[(N[(c * t), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+31], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $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 -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t, j, \left(i \cdot b\right) \cdot a\right)\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.99999999999999941e75 or 7e31 < y Initial program 64.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-*.f6463.2
Applied rewrites63.2%
if -7.99999999999999941e75 < y < -4.5e-158Initial program 79.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in y around 0
lift-*.f6441.9
Applied rewrites41.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6442.4
Applied rewrites42.4%
if -4.5e-158 < y < 7e31Initial program 81.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.5
Applied rewrites47.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= y -8e+75)
t_1
(if (<= y -1.32e-45)
(* (fma (- a) x (* j c)) t)
(if (<= y 7e+31) (* (fma j t (* (- b) z)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (y <= -8e+75) {
tmp = t_1;
} else if (y <= -1.32e-45) {
tmp = fma(-a, x, (j * c)) * t;
} else if (y <= 7e+31) {
tmp = fma(j, t, (-b * z)) * c;
} 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 <= -8e+75) tmp = t_1; elseif (y <= -1.32e-45) tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t); elseif (y <= 7e+31) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); 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, -8e+75], t$95$1, If[LessEqual[y, -1.32e-45], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 7e+31], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $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 -8 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.32 \cdot 10^{-45}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.99999999999999941e75 or 7e31 < y Initial program 64.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-*.f6463.2
Applied rewrites63.2%
if -7.99999999999999941e75 < y < -1.32000000000000005e-45Initial program 77.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
if -1.32000000000000005e-45 < y < 7e31Initial program 81.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6447.2
Applied rewrites47.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma j t (* (- b) z)) c)))
(if (<= c -2.65e+133)
t_1
(if (<= c -7e-80)
(* (fma i a (* (- c) z)) b)
(if (<= c 1.05e+35) (* (fma (- a) t (* z y)) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, t, (-b * z)) * c;
double tmp;
if (c <= -2.65e+133) {
tmp = t_1;
} else if (c <= -7e-80) {
tmp = fma(i, a, (-c * z)) * b;
} else if (c <= 1.05e+35) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(j, t, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -2.65e+133) tmp = t_1; elseif (c <= -7e-80) tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b); elseif (c <= 1.05e+35) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.65e+133], t$95$1, If[LessEqual[c, -7e-80], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[c, 1.05e+35], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -2.65 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -7 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;c \leq 1.05 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.64999999999999998e133 or 1.0499999999999999e35 < c Initial program 63.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6465.6
Applied rewrites65.6%
if -2.64999999999999998e133 < c < -7.00000000000000029e-80Initial program 76.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6440.8
Applied rewrites40.8%
if -7.00000000000000029e-80 < c < 1.0499999999999999e35Initial program 81.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma y x (* (- b) c)) z)))
(if (<= z -5.5e-25)
t_1
(if (<= z 2.9e-293)
(* (* (- i) j) y)
(if (<= z 1.9e+20) (* (fma j t (* (- b) z)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(y, x, (-b * c)) * z;
double tmp;
if (z <= -5.5e-25) {
tmp = t_1;
} else if (z <= 2.9e-293) {
tmp = (-i * j) * y;
} else if (z <= 1.9e+20) {
tmp = fma(j, t, (-b * z)) * c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(y, x, Float64(Float64(-b) * c)) * z) tmp = 0.0 if (z <= -5.5e-25) tmp = t_1; elseif (z <= 2.9e-293) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (z <= 1.9e+20) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -5.5e-25], t$95$1, If[LessEqual[z, 2.9e-293], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.9e+20], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+20}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.50000000000000004e-25 or 1.9e20 < z Initial program 66.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.4
Applied rewrites60.4%
if -5.50000000000000004e-25 < z < 2.8999999999999999e-293Initial program 82.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-*.f6432.3
Applied rewrites32.3%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6425.5
Applied rewrites25.5%
if 2.8999999999999999e-293 < z < 1.9e20Initial program 80.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6435.2
Applied rewrites35.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -7.8e+161)
(* (* (- a) t) x)
(if (<= x -1.05e+45)
(* (* z x) y)
(if (<= x 3.6e+67) (* (fma j t (* (- b) z)) c) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -1.05e+45) {
tmp = (z * x) * y;
} else if (x <= 3.6e+67) {
tmp = fma(j, t, (-b * z)) * c;
} else {
tmp = (y * x) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -7.8e+161) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= -1.05e+45) tmp = Float64(Float64(z * x) * y); elseif (x <= 3.6e+67) tmp = Float64(fma(j, t, Float64(Float64(-b) * z)) * c); else tmp = Float64(Float64(y * x) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -1.05e+45], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 3.6e+67], N[(N[(j * t + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq -1.05 \cdot 10^{+45}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -7.8000000000000004e161Initial program 71.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6441.7
Applied rewrites41.7%
if -7.8000000000000004e161 < x < -1.04999999999999997e45Initial program 75.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-*.f6443.8
Applied rewrites43.8%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.1
Applied rewrites31.1%
if -1.04999999999999997e45 < x < 3.5999999999999999e67Initial program 74.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6446.3
Applied rewrites46.3%
if 3.5999999999999999e67 < x Initial program 72.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.3
Applied rewrites45.3%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6436.2
Applied rewrites36.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -7.8e+161)
(* (* (- a) t) x)
(if (<= x -6.4e+44)
(* (* z x) y)
(if (<= x 3.5e+67) (* (fma i a (* (- c) z)) b) (* (* y x) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -7.8e+161) {
tmp = (-a * t) * x;
} else if (x <= -6.4e+44) {
tmp = (z * x) * y;
} else if (x <= 3.5e+67) {
tmp = fma(i, a, (-c * z)) * b;
} else {
tmp = (y * x) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -7.8e+161) tmp = Float64(Float64(Float64(-a) * t) * x); elseif (x <= -6.4e+44) tmp = Float64(Float64(z * x) * y); elseif (x <= 3.5e+67) tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b); else tmp = Float64(Float64(y * x) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.8e+161], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -6.4e+44], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 3.5e+67], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{+161}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{elif}\;x \leq -6.4 \cdot 10^{+44}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if x < -7.8000000000000004e161Initial program 71.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6441.7
Applied rewrites41.7%
if -7.8000000000000004e161 < x < -6.40000000000000009e44Initial program 75.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-*.f6443.9
Applied rewrites43.9%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6431.3
Applied rewrites31.3%
if -6.40000000000000009e44 < x < 3.5e67Initial program 74.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.6
Applied rewrites45.6%
if 3.5e67 < x Initial program 72.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-*.f6445.3
Applied rewrites45.3%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6436.2
Applied rewrites36.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -4.5e+150)
(* (* (- b) z) c)
(if (<= z -8e+24)
t_1
(if (<= z 3.8e-293)
(* (* (- i) j) y)
(if (<= z 3e+35) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -4.5e+150) {
tmp = (-b * z) * c;
} else if (z <= -8e+24) {
tmp = t_1;
} else if (z <= 3.8e-293) {
tmp = (-i * j) * y;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * x) * y
if (z <= (-4.5d+150)) then
tmp = (-b * z) * c
else if (z <= (-8d+24)) then
tmp = t_1
else if (z <= 3.8d-293) then
tmp = (-i * j) * y
else if (z <= 3d+35) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -4.5e+150) {
tmp = (-b * z) * c;
} else if (z <= -8e+24) {
tmp = t_1;
} else if (z <= 3.8e-293) {
tmp = (-i * j) * y;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -4.5e+150: tmp = (-b * z) * c elif z <= -8e+24: tmp = t_1 elif z <= 3.8e-293: tmp = (-i * j) * y elif z <= 3e+35: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -4.5e+150) tmp = Float64(Float64(Float64(-b) * z) * c); elseif (z <= -8e+24) tmp = t_1; elseif (z <= 3.8e-293) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (z <= 3e+35) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -4.5e+150) tmp = (-b * z) * c; elseif (z <= -8e+24) tmp = t_1; elseif (z <= 3.8e-293) tmp = (-i * j) * y; elseif (z <= 3e+35) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -4.5e+150], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, -8e+24], t$95$1, If[LessEqual[z, 3.8e-293], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;z \leq -8 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5e150Initial program 60.2%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6449.4
Applied rewrites49.4%
Taylor expanded in z around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lift-neg.f6441.1
Applied rewrites41.1%
if -4.5e150 < z < -7.9999999999999999e24 or 2.99999999999999991e35 < z Initial program 66.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.4
Applied rewrites44.4%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6432.5
Applied rewrites32.5%
if -7.9999999999999999e24 < z < 3.8e-293Initial program 82.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-*.f6432.6
Applied rewrites32.6%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6424.8
Applied rewrites24.8%
if 3.8e-293 < z < 2.99999999999999991e35Initial program 80.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
Taylor expanded in x 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
(let* ((t_1 (* (* z x) y)))
(if (<= z -4.5e+150)
(- (* (* c b) z))
(if (<= z -1900.0)
t_1
(if (<= z -1.2e-274)
(* (* b a) i)
(if (<= z 3e+35) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -4.5e+150) {
tmp = -((c * b) * z);
} else if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * x) * y
if (z <= (-4.5d+150)) then
tmp = -((c * b) * z)
else if (z <= (-1900.0d0)) then
tmp = t_1
else if (z <= (-1.2d-274)) then
tmp = (b * a) * i
else if (z <= 3d+35) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -4.5e+150) {
tmp = -((c * b) * z);
} else if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -4.5e+150: tmp = -((c * b) * z) elif z <= -1900.0: tmp = t_1 elif z <= -1.2e-274: tmp = (b * a) * i elif z <= 3e+35: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -4.5e+150) tmp = Float64(-Float64(Float64(c * b) * z)); elseif (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = Float64(Float64(b * a) * i); elseif (z <= 3e+35) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -4.5e+150) tmp = -((c * b) * z); elseif (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = (b * a) * i; elseif (z <= 3e+35) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -4.5e+150], (-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+150}:\\
\;\;\;\;-\left(c \cdot b\right) \cdot z\\
\mathbf{elif}\;z \leq -1900:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5e150Initial program 60.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6449.0
Applied rewrites49.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.3
Applied rewrites18.3%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
Applied rewrites38.9%
if -4.5e150 < z < -1900 or 2.99999999999999991e35 < z Initial program 67.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.0
Applied rewrites44.0%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6432.2
Applied rewrites32.2%
if -1900 < z < -1.2e-274Initial program 82.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6433.3
Applied rewrites33.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.1
Applied rewrites24.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
if -1.2e-274 < z < 2.99999999999999991e35Initial program 80.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-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -1900.0)
t_1
(if (<= z -1.2e-274) (* (* b a) i) (if (<= z 3e+35) (* (* j t) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * x) * y
if (z <= (-1900.0d0)) then
tmp = t_1
else if (z <= (-1.2d-274)) then
tmp = (b * a) * i
else if (z <= 3d+35) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -1900.0: tmp = t_1 elif z <= -1.2e-274: tmp = (b * a) * i elif z <= 3e+35: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = Float64(Float64(b * a) * i); elseif (z <= 3e+35) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = (b * a) * i; elseif (z <= 3e+35) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -1900:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1900 or 2.99999999999999991e35 < z Initial program 65.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-*.f6445.9
Applied rewrites45.9%
Taylor expanded in x around inf
*-commutativeN/A
lift-*.f6435.0
Applied rewrites35.0%
if -1900 < z < -1.2e-274Initial program 82.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6433.3
Applied rewrites33.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.1
Applied rewrites24.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
if -1.2e-274 < z < 2.99999999999999991e35Initial program 80.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-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* y x) z)))
(if (<= z -1900.0)
t_1
(if (<= z -1.2e-274) (* (* b a) i) (if (<= z 3e+35) (* (* j t) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (y * x) * z
if (z <= (-1900.0d0)) then
tmp = t_1
else if (z <= (-1.2d-274)) then
tmp = (b * a) * i
else if (z <= 3d+35) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (z <= -1900.0) {
tmp = t_1;
} else if (z <= -1.2e-274) {
tmp = (b * a) * i;
} else if (z <= 3e+35) {
tmp = (j * t) * c;
} 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 z <= -1900.0: tmp = t_1 elif z <= -1.2e-274: tmp = (b * a) * i elif z <= 3e+35: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(y * x) * z) tmp = 0.0 if (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = Float64(Float64(b * a) * i); elseif (z <= 3e+35) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (y * x) * z; tmp = 0.0; if (z <= -1900.0) tmp = t_1; elseif (z <= -1.2e-274) tmp = (b * a) * i; elseif (z <= 3e+35) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1900.0], t$95$1, If[LessEqual[z, -1.2e-274], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3e+35], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -1900:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-274}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1900 or 2.99999999999999991e35 < z Initial program 65.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-*.f6445.9
Applied rewrites45.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6433.9
Applied rewrites33.9%
if -1900 < z < -1.2e-274Initial program 82.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6433.3
Applied rewrites33.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.1
Applied rewrites24.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
if -1.2e-274 < z < 2.99999999999999991e35Initial program 80.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-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* b a) i))) (if (<= a -2.1e-176) t_1 (if (<= a 8e-63) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double tmp;
if (a <= -2.1e-176) {
tmp = t_1;
} else if (a <= 8e-63) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (b * a) * i
if (a <= (-2.1d-176)) then
tmp = t_1
else if (a <= 8d-63) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * a) * i;
double tmp;
if (a <= -2.1e-176) {
tmp = t_1;
} else if (a <= 8e-63) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (b * a) * i tmp = 0 if a <= -2.1e-176: tmp = t_1 elif a <= 8e-63: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(b * a) * i) tmp = 0.0 if (a <= -2.1e-176) tmp = t_1; elseif (a <= 8e-63) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (b * a) * i; tmp = 0.0; if (a <= -2.1e-176) tmp = t_1; elseif (a <= 8e-63) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[a, -2.1e-176], t$95$1, If[LessEqual[a, 8e-63], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-63}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.09999999999999992e-176 or 8.00000000000000053e-63 < a Initial program 70.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.5
Applied rewrites43.5%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.1
Applied rewrites28.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6428.8
Applied rewrites28.8%
if -2.09999999999999992e-176 < a < 8.00000000000000053e-63Initial program 81.8%
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-*.f6433.3
Applied rewrites33.3%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
(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 74.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6440.4
Applied rewrites40.4%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.4
Applied rewrites22.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.4
Applied rewrites22.4%
(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 (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 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(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) 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[(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[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\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) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2025091
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))