
(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]
\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)
Herbie found 24 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]
\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)
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
INFINITY)
(fma
(- (* z y) (* a t))
x
(fma (- (* i t) (* c z)) b (* (- (* c a) (* i y)) j)))
(* c (- (* a j) (* b z)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = fma(((z * y) - (a * t)), x, fma(((i * t) - (c * z)), b, (((c * a) - (i * y)) * j)));
} else {
tmp = c * ((a * j) - (b * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(Float64(c * a) - Float64(i * y)) * j))); else tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
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 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))))
(if (<= t -1e+94)
(+ (* -1.0 (* t (- (* a x) (* b i)))) t_1)
(if (<= t -3.8e-140)
(fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))
(if (<= t 1.25e+35)
(+ (* z (- (* x y) (* b c))) t_1)
(fma (- (* z y) (* a t)) x (* b (- (* i t) (* c z)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double tmp;
if (t <= -1e+94) {
tmp = (-1.0 * (t * ((a * x) - (b * i)))) + t_1;
} else if (t <= -3.8e-140) {
tmp = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
} else if (t <= 1.25e+35) {
tmp = (z * ((x * y) - (b * c))) + t_1;
} else {
tmp = fma(((z * y) - (a * t)), x, (b * ((i * t) - (c * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (t <= -1e+94) tmp = Float64(Float64(-1.0 * Float64(t * Float64(Float64(a * x) - Float64(b * i)))) + t_1); elseif (t <= -3.8e-140) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (t <= 1.25e+35) tmp = Float64(Float64(z * Float64(Float64(x * y) - Float64(b * c))) + t_1); else tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(b * Float64(Float64(i * t) - Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+94], N[(N[(-1.0 * N[(t * N[(N[(a * x), $MachinePrecision] - N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -3.8e-140], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+35], N[(N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+94}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-140}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+35}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\end{array}
if t < -1e94Initial program 74.0%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.7%
Applied rewrites59.7%
if -1e94 < t < -3.8e-140Initial program 74.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7%
Applied rewrites60.7%
if -3.8e-140 < t < 1.2500000000000001e35Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
if 1.2500000000000001e35 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -1.1e+94)
(* t (fma -1.0 (* a x) (* b i)))
(if (<= t -3.8e-140)
(fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))
(if (<= t 1.25e+35)
(+ (* z (- (* x y) (* b c))) (* j (- (* c a) (* y i))))
(fma (- (* z y) (* a t)) x (* b (- (* i t) (* c 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 <= -1.1e+94) {
tmp = t * fma(-1.0, (a * x), (b * i));
} else if (t <= -3.8e-140) {
tmp = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
} else if (t <= 1.25e+35) {
tmp = (z * ((x * y) - (b * c))) + (j * ((c * a) - (y * i)));
} else {
tmp = fma(((z * y) - (a * t)), x, (b * ((i * t) - (c * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -1.1e+94) tmp = Float64(t * fma(-1.0, Float64(a * x), Float64(b * i))); elseif (t <= -3.8e-140) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (t <= 1.25e+35) tmp = Float64(Float64(z * Float64(Float64(x * y) - Float64(b * c))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(b * Float64(Float64(i * t) - Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -1.1e+94], N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-140], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+35], N[(N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+94}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-140}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+35}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\end{array}
if t < -1.1000000000000001e94Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -1.1000000000000001e94 < t < -3.8e-140Initial program 74.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7%
Applied rewrites60.7%
if -3.8e-140 < t < 1.2500000000000001e35Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
if 1.2500000000000001e35 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= t -9.5e-91)
(fma t_1 x (* i (fma -1.0 (* j y) (* b t))))
(if (<= t 1.25e+35)
(+ (* z (- (* x y) (* b c))) (* j (- (* c a) (* y i))))
(fma t_1 x (* b (- (* i t) (* c z))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (t <= -9.5e-91) {
tmp = fma(t_1, x, (i * fma(-1.0, (j * y), (b * t))));
} else if (t <= 1.25e+35) {
tmp = (z * ((x * y) - (b * c))) + (j * ((c * a) - (y * i)));
} else {
tmp = fma(t_1, x, (b * ((i * t) - (c * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (t <= -9.5e-91) tmp = fma(t_1, x, Float64(i * fma(-1.0, Float64(j * y), Float64(b * t)))); elseif (t <= 1.25e+35) tmp = Float64(Float64(z * Float64(Float64(x * y) - Float64(b * c))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = fma(t_1, x, Float64(b * Float64(Float64(i * t) - Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-91], N[(t$95$1 * x + N[(i * N[(-1.0 * N[(j * y), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+35], N[(N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-91}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, i \cdot \mathsf{fma}\left(-1, j \cdot y, b \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+35}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\end{array}
if t < -9.5000000000000003e-91Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
if -9.5000000000000003e-91 < t < 1.2500000000000001e35Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
if 1.2500000000000001e35 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))))
(if (<= j -1.02e+35)
t_1
(if (<= j 9.8e+85)
(fma (- (* z y) (* a t)) x (* b (- (* i t) (* c z))))
(if (<= j 3.25e+209)
(fma (- (* c a) (* i y)) j (* (* b i) 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(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
double tmp;
if (j <= -1.02e+35) {
tmp = t_1;
} else if (j <= 9.8e+85) {
tmp = fma(((z * y) - (a * t)), x, (b * ((i * t) - (c * z))));
} else if (j <= 3.25e+209) {
tmp = fma(((c * a) - (i * y)), j, ((b * i) * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (j <= -1.02e+35) tmp = t_1; elseif (j <= 9.8e+85) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(b * Float64(Float64(i * t) - Float64(c * z)))); elseif (j <= 3.25e+209) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(b * i) * t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.02e+35], t$95$1, If[LessEqual[j, 9.8e+85], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.25e+209], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(b * i), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;j \leq -1.02 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 9.8 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, b \cdot \left(i \cdot t - c \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 3.25 \cdot 10^{+209}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(b \cdot i\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -1.0200000000000001e35 or 3.2499999999999999e209 < j Initial program 74.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7%
Applied rewrites60.7%
if -1.0200000000000001e35 < j < 9.7999999999999993e85Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
if 9.7999999999999993e85 < j < 3.2499999999999999e209Initial program 74.0%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6450.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6450.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6450.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.2%
Applied rewrites50.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= j -1.02e+35)
(fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))
(if (<= j 6.8e-53)
(fma (- (* z y) (* a t)) x t_1)
(+ t_1 (* 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) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (j <= -1.02e+35) {
tmp = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
} else if (j <= 6.8e-53) {
tmp = fma(((z * y) - (a * t)), x, t_1);
} else {
tmp = t_1 + (j * ((c * a) - (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (j <= -1.02e+35) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (j <= 6.8e-53) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, t_1); else tmp = Float64(t_1 + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.02e+35], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 6.8e-53], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + t$95$1), $MachinePrecision], N[(t$95$1 + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;j \leq -1.02 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;j \leq 6.8 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + j \cdot \left(c \cdot a - y \cdot i\right)\\
\end{array}
if j < -1.0200000000000001e35Initial program 74.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7%
Applied rewrites60.7%
if -1.0200000000000001e35 < j < 6.8e-53Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
if 6.8e-53 < j Initial program 74.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.6%
Applied rewrites59.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2 (* t (fma -1.0 (* a x) (* b i)))))
(if (<= t -2.7e+99)
t_2
(if (<= t -2.8e-8)
(fma (* t b) i (* y (- (* x z) (* i j))))
(if (<= t -1.45e-89)
(fma (- (* z y) (* a t)) x (* -1.0 (* i (* j y))))
(if (<= t -2.9e-256)
(+ (* x (* y z)) t_1)
(if (<= t 1.36e+35) (+ (* -1.0 (* b (* c z))) 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 = t * fma(-1.0, (a * x), (b * i));
double tmp;
if (t <= -2.7e+99) {
tmp = t_2;
} else if (t <= -2.8e-8) {
tmp = fma((t * b), i, (y * ((x * z) - (i * j))));
} else if (t <= -1.45e-89) {
tmp = fma(((z * y) - (a * t)), x, (-1.0 * (i * (j * y))));
} else if (t <= -2.9e-256) {
tmp = (x * (y * z)) + t_1;
} else if (t <= 1.36e+35) {
tmp = (-1.0 * (b * (c * z))) + 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(t * fma(-1.0, Float64(a * x), Float64(b * i))) tmp = 0.0 if (t <= -2.7e+99) tmp = t_2; elseif (t <= -2.8e-8) tmp = fma(Float64(t * b), i, Float64(y * Float64(Float64(x * z) - Float64(i * j)))); elseif (t <= -1.45e-89) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(-1.0 * Float64(i * Float64(j * y)))); elseif (t <= -2.9e-256) tmp = Float64(Float64(x * Float64(y * z)) + t_1); elseif (t <= 1.36e+35) tmp = Float64(Float64(-1.0 * Float64(b * Float64(c * z))) + t_1); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+99], t$95$2, If[LessEqual[t, -2.8e-8], N[(N[(t * b), $MachinePrecision] * i + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-89], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.9e-256], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 1.36e+35], N[(N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - i \cdot j\right)\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-89}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-256}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + t\_1\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+35}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if t < -2.6999999999999999e99 or 1.36e35 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -2.6999999999999999e99 < t < -2.7999999999999999e-8Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -2.7999999999999999e-8 < t < -1.45e-89Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
if -1.45e-89 < t < -2.8999999999999997e-256Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
if -2.8999999999999997e-256 < t < 1.36e35Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma j (- (* a c) (* i y)) (* x (- (* y z) (* a t))))))
(if (<= j -1.7e-127)
t_1
(if (<= j 6.8e-56)
(fma (* t b) i (* z (- (* x y) (* b c))))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
double tmp;
if (j <= -1.7e-127) {
tmp = t_1;
} else if (j <= 6.8e-56) {
tmp = fma((t * b), i, (z * ((x * y) - (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (j <= -1.7e-127) tmp = t_1; elseif (j <= 6.8e-56) tmp = fma(Float64(t * b), i, Float64(z * Float64(Float64(x * y) - Float64(b * c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.7e-127], t$95$1, If[LessEqual[j, 6.8e-56], N[(N[(t * b), $MachinePrecision] * i + N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;j \leq -1.7 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 6.8 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -1.6999999999999999e-127 or 6.7999999999999996e-56 < j Initial program 74.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.7%
Applied rewrites60.7%
if -1.6999999999999999e-127 < j < 6.7999999999999996e-56Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma -1.0 (* a x) (* b i)))))
(if (<= t -2.7e+99)
t_1
(if (<= t -2.8e-8)
(fma (* t b) i (* y (- (* x z) (* i j))))
(if (<= t -1.45e-89)
(fma (- (* z y) (* a t)) x (* -1.0 (* i (* j y))))
(if (<= t 1.36e+35)
(+ (* x (* y z)) (* j (- (* c a) (* y i))))
t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = t * fma(-1.0, (a * x), (b * i));
double tmp;
if (t <= -2.7e+99) {
tmp = t_1;
} else if (t <= -2.8e-8) {
tmp = fma((t * b), i, (y * ((x * z) - (i * j))));
} else if (t <= -1.45e-89) {
tmp = fma(((z * y) - (a * t)), x, (-1.0 * (i * (j * y))));
} else if (t <= 1.36e+35) {
tmp = (x * (y * z)) + (j * ((c * a) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * fma(-1.0, Float64(a * x), Float64(b * i))) tmp = 0.0 if (t <= -2.7e+99) tmp = t_1; elseif (t <= -2.8e-8) tmp = fma(Float64(t * b), i, Float64(y * Float64(Float64(x * z) - Float64(i * j)))); elseif (t <= -1.45e-89) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(-1.0 * Float64(i * Float64(j * y)))); elseif (t <= 1.36e+35) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+99], t$95$1, If[LessEqual[t, -2.8e-8], N[(N[(t * b), $MachinePrecision] * i + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-89], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+35], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - i \cdot j\right)\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-89}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.6999999999999999e99 or 1.36e35 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -2.6999999999999999e99 < t < -2.7999999999999999e-8Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
if -2.7999999999999999e-8 < t < -1.45e-89Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5%
Applied rewrites60.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
if -1.45e-89 < t < 1.36e35Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (* x (* y z)) (* j (- (* c a) (* y i))))))
(if (<= j -1.02e+35)
t_1
(if (<= j 2.7e+85)
(fma (* t b) i (* z (- (* x y) (* b c))))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (x * (y * z)) + (j * ((c * a) - (y * i)));
double tmp;
if (j <= -1.02e+35) {
tmp = t_1;
} else if (j <= 2.7e+85) {
tmp = fma((t * b), i, (z * ((x * y) - (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (j <= -1.02e+35) tmp = t_1; elseif (j <= 2.7e+85) tmp = fma(Float64(t * b), i, Float64(z * Float64(Float64(x * y) - Float64(b * c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.02e+35], t$95$1, If[LessEqual[j, 2.7e+85], N[(N[(t * b), $MachinePrecision] * i + N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;j \leq -1.02 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.7 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -1.0200000000000001e35 or 2.6999999999999998e85 < j Initial program 74.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
if -1.0200000000000001e35 < j < 2.6999999999999998e85Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- (* c a) (* i y)) j (* (* b i) t))))
(if (<= j -5500000.0)
t_1
(if (<= j 9.8e+85)
(fma (* t b) i (* z (- (* x y) (* b c))))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(((c * a) - (i * y)), j, ((b * i) * t));
double tmp;
if (j <= -5500000.0) {
tmp = t_1;
} else if (j <= 9.8e+85) {
tmp = fma((t * b), i, (z * ((x * y) - (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(b * i) * t)) tmp = 0.0 if (j <= -5500000.0) tmp = t_1; elseif (j <= 9.8e+85) tmp = fma(Float64(t * b), i, Float64(z * Float64(Float64(x * y) - Float64(b * c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(b * i), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5500000.0], t$95$1, If[LessEqual[j, 9.8e+85], N[(N[(t * b), $MachinePrecision] * i + N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(b \cdot i\right) \cdot t\right)\\
\mathbf{if}\;j \leq -5500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 9.8 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -5.5e6 or 9.7999999999999993e85 < j Initial program 74.0%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6450.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6450.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6450.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.2%
Applied rewrites50.2%
if -5.5e6 < j < 9.7999999999999993e85Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* -1.0 (* j (- (* i y) (* a c))))))
(if (<= j -1.02e+35)
t_1
(if (<= j 9.8e+85)
(fma (* t b) i (* z (- (* x y) (* b c))))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -1.0 * (j * ((i * y) - (a * c)));
double tmp;
if (j <= -1.02e+35) {
tmp = t_1;
} else if (j <= 9.8e+85) {
tmp = fma((t * b), i, (z * ((x * y) - (b * c))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(-1.0 * Float64(j * Float64(Float64(i * y) - Float64(a * c)))) tmp = 0.0 if (j <= -1.02e+35) tmp = t_1; elseif (j <= 9.8e+85) tmp = fma(Float64(t * b), i, Float64(z * Float64(Float64(x * y) - Float64(b * c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(-1.0 * N[(j * N[(N[(i * y), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.02e+35], t$95$1, If[LessEqual[j, 9.8e+85], N[(N[(t * b), $MachinePrecision] * i + N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := -1 \cdot \left(j \cdot \left(i \cdot y - a \cdot c\right)\right)\\
\mathbf{if}\;j \leq -1.02 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 9.8 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -1.0200000000000001e35 or 9.7999999999999993e85 < j Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in j around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
if -1.0200000000000001e35 < j < 9.7999999999999993e85Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.8%
Applied rewrites49.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (fma -1.0 (* a x) (* b i)))))
(if (<= t -2e+44)
t_1
(if (<= t -6.5e-91)
(* x (- (* y z) (* a t)))
(if (<= t 1.55e-142)
(* z (- (* x y) (* b c)))
(if (<= t 4.9e+107) (* c (- (* a j) (* b z))) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = t * fma(-1.0, (a * x), (b * i));
double tmp;
if (t <= -2e+44) {
tmp = t_1;
} else if (t <= -6.5e-91) {
tmp = x * ((y * z) - (a * t));
} else if (t <= 1.55e-142) {
tmp = z * ((x * y) - (b * c));
} else if (t <= 4.9e+107) {
tmp = c * ((a * j) - (b * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * fma(-1.0, Float64(a * x), Float64(b * i))) tmp = 0.0 if (t <= -2e+44) tmp = t_1; elseif (t <= -6.5e-91) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (t <= 1.55e-142) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); elseif (t <= 4.9e+107) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+44], t$95$1, If[LessEqual[t, -6.5e-91], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.55e-142], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+107], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+107}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.0000000000000002e44 or 4.9000000000000001e107 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -2.0000000000000002e44 < t < -6.5000000000000001e-91Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6471.8%
Applied rewrites71.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -6.5000000000000001e-91 < t < 1.55e-142Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
if 1.55e-142 < t < 4.9000000000000001e107Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* a j) (* b z)))))
(if (<= c -2.95e+97)
t_1
(if (<= c 4e+38) (fma (* t b) i (* y (- (* x z) (* i 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 = c * ((a * j) - (b * z));
double tmp;
if (c <= -2.95e+97) {
tmp = t_1;
} else if (c <= 4e+38) {
tmp = fma((t * b), i, (y * ((x * z) - (i * j))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(a * j) - Float64(b * z))) tmp = 0.0 if (c <= -2.95e+97) tmp = t_1; elseif (c <= 4e+38) tmp = fma(Float64(t * b), i, Float64(y * Float64(Float64(x * z) - Float64(i * j)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.95e+97], t$95$1, If[LessEqual[c, 4e+38], N[(N[(t * b), $MachinePrecision] * i + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{if}\;c \leq -2.95 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - i \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -2.95e97 or 3.9999999999999999e38 < c Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
if -2.95e97 < c < 3.9999999999999999e38Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6451.7%
Applied rewrites51.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))))
(if (<= x -5.6e-18)
t_1
(if (<= x 1.4e-84) (* i (fma (- y) j (* 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 = x * ((y * z) - (a * t));
double tmp;
if (x <= -5.6e-18) {
tmp = t_1;
} else if (x <= 1.4e-84) {
tmp = i * fma(-y, j, (b * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) tmp = 0.0 if (x <= -5.6e-18) tmp = t_1; elseif (x <= 1.4e-84) tmp = Float64(i * fma(Float64(-y), j, Float64(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[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e-18], t$95$1, If[LessEqual[x, 1.4e-84], N[(i * N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-84}:\\
\;\;\;\;i \cdot \mathsf{fma}\left(-y, j, b \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -5.6000000000000002e-18 or 1.3999999999999999e-84 < x Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6471.8%
Applied rewrites71.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -5.6000000000000002e-18 < x < 1.3999999999999999e-84Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.1%
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))))
(if (<= x -5.6e-18)
t_1
(if (<= x 1.4e-84) (* i (- (* b t) (* j y))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double tmp;
if (x <= -5.6e-18) {
tmp = t_1;
} else if (x <= 1.4e-84) {
tmp = i * ((b * t) - (j * y));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((y * z) - (a * t))
if (x <= (-5.6d-18)) then
tmp = t_1
else if (x <= 1.4d-84) then
tmp = i * ((b * t) - (j * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double tmp;
if (x <= -5.6e-18) {
tmp = t_1;
} else if (x <= 1.4e-84) {
tmp = i * ((b * t) - (j * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * ((y * z) - (a * t)) tmp = 0 if x <= -5.6e-18: tmp = t_1 elif x <= 1.4e-84: tmp = i * ((b * t) - (j * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) tmp = 0.0 if (x <= -5.6e-18) tmp = t_1; elseif (x <= 1.4e-84) tmp = Float64(i * Float64(Float64(b * t) - Float64(j * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * ((y * z) - (a * t)); tmp = 0.0; if (x <= -5.6e-18) tmp = t_1; elseif (x <= 1.4e-84) tmp = i * ((b * t) - (j * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e-18], t$95$1, If[LessEqual[x, 1.4e-84], N[(i * N[(N[(b * t), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-84}:\\
\;\;\;\;i \cdot \left(b \cdot t - j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -5.6000000000000002e-18 or 1.3999999999999999e-84 < x Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6471.8%
Applied rewrites71.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -5.6000000000000002e-18 < x < 1.3999999999999999e-84Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -4.2e+189)
(* x (* y z))
(if (<= z 2.15e+36)
(* i (- (* b t) (* j y)))
(if (<= z 1.85e+126) (* a (* c j)) (* c (* -1.0 (* b z)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -4.2e+189) {
tmp = x * (y * z);
} else if (z <= 2.15e+36) {
tmp = i * ((b * t) - (j * y));
} else if (z <= 1.85e+126) {
tmp = a * (c * j);
} else {
tmp = c * (-1.0 * (b * z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-4.2d+189)) then
tmp = x * (y * z)
else if (z <= 2.15d+36) then
tmp = i * ((b * t) - (j * y))
else if (z <= 1.85d+126) then
tmp = a * (c * j)
else
tmp = c * ((-1.0d0) * (b * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -4.2e+189) {
tmp = x * (y * z);
} else if (z <= 2.15e+36) {
tmp = i * ((b * t) - (j * y));
} else if (z <= 1.85e+126) {
tmp = a * (c * j);
} else {
tmp = c * (-1.0 * (b * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -4.2e+189: tmp = x * (y * z) elif z <= 2.15e+36: tmp = i * ((b * t) - (j * y)) elif z <= 1.85e+126: tmp = a * (c * j) else: tmp = c * (-1.0 * (b * z)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -4.2e+189) tmp = Float64(x * Float64(y * z)); elseif (z <= 2.15e+36) tmp = Float64(i * Float64(Float64(b * t) - Float64(j * y))); elseif (z <= 1.85e+126) tmp = Float64(a * Float64(c * j)); else tmp = Float64(c * Float64(-1.0 * Float64(b * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -4.2e+189) tmp = x * (y * z); elseif (z <= 2.15e+36) tmp = i * ((b * t) - (j * y)); elseif (z <= 1.85e+126) tmp = a * (c * j); else tmp = c * (-1.0 * (b * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -4.2e+189], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+36], N[(i * N[(N[(b * t), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+126], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(c * N[(-1.0 * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+189}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+36}:\\
\;\;\;\;i \cdot \left(b \cdot t - j \cdot y\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+126}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(-1 \cdot \left(b \cdot z\right)\right)\\
\end{array}
if z < -4.1999999999999998e189Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if -4.1999999999999998e189 < z < 2.15e36Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
if 2.15e36 < z < 1.8499999999999999e126Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
if 1.8499999999999999e126 < z Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.0%
Applied rewrites22.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (* b t))))
(if (<= t -3.4e+265)
(* a (* -1.0 (* t x)))
(if (<= t -2.1e+44)
t_1
(if (<= t 4.4e-291)
(* x (* y z))
(if (<= t 5e-273)
(* y (* -1.0 (* i j)))
(if (<= t 1.75e-149)
(* -1.0 (* b (* c z)))
(if (<= t 8.8e+63) (* a (* c j)) t_1))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -3.4e+265) {
tmp = a * (-1.0 * (t * x));
} else if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= 4.4e-291) {
tmp = x * (y * z);
} else if (t <= 5e-273) {
tmp = y * (-1.0 * (i * j));
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = i * (b * t)
if (t <= (-3.4d+265)) then
tmp = a * ((-1.0d0) * (t * x))
else if (t <= (-2.1d+44)) then
tmp = t_1
else if (t <= 4.4d-291) then
tmp = x * (y * z)
else if (t <= 5d-273) then
tmp = y * ((-1.0d0) * (i * j))
else if (t <= 1.75d-149) then
tmp = (-1.0d0) * (b * (c * z))
else if (t <= 8.8d+63) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -3.4e+265) {
tmp = a * (-1.0 * (t * x));
} else if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= 4.4e-291) {
tmp = x * (y * z);
} else if (t <= 5e-273) {
tmp = y * (-1.0 * (i * j));
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = i * (b * t) tmp = 0 if t <= -3.4e+265: tmp = a * (-1.0 * (t * x)) elif t <= -2.1e+44: tmp = t_1 elif t <= 4.4e-291: tmp = x * (y * z) elif t <= 5e-273: tmp = y * (-1.0 * (i * j)) elif t <= 1.75e-149: tmp = -1.0 * (b * (c * z)) elif t <= 8.8e+63: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * Float64(b * t)) tmp = 0.0 if (t <= -3.4e+265) tmp = Float64(a * Float64(-1.0 * Float64(t * x))); elseif (t <= -2.1e+44) tmp = t_1; elseif (t <= 4.4e-291) tmp = Float64(x * Float64(y * z)); elseif (t <= 5e-273) tmp = Float64(y * Float64(-1.0 * Float64(i * j))); elseif (t <= 1.75e-149) tmp = Float64(-1.0 * Float64(b * Float64(c * z))); elseif (t <= 8.8e+63) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = i * (b * t); tmp = 0.0; if (t <= -3.4e+265) tmp = a * (-1.0 * (t * x)); elseif (t <= -2.1e+44) tmp = t_1; elseif (t <= 4.4e-291) tmp = x * (y * z); elseif (t <= 5e-273) tmp = y * (-1.0 * (i * j)); elseif (t <= 1.75e-149) tmp = -1.0 * (b * (c * z)); elseif (t <= 8.8e+63) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+265], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, 4.4e-291], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-273], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-291}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-273}:\\
\;\;\;\;y \cdot \left(-1 \cdot \left(i \cdot j\right)\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.3999999999999999e265Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
if -3.3999999999999999e265 < t < -2.0999999999999999e44 or 8.7999999999999995e63 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
if -2.0999999999999999e44 < t < 4.4e-291Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 4.4e-291 < t < 4.9999999999999997e-273Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.6%
Applied rewrites22.6%
if 4.9999999999999997e-273 < t < 1.75e-149Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in z around 0
lower-*.f6421.9%
Applied rewrites21.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.0%
Applied rewrites22.0%
if 1.75e-149 < t < 8.7999999999999995e63Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (* b t))))
(if (<= t -3.4e+265)
(* a (* -1.0 (* t x)))
(if (<= t -2.1e+44)
t_1
(if (<= t -2.85e-256)
(* x (* y z))
(if (<= t 1.75e-149)
(* -1.0 (* b (* c z)))
(if (<= t 8.8e+63) (* a (* c j)) t_1)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -3.4e+265) {
tmp = a * (-1.0 * (t * x));
} else if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= -2.85e-256) {
tmp = x * (y * z);
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = i * (b * t)
if (t <= (-3.4d+265)) then
tmp = a * ((-1.0d0) * (t * x))
else if (t <= (-2.1d+44)) then
tmp = t_1
else if (t <= (-2.85d-256)) then
tmp = x * (y * z)
else if (t <= 1.75d-149) then
tmp = (-1.0d0) * (b * (c * z))
else if (t <= 8.8d+63) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -3.4e+265) {
tmp = a * (-1.0 * (t * x));
} else if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= -2.85e-256) {
tmp = x * (y * z);
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = i * (b * t) tmp = 0 if t <= -3.4e+265: tmp = a * (-1.0 * (t * x)) elif t <= -2.1e+44: tmp = t_1 elif t <= -2.85e-256: tmp = x * (y * z) elif t <= 1.75e-149: tmp = -1.0 * (b * (c * z)) elif t <= 8.8e+63: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * Float64(b * t)) tmp = 0.0 if (t <= -3.4e+265) tmp = Float64(a * Float64(-1.0 * Float64(t * x))); elseif (t <= -2.1e+44) tmp = t_1; elseif (t <= -2.85e-256) tmp = Float64(x * Float64(y * z)); elseif (t <= 1.75e-149) tmp = Float64(-1.0 * Float64(b * Float64(c * z))); elseif (t <= 8.8e+63) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = i * (b * t); tmp = 0.0; if (t <= -3.4e+265) tmp = a * (-1.0 * (t * x)); elseif (t <= -2.1e+44) tmp = t_1; elseif (t <= -2.85e-256) tmp = x * (y * z); elseif (t <= 1.75e-149) tmp = -1.0 * (b * (c * z)); elseif (t <= 8.8e+63) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+265], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, -2.85e-256], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-256}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.3999999999999999e265Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
if -3.3999999999999999e265 < t < -2.0999999999999999e44 or 8.7999999999999995e63 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
if -2.0999999999999999e44 < t < -2.85e-256Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if -2.85e-256 < t < 1.75e-149Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in z around 0
lower-*.f6421.9%
Applied rewrites21.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.0%
Applied rewrites22.0%
if 1.75e-149 < t < 8.7999999999999995e63Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (* b t))))
(if (<= t -2.1e+44)
t_1
(if (<= t -2.85e-256)
(* x (* y z))
(if (<= t 1.75e-149)
(* -1.0 (* b (* c z)))
(if (<= t 8.8e+63) (* a (* c j)) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= -2.85e-256) {
tmp = x * (y * z);
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = i * (b * t)
if (t <= (-2.1d+44)) then
tmp = t_1
else if (t <= (-2.85d-256)) then
tmp = x * (y * z)
else if (t <= 1.75d-149) then
tmp = (-1.0d0) * (b * (c * z))
else if (t <= 8.8d+63) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= -2.85e-256) {
tmp = x * (y * z);
} else if (t <= 1.75e-149) {
tmp = -1.0 * (b * (c * z));
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = i * (b * t) tmp = 0 if t <= -2.1e+44: tmp = t_1 elif t <= -2.85e-256: tmp = x * (y * z) elif t <= 1.75e-149: tmp = -1.0 * (b * (c * z)) elif t <= 8.8e+63: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * Float64(b * t)) tmp = 0.0 if (t <= -2.1e+44) tmp = t_1; elseif (t <= -2.85e-256) tmp = Float64(x * Float64(y * z)); elseif (t <= 1.75e-149) tmp = Float64(-1.0 * Float64(b * Float64(c * z))); elseif (t <= 8.8e+63) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = i * (b * t); tmp = 0.0; if (t <= -2.1e+44) tmp = t_1; elseif (t <= -2.85e-256) tmp = x * (y * z); elseif (t <= 1.75e-149) tmp = -1.0 * (b * (c * z)); elseif (t <= 8.8e+63) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, -2.85e-256], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-256}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.0999999999999999e44 or 8.7999999999999995e63 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
if -2.0999999999999999e44 < t < -2.85e-256Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if -2.85e-256 < t < 1.75e-149Initial program 74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in z around 0
lower-*.f6421.9%
Applied rewrites21.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.0%
Applied rewrites22.0%
if 1.75e-149 < t < 8.7999999999999995e63Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (* b t))))
(if (<= t -2.1e+44)
t_1
(if (<= t 2.95e-148)
(* x (* y z))
(if (<= t 8.8e+63) (* a (* c j)) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= 2.95e-148) {
tmp = x * (y * z);
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = i * (b * t)
if (t <= (-2.1d+44)) then
tmp = t_1
else if (t <= 2.95d-148) then
tmp = x * (y * z)
else if (t <= 8.8d+63) then
tmp = a * (c * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * (b * t);
double tmp;
if (t <= -2.1e+44) {
tmp = t_1;
} else if (t <= 2.95e-148) {
tmp = x * (y * z);
} else if (t <= 8.8e+63) {
tmp = a * (c * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = i * (b * t) tmp = 0 if t <= -2.1e+44: tmp = t_1 elif t <= 2.95e-148: tmp = x * (y * z) elif t <= 8.8e+63: tmp = a * (c * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * Float64(b * t)) tmp = 0.0 if (t <= -2.1e+44) tmp = t_1; elseif (t <= 2.95e-148) tmp = Float64(x * Float64(y * z)); elseif (t <= 8.8e+63) tmp = Float64(a * Float64(c * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = i * (b * t); tmp = 0.0; if (t <= -2.1e+44) tmp = t_1; elseif (t <= 2.95e-148) tmp = x * (y * z); elseif (t <= 8.8e+63) tmp = a * (c * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, 2.95e-148], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.0999999999999999e44 or 8.7999999999999995e63 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
if -2.0999999999999999e44 < t < 2.9500000000000001e-148Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 2.9500000000000001e-148 < t < 8.7999999999999995e63Initial program 74.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in x around 0
lower-*.f6422.1%
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= t -2.1e+44) (* i (* b t)) (if (<= t 2.5e+95) (* x (* y z)) (* b (* i t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -2.1e+44) {
tmp = i * (b * t);
} else if (t <= 2.5e+95) {
tmp = x * (y * z);
} else {
tmp = b * (i * 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 (t <= (-2.1d+44)) then
tmp = i * (b * t)
else if (t <= 2.5d+95) then
tmp = x * (y * z)
else
tmp = b * (i * 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 (t <= -2.1e+44) {
tmp = i * (b * t);
} else if (t <= 2.5e+95) {
tmp = x * (y * z);
} else {
tmp = b * (i * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= -2.1e+44: tmp = i * (b * t) elif t <= 2.5e+95: tmp = x * (y * z) else: tmp = b * (i * t) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -2.1e+44) tmp = Float64(i * Float64(b * t)); elseif (t <= 2.5e+95) tmp = Float64(x * Float64(y * z)); else tmp = Float64(b * Float64(i * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (t <= -2.1e+44) tmp = i * (b * t); elseif (t <= 2.5e+95) tmp = x * (y * z); else tmp = b * (i * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -2.1e+44], N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+95], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;i \cdot \left(b \cdot t\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\end{array}
if t < -2.0999999999999999e44Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
if -2.0999999999999999e44 < t < 2.5000000000000001e95Initial program 74.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0%
Applied rewrites39.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 2.5000000000000001e95 < t Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
(FPCore (x y z t a b c i j) :precision binary64 (* i (* b t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return i * (b * t);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = i * (b * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return i * (b * t);
}
def code(x, y, z, t, a, b, c, i, j): return i * (b * t)
function code(x, y, z, t, a, b, c, i, j) return Float64(i * Float64(b * t)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = i * (b * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]
i \cdot \left(b \cdot t\right)
Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f6421.9%
Applied rewrites21.9%
(FPCore (x y z t a b c i j) :precision binary64 (* b (* i t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return b * (i * t);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = b * (i * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return b * (i * t);
}
def code(x, y, z, t, a, b, c, i, j): return b * (i * t)
function code(x, y, z, t, a, b, c, i, j) return Float64(b * Float64(i * t)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = b * (i * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]
b \cdot \left(i \cdot t\right)
Initial program 74.0%
lift-+.f64N/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites77.0%
Applied rewrites74.8%
Taylor expanded in i around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.8%
Applied rewrites38.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
herbie shell --seed 2025213
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))