
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y))))
(if (<=
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j t_1))
INFINITY)
(fma (- (* z y) (* a t)) x (fma (- (* i a) (* c z)) b (* t_1 j)))
(* z (- (* x y) (* b c))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) - (i * y);
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * t_1)) <= ((double) INFINITY)) {
tmp = fma(((z * y) - (a * t)), x, fma(((i * a) - (c * z)), b, (t_1 * j)));
} else {
tmp = z * ((x * y) - (b * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) - Float64(i * y)) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * t_1)) <= Inf) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, fma(Float64(Float64(i * a) - Float64(c * z)), b, Float64(t_1 * j))); else tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * t$95$1), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$1 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot a - c \cdot z, b, t\_1 \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 73.7%
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 rewrites76.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 73.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9%
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y)))
(t_2 (- (* a i) (* c z)))
(t_3 (fma b t_2 (* j t_1))))
(if (<= b -3.8e+212)
(* b t_2)
(if (<= b -1.85e+21)
t_3
(if (<= b 3.35e+47) (fma j t_1 (* x (- (* y z) (* a 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 = (c * t) - (i * y);
double t_2 = (a * i) - (c * z);
double t_3 = fma(b, t_2, (j * t_1));
double tmp;
if (b <= -3.8e+212) {
tmp = b * t_2;
} else if (b <= -1.85e+21) {
tmp = t_3;
} else if (b <= 3.35e+47) {
tmp = fma(j, t_1, (x * ((y * z) - (a * t))));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) - Float64(i * y)) t_2 = Float64(Float64(a * i) - Float64(c * z)) t_3 = fma(b, t_2, Float64(j * t_1)) tmp = 0.0 if (b <= -3.8e+212) tmp = Float64(b * t_2); elseif (b <= -1.85e+21) tmp = t_3; elseif (b <= 3.35e+47) tmp = fma(j, t_1, Float64(x * Float64(Float64(y * z) - Float64(a * t)))); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * t$95$2 + N[(j * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.8e+212], N[(b * t$95$2), $MachinePrecision], If[LessEqual[b, -1.85e+21], t$95$3, If[LessEqual[b, 3.35e+47], N[(j * t$95$1 + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
t_2 := a \cdot i - c \cdot z\\
t_3 := \mathsf{fma}\left(b, t\_2, j \cdot t\_1\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+212}:\\
\;\;\;\;b \cdot t\_2\\
\mathbf{elif}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_1, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
if b < -3.79999999999999988e212Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -3.79999999999999988e212 < b < -1.85e21 or 3.34999999999999986e47 < b Initial program 73.7%
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 rewrites76.7%
Taylor expanded in x 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-*.f6461.3%
Applied rewrites61.3%
if -1.85e21 < b < 3.34999999999999986e47Initial program 73.7%
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-*.f6459.9%
Applied rewrites59.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (* j t) c (fma (* j (- y)) i (* b (- (* a i) (* c z)))))))
(if (<= b -1.85e+21)
t_1
(if (<= b 3.35e+47)
(fma j (- (* c t) (* 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 = fma((j * t), c, fma((j * -y), i, (b * ((a * i) - (c * z)))));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 3.35e+47) {
tmp = fma(j, ((c * t) - (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 = fma(Float64(j * t), c, fma(Float64(j * Float64(-y)), i, Float64(b * Float64(Float64(a * i) - Float64(c * z))))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_1; elseif (b <= 3.35e+47) tmp = fma(j, Float64(Float64(c * t) - 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[(N[(j * t), $MachinePrecision] * c + N[(N[(j * (-y)), $MachinePrecision] * i + N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$1, If[LessEqual[b, 3.35e+47], N[(j * N[(N[(c * t), $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 := \mathsf{fma}\left(j \cdot t, c, \mathsf{fma}\left(j \cdot \left(-y\right), i, b \cdot \left(a \cdot i - c \cdot z\right)\right)\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t - i \cdot y, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.85e21 or 3.34999999999999986e47 < b Initial program 73.7%
Applied rewrites76.1%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6461.1%
Applied rewrites61.1%
if -1.85e21 < b < 3.34999999999999986e47Initial program 73.7%
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-*.f6459.9%
Applied rewrites59.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c t) (* i y))))
(t_2 (- (* a i) (* c z)))
(t_3 (fma b t_2 t_1)))
(if (<= b -3.8e+212)
(* b t_2)
(if (<= b -5.1e+45)
t_3
(if (<= b -1.55e-60)
(fma (- (* z y) (* a t)) x (* -1.0 (* b (* c z))))
(if (<= b 5e-178)
(+ (* x (* y z)) t_1)
(if (<= b 3.9e+18) (* x (- (* y z) (* a 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 = j * ((c * t) - (i * y));
double t_2 = (a * i) - (c * z);
double t_3 = fma(b, t_2, t_1);
double tmp;
if (b <= -3.8e+212) {
tmp = b * t_2;
} else if (b <= -5.1e+45) {
tmp = t_3;
} else if (b <= -1.55e-60) {
tmp = fma(((z * y) - (a * t)), x, (-1.0 * (b * (c * z))));
} else if (b <= 5e-178) {
tmp = (x * (y * z)) + t_1;
} else if (b <= 3.9e+18) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * t) - Float64(i * y))) t_2 = Float64(Float64(a * i) - Float64(c * z)) t_3 = fma(b, t_2, t_1) tmp = 0.0 if (b <= -3.8e+212) tmp = Float64(b * t_2); elseif (b <= -5.1e+45) tmp = t_3; elseif (b <= -1.55e-60) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(-1.0 * Float64(b * Float64(c * z)))); elseif (b <= 5e-178) tmp = Float64(Float64(x * Float64(y * z)) + t_1); elseif (b <= 3.9e+18) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); 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 * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * t$95$2 + t$95$1), $MachinePrecision]}, If[LessEqual[b, -3.8e+212], N[(b * t$95$2), $MachinePrecision], If[LessEqual[b, -5.1e+45], t$95$3, If[LessEqual[b, -1.55e-60], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-178], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 3.9e+18], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
t_2 := a \cdot i - c \cdot z\\
t_3 := \mathsf{fma}\left(b, t\_2, t\_1\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+212}:\\
\;\;\;\;b \cdot t\_2\\
\mathbf{elif}\;b \leq -5.1 \cdot 10^{+45}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + t\_1\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
if b < -3.79999999999999988e212Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -3.79999999999999988e212 < b < -5.0999999999999997e45 or 3.9e18 < b Initial program 73.7%
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 rewrites76.7%
Taylor expanded in x 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-*.f6461.3%
Applied rewrites61.3%
if -5.0999999999999997e45 < b < -1.54999999999999994e-60Initial program 73.7%
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 rewrites76.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.7%
Applied rewrites49.7%
if -1.54999999999999994e-60 < b < 4.99999999999999976e-178Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.1%
Applied rewrites49.1%
if 4.99999999999999976e-178 < b < 3.9e18Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c t) (* i y))))
(t_2 (* b (- (* a i) (* c z))))
(t_3 (* -1.0 (* b (* c z)))))
(if (<= b -1.55e+32)
t_2
(if (<= b -1.55e-60)
(fma (- (* z y) (* a t)) x t_3)
(if (<= b 5e-178)
(+ (* x (* y z)) t_1)
(if (<= b 3.9e+18)
(* x (- (* y z) (* a t)))
(if (<= b 1.5e+134) (+ t_3 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 * t) - (i * y));
double t_2 = b * ((a * i) - (c * z));
double t_3 = -1.0 * (b * (c * z));
double tmp;
if (b <= -1.55e+32) {
tmp = t_2;
} else if (b <= -1.55e-60) {
tmp = fma(((z * y) - (a * t)), x, t_3);
} else if (b <= 5e-178) {
tmp = (x * (y * z)) + t_1;
} else if (b <= 3.9e+18) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 1.5e+134) {
tmp = t_3 + 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 * t) - Float64(i * y))) t_2 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) t_3 = Float64(-1.0 * Float64(b * Float64(c * z))) tmp = 0.0 if (b <= -1.55e+32) tmp = t_2; elseif (b <= -1.55e-60) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, t_3); elseif (b <= 5e-178) tmp = Float64(Float64(x * Float64(y * z)) + t_1); elseif (b <= 3.9e+18) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 1.5e+134) tmp = Float64(t_3 + 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 * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+32], t$95$2, If[LessEqual[b, -1.55e-60], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + t$95$3), $MachinePrecision], If[LessEqual[b, 5e-178], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 3.9e+18], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+134], N[(t$95$3 + t$95$1), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
t_2 := b \cdot \left(a \cdot i - c \cdot z\right)\\
t_3 := -1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, t\_3\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + t\_1\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+134}:\\
\;\;\;\;t\_3 + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if b < -1.54999999999999997e32 or 1.49999999999999998e134 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.54999999999999997e32 < b < -1.54999999999999994e-60Initial program 73.7%
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 rewrites76.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.7%
Applied rewrites49.7%
if -1.54999999999999994e-60 < b < 4.99999999999999976e-178Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.1%
Applied rewrites49.1%
if 4.99999999999999976e-178 < b < 3.9e18Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if 3.9e18 < b < 1.49999999999999998e134Initial program 73.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.9%
Applied rewrites49.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -1.55e+32)
t_1
(if (<= b -1.55e-60)
(fma (- (* z y) (* a t)) x (* -1.0 (* b (* c z))))
(if (<= b 5e-178)
(+ (* x (* y z)) (* j (- (* c t) (* i y))))
(if (<= b 1750000000.0)
(* x (- (* y z) (* a t)))
(if (<= b 4.2e+88) (* j (fma -1.0 (* i y) (* c 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.55e+32) {
tmp = t_1;
} else if (b <= -1.55e-60) {
tmp = fma(((z * y) - (a * t)), x, (-1.0 * (b * (c * z))));
} else if (b <= 5e-178) {
tmp = (x * (y * z)) + (j * ((c * t) - (i * y)));
} else if (b <= 1750000000.0) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 4.2e+88) {
tmp = j * fma(-1.0, (i * y), (c * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.55e+32) tmp = t_1; elseif (b <= -1.55e-60) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(-1.0 * Float64(b * Float64(c * z)))); elseif (b <= 5e-178) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); elseif (b <= 1750000000.0) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 4.2e+88) tmp = Float64(j * fma(-1.0, Float64(i * y), Float64(c * 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[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+32], t$95$1, If[LessEqual[b, -1.55e-60], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-178], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1750000000.0], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+88], N[(j * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{elif}\;b \leq 1750000000:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;j \cdot \mathsf{fma}\left(-1, i \cdot y, c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.54999999999999997e32 or 4.2e88 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.54999999999999997e32 < b < -1.54999999999999994e-60Initial program 73.7%
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 rewrites76.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.7%
Applied rewrites49.7%
if -1.54999999999999994e-60 < b < 4.99999999999999976e-178Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.1%
Applied rewrites49.1%
if 4.99999999999999976e-178 < b < 1.75e9Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if 1.75e9 < b < 4.2e88Initial program 73.7%
Applied rewrites76.1%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.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 (* x (- (* y z) (* a t)))) (t_2 (* b (- (* a i) (* c z)))))
(if (<= b -1.85e+21)
t_2
(if (<= b -3.2e-88)
t_1
(if (<= b -5.2e-167)
(+ (* a (* b i)) (* j (- (* c t) (* i y))))
(if (<= b 2.85e-210)
(* (- (* x z) (* j i)) y)
(if (<= b 1750000000.0)
t_1
(if (<= b 4.2e+88) (* j (fma -1.0 (* i y) (* c t))) t_2))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_2;
} else if (b <= -3.2e-88) {
tmp = t_1;
} else if (b <= -5.2e-167) {
tmp = (a * (b * i)) + (j * ((c * t) - (i * y)));
} else if (b <= 2.85e-210) {
tmp = ((x * z) - (j * i)) * y;
} else if (b <= 1750000000.0) {
tmp = t_1;
} else if (b <= 4.2e+88) {
tmp = j * fma(-1.0, (i * y), (c * t));
} else {
tmp = t_2;
}
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 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_2; elseif (b <= -3.2e-88) tmp = t_1; elseif (b <= -5.2e-167) tmp = Float64(Float64(a * Float64(b * i)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); elseif (b <= 2.85e-210) tmp = Float64(Float64(Float64(x * z) - Float64(j * i)) * y); elseif (b <= 1750000000.0) tmp = t_1; elseif (b <= 4.2e+88) tmp = Float64(j * fma(-1.0, Float64(i * y), Float64(c * t))); else tmp = t_2; 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[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$2, If[LessEqual[b, -3.2e-88], t$95$1, If[LessEqual[b, -5.2e-167], N[(N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.85e-210], N[(N[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 1750000000.0], t$95$1, If[LessEqual[b, 4.2e+88], N[(j * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-167}:\\
\;\;\;\;a \cdot \left(b \cdot i\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{elif}\;b \leq 2.85 \cdot 10^{-210}:\\
\;\;\;\;\left(x \cdot z - j \cdot i\right) \cdot y\\
\mathbf{elif}\;b \leq 1750000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;j \cdot \mathsf{fma}\left(-1, i \cdot y, c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if b < -1.85e21 or 4.2e88 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.85e21 < b < -3.20000000000000012e-88 or 2.84999999999999985e-210 < b < 1.75e9Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if -3.20000000000000012e-88 < b < -5.1999999999999998e-167Initial program 73.7%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6450.0%
Applied rewrites50.0%
if -5.1999999999999998e-167 < b < 2.84999999999999985e-210Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.2%
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity39.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.2%
Applied rewrites39.2%
if 1.75e9 < b < 4.2e88Initial program 73.7%
Applied rewrites76.1%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.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 (* b (- (* a i) (* c z)))))
(if (<= b -1.8e+21)
t_1
(if (<= b -3.4e-37)
(* (- (* j c) (* x a)) t)
(if (<= b 5e-178)
(+ (* x (* y z)) (* j (- (* c t) (* i y))))
(if (<= b 1750000000.0)
(* x (- (* y z) (* a t)))
(if (<= b 4.2e+88) (* j (fma -1.0 (* i y) (* c 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.8e+21) {
tmp = t_1;
} else if (b <= -3.4e-37) {
tmp = ((j * c) - (x * a)) * t;
} else if (b <= 5e-178) {
tmp = (x * (y * z)) + (j * ((c * t) - (i * y)));
} else if (b <= 1750000000.0) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 4.2e+88) {
tmp = j * fma(-1.0, (i * y), (c * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.8e+21) tmp = t_1; elseif (b <= -3.4e-37) tmp = Float64(Float64(Float64(j * c) - Float64(x * a)) * t); elseif (b <= 5e-178) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); elseif (b <= 1750000000.0) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 4.2e+88) tmp = Float64(j * fma(-1.0, Float64(i * y), Float64(c * 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[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.8e+21], t$95$1, If[LessEqual[b, -3.4e-37], N[(N[(N[(j * c), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 5e-178], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1750000000.0], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+88], N[(j * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-37}:\\
\;\;\;\;\left(j \cdot c - x \cdot a\right) \cdot t\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{elif}\;b \leq 1750000000:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;j \cdot \mathsf{fma}\left(-1, i \cdot y, c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.8e21 or 4.2e88 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.8e21 < b < -3.40000000000000018e-37Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
Applied rewrites38.5%
if -3.40000000000000018e-37 < b < 4.99999999999999976e-178Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.1%
Applied rewrites49.1%
if 4.99999999999999976e-178 < b < 1.75e9Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if 1.75e9 < b < 4.2e88Initial program 73.7%
Applied rewrites76.1%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.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 (* b (- (* a i) (* c z)))))
(if (<= b -1.85e+21)
t_1
(if (<= b -8.5e-180)
(* x (- (* y z) (* a t)))
(if (<= b 5e-88)
(* (- (* x z) (* j i)) y)
(if (<= b 3.35e+47) (* (- (* j c) (* x 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= -8.5e-180) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 5e-88) {
tmp = ((x * z) - (j * i)) * y;
} else if (b <= 3.35e+47) {
tmp = ((j * c) - (x * a)) * t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((a * i) - (c * z))
if (b <= (-1.85d+21)) then
tmp = t_1
else if (b <= (-8.5d-180)) then
tmp = x * ((y * z) - (a * t))
else if (b <= 5d-88) then
tmp = ((x * z) - (j * i)) * y
else if (b <= 3.35d+47) then
tmp = ((j * c) - (x * a)) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= -8.5e-180) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 5e-88) {
tmp = ((x * z) - (j * i)) * y;
} else if (b <= 3.35e+47) {
tmp = ((j * c) - (x * a)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (c * z)) tmp = 0 if b <= -1.85e+21: tmp = t_1 elif b <= -8.5e-180: tmp = x * ((y * z) - (a * t)) elif b <= 5e-88: tmp = ((x * z) - (j * i)) * y elif b <= 3.35e+47: tmp = ((j * c) - (x * 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(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_1; elseif (b <= -8.5e-180) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 5e-88) tmp = Float64(Float64(Float64(x * z) - Float64(j * i)) * y); elseif (b <= 3.35e+47) tmp = Float64(Float64(Float64(j * c) - Float64(x * a)) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (c * z)); tmp = 0.0; if (b <= -1.85e+21) tmp = t_1; elseif (b <= -8.5e-180) tmp = x * ((y * z) - (a * t)); elseif (b <= 5e-88) tmp = ((x * z) - (j * i)) * y; elseif (b <= 3.35e+47) tmp = ((j * c) - (x * a)) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$1, If[LessEqual[b, -8.5e-180], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-88], N[(N[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 3.35e+47], N[(N[(N[(j * c), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -8.5 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-88}:\\
\;\;\;\;\left(x \cdot z - j \cdot i\right) \cdot y\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;\left(j \cdot c - x \cdot a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.85e21 or 3.34999999999999986e47 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.85e21 < b < -8.4999999999999993e-180Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if -8.4999999999999993e-180 < b < 5.00000000000000009e-88Initial program 73.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.2%
Applied rewrites39.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.2%
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity39.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.2%
Applied rewrites39.2%
if 5.00000000000000009e-88 < b < 3.34999999999999986e47Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
Applied rewrites38.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -1.85e+21)
t_1
(if (<= b 1750000000.0)
(* x (- (* y z) (* a t)))
(if (<= b 4.2e+88) (* j (fma -1.0 (* i y) (* c 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 1750000000.0) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 4.2e+88) {
tmp = j * fma(-1.0, (i * y), (c * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_1; elseif (b <= 1750000000.0) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 4.2e+88) tmp = Float64(j * fma(-1.0, Float64(i * y), Float64(c * 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[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$1, If[LessEqual[b, 1750000000.0], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+88], N[(j * N[(-1.0 * N[(i * y), $MachinePrecision] + N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1750000000:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;j \cdot \mathsf{fma}\left(-1, i \cdot y, c \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.85e21 or 4.2e88 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.85e21 < b < 1.75e9Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if 1.75e9 < b < 4.2e88Initial program 73.7%
Applied rewrites76.1%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.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 (* b (- (* a i) (* c z)))))
(if (<= b -1.85e+21)
t_1
(if (<= b 1.18e-85)
(* x (- (* y z) (* a t)))
(if (<= b 3.35e+47) (* (- (* j c) (* x 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 1.18e-85) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 3.35e+47) {
tmp = ((j * c) - (x * a)) * t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((a * i) - (c * z))
if (b <= (-1.85d+21)) then
tmp = t_1
else if (b <= 1.18d-85) then
tmp = x * ((y * z) - (a * t))
else if (b <= 3.35d+47) then
tmp = ((j * c) - (x * a)) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 1.18e-85) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 3.35e+47) {
tmp = ((j * c) - (x * a)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (c * z)) tmp = 0 if b <= -1.85e+21: tmp = t_1 elif b <= 1.18e-85: tmp = x * ((y * z) - (a * t)) elif b <= 3.35e+47: tmp = ((j * c) - (x * 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(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_1; elseif (b <= 1.18e-85) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 3.35e+47) tmp = Float64(Float64(Float64(j * c) - Float64(x * a)) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (c * z)); tmp = 0.0; if (b <= -1.85e+21) tmp = t_1; elseif (b <= 1.18e-85) tmp = x * ((y * z) - (a * t)); elseif (b <= 3.35e+47) tmp = ((j * c) - (x * a)) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$1, If[LessEqual[b, 1.18e-85], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.35e+47], N[(N[(N[(j * c), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.18 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;\left(j \cdot c - x \cdot a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.85e21 or 3.34999999999999986e47 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.85e21 < b < 1.18e-85Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
if 1.18e-85 < b < 3.34999999999999986e47Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-fma.f64N/A
+-commutativeN/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.5%
Applied rewrites38.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -1.85e+21)
t_1
(if (<= b 3.35e+47) (* 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 * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 3.35e+47) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((a * i) - (c * z))
if (b <= (-1.85d+21)) then
tmp = t_1
else if (b <= 3.35d+47) then
tmp = x * ((y * z) - (a * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.85e+21) {
tmp = t_1;
} else if (b <= 3.35e+47) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (c * z)) tmp = 0 if b <= -1.85e+21: tmp = t_1 elif b <= 3.35e+47: tmp = 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(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.85e+21) tmp = t_1; elseif (b <= 3.35e+47) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (c * z)); tmp = 0.0; if (b <= -1.85e+21) tmp = t_1; elseif (b <= 3.35e+47) tmp = x * ((y * z) - (a * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.85e+21], t$95$1, If[LessEqual[b, 3.35e+47], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+47}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.85e21 or 3.34999999999999986e47 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -1.85e21 < b < 3.34999999999999986e47Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -3.2e+20)
t_1
(if (<= b -5.8e-38)
(* -1.0 (* a (* t x)))
(if (<= b 2.9e-148)
(* x (* y z))
(if (<= b 1.12e+21) (* t (* -1.0 (* a 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 = b * ((a * i) - (c * z));
double tmp;
if (b <= -3.2e+20) {
tmp = t_1;
} else if (b <= -5.8e-38) {
tmp = -1.0 * (a * (t * x));
} else if (b <= 2.9e-148) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = t * (-1.0 * (a * x));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((a * i) - (c * z))
if (b <= (-3.2d+20)) then
tmp = t_1
else if (b <= (-5.8d-38)) then
tmp = (-1.0d0) * (a * (t * x))
else if (b <= 2.9d-148) then
tmp = x * (y * z)
else if (b <= 1.12d+21) then
tmp = t * ((-1.0d0) * (a * x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -3.2e+20) {
tmp = t_1;
} else if (b <= -5.8e-38) {
tmp = -1.0 * (a * (t * x));
} else if (b <= 2.9e-148) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = t * (-1.0 * (a * x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (c * z)) tmp = 0 if b <= -3.2e+20: tmp = t_1 elif b <= -5.8e-38: tmp = -1.0 * (a * (t * x)) elif b <= 2.9e-148: tmp = x * (y * z) elif b <= 1.12e+21: tmp = t * (-1.0 * (a * x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -3.2e+20) tmp = t_1; elseif (b <= -5.8e-38) tmp = Float64(-1.0 * Float64(a * Float64(t * x))); elseif (b <= 2.9e-148) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.12e+21) tmp = Float64(t * Float64(-1.0 * Float64(a * x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (c * z)); tmp = 0.0; if (b <= -3.2e+20) tmp = t_1; elseif (b <= -5.8e-38) tmp = -1.0 * (a * (t * x)); elseif (b <= 2.9e-148) tmp = x * (y * z); elseif (b <= 1.12e+21) tmp = t * (-1.0 * (a * x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+20], t$95$1, If[LessEqual[b, -5.8e-38], N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-148], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e+21], N[(t * N[(-1.0 * N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-38}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(a \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -3.2e20 or 1.12e21 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
if -3.2e20 < b < -5.79999999999999988e-38Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
if -5.79999999999999988e-38 < b < 2.8999999999999998e-148Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 2.8999999999999998e-148 < b < 1.12e21Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.55e+32)
(* a (* b i))
(if (<= b 2.9e-148)
(* x (* y z))
(if (<= b 1.12e+21) (* t (* -1.0 (* a x))) (* (* i a) b)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 2.9e-148) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = t * (-1.0 * (a * x));
} else {
tmp = (i * a) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.55d+32)) then
tmp = a * (b * i)
else if (b <= 2.9d-148) then
tmp = x * (y * z)
else if (b <= 1.12d+21) then
tmp = t * ((-1.0d0) * (a * x))
else
tmp = (i * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 2.9e-148) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = t * (-1.0 * (a * x));
} else {
tmp = (i * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.55e+32: tmp = a * (b * i) elif b <= 2.9e-148: tmp = x * (y * z) elif b <= 1.12e+21: tmp = t * (-1.0 * (a * x)) else: tmp = (i * a) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.55e+32) tmp = Float64(a * Float64(b * i)); elseif (b <= 2.9e-148) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.12e+21) tmp = Float64(t * Float64(-1.0 * Float64(a * x))); else tmp = Float64(Float64(i * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.55e+32) tmp = a * (b * i); elseif (b <= 2.9e-148) tmp = x * (y * z); elseif (b <= 1.12e+21) tmp = t * (-1.0 * (a * x)); else tmp = (i * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.55e+32], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-148], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e+21], N[(t * N[(-1.0 * N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(a \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\end{array}
if b < -1.54999999999999997e32Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
if -1.54999999999999997e32 < b < 2.8999999999999998e-148Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 2.8999999999999998e-148 < b < 1.12e21Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 1.12e21 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.55e+32)
(* a (* b i))
(if (<= b 1.52e-87)
(* x (* y z))
(if (<= b 1.12e+21) (* -1.0 (* a (* t x))) (* (* i a) b)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 1.52e-87) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = -1.0 * (a * (t * x));
} else {
tmp = (i * a) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.55d+32)) then
tmp = a * (b * i)
else if (b <= 1.52d-87) then
tmp = x * (y * z)
else if (b <= 1.12d+21) then
tmp = (-1.0d0) * (a * (t * x))
else
tmp = (i * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 1.52e-87) {
tmp = x * (y * z);
} else if (b <= 1.12e+21) {
tmp = -1.0 * (a * (t * x));
} else {
tmp = (i * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.55e+32: tmp = a * (b * i) elif b <= 1.52e-87: tmp = x * (y * z) elif b <= 1.12e+21: tmp = -1.0 * (a * (t * x)) else: tmp = (i * a) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.55e+32) tmp = Float64(a * Float64(b * i)); elseif (b <= 1.52e-87) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.12e+21) tmp = Float64(-1.0 * Float64(a * Float64(t * x))); else tmp = Float64(Float64(i * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.55e+32) tmp = a * (b * i); elseif (b <= 1.52e-87) tmp = x * (y * z); elseif (b <= 1.12e+21) tmp = -1.0 * (a * (t * x)); else tmp = (i * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.55e+32], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.52e-87], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e+21], N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 1.52 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+21}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\end{array}
if b < -1.54999999999999997e32Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
if -1.54999999999999997e32 < b < 1.52000000000000004e-87Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 1.52000000000000004e-87 < b < 1.12e21Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
if 1.12e21 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.55e+32)
(* a (* b i))
(if (<= b 5e-85)
(* x (* y z))
(if (<= b 1.82e+84) (* t (* c j)) (* (* i a) b)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 5e-85) {
tmp = x * (y * z);
} else if (b <= 1.82e+84) {
tmp = t * (c * j);
} else {
tmp = (i * a) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.55d+32)) then
tmp = a * (b * i)
else if (b <= 5d-85) then
tmp = x * (y * z)
else if (b <= 1.82d+84) then
tmp = t * (c * j)
else
tmp = (i * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 5e-85) {
tmp = x * (y * z);
} else if (b <= 1.82e+84) {
tmp = t * (c * j);
} else {
tmp = (i * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.55e+32: tmp = a * (b * i) elif b <= 5e-85: tmp = x * (y * z) elif b <= 1.82e+84: tmp = t * (c * j) else: tmp = (i * a) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.55e+32) tmp = Float64(a * Float64(b * i)); elseif (b <= 5e-85) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.82e+84) tmp = Float64(t * Float64(c * j)); else tmp = Float64(Float64(i * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.55e+32) tmp = a * (b * i); elseif (b <= 5e-85) tmp = x * (y * z); elseif (b <= 1.82e+84) tmp = t * (c * j); else tmp = (i * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.55e+32], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-85], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.82e+84], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.82 \cdot 10^{+84}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\end{array}
if b < -1.54999999999999997e32Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
if -1.54999999999999997e32 < b < 5.0000000000000002e-85Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 5.0000000000000002e-85 < b < 1.8200000000000001e84Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around 0
lower-*.f6422.4%
Applied rewrites22.4%
if 1.8200000000000001e84 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.55e+32)
(* a (* b i))
(if (<= b 5e-85)
(* x (* y z))
(if (<= b 1.82e+84) (* c (* j t)) (* (* i a) b)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 5e-85) {
tmp = x * (y * z);
} else if (b <= 1.82e+84) {
tmp = c * (j * t);
} else {
tmp = (i * a) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.55d+32)) then
tmp = a * (b * i)
else if (b <= 5d-85) then
tmp = x * (y * z)
else if (b <= 1.82d+84) then
tmp = c * (j * t)
else
tmp = (i * a) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.55e+32) {
tmp = a * (b * i);
} else if (b <= 5e-85) {
tmp = x * (y * z);
} else if (b <= 1.82e+84) {
tmp = c * (j * t);
} else {
tmp = (i * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.55e+32: tmp = a * (b * i) elif b <= 5e-85: tmp = x * (y * z) elif b <= 1.82e+84: tmp = c * (j * t) else: tmp = (i * a) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.55e+32) tmp = Float64(a * Float64(b * i)); elseif (b <= 5e-85) tmp = Float64(x * Float64(y * z)); elseif (b <= 1.82e+84) tmp = Float64(c * Float64(j * t)); else tmp = Float64(Float64(i * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.55e+32) tmp = a * (b * i); elseif (b <= 5e-85) tmp = x * (y * z); elseif (b <= 1.82e+84) tmp = c * (j * t); else tmp = (i * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.55e+32], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e-85], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.82e+84], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;b \leq 1.82 \cdot 10^{+84}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\end{array}
if b < -1.54999999999999997e32Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
if -1.54999999999999997e32 < b < 5.0000000000000002e-85Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.2%
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6421.8%
Applied rewrites21.8%
if 5.0000000000000002e-85 < b < 1.8200000000000001e84Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
if 1.8200000000000001e84 < b Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* b i)))) (if (<= i -7.5e-107) t_1 (if (<= i 1.2e+106) (* c (* j 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 = a * (b * i);
double tmp;
if (i <= -7.5e-107) {
tmp = t_1;
} else if (i <= 1.2e+106) {
tmp = c * (j * t);
} 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 = a * (b * i)
if (i <= (-7.5d-107)) then
tmp = t_1
else if (i <= 1.2d+106) then
tmp = c * (j * t)
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 = a * (b * i);
double tmp;
if (i <= -7.5e-107) {
tmp = t_1;
} else if (i <= 1.2e+106) {
tmp = c * (j * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (b * i) tmp = 0 if i <= -7.5e-107: tmp = t_1 elif i <= 1.2e+106: tmp = c * (j * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(b * i)) tmp = 0.0 if (i <= -7.5e-107) tmp = t_1; elseif (i <= 1.2e+106) tmp = Float64(c * Float64(j * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (b * i); tmp = 0.0; if (i <= -7.5e-107) tmp = t_1; elseif (i <= 1.2e+106) tmp = c * (j * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -7.5e-107], t$95$1, If[LessEqual[i, 1.2e+106], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := a \cdot \left(b \cdot i\right)\\
\mathbf{if}\;i \leq -7.5 \cdot 10^{-107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{+106}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if i < -7.50000000000000047e-107 or 1.2e106 < i Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
if -7.50000000000000047e-107 < i < 1.2e106Initial program 73.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.5%
Applied rewrites38.5%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.5%
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * 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 = a * (b * 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 a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j): return a * (b * i)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(b * i)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (b * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
a \cdot \left(b \cdot i\right)
Initial program 73.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.4%
Applied rewrites39.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6422.7%
Applied rewrites22.7%
herbie shell --seed 2025188
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))