
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(if (or (<= z -8e-10) (not (<= z 3.3e-55)))
(*
(-
(fma y x (/ (fma (fma (- i) y (* c a)) j (* (fma (- a) x (* i b)) t)) z))
(* c b))
z)
(fma
(- b)
(fma (- i) t (* c z))
(fma (fma (- x) t (* j c)) a (* (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 tmp;
if ((z <= -8e-10) || !(z <= 3.3e-55)) {
tmp = (fma(y, x, (fma(fma(-i, y, (c * a)), j, (fma(-a, x, (i * b)) * t)) / z)) - (c * b)) * z;
} else {
tmp = fma(-b, fma(-i, t, (c * z)), fma(fma(-x, t, (j * c)), a, (fma(-i, j, (z * x)) * y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -8e-10) || !(z <= 3.3e-55)) tmp = Float64(Float64(fma(y, x, Float64(fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(fma(Float64(-a), x, Float64(i * b)) * t)) / z)) - Float64(c * b)) * z); else tmp = fma(Float64(-b), fma(Float64(-i), t, Float64(c * z)), fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -8e-10], N[Not[LessEqual[z, 3.3e-55]], $MachinePrecision]], N[(N[(N[(y * x + N[(N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[((-b) * N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-10} \lor \neg \left(z \leq 3.3 \cdot 10^{-55}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(y, x, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{z}\right) - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, \mathsf{fma}\left(-i, t, c \cdot z\right), \mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -8.00000000000000029e-10 or 3.2999999999999999e-55 < z Initial program 70.6%
Taylor expanded in z around inf
Applied rewrites86.1%
if -8.00000000000000029e-10 < z < 3.2999999999999999e-55Initial program 81.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites87.9%
Final simplification86.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i)))))
(t_2 (fma (- x) t (* j c))))
(if (<= t_1 -1e+30)
t_1
(if (<= t_1 INFINITY)
(fma
(- b)
(fma (- i) t (* c z))
(fma t_2 a (* (fma (- i) j (* z x)) y)))
(* (fma (- i) j (fma x z (/ (* t_2 a) y))) 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) - (t * i)))) + (j * ((c * a) - (y * i)));
double t_2 = fma(-x, t, (j * c));
double tmp;
if (t_1 <= -1e+30) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma(-b, fma(-i, t, (c * z)), fma(t_2, a, (fma(-i, j, (z * x)) * y)));
} else {
tmp = fma(-i, j, fma(x, z, ((t_2 * a) / y))) * 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(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) t_2 = fma(Float64(-x), t, Float64(j * c)) tmp = 0.0 if (t_1 <= -1e+30) tmp = t_1; elseif (t_1 <= Inf) tmp = fma(Float64(-b), fma(Float64(-i), t, Float64(c * z)), fma(t_2, a, Float64(fma(Float64(-i), j, Float64(z * x)) * y))); else tmp = Float64(fma(Float64(-i), j, fma(x, z, Float64(Float64(t_2 * a) / y))) * 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[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+30], t$95$1, If[LessEqual[t$95$1, Infinity], N[((-b) * N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j + N[(x * z + N[(N[(t$95$2 * a), $MachinePrecision] / y), $MachinePrecision]), $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 - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \mathsf{fma}\left(-x, t, j \cdot c\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(-b, \mathsf{fma}\left(-i, t, c \cdot z\right), \mathsf{fma}\left(t\_2, a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, \mathsf{fma}\left(x, z, \frac{t\_2 \cdot a}{y}\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 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < -1e30Initial program 87.1%
if -1e30 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 87.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites91.8%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6430.6
Applied rewrites30.6%
Taylor expanded in y around inf
Applied rewrites63.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a 3.2e-25)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- a) x (* i b)) t (* (fma (- b) c (* y x)) z)))
(fma
(- b)
(fma (- i) t (* c z))
(fma (fma (- x) t (* j c)) a (* (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 tmp;
if (a <= 3.2e-25) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-a, x, (i * b)), t, (fma(-b, c, (y * x)) * z)));
} else {
tmp = fma(-b, fma(-i, t, (c * z)), fma(fma(-x, t, (j * c)), a, (fma(-i, j, (z * x)) * y)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= 3.2e-25) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(fma(Float64(-b), c, Float64(y * x)) * z))); else tmp = fma(Float64(-b), fma(Float64(-i), t, Float64(c * z)), fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, 3.2e-25], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-b) * N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.2 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, \mathsf{fma}\left(-i, t, c \cdot z\right), \mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\
\end{array}
\end{array}
if a < 3.2000000000000001e-25Initial program 78.9%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites86.4%
if 3.2000000000000001e-25 < a Initial program 68.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites77.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a 9.5e+71)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- a) x (* i b)) t (* (fma (- b) c (* y x)) z)))
(* (fma (- i) j (fma x z (/ (* (fma (- x) t (* j c)) a) y))) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= 9.5e+71) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-a, x, (i * b)), t, (fma(-b, c, (y * x)) * z)));
} else {
tmp = fma(-i, j, fma(x, z, ((fma(-x, t, (j * c)) * a) / y))) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= 9.5e+71) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(fma(Float64(-b), c, Float64(y * x)) * z))); else tmp = Float64(fma(Float64(-i), j, fma(x, z, Float64(Float64(fma(Float64(-x), t, Float64(j * c)) * a) / y))) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, 9.5e+71], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j + N[(x * z + N[(N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, \mathsf{fma}\left(x, z, \frac{\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a}{y}\right)\right) \cdot y\\
\end{array}
\end{array}
if a < 9.50000000000000015e71Initial program 77.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
Applied rewrites83.8%
if 9.50000000000000015e71 < a Initial program 68.0%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6469.6
Applied rewrites69.6%
Taylor expanded in y around inf
Applied rewrites79.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -7.5e+50)
(* (fma (- z) c (* i t)) b)
(if (<= b 8e+19)
(* (fma (- i) j (fma x z (/ (* (fma (- x) t (* j c)) a) y))) y)
(* (- (* x z) (* (fma (- i) t (* c z)) (/ b y))) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -7.5e+50) {
tmp = fma(-z, c, (i * t)) * b;
} else if (b <= 8e+19) {
tmp = fma(-i, j, fma(x, z, ((fma(-x, t, (j * c)) * a) / y))) * y;
} else {
tmp = ((x * z) - (fma(-i, t, (c * z)) * (b / y))) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -7.5e+50) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); elseif (b <= 8e+19) tmp = Float64(fma(Float64(-i), j, fma(x, z, Float64(Float64(fma(Float64(-x), t, Float64(j * c)) * a) / y))) * y); else tmp = Float64(Float64(Float64(x * z) - Float64(fma(Float64(-i), t, Float64(c * z)) * Float64(b / y))) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -7.5e+50], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 8e+19], N[(N[((-i) * j + N[(x * z + N[(N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(x * z), $MachinePrecision] - N[(N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, \mathsf{fma}\left(x, z, \frac{\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a}{y}\right)\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z - \mathsf{fma}\left(-i, t, c \cdot z\right) \cdot \frac{b}{y}\right) \cdot y\\
\end{array}
\end{array}
if b < -7.4999999999999999e50Initial program 80.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6475.0
Applied rewrites75.0%
if -7.4999999999999999e50 < b < 8e19Initial program 71.0%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6472.4
Applied rewrites72.4%
Taylor expanded in y around inf
Applied rewrites77.0%
if 8e19 < b Initial program 80.9%
Taylor expanded in y around inf
Applied rewrites69.6%
Taylor expanded in z around inf
Applied rewrites66.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (or (<= c -3e-33) (not (<= c 11500.0)))
(fma (fma (- z) b (* j a)) c t_1)
(fma (fma (- i) y (* c a)) j t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if ((c <= -3e-33) || !(c <= 11500.0)) {
tmp = fma(fma(-z, b, (j * a)), c, t_1);
} else {
tmp = fma(fma(-i, y, (c * a)), j, 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 ((c <= -3e-33) || !(c <= 11500.0)) tmp = fma(fma(Float64(-z), b, Float64(j * a)), c, t_1); else tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, 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[Or[LessEqual[c, -3e-33], N[Not[LessEqual[c, 11500.0]], $MachinePrecision]], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + t$95$1), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;c \leq -3 \cdot 10^{-33} \lor \neg \left(c \leq 11500\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, t\_1\right)\\
\end{array}
\end{array}
if c < -3.0000000000000002e-33 or 11500 < c Initial program 66.8%
Taylor expanded in i around 0
Applied rewrites73.9%
if -3.0000000000000002e-33 < c < 11500Initial program 84.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6470.5
Applied rewrites70.5%
Final simplification72.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -2.4e+50) (not (<= b 1.76e+65))) (* (fma (- z) c (* i t)) b) (fma (fma (- i) y (* c a)) j (* (fma (- a) t (* z y)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -2.4e+50) || !(b <= 1.76e+65)) {
tmp = fma(-z, c, (i * t)) * b;
} else {
tmp = fma(fma(-i, y, (c * a)), j, (fma(-a, t, (z * y)) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -2.4e+50) || !(b <= 1.76e+65)) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); else tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(fma(Float64(-a), t, Float64(z * y)) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -2.4e+50], N[Not[LessEqual[b, 1.76e+65]], $MachinePrecision]], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+50} \lor \neg \left(b \leq 1.76 \cdot 10^{+65}\right):\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if b < -2.4000000000000002e50 or 1.76000000000000001e65 < b Initial program 81.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.2
Applied rewrites71.2%
if -2.4000000000000002e50 < b < 1.76000000000000001e65Initial program 70.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6472.0
Applied rewrites72.0%
Final simplification71.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -2.4e+50) (not (<= b 1.85e+65))) (* (fma (- z) c (* i t)) b) (fma (* (- i) y) j (* (fma (- a) t (* z y)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -2.4e+50) || !(b <= 1.85e+65)) {
tmp = fma(-z, c, (i * t)) * b;
} else {
tmp = fma((-i * y), j, (fma(-a, t, (z * y)) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -2.4e+50) || !(b <= 1.85e+65)) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); else tmp = fma(Float64(Float64(-i) * y), j, Float64(fma(Float64(-a), t, Float64(z * y)) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -2.4e+50], N[Not[LessEqual[b, 1.85e+65]], $MachinePrecision]], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[((-i) * y), $MachinePrecision] * j + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+50} \lor \neg \left(b \leq 1.85 \cdot 10^{+65}\right):\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot y, j, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if b < -2.4000000000000002e50 or 1.84999999999999997e65 < b Initial program 81.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.2
Applied rewrites71.2%
if -2.4000000000000002e50 < b < 1.84999999999999997e65Initial program 70.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6472.0
Applied rewrites72.0%
Taylor expanded in y around inf
Applied rewrites63.0%
Final simplification66.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -1.45e+46)
(* (* y x) (fma (- a) (/ t y) z))
(if (<= x 8.2e-255)
(* (fma (- z) c (* i t)) b)
(if (<= x 1.04e-134)
(* (fma (- i) y (* a c)) j)
(if (<= x 7.2e+39)
(* (fma (- y) j (* b t)) i)
(* (fma (- t) a (* y z)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -1.45e+46) {
tmp = (y * x) * fma(-a, (t / y), z);
} else if (x <= 8.2e-255) {
tmp = fma(-z, c, (i * t)) * b;
} else if (x <= 1.04e-134) {
tmp = fma(-i, y, (a * c)) * j;
} else if (x <= 7.2e+39) {
tmp = fma(-y, j, (b * t)) * i;
} else {
tmp = fma(-t, a, (y * z)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -1.45e+46) tmp = Float64(Float64(y * x) * fma(Float64(-a), Float64(t / y), z)); elseif (x <= 8.2e-255) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); elseif (x <= 1.04e-134) tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); elseif (x <= 7.2e+39) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); else tmp = Float64(fma(Float64(-t), a, Float64(y * z)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -1.45e+46], N[(N[(y * x), $MachinePrecision] * N[((-a) * N[(t / y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e-255], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 1.04e-134], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 7.2e+39], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], N[(N[((-t) * a + N[(y * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+46}:\\
\;\;\;\;\left(y \cdot x\right) \cdot \mathsf{fma}\left(-a, \frac{t}{y}, z\right)\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{elif}\;x \leq 1.04 \cdot 10^{-134}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, y \cdot z\right) \cdot x\\
\end{array}
\end{array}
if x < -1.4500000000000001e46Initial program 63.0%
Taylor expanded in y around inf
Applied rewrites71.6%
Taylor expanded in x around inf
Applied rewrites79.1%
if -1.4500000000000001e46 < x < 8.2e-255Initial program 77.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.1
Applied rewrites53.1%
if 8.2e-255 < x < 1.04000000000000002e-134Initial program 83.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6477.9
Applied rewrites77.9%
Taylor expanded in x around 0
Applied rewrites68.2%
if 1.04000000000000002e-134 < x < 7.19999999999999969e39Initial program 68.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
if 7.19999999999999969e39 < x Initial program 81.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites71.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6469.0
Applied rewrites69.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* y z)) x)))
(if (<= x -1.55e+54)
t_1
(if (<= x 8.2e-255)
(* (fma (- z) c (* i t)) b)
(if (<= x 1.04e-134)
(* (fma (- i) y (* a c)) j)
(if (<= x 7.2e+39) (* (fma (- y) j (* b t)) i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (y * z)) * x;
double tmp;
if (x <= -1.55e+54) {
tmp = t_1;
} else if (x <= 8.2e-255) {
tmp = fma(-z, c, (i * t)) * b;
} else if (x <= 1.04e-134) {
tmp = fma(-i, y, (a * c)) * j;
} else if (x <= 7.2e+39) {
tmp = fma(-y, j, (b * t)) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(y * z)) * x) tmp = 0.0 if (x <= -1.55e+54) tmp = t_1; elseif (x <= 8.2e-255) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); elseif (x <= 1.04e-134) tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); elseif (x <= 7.2e+39) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(y * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.55e+54], t$95$1, If[LessEqual[x, 8.2e-255], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 1.04e-134], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 7.2e+39], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, y \cdot z\right) \cdot x\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-255}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{elif}\;x \leq 1.04 \cdot 10^{-134}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.55e54 or 7.19999999999999969e39 < x Initial program 73.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites70.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
if -1.55e54 < x < 8.2e-255Initial program 77.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.1
Applied rewrites53.1%
if 8.2e-255 < x < 1.04000000000000002e-134Initial program 83.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6477.9
Applied rewrites77.9%
Taylor expanded in x around 0
Applied rewrites68.2%
if 1.04000000000000002e-134 < x < 7.19999999999999969e39Initial program 68.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* y z)) x)))
(if (<= x -6.2e+60)
t_1
(if (<= x -6.2e-183)
(* (fma (- b) c (* y x)) z)
(if (<= x 1.04e-134)
(* (fma (- i) y (* a c)) j)
(if (<= x 7.2e+39) (* (fma (- y) j (* b t)) i) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (y * z)) * x;
double tmp;
if (x <= -6.2e+60) {
tmp = t_1;
} else if (x <= -6.2e-183) {
tmp = fma(-b, c, (y * x)) * z;
} else if (x <= 1.04e-134) {
tmp = fma(-i, y, (a * c)) * j;
} else if (x <= 7.2e+39) {
tmp = fma(-y, j, (b * t)) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(y * z)) * x) tmp = 0.0 if (x <= -6.2e+60) tmp = t_1; elseif (x <= -6.2e-183) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (x <= 1.04e-134) tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); elseif (x <= 7.2e+39) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(y * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.2e+60], t$95$1, If[LessEqual[x, -6.2e-183], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 1.04e-134], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 7.2e+39], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, y \cdot z\right) \cdot x\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-183}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 1.04 \cdot 10^{-134}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.2000000000000001e60 or 7.19999999999999969e39 < x Initial program 73.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites70.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
if -6.2000000000000001e60 < x < -6.19999999999999999e-183Initial program 76.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
if -6.19999999999999999e-183 < x < 1.04000000000000002e-134Initial program 79.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6458.7
Applied rewrites58.7%
Taylor expanded in x around 0
Applied rewrites55.9%
if 1.04000000000000002e-134 < x < 7.19999999999999969e39Initial program 68.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* y z)) x)))
(if (<= x -6.2e+60)
t_1
(if (<= x -6.2e-183)
(* (fma (- b) c (* y x)) z)
(if (<= x 7e-112)
(* (fma (- i) y (* a c)) j)
(if (<= x 8.4e+39) (* (fma (- a) x (* i b)) t) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (y * z)) * x;
double tmp;
if (x <= -6.2e+60) {
tmp = t_1;
} else if (x <= -6.2e-183) {
tmp = fma(-b, c, (y * x)) * z;
} else if (x <= 7e-112) {
tmp = fma(-i, y, (a * c)) * j;
} else if (x <= 8.4e+39) {
tmp = fma(-a, x, (i * b)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(y * z)) * x) tmp = 0.0 if (x <= -6.2e+60) tmp = t_1; elseif (x <= -6.2e-183) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (x <= 7e-112) tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); elseif (x <= 8.4e+39) tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(y * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.2e+60], t$95$1, If[LessEqual[x, -6.2e-183], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 7e-112], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, 8.4e+39], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, y \cdot z\right) \cdot x\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-183}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.2000000000000001e60 or 8.3999999999999994e39 < x Initial program 73.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites70.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
if -6.2000000000000001e60 < x < -6.19999999999999999e-183Initial program 76.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
if -6.19999999999999999e-183 < x < 6.99999999999999988e-112Initial program 77.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6456.8
Applied rewrites56.8%
Taylor expanded in x around 0
Applied rewrites55.6%
if 6.99999999999999988e-112 < x < 8.3999999999999994e39Initial program 72.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.4
Applied rewrites51.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -7e+50) (not (<= b 1.05e+66))) (* (fma (- z) c (* i t)) b) (fma (* y x) z (* (fma (- x) t (* j c)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -7e+50) || !(b <= 1.05e+66)) {
tmp = fma(-z, c, (i * t)) * b;
} else {
tmp = fma((y * x), z, (fma(-x, t, (j * c)) * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -7e+50) || !(b <= 1.05e+66)) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); else tmp = fma(Float64(y * x), z, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -7e+50], N[Not[LessEqual[b, 1.05e+66]], $MachinePrecision]], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+50} \lor \neg \left(b \leq 1.05 \cdot 10^{+66}\right):\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot x, z, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\end{array}
\end{array}
if b < -7.00000000000000012e50 or 1.05000000000000003e66 < b Initial program 81.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.2
Applied rewrites71.2%
if -7.00000000000000012e50 < b < 1.05000000000000003e66Initial program 70.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6472.0
Applied rewrites72.0%
Taylor expanded in i around 0
Applied rewrites61.8%
Final simplification65.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* y z)) x)))
(if (<= x -4.6e+55)
t_1
(if (<= x 1.6e-134)
(* (fma (- z) b (* j a)) c)
(if (<= x 7.2e+39) (* (fma (- y) j (* b t)) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (y * z)) * x;
double tmp;
if (x <= -4.6e+55) {
tmp = t_1;
} else if (x <= 1.6e-134) {
tmp = fma(-z, b, (j * a)) * c;
} else if (x <= 7.2e+39) {
tmp = fma(-y, j, (b * t)) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(y * z)) * x) tmp = 0.0 if (x <= -4.6e+55) tmp = t_1; elseif (x <= 1.6e-134) tmp = Float64(fma(Float64(-z), b, Float64(j * a)) * c); elseif (x <= 7.2e+39) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(y * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -4.6e+55], t$95$1, If[LessEqual[x, 1.6e-134], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, 7.2e+39], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, y \cdot z\right) \cdot x\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-134}:\\
\;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.59999999999999975e55 or 7.19999999999999969e39 < x Initial program 73.8%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
Applied rewrites70.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
if -4.59999999999999975e55 < x < 1.6000000000000001e-134Initial program 78.2%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.6
Applied rewrites51.6%
if 1.6000000000000001e-134 < x < 7.19999999999999969e39Initial program 68.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* i b)) t)))
(if (<= t -3.1e-78)
t_1
(if (<= t 1e-86)
(* (fma (- b) c (* y x)) z)
(if (<= t 6800000.0) (* (fma (- i) j (* z x)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (i * b)) * t;
double tmp;
if (t <= -3.1e-78) {
tmp = t_1;
} else if (t <= 1e-86) {
tmp = fma(-b, c, (y * x)) * z;
} else if (t <= 6800000.0) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), x, Float64(i * b)) * t) tmp = 0.0 if (t <= -3.1e-78) tmp = t_1; elseif (t <= 1e-86) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (t <= 6800000.0) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.1e-78], t$95$1, If[LessEqual[t, 1e-86], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 6800000.0], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-86}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;t \leq 6800000:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.10000000000000018e-78 or 6.8e6 < t Initial program 74.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.7
Applied rewrites59.7%
if -3.10000000000000018e-78 < t < 1.00000000000000008e-86Initial program 76.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.2
Applied rewrites54.2%
if 1.00000000000000008e-86 < t < 6.8e6Initial program 71.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.5
Applied rewrites61.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -4e-32)
(* (* (- z) b) c)
(if (<= b 7.8e-274)
(* (* a j) c)
(if (<= b 1.35e-196)
(* (* (- x) a) t)
(if (<= b 20500000000.0) (* (* c a) j) (* (* i b) t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -4e-32) {
tmp = (-z * b) * c;
} else if (b <= 7.8e-274) {
tmp = (a * j) * c;
} else if (b <= 1.35e-196) {
tmp = (-x * a) * t;
} else if (b <= 20500000000.0) {
tmp = (c * a) * j;
} else {
tmp = (i * b) * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-4d-32)) then
tmp = (-z * b) * c
else if (b <= 7.8d-274) then
tmp = (a * j) * c
else if (b <= 1.35d-196) then
tmp = (-x * a) * t
else if (b <= 20500000000.0d0) then
tmp = (c * a) * j
else
tmp = (i * b) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -4e-32) {
tmp = (-z * b) * c;
} else if (b <= 7.8e-274) {
tmp = (a * j) * c;
} else if (b <= 1.35e-196) {
tmp = (-x * a) * t;
} else if (b <= 20500000000.0) {
tmp = (c * a) * j;
} else {
tmp = (i * b) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -4e-32: tmp = (-z * b) * c elif b <= 7.8e-274: tmp = (a * j) * c elif b <= 1.35e-196: tmp = (-x * a) * t elif b <= 20500000000.0: tmp = (c * a) * j else: tmp = (i * b) * t return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -4e-32) tmp = Float64(Float64(Float64(-z) * b) * c); elseif (b <= 7.8e-274) tmp = Float64(Float64(a * j) * c); elseif (b <= 1.35e-196) tmp = Float64(Float64(Float64(-x) * a) * t); elseif (b <= 20500000000.0) tmp = Float64(Float64(c * a) * j); else tmp = Float64(Float64(i * b) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -4e-32) tmp = (-z * b) * c; elseif (b <= 7.8e-274) tmp = (a * j) * c; elseif (b <= 1.35e-196) tmp = (-x * a) * t; elseif (b <= 20500000000.0) tmp = (c * a) * j; else tmp = (i * b) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -4e-32], N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, 7.8e-274], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, 1.35e-196], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 20500000000.0], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{-32}:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{-274}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-196}:\\
\;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
\mathbf{elif}\;b \leq 20500000000:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if b < -4.00000000000000022e-32Initial program 76.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.1
Applied rewrites51.1%
Taylor expanded in z around inf
Applied rewrites42.7%
if -4.00000000000000022e-32 < b < 7.79999999999999971e-274Initial program 73.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6440.4
Applied rewrites40.4%
Taylor expanded in z around 0
Applied rewrites39.6%
if 7.79999999999999971e-274 < b < 1.34999999999999991e-196Initial program 69.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
Applied rewrites46.8%
if 1.34999999999999991e-196 < b < 2.05e10Initial program 69.7%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6460.4
Applied rewrites60.4%
Taylor expanded in x around 0
Applied rewrites53.5%
Taylor expanded in y around 0
Applied rewrites37.2%
if 2.05e10 < b Initial program 81.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.3
Applied rewrites54.3%
Taylor expanded in x around 0
Applied rewrites41.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -2.9e+104) (not (<= a 3e+23))) (* (fma (- x) t (* j c)) a) (* (fma (- b) 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 ((a <= -2.9e+104) || !(a <= 3e+23)) {
tmp = fma(-x, t, (j * c)) * a;
} else {
tmp = fma(-b, c, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -2.9e+104) || !(a <= 3e+23)) tmp = Float64(fma(Float64(-x), t, Float64(j * c)) * a); else tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -2.9e+104], N[Not[LessEqual[a, 3e+23]], $MachinePrecision]], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+104} \lor \neg \left(a \leq 3 \cdot 10^{+23}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if a < -2.8999999999999998e104 or 3.0000000000000001e23 < a Initial program 65.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6465.4
Applied rewrites65.4%
if -2.8999999999999998e104 < a < 3.0000000000000001e23Initial program 83.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.7
Applied rewrites49.7%
Final simplification56.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= t -3.1e-78) (not (<= t 950000.0))) (* (fma (- a) x (* i b)) t) (* (fma (- b) 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 ((t <= -3.1e-78) || !(t <= 950000.0)) {
tmp = fma(-a, x, (i * b)) * t;
} else {
tmp = fma(-b, c, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((t <= -3.1e-78) || !(t <= 950000.0)) tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); else tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -3.1e-78], N[Not[LessEqual[t, 950000.0]], $MachinePrecision]], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{-78} \lor \neg \left(t \leq 950000\right):\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if t < -3.10000000000000018e-78 or 9.5e5 < t Initial program 74.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.7
Applied rewrites59.7%
if -3.10000000000000018e-78 < t < 9.5e5Initial program 75.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites50.8%
Final simplification55.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= t -3.8e+49) (not (<= t 8000000.0))) (* (fma (- a) x (* i b)) t) (* (fma (- i) y (* a c)) j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((t <= -3.8e+49) || !(t <= 8000000.0)) {
tmp = fma(-a, x, (i * b)) * t;
} else {
tmp = fma(-i, y, (a * c)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((t <= -3.8e+49) || !(t <= 8000000.0)) tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); else tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -3.8e+49], N[Not[LessEqual[t, 8000000.0]], $MachinePrecision]], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+49} \lor \neg \left(t \leq 8000000\right):\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\end{array}
\end{array}
if t < -3.7999999999999999e49 or 8e6 < t Initial program 74.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.1
Applied rewrites64.1%
if -3.7999999999999999e49 < t < 8e6Initial program 75.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6461.1
Applied rewrites61.1%
Taylor expanded in x around 0
Applied rewrites44.0%
Final simplification52.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -1.45e+80) (* (* (- z) b) c) (if (<= b 8.2e+33) (* (fma (- i) y (* a c)) j) (* (* i b) t))))
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.45e+80) {
tmp = (-z * b) * c;
} else if (b <= 8.2e+33) {
tmp = fma(-i, y, (a * c)) * j;
} else {
tmp = (i * b) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.45e+80) tmp = Float64(Float64(Float64(-z) * b) * c); elseif (b <= 8.2e+33) tmp = Float64(fma(Float64(-i), y, Float64(a * c)) * j); else tmp = Float64(Float64(i * b) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.45e+80], N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, 8.2e+33], N[(N[((-i) * y + N[(a * c), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+80}:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, a \cdot c\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if b < -1.44999999999999993e80Initial program 81.2%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.3
Applied rewrites52.3%
Taylor expanded in z around inf
Applied rewrites47.4%
if -1.44999999999999993e80 < b < 8.1999999999999999e33Initial program 71.4%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6471.4
Applied rewrites71.4%
Taylor expanded in x around 0
Applied rewrites47.3%
if 8.1999999999999999e33 < b Initial program 80.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.8
Applied rewrites54.8%
Taylor expanded in x around 0
Applied rewrites41.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -1.7e-8)
(* (* c a) j)
(if (<= a 3.05e-124)
(* (* y x) z)
(if (<= a 7e+33) (* (* t b) i) (* (* a j) c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 3.05e-124) {
tmp = (y * x) * z;
} else if (a <= 7e+33) {
tmp = (t * b) * i;
} else {
tmp = (a * j) * c;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (a <= (-1.7d-8)) then
tmp = (c * a) * j
else if (a <= 3.05d-124) then
tmp = (y * x) * z
else if (a <= 7d+33) then
tmp = (t * b) * i
else
tmp = (a * j) * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 3.05e-124) {
tmp = (y * x) * z;
} else if (a <= 7e+33) {
tmp = (t * b) * i;
} else {
tmp = (a * j) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.7e-8: tmp = (c * a) * j elif a <= 3.05e-124: tmp = (y * x) * z elif a <= 7e+33: tmp = (t * b) * i else: tmp = (a * j) * c return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.7e-8) tmp = Float64(Float64(c * a) * j); elseif (a <= 3.05e-124) tmp = Float64(Float64(y * x) * z); elseif (a <= 7e+33) tmp = Float64(Float64(t * b) * i); else tmp = Float64(Float64(a * j) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.7e-8) tmp = (c * a) * j; elseif (a <= 3.05e-124) tmp = (y * x) * z; elseif (a <= 7e+33) tmp = (t * b) * i; else tmp = (a * j) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.7e-8], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[a, 3.05e-124], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 7e+33], N[(N[(t * b), $MachinePrecision] * i), $MachinePrecision], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-8}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;a \leq 3.05 \cdot 10^{-124}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+33}:\\
\;\;\;\;\left(t \cdot b\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\end{array}
\end{array}
if a < -1.7e-8Initial program 63.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around 0
Applied rewrites41.2%
Taylor expanded in y around 0
Applied rewrites33.3%
if -1.7e-8 < a < 3.0499999999999999e-124Initial program 85.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6462.7
Applied rewrites62.7%
Taylor expanded in x around 0
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites8.3%
Taylor expanded in z around inf
Applied rewrites35.2%
if 3.0499999999999999e-124 < a < 7.0000000000000002e33Initial program 77.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6441.4
Applied rewrites41.4%
Taylor expanded in y around 0
Applied rewrites34.7%
if 7.0000000000000002e33 < a Initial program 68.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.4
Applied rewrites57.4%
Taylor expanded in z around 0
Applied rewrites46.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -1.7e-8)
(* (* c a) j)
(if (<= a 3.05e-124)
(* (* y x) z)
(if (<= a 2.6e+38) (* (* t b) i) (* (* j c) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 3.05e-124) {
tmp = (y * x) * z;
} else if (a <= 2.6e+38) {
tmp = (t * b) * i;
} else {
tmp = (j * c) * a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (a <= (-1.7d-8)) then
tmp = (c * a) * j
else if (a <= 3.05d-124) then
tmp = (y * x) * z
else if (a <= 2.6d+38) then
tmp = (t * b) * i
else
tmp = (j * c) * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 3.05e-124) {
tmp = (y * x) * z;
} else if (a <= 2.6e+38) {
tmp = (t * b) * i;
} else {
tmp = (j * c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.7e-8: tmp = (c * a) * j elif a <= 3.05e-124: tmp = (y * x) * z elif a <= 2.6e+38: tmp = (t * b) * i else: tmp = (j * c) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.7e-8) tmp = Float64(Float64(c * a) * j); elseif (a <= 3.05e-124) tmp = Float64(Float64(y * x) * z); elseif (a <= 2.6e+38) tmp = Float64(Float64(t * b) * i); else tmp = Float64(Float64(j * c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.7e-8) tmp = (c * a) * j; elseif (a <= 3.05e-124) tmp = (y * x) * z; elseif (a <= 2.6e+38) tmp = (t * b) * i; else tmp = (j * c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.7e-8], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[a, 3.05e-124], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2.6e+38], N[(N[(t * b), $MachinePrecision] * i), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-8}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;a \leq 3.05 \cdot 10^{-124}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+38}:\\
\;\;\;\;\left(t \cdot b\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if a < -1.7e-8Initial program 63.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around 0
Applied rewrites41.2%
Taylor expanded in y around 0
Applied rewrites33.3%
if -1.7e-8 < a < 3.0499999999999999e-124Initial program 85.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6462.7
Applied rewrites62.7%
Taylor expanded in x around 0
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites8.3%
Taylor expanded in z around inf
Applied rewrites35.2%
if 3.0499999999999999e-124 < a < 2.5999999999999999e38Initial program 74.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6443.2
Applied rewrites43.2%
Taylor expanded in y around 0
Applied rewrites33.5%
if 2.5999999999999999e38 < a Initial program 69.9%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6471.3
Applied rewrites71.3%
Taylor expanded in x around 0
Applied rewrites55.9%
Taylor expanded in y around 0
Applied rewrites42.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -1.7e-8)
(* (* c a) j)
(if (<= a 4.5e-124)
(* (* y x) z)
(if (<= a 2e-6) (* (* t i) b) (* (* j c) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 4.5e-124) {
tmp = (y * x) * z;
} else if (a <= 2e-6) {
tmp = (t * i) * b;
} else {
tmp = (j * c) * a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (a <= (-1.7d-8)) then
tmp = (c * a) * j
else if (a <= 4.5d-124) then
tmp = (y * x) * z
else if (a <= 2d-6) then
tmp = (t * i) * b
else
tmp = (j * c) * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -1.7e-8) {
tmp = (c * a) * j;
} else if (a <= 4.5e-124) {
tmp = (y * x) * z;
} else if (a <= 2e-6) {
tmp = (t * i) * b;
} else {
tmp = (j * c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.7e-8: tmp = (c * a) * j elif a <= 4.5e-124: tmp = (y * x) * z elif a <= 2e-6: tmp = (t * i) * b else: tmp = (j * c) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.7e-8) tmp = Float64(Float64(c * a) * j); elseif (a <= 4.5e-124) tmp = Float64(Float64(y * x) * z); elseif (a <= 2e-6) tmp = Float64(Float64(t * i) * b); else tmp = Float64(Float64(j * c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.7e-8) tmp = (c * a) * j; elseif (a <= 4.5e-124) tmp = (y * x) * z; elseif (a <= 2e-6) tmp = (t * i) * b; else tmp = (j * c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.7e-8], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[a, 4.5e-124], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2e-6], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-8}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-6}:\\
\;\;\;\;\left(t \cdot i\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if a < -1.7e-8Initial program 63.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6453.0
Applied rewrites53.0%
Taylor expanded in x around 0
Applied rewrites41.2%
Taylor expanded in y around 0
Applied rewrites33.3%
if -1.7e-8 < a < 4.4999999999999996e-124Initial program 85.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6462.7
Applied rewrites62.7%
Taylor expanded in x around 0
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites8.3%
Taylor expanded in z around inf
Applied rewrites35.2%
if 4.4999999999999996e-124 < a < 1.99999999999999991e-6Initial program 77.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.7
Applied rewrites42.7%
Taylor expanded in x around 0
Applied rewrites42.0%
if 1.99999999999999991e-6 < a Initial program 69.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6469.7
Applied rewrites69.7%
Taylor expanded in x around 0
Applied rewrites51.3%
Taylor expanded in y around 0
Applied rewrites39.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -8.5e+75) (not (<= b 20500000000.0))) (* (* t i) b) (* (* c a) j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -8.5e+75) || !(b <= 20500000000.0)) {
tmp = (t * i) * b;
} else {
tmp = (c * a) * j;
}
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 ((b <= (-8.5d+75)) .or. (.not. (b <= 20500000000.0d0))) then
tmp = (t * i) * b
else
tmp = (c * a) * j
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 ((b <= -8.5e+75) || !(b <= 20500000000.0)) {
tmp = (t * i) * b;
} else {
tmp = (c * a) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -8.5e+75) or not (b <= 20500000000.0): tmp = (t * i) * b else: tmp = (c * a) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -8.5e+75) || !(b <= 20500000000.0)) tmp = Float64(Float64(t * i) * b); else tmp = Float64(Float64(c * a) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -8.5e+75) || ~((b <= 20500000000.0))) tmp = (t * i) * b; else tmp = (c * a) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -8.5e+75], N[Not[LessEqual[b, 20500000000.0]], $MachinePrecision]], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{+75} \lor \neg \left(b \leq 20500000000\right):\\
\;\;\;\;\left(t \cdot i\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if b < -8.4999999999999993e75 or 2.05e10 < b Initial program 81.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in x around 0
Applied rewrites39.6%
if -8.4999999999999993e75 < b < 2.05e10Initial program 70.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6471.3
Applied rewrites71.3%
Taylor expanded in x around 0
Applied rewrites47.1%
Taylor expanded in y around 0
Applied rewrites30.1%
Final simplification34.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -6.4e+84) (not (<= b 14500000000.0))) (* (* t i) b) (* (* j c) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -6.4e+84) || !(b <= 14500000000.0)) {
tmp = (t * i) * b;
} else {
tmp = (j * c) * a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((b <= (-6.4d+84)) .or. (.not. (b <= 14500000000.0d0))) then
tmp = (t * i) * b
else
tmp = (j * c) * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -6.4e+84) || !(b <= 14500000000.0)) {
tmp = (t * i) * b;
} else {
tmp = (j * c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -6.4e+84) or not (b <= 14500000000.0): tmp = (t * i) * b else: tmp = (j * c) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -6.4e+84) || !(b <= 14500000000.0)) tmp = Float64(Float64(t * i) * b); else tmp = Float64(Float64(j * c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -6.4e+84) || ~((b <= 14500000000.0))) tmp = (t * i) * b; else tmp = (j * c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -6.4e+84], N[Not[LessEqual[b, 14500000000.0]], $MachinePrecision]], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.4 \cdot 10^{+84} \lor \neg \left(b \leq 14500000000\right):\\
\;\;\;\;\left(t \cdot i\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if b < -6.4000000000000002e84 or 1.45e10 < b Initial program 82.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in x around 0
Applied rewrites40.3%
if -6.4000000000000002e84 < b < 1.45e10Initial program 70.4%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/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-*.f6471.1
Applied rewrites71.1%
Taylor expanded in x around 0
Applied rewrites47.1%
Taylor expanded in y around 0
Applied rewrites28.4%
Final simplification33.3%
(FPCore (x y z t a b c i j) :precision binary64 (* (* t i) b))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (t * i) * b;
}
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 = (t * i) * b
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 (t * i) * b;
}
def code(x, y, z, t, a, b, c, i, j): return (t * i) * b
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(t * i) * b) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (t * i) * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision]
\begin{array}{l}
\\
\left(t \cdot i\right) \cdot b
\end{array}
Initial program 75.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in x around 0
Applied rewrites21.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2025015
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))