
(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 20 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
(- (* i t) (* c z))
b
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x)))
(* c (* b (- (/ (* 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(((i * t) - (c * z)), b, fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x)));
} else {
tmp = c * (b * (((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(i * t) - Float64(c * z)), b, fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x))); else tmp = Float64(c * Float64(b * Float64(Float64(Float64(a * j) / 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[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b * N[(N[(N[(a * j), $MachinePrecision] / b), $MachinePrecision] - 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(i \cdot t - c \cdot z, b, \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b \cdot \left(\frac{a \cdot j}{b} - z\right)\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 73.5%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate-+l+N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
Applied rewrites75.9%
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 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.7%
Applied rewrites38.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6439.1%
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2 (+ (* -1.0 (* t (- (* a x) (* b i)))) t_1)))
(if (<= j -1.16e-102)
t_2
(if (<= j 2.2)
(fma
(* i t)
b
(fma c (- (* a j) (* b z)) (* x (- (* y z) (* a t)))))
(if (<= j 4e+174) t_2 (+ (* 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 = j * ((c * a) - (y * i));
double t_2 = (-1.0 * (t * ((a * x) - (b * i)))) + t_1;
double tmp;
if (j <= -1.16e-102) {
tmp = t_2;
} else if (j <= 2.2) {
tmp = fma((i * t), b, fma(c, ((a * j) - (b * z)), (x * ((y * z) - (a * t)))));
} else if (j <= 4e+174) {
tmp = t_2;
} else {
tmp = (b * (i * t)) + t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(-1.0 * Float64(t * Float64(Float64(a * x) - Float64(b * i)))) + t_1) tmp = 0.0 if (j <= -1.16e-102) tmp = t_2; elseif (j <= 2.2) tmp = fma(Float64(i * t), b, fma(c, Float64(Float64(a * j) - Float64(b * z)), Float64(x * Float64(Float64(y * z) - Float64(a * t))))); elseif (j <= 4e+174) tmp = t_2; else tmp = Float64(Float64(b * Float64(i * t)) + t_1); 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[(N[(-1.0 * N[(t * N[(N[(a * x), $MachinePrecision] - N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[j, -1.16e-102], t$95$2, If[LessEqual[j, 2.2], N[(N[(i * t), $MachinePrecision] * b + N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4e+174], t$95$2, N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + t\_1\\
\mathbf{if}\;j \leq -1.16 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 2.2:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t, b, \mathsf{fma}\left(c, a \cdot j - b \cdot z, x \cdot \left(y \cdot z - a \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq 4 \cdot 10^{+174}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + t\_1\\
\end{array}
if j < -1.1599999999999999e-102 or 2.2000000000000002 < j < 4.0000000000000003e174Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.2%
Applied rewrites59.2%
if -1.1599999999999999e-102 < j < 2.2000000000000002Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in i 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-*.f6468.8%
Applied rewrites68.8%
if 4.0000000000000003e174 < j Initial program 73.5%
Taylor expanded in i 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 (* j (- (* c a) (* y i))))
(t_2 (+ (* -1.0 (* t (- (* a x) (* b i)))) t_1)))
(if (<= j -1.32e-102)
t_2
(if (<= j 2.2)
(- (* x (- (* y z) (* a t))) (* b (- (* c z) (* i t))))
(if (<= j 4e+174) t_2 (+ (* 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 = j * ((c * a) - (y * i));
double t_2 = (-1.0 * (t * ((a * x) - (b * i)))) + t_1;
double tmp;
if (j <= -1.32e-102) {
tmp = t_2;
} else if (j <= 2.2) {
tmp = (x * ((y * z) - (a * t))) - (b * ((c * z) - (i * t)));
} else if (j <= 4e+174) {
tmp = t_2;
} else {
tmp = (b * (i * t)) + 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) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((-1.0d0) * (t * ((a * x) - (b * i)))) + t_1
if (j <= (-1.32d-102)) then
tmp = t_2
else if (j <= 2.2d0) then
tmp = (x * ((y * z) - (a * t))) - (b * ((c * z) - (i * t)))
else if (j <= 4d+174) then
tmp = t_2
else
tmp = (b * (i * t)) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = (-1.0 * (t * ((a * x) - (b * i)))) + t_1;
double tmp;
if (j <= -1.32e-102) {
tmp = t_2;
} else if (j <= 2.2) {
tmp = (x * ((y * z) - (a * t))) - (b * ((c * z) - (i * t)));
} else if (j <= 4e+174) {
tmp = t_2;
} else {
tmp = (b * (i * t)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = (-1.0 * (t * ((a * x) - (b * i)))) + t_1 tmp = 0 if j <= -1.32e-102: tmp = t_2 elif j <= 2.2: tmp = (x * ((y * z) - (a * t))) - (b * ((c * z) - (i * t))) elif j <= 4e+174: tmp = t_2 else: tmp = (b * (i * t)) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(-1.0 * Float64(t * Float64(Float64(a * x) - Float64(b * i)))) + t_1) tmp = 0.0 if (j <= -1.32e-102) tmp = t_2; elseif (j <= 2.2) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(a * t))) - Float64(b * Float64(Float64(c * z) - Float64(i * t)))); elseif (j <= 4e+174) tmp = t_2; else tmp = Float64(Float64(b * Float64(i * t)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = (-1.0 * (t * ((a * x) - (b * i)))) + t_1; tmp = 0.0; if (j <= -1.32e-102) tmp = t_2; elseif (j <= 2.2) tmp = (x * ((y * z) - (a * t))) - (b * ((c * z) - (i * t))); elseif (j <= 4e+174) tmp = t_2; else tmp = (b * (i * t)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 * N[(t * N[(N[(a * x), $MachinePrecision] - N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[j, -1.32e-102], t$95$2, If[LessEqual[j, 2.2], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4e+174], t$95$2, N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := -1 \cdot \left(t \cdot \left(a \cdot x - b \cdot i\right)\right) + t\_1\\
\mathbf{if}\;j \leq -1.32 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 2.2:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - i \cdot t\right)\\
\mathbf{elif}\;j \leq 4 \cdot 10^{+174}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + t\_1\\
\end{array}
if j < -1.32e-102 or 2.2000000000000002 < j < 4.0000000000000003e174Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.2%
Applied rewrites59.2%
if -1.32e-102 < j < 2.2000000000000002Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.7%
Applied rewrites59.7%
if 4.0000000000000003e174 < j Initial program 73.5%
Taylor expanded in i 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) (* a t))))
(t_2 (fma j (- (* a c) (* i y)) t_1))
(t_3 (* j (- (* c a) (* y i)))))
(if (<= j -5e+18)
t_2
(if (<= j -9.2e-102)
(+ (* -1.0 (* b (* c z))) t_3)
(if (<= j 1.06e-32)
(- t_1 (* b (- (* c z) (* i t))))
(if (<= j 8.4e+148) t_2 (+ (* b (* i t)) t_3)))))))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 t_2 = fma(j, ((a * c) - (i * y)), t_1);
double t_3 = j * ((c * a) - (y * i));
double tmp;
if (j <= -5e+18) {
tmp = t_2;
} else if (j <= -9.2e-102) {
tmp = (-1.0 * (b * (c * z))) + t_3;
} else if (j <= 1.06e-32) {
tmp = t_1 - (b * ((c * z) - (i * t)));
} else if (j <= 8.4e+148) {
tmp = t_2;
} else {
tmp = (b * (i * t)) + t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = fma(j, Float64(Float64(a * c) - Float64(i * y)), t_1) t_3 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (j <= -5e+18) tmp = t_2; elseif (j <= -9.2e-102) tmp = Float64(Float64(-1.0 * Float64(b * Float64(c * z))) + t_3); elseif (j <= 1.06e-32) tmp = Float64(t_1 - Float64(b * Float64(Float64(c * z) - Float64(i * t)))); elseif (j <= 8.4e+148) tmp = t_2; else tmp = Float64(Float64(b * Float64(i * t)) + t_3); 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]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5e+18], t$95$2, If[LessEqual[j, -9.2e-102], N[(N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[j, 1.06e-32], N[(t$95$1 - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8.4e+148], t$95$2, N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := \mathsf{fma}\left(j, a \cdot c - i \cdot y, t\_1\right)\\
t_3 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;j \leq -5 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -9.2 \cdot 10^{-102}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_3\\
\mathbf{elif}\;j \leq 1.06 \cdot 10^{-32}:\\
\;\;\;\;t\_1 - b \cdot \left(c \cdot z - i \cdot t\right)\\
\mathbf{elif}\;j \leq 8.4 \cdot 10^{+148}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + t\_3\\
\end{array}
if j < -5e18 or 1.0599999999999999e-32 < j < 8.4e148Initial program 73.5%
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.4%
Applied rewrites60.4%
if -5e18 < j < -9.1999999999999995e-102Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6448.7%
Applied rewrites48.7%
if -9.1999999999999995e-102 < j < 1.0599999999999999e-32Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6459.7%
Applied rewrites59.7%
if 8.4e148 < j Initial program 73.5%
Taylor expanded in i 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 (* b (- (* i t) (* c z)))))
(if (<= b -2.55e+66)
t_1
(if (<= b 2.3e+256)
(fma j (- (* a c) (* i y)) (* x (- (* y z) (* a 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 = b * ((i * t) - (c * z));
double tmp;
if (b <= -2.55e+66) {
tmp = t_1;
} else if (b <= 2.3e+256) {
tmp = fma(j, ((a * c) - (i * y)), (x * ((y * z) - (a * t))));
} else {
tmp = t_1;
}
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 (b <= -2.55e+66) tmp = t_1; elseif (b <= 2.3e+256) tmp = fma(j, Float64(Float64(a * c) - Float64(i * y)), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); else tmp = t_1; 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[b, -2.55e+66], t$95$1, If[LessEqual[b, 2.3e+256], 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], t$95$1]]]
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -2.55 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+256}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -2.55e66 or 2.2999999999999999e256 < b Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1%
Applied rewrites39.1%
if -2.55e66 < b < 2.2999999999999999e256Initial program 73.5%
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.4%
Applied rewrites60.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2 (+ (* -1.0 (* b (* c z))) t_1))
(t_3 (fma j (* a c) (* x (- (* y z) (* a t))))))
(if (<= x -5e-7)
t_3
(if (<= x 3.5e-299)
t_2
(if (<= x 5.6e-12)
(+ (* b (* i t)) t_1)
(if (<= x 2.4e+97) t_2 t_3))))))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 = (-1.0 * (b * (c * z))) + t_1;
double t_3 = fma(j, (a * c), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -5e-7) {
tmp = t_3;
} else if (x <= 3.5e-299) {
tmp = t_2;
} else if (x <= 5.6e-12) {
tmp = (b * (i * t)) + t_1;
} else if (x <= 2.4e+97) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(-1.0 * Float64(b * Float64(c * z))) + t_1) t_3 = fma(j, Float64(a * c), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -5e-7) tmp = t_3; elseif (x <= 3.5e-299) tmp = t_2; elseif (x <= 5.6e-12) tmp = Float64(Float64(b * Float64(i * t)) + t_1); elseif (x <= 2.4e+97) tmp = t_2; else tmp = t_3; 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[(N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(a * c), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e-7], t$95$3, If[LessEqual[x, 3.5e-299], t$95$2, If[LessEqual[x, 5.6e-12], N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2.4e+97], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := -1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_1\\
t_3 := \mathsf{fma}\left(j, a \cdot c, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{-7}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-12}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + t\_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
if x < -4.9999999999999998e-7 or 2.4e97 < x Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in y around 0
lower-*.f6450.9%
Applied rewrites50.9%
if -4.9999999999999998e-7 < x < 3.4999999999999999e-299 or 5.6000000000000004e-12 < x < 2.4e97Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6448.7%
Applied rewrites48.7%
if 3.4999999999999999e-299 < x < 5.6000000000000004e-12Initial program 73.5%
Taylor expanded in i 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 (fma j (* a c) (* x (- (* y z) (* a t))))))
(if (<= x -4.5e-5)
t_1
(if (<= x 3.4e+14)
(+ (* b (* i t)) (* j (- (* c a) (* y i))))
(if (<= x 2.7e+96) (* 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 = fma(j, (a * c), (x * ((y * z) - (a * t))));
double tmp;
if (x <= -4.5e-5) {
tmp = t_1;
} else if (x <= 3.4e+14) {
tmp = (b * (i * t)) + (j * ((c * a) - (y * i)));
} else if (x <= 2.7e+96) {
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 = fma(j, Float64(a * c), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) tmp = 0.0 if (x <= -4.5e-5) tmp = t_1; elseif (x <= 3.4e+14) tmp = Float64(Float64(b * Float64(i * t)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (x <= 2.7e+96) 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[(j * N[(a * c), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-5], t$95$1, If[LessEqual[x, 3.4e+14], N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+96], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, a \cdot c, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+14}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+96}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -4.5000000000000003e-5 or 2.7000000000000002e96 < x Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in y around 0
lower-*.f6450.9%
Applied rewrites50.9%
if -4.5000000000000003e-5 < x < 3.4e14Initial program 73.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6449.4%
Applied rewrites49.4%
if 3.4e14 < x < 2.7000000000000002e96Initial program 73.5%
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 (* (- (* b t) (* j y)) i)))
(if (<= i -1.8e+216)
t_1
(if (<= i 1.95e+48)
(fma j (* a c) (* x (- (* y z) (* a 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 = ((b * t) - (j * y)) * i;
double tmp;
if (i <= -1.8e+216) {
tmp = t_1;
} else if (i <= 1.95e+48) {
tmp = fma(j, (a * c), (x * ((y * z) - (a * t))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(b * t) - Float64(j * y)) * i) tmp = 0.0 if (i <= -1.8e+216) tmp = t_1; elseif (i <= 1.95e+48) tmp = fma(j, Float64(a * c), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(b * t), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1.8e+216], t$95$1, If[LessEqual[i, 1.95e+48], N[(j * N[(a * c), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(b \cdot t - j \cdot y\right) \cdot i\\
\mathbf{if}\;i \leq -1.8 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.95 \cdot 10^{+48}:\\
\;\;\;\;\mathsf{fma}\left(j, a \cdot c, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if i < -1.8000000000000001e216 or 1.95e48 < i Initial program 73.5%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.2%
Applied rewrites39.2%
if -1.8000000000000001e216 < i < 1.95e48Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in y around 0
lower-*.f6450.9%
Applied rewrites50.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -4.3e-74)
t_1
(if (<= j 2e-172)
(* z (fma (- c) b (* y x)))
(if (<= j 1.06e-32) (* t (fma -1.0 (* a x) (* b 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 2e-172) {
tmp = z * fma(-c, b, (y * x));
} else if (j <= 1.06e-32) {
tmp = t * fma(-1.0, (a * x), (b * i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -4.3e-74) tmp = t_1; elseif (j <= 2e-172) tmp = Float64(z * fma(Float64(-c), b, Float64(y * x))); elseif (j <= 1.06e-32) tmp = Float64(t * fma(-1.0, Float64(a * x), Float64(b * i))); 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]), $MachinePrecision]}, If[LessEqual[j, -4.3e-74], t$95$1, If[LessEqual[j, 2e-172], N[(z * N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.06e-32], N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2 \cdot 10^{-172}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(-c, b, y \cdot x\right)\\
\mathbf{elif}\;j \leq 1.06 \cdot 10^{-32}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -4.2999999999999997e-74 or 1.0599999999999999e-32 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -4.2999999999999997e-74 < j < 2.0000000000000001e-172Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.8%
Applied rewrites39.8%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
lower-fma.f64N/A
lower-neg.f6440.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.2%
Applied rewrites40.2%
if 2.0000000000000001e-172 < j < 1.0599999999999999e-32Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in i 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-*.f6468.8%
Applied rewrites68.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -4.3e-74)
t_1
(if (<= j 2.5) (* z (fma (- c) b (* y x))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 2.5) {
tmp = z * fma(-c, b, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -4.3e-74) tmp = t_1; elseif (j <= 2.5) tmp = Float64(z * fma(Float64(-c), b, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.3e-74], t$95$1, If[LessEqual[j, 2.5], N[(z * N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.5:\\
\;\;\;\;z \cdot \mathsf{fma}\left(-c, b, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -4.2999999999999997e-74 or 2.5 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -4.2999999999999997e-74 < j < 2.5Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.8%
Applied rewrites39.8%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
lower-fma.f64N/A
lower-neg.f6440.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.2%
Applied rewrites40.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -4.3e-74)
t_1
(if (<= j 2.5) (* 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 2.5) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (i * y))
if (j <= (-4.3d-74)) then
tmp = t_1
else if (j <= 2.5d0) then
tmp = z * ((x * y) - (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 2.5) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (i * y)) tmp = 0 if j <= -4.3e-74: tmp = t_1 elif j <= 2.5: tmp = 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(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -4.3e-74) tmp = t_1; elseif (j <= 2.5) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -4.3e-74) tmp = t_1; elseif (j <= 2.5) tmp = z * ((x * y) - (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.3e-74], t$95$1, If[LessEqual[j, 2.5], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.5:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -4.2999999999999997e-74 or 2.5 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -4.2999999999999997e-74 < j < 2.5Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.8%
Applied rewrites39.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z))))
(t_2 (* j (- (* a c) (* i y)))))
(if (<= j -4.3e-74)
t_2
(if (<= j 7e-236)
t_1
(if (<= j 4e-141)
(* y (- (* z x) (* j i)))
(if (<= j 1.06e-32) t_1 t_2))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double t_2 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_2;
} else if (j <= 7e-236) {
tmp = t_1;
} else if (j <= 4e-141) {
tmp = y * ((z * x) - (j * i));
} else if (j <= 1.06e-32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * ((i * t) - (c * z))
t_2 = j * ((a * c) - (i * y))
if (j <= (-4.3d-74)) then
tmp = t_2
else if (j <= 7d-236) then
tmp = t_1
else if (j <= 4d-141) then
tmp = y * ((z * x) - (j * i))
else if (j <= 1.06d-32) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double t_2 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_2;
} else if (j <= 7e-236) {
tmp = t_1;
} else if (j <= 4e-141) {
tmp = y * ((z * x) - (j * i));
} else if (j <= 1.06e-32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((i * t) - (c * z)) t_2 = j * ((a * c) - (i * y)) tmp = 0 if j <= -4.3e-74: tmp = t_2 elif j <= 7e-236: tmp = t_1 elif j <= 4e-141: tmp = y * ((z * x) - (j * i)) elif j <= 1.06e-32: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) t_2 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -4.3e-74) tmp = t_2; elseif (j <= 7e-236) tmp = t_1; elseif (j <= 4e-141) tmp = Float64(y * Float64(Float64(z * x) - Float64(j * i))); elseif (j <= 1.06e-32) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((i * t) - (c * z)); t_2 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -4.3e-74) tmp = t_2; elseif (j <= 7e-236) tmp = t_1; elseif (j <= 4e-141) tmp = y * ((z * x) - (j * i)); elseif (j <= 1.06e-32) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.3e-74], t$95$2, If[LessEqual[j, 7e-236], t$95$1, If[LessEqual[j, 4e-141], N[(y * N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.06e-32], t$95$1, t$95$2]]]]]]
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
t_2 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{-74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 7 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 4 \cdot 10^{-141}:\\
\;\;\;\;y \cdot \left(z \cdot x - j \cdot i\right)\\
\mathbf{elif}\;j \leq 1.06 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if j < -4.2999999999999997e-74 or 1.0599999999999999e-32 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -4.2999999999999997e-74 < j < 6.9999999999999999e-236 or 4.0000000000000002e-141 < j < 1.0599999999999999e-32Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1%
Applied rewrites39.1%
if 6.9999999999999999e-236 < j < 4.0000000000000002e-141Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in a around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.2%
Applied rewrites36.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* y (- (* z x) (* j i)))))
(if (<= y -6.2e+35)
t_1
(if (<= y 2.4e+76) (* 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 = y * ((z * x) - (j * i));
double tmp;
if (y <= -6.2e+35) {
tmp = t_1;
} else if (y <= 2.4e+76) {
tmp = c * ((a * j) - (b * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z * x) - (j * i))
if (y <= (-6.2d+35)) then
tmp = t_1
else if (y <= 2.4d+76) then
tmp = c * ((a * j) - (b * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = y * ((z * x) - (j * i));
double tmp;
if (y <= -6.2e+35) {
tmp = t_1;
} else if (y <= 2.4e+76) {
tmp = c * ((a * j) - (b * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = y * ((z * x) - (j * i)) tmp = 0 if y <= -6.2e+35: tmp = t_1 elif y <= 2.4e+76: 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(y * Float64(Float64(z * x) - Float64(j * i))) tmp = 0.0 if (y <= -6.2e+35) tmp = t_1; elseif (y <= 2.4e+76) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = y * ((z * x) - (j * i)); tmp = 0.0; if (y <= -6.2e+35) tmp = t_1; elseif (y <= 2.4e+76) tmp = c * ((a * j) - (b * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(y * N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+35], t$95$1, If[LessEqual[y, 2.4e+76], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \left(z \cdot x - j \cdot i\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+76}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -6.1999999999999997e35 or 2.4e76 < y Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in a around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.2%
Applied rewrites36.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
if -6.1999999999999997e35 < y < 2.4e76Initial program 73.5%
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 (- (* a c) (* i y)))))
(if (<= j -5.8e+57)
t_1
(if (<= j 2.4) (* y (- (* z x) (* j 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -5.8e+57) {
tmp = t_1;
} else if (j <= 2.4) {
tmp = y * ((z * x) - (j * i));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (i * y))
if (j <= (-5.8d+57)) then
tmp = t_1
else if (j <= 2.4d0) then
tmp = y * ((z * x) - (j * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -5.8e+57) {
tmp = t_1;
} else if (j <= 2.4) {
tmp = y * ((z * x) - (j * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (i * y)) tmp = 0 if j <= -5.8e+57: tmp = t_1 elif j <= 2.4: tmp = y * ((z * x) - (j * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -5.8e+57) tmp = t_1; elseif (j <= 2.4) tmp = Float64(y * Float64(Float64(z * x) - Float64(j * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -5.8e+57) tmp = t_1; elseif (j <= 2.4) tmp = y * ((z * x) - (j * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.8e+57], t$95$1, If[LessEqual[j, 2.4], N[(y * N[(N[(z * x), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -5.8 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 2.4:\\
\;\;\;\;y \cdot \left(z \cdot x - j \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -5.8000000000000003e57 or 2.3999999999999999 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -5.8000000000000003e57 < j < 2.3999999999999999Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in a around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.2%
Applied rewrites36.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* i y)))))
(if (<= j -4.3e-74)
t_1
(if (<= j 6.5e-63) (* z (* -1.0 (* 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 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 6.5e-63) {
tmp = z * (-1.0 * (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (i * y))
if (j <= (-4.3d-74)) then
tmp = t_1
else if (j <= 6.5d-63) then
tmp = z * ((-1.0d0) * (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -4.3e-74) {
tmp = t_1;
} else if (j <= 6.5e-63) {
tmp = z * (-1.0 * (b * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (i * y)) tmp = 0 if j <= -4.3e-74: tmp = t_1 elif j <= 6.5e-63: tmp = z * (-1.0 * (b * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -4.3e-74) tmp = t_1; elseif (j <= 6.5e-63) tmp = Float64(z * Float64(-1.0 * Float64(b * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -4.3e-74) tmp = t_1; elseif (j <= 6.5e-63) tmp = z * (-1.0 * (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.3e-74], t$95$1, If[LessEqual[j, 6.5e-63], N[(z * N[(-1.0 * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 6.5 \cdot 10^{-63}:\\
\;\;\;\;z \cdot \left(-1 \cdot \left(b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if j < -4.2999999999999997e-74 or 6.4999999999999998e-63 < j Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if -4.2999999999999997e-74 < j < 6.4999999999999998e-63Initial program 73.5%
Taylor expanded in c around 0
lower--.f64N/A
Applied rewrites72.3%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6473.5%
lift-fma.f64N/A
Applied rewrites74.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.8%
Applied rewrites39.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.2%
Applied rewrites22.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= y -6.2e+35) (* -1.0 (* i (* j y))) (if (<= y 1.9e+248) (* c (* a j)) (* (* (- y) i) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -6.2e+35) {
tmp = -1.0 * (i * (j * y));
} else if (y <= 1.9e+248) {
tmp = c * (a * j);
} else {
tmp = (-y * i) * j;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-6.2d+35)) then
tmp = (-1.0d0) * (i * (j * y))
else if (y <= 1.9d+248) then
tmp = c * (a * j)
else
tmp = (-y * i) * j
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -6.2e+35) {
tmp = -1.0 * (i * (j * y));
} else if (y <= 1.9e+248) {
tmp = c * (a * j);
} else {
tmp = (-y * i) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -6.2e+35: tmp = -1.0 * (i * (j * y)) elif y <= 1.9e+248: tmp = c * (a * j) else: tmp = (-y * i) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -6.2e+35) tmp = Float64(-1.0 * Float64(i * Float64(j * y))); elseif (y <= 1.9e+248) tmp = Float64(c * Float64(a * j)); else tmp = Float64(Float64(Float64(-y) * i) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -6.2e+35) tmp = -1.0 * (i * (j * y)); elseif (y <= 1.9e+248) tmp = c * (a * j); else tmp = (-y * i) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -6.2e+35], N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+248], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+35}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+248}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\end{array}
if y < -6.1999999999999997e35Initial program 73.5%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if -6.1999999999999997e35 < y < 1.9e248Initial program 73.5%
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-*.f6422.5%
Applied rewrites22.5%
if 1.9e248 < y Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.7%
Applied rewrites21.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6421.7%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6421.7%
Applied rewrites21.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* (- y) i) j))) (if (<= y -6.2e+35) t_1 (if (<= y 1.9e+248) (* c (* a j)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-y * i) * j;
double tmp;
if (y <= -6.2e+35) {
tmp = t_1;
} else if (y <= 1.9e+248) {
tmp = c * (a * j);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (-y * i) * j
if (y <= (-6.2d+35)) then
tmp = t_1
else if (y <= 1.9d+248) then
tmp = c * (a * j)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-y * i) * j;
double tmp;
if (y <= -6.2e+35) {
tmp = t_1;
} else if (y <= 1.9e+248) {
tmp = c * (a * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-y * i) * j tmp = 0 if y <= -6.2e+35: tmp = t_1 elif y <= 1.9e+248: tmp = c * (a * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-y) * i) * j) tmp = 0.0 if (y <= -6.2e+35) tmp = t_1; elseif (y <= 1.9e+248) tmp = Float64(c * Float64(a * j)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-y * i) * j; tmp = 0.0; if (y <= -6.2e+35) tmp = t_1; elseif (y <= 1.9e+248) tmp = c * (a * j); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[y, -6.2e+35], t$95$1, If[LessEqual[y, 1.9e+248], N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(\left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+248}:\\
\;\;\;\;c \cdot \left(a \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -6.1999999999999997e35 or 1.9e248 < y Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.7%
Applied rewrites21.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6421.7%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6421.7%
Applied rewrites21.7%
if -6.1999999999999997e35 < y < 1.9e248Initial program 73.5%
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-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= y -4.6e-130) (* a (* c j)) (* j (* a c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -4.6e-130) {
tmp = a * (c * j);
} else {
tmp = j * (a * c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-4.6d-130)) then
tmp = a * (c * j)
else
tmp = j * (a * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -4.6e-130) {
tmp = a * (c * j);
} else {
tmp = j * (a * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -4.6e-130: tmp = a * (c * j) else: tmp = j * (a * c) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -4.6e-130) tmp = Float64(a * Float64(c * j)); else tmp = Float64(j * Float64(a * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -4.6e-130) tmp = a * (c * j); else tmp = j * (a * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -4.6e-130], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-130}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\end{array}
if y < -4.6000000000000002e-130Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.4%
Applied rewrites22.4%
if -4.6000000000000002e-130 < y Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around 0
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (* c (* a j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return c * (a * j);
}
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 = c * (a * j)
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 c * (a * j);
}
def code(x, y, z, t, a, b, c, i, j): return c * (a * j)
function code(x, y, z, t, a, b, c, i, j) return Float64(c * Float64(a * j)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = c * (a * j); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision]
c \cdot \left(a \cdot j\right)
Initial program 73.5%
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-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* c j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (c * j);
}
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 = a * (c * j)
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 a * (c * j);
}
def code(x, y, z, t, a, b, c, i, j): return a * (c * j)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(c * j)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (c * j); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]
a \cdot \left(c \cdot j\right)
Initial program 73.5%
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.4%
Applied rewrites60.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.4%
Applied rewrites22.4%
herbie shell --seed 2025212
(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)))))