
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y))))
(if (<=
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j t_1))
INFINITY)
(fma t_1 j (fma (- (* i a) (* c z)) b (* (- (* z y) (* a t)) x)))
(* t (fma -1.0 (* a x) (* c j))))))
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(t_1, j, fma(((i * a) - (c * z)), b, (((z * y) - (a * t)) * x)));
} else {
tmp = t * fma(-1.0, (a * x), (c * j));
}
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(t_1, j, fma(Float64(Float64(i * a) - Float64(c * z)), b, Float64(Float64(Float64(z * y) - Float64(a * t)) * x))); else tmp = Float64(t * fma(-1.0, Float64(a * x), Float64(c * j))); 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[(t$95$1 * j + N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(c * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\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(t\_1, j, \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(z \cdot y - a \cdot t\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-1, a \cdot x, c \cdot j\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.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.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))) (t_2 (fma (- y) i (* t c))))
(if (<= x -1.14e+111)
(fma j t_2 t_1)
(if (<= x 3.5e+36)
(fma t_2 j (* b (- (* a i) (* c z))))
(fma j (- (* c t) (* i y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = fma(-y, i, (t * c));
double tmp;
if (x <= -1.14e+111) {
tmp = fma(j, t_2, t_1);
} else if (x <= 3.5e+36) {
tmp = fma(t_2, j, (b * ((a * i) - (c * z))));
} else {
tmp = fma(j, ((c * t) - (i * y)), t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = fma(Float64(-y), i, Float64(t * c)) tmp = 0.0 if (x <= -1.14e+111) tmp = fma(j, t_2, t_1); elseif (x <= 3.5e+36) tmp = fma(t_2, j, Float64(b * Float64(Float64(a * i) - Float64(c * z)))); else tmp = fma(j, Float64(Float64(c * t) - Float64(i * y)), t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) * i + N[(t * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.14e+111], N[(j * t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[x, 3.5e+36], N[(t$95$2 * j + N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := \mathsf{fma}\left(-y, i, t \cdot c\right)\\
\mathbf{if}\;x \leq -1.14 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_2, t\_1\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, j, b \cdot \left(a \cdot i - c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t - i \cdot y, t\_1\right)\\
\end{array}
\end{array}
if x < -1.14e111Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.9
Applied rewrites60.9%
if -1.14e111 < x < 3.4999999999999998e36Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
if 3.4999999999999998e36 < x Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))))
(if (<= x -1.14e+111)
(fma j (fma (- y) i (* t c)) t_1)
(if (<= x 3.5e+36)
(fma (fma t c (* (- i) y)) j (* b (- (* a i) (* c z))))
(fma j (- (* c t) (* i y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double tmp;
if (x <= -1.14e+111) {
tmp = fma(j, fma(-y, i, (t * c)), t_1);
} else if (x <= 3.5e+36) {
tmp = fma(fma(t, c, (-i * y)), j, (b * ((a * i) - (c * z))));
} else {
tmp = fma(j, ((c * t) - (i * y)), t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) tmp = 0.0 if (x <= -1.14e+111) tmp = fma(j, fma(Float64(-y), i, Float64(t * c)), t_1); elseif (x <= 3.5e+36) tmp = fma(fma(t, c, Float64(Float64(-i) * y)), j, Float64(b * Float64(Float64(a * i) - Float64(c * z)))); else tmp = fma(j, Float64(Float64(c * t) - Float64(i * y)), t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.14e+111], N[(j * N[((-y) * i + N[(t * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 3.5e+36], N[(N[(t * c + N[((-i) * y), $MachinePrecision]), $MachinePrecision] * j + N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{if}\;x \leq -1.14 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(j, \mathsf{fma}\left(-y, i, t \cdot c\right), t\_1\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, c, \left(-i\right) \cdot y\right), j, b \cdot \left(a \cdot i - c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t - i \cdot y, t\_1\right)\\
\end{array}
\end{array}
if x < -1.14e111Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.9
Applied rewrites60.9%
if -1.14e111 < x < 3.4999999999999998e36Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
add-flipN/A
sub-flipN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
remove-double-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.5
Applied rewrites60.5%
if 3.4999999999999998e36 < x Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y))) (t_2 (* x (- (* y z) (* a t)))))
(if (<= x -1.14e+111)
(fma j (fma (- y) i (* t c)) t_2)
(if (<= x 3.5e+36)
(fma t_1 j (* b (- (* a i) (* c z))))
(fma j 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 = (c * t) - (i * y);
double t_2 = x * ((y * z) - (a * t));
double tmp;
if (x <= -1.14e+111) {
tmp = fma(j, fma(-y, i, (t * c)), t_2);
} else if (x <= 3.5e+36) {
tmp = fma(t_1, j, (b * ((a * i) - (c * z))));
} else {
tmp = fma(j, t_1, t_2);
}
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(x * Float64(Float64(y * z) - Float64(a * t))) tmp = 0.0 if (x <= -1.14e+111) tmp = fma(j, fma(Float64(-y), i, Float64(t * c)), t_2); elseif (x <= 3.5e+36) tmp = fma(t_1, j, Float64(b * Float64(Float64(a * i) - Float64(c * z)))); else tmp = fma(j, t_1, t_2); 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[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.14e+111], N[(j * N[((-y) * i + N[(t * c), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 3.5e+36], N[(t$95$1 * j + N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
t_2 := x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{if}\;x \leq -1.14 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(j, \mathsf{fma}\left(-y, i, t \cdot c\right), t\_2\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, j, b \cdot \left(a \cdot i - c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_1, t\_2\right)\\
\end{array}
\end{array}
if x < -1.14e111Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.9
Applied rewrites60.9%
if -1.14e111 < x < 3.4999999999999998e36Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
if 3.4999999999999998e36 < x Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* a t)))) (t_2 (- (* c t) (* i y))))
(if (<= x -2.2e+174)
(fma j (* c t) t_1)
(if (<= x 3.5e+36)
(fma t_2 j (* b (- (* a i) (* c z))))
(fma j t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (a * t));
double t_2 = (c * t) - (i * y);
double tmp;
if (x <= -2.2e+174) {
tmp = fma(j, (c * t), t_1);
} else if (x <= 3.5e+36) {
tmp = fma(t_2, j, (b * ((a * i) - (c * z))));
} else {
tmp = fma(j, t_2, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(a * t))) t_2 = Float64(Float64(c * t) - Float64(i * y)) tmp = 0.0 if (x <= -2.2e+174) tmp = fma(j, Float64(c * t), t_1); elseif (x <= 3.5e+36) tmp = fma(t_2, j, Float64(b * Float64(Float64(a * i) - Float64(c * z)))); else tmp = fma(j, t_2, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+174], N[(j * N[(c * t), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 3.5e+36], N[(t$95$2 * j + N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * t$95$2 + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\
t_2 := c \cdot t - i \cdot y\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+174}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t, t\_1\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, j, b \cdot \left(a \cdot i - c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, t\_2, t\_1\right)\\
\end{array}
\end{array}
if x < -2.2000000000000002e174Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in y around 0
lower-*.f6450.2
Applied rewrites50.2%
if -2.2000000000000002e174 < x < 3.4999999999999998e36Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
if 3.4999999999999998e36 < x Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -2.35e+129)
t_1
(if (<= b 4.5e+85)
(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 = b * ((a * i) - (c * z));
double tmp;
if (b <= -2.35e+129) {
tmp = t_1;
} else if (b <= 4.5e+85) {
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 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -2.35e+129) tmp = t_1; elseif (b <= 4.5e+85) 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[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.35e+129], t$95$1, If[LessEqual[b, 4.5e+85], 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}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -2.35 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+85}:\\
\;\;\;\;\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}
\end{array}
if b < -2.35000000000000004e129 or 4.50000000000000007e85 < b Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -2.35000000000000004e129 < b < 4.50000000000000007e85Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -9.6e+88)
(* x (- (* y z) (* a t)))
(if (<= z -1.05e-118)
(fma (- (* c t) (* i y)) j (* b (* -1.0 (* c z))))
(if (<= z 1.35e+143)
(fma (fma (- y) i (* t c)) j (* b (* a i)))
(* 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 tmp;
if (z <= -9.6e+88) {
tmp = x * ((y * z) - (a * t));
} else if (z <= -1.05e-118) {
tmp = fma(((c * t) - (i * y)), j, (b * (-1.0 * (c * z))));
} else if (z <= 1.35e+143) {
tmp = fma(fma(-y, i, (t * c)), j, (b * (a * i)));
} else {
tmp = z * ((x * y) - (b * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -9.6e+88) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (z <= -1.05e-118) tmp = fma(Float64(Float64(c * t) - Float64(i * y)), j, Float64(b * Float64(-1.0 * Float64(c * z)))); elseif (z <= 1.35e+143) tmp = fma(fma(Float64(-y), i, Float64(t * c)), j, Float64(b * Float64(a * i))); 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_] := If[LessEqual[z, -9.6e+88], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e-118], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(b * N[(-1.0 * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+143], N[(N[((-y) * i + N[(t * c), $MachinePrecision]), $MachinePrecision] * j + N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.6 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-118}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, b \cdot \left(-1 \cdot \left(c \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, t \cdot c\right), j, b \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\end{array}
\end{array}
if z < -9.5999999999999996e88Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -9.5999999999999996e88 < z < -1.05e-118Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
if -1.05e-118 < z < 1.3500000000000001e143Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in z around 0
lower-*.f6450.4
Applied rewrites50.4%
if 1.3500000000000001e143 < z Initial program 73.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -1.08e+70)
t_1
(if (<= b -7.5e-135)
(fma j (* c t) (* x (- (* y z) (* a t))))
(if (<= b 4.5e+85) (+ (* x (* y z)) (* j (- (* c t) (* i y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.08e+70) {
tmp = t_1;
} else if (b <= -7.5e-135) {
tmp = fma(j, (c * t), (x * ((y * z) - (a * t))));
} else if (b <= 4.5e+85) {
tmp = (x * (y * z)) + (j * ((c * t) - (i * y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(c * z))) tmp = 0.0 if (b <= -1.08e+70) tmp = t_1; elseif (b <= -7.5e-135) tmp = fma(j, Float64(c * t), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (b <= 4.5e+85) tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.08e+70], t$95$1, If[LessEqual[b, -7.5e-135], N[(j * N[(c * t), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+85], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.08 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7.5 \cdot 10^{-135}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.0799999999999999e70 or 4.50000000000000007e85 < b Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -1.0799999999999999e70 < b < -7.5e-135Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in y around 0
lower-*.f6450.2
Applied rewrites50.2%
if -7.5e-135 < b < 4.50000000000000007e85Initial program 73.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.0
Applied rewrites49.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.55e+94)
(* x (- (* y z) (* a t)))
(if (<= z 1.35e+143)
(fma (fma (- y) i (* t c)) j (* b (* a i)))
(* 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 tmp;
if (z <= -1.55e+94) {
tmp = x * ((y * z) - (a * t));
} else if (z <= 1.35e+143) {
tmp = fma(fma(-y, i, (t * c)), j, (b * (a * i)));
} else {
tmp = z * ((x * y) - (b * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.55e+94) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (z <= 1.35e+143) tmp = fma(fma(Float64(-y), i, Float64(t * c)), j, Float64(b * Float64(a * i))); 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_] := If[LessEqual[z, -1.55e+94], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+143], N[(N[((-y) * i + N[(t * c), $MachinePrecision]), $MachinePrecision] * j + N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+94}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, t \cdot c\right), j, b \cdot \left(a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\end{array}
\end{array}
if z < -1.54999999999999996e94Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -1.54999999999999996e94 < z < 1.3500000000000001e143Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6460.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in z around 0
lower-*.f6450.4
Applied rewrites50.4%
if 1.3500000000000001e143 < z Initial program 73.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (fma (- z) b (* j t)))))
(if (<= c -6e+78)
t_1
(if (<= c 1.75e-180)
(fma j (* c t) (* x (- (* y z) (* a t))))
(if (<= c 4.8e+54) (* (- (* b a) (* j y)) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(-z, b, (j * t));
double tmp;
if (c <= -6e+78) {
tmp = t_1;
} else if (c <= 1.75e-180) {
tmp = fma(j, (c * t), (x * ((y * z) - (a * t))));
} else if (c <= 4.8e+54) {
tmp = ((b * a) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(Float64(-z), b, Float64(j * t))) tmp = 0.0 if (c <= -6e+78) tmp = t_1; elseif (c <= 1.75e-180) tmp = fma(j, Float64(c * t), Float64(x * Float64(Float64(y * z) - Float64(a * t)))); elseif (c <= 4.8e+54) tmp = Float64(Float64(Float64(b * a) - Float64(j * y)) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[((-z) * b + N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6e+78], t$95$1, If[LessEqual[c, 1.75e-180], N[(j * N[(c * t), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.8e+54], N[(N[(N[(b * a), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(-z, b, j \cdot t\right)\\
\mathbf{if}\;c \leq -6 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{-180}:\\
\;\;\;\;\mathsf{fma}\left(j, c \cdot t, x \cdot \left(y \cdot z - a \cdot t\right)\right)\\
\mathbf{elif}\;c \leq 4.8 \cdot 10^{+54}:\\
\;\;\;\;\left(b \cdot a - j \cdot y\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.99999999999999964e78 or 4.79999999999999997e54 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.5
Applied rewrites39.5%
if -5.99999999999999964e78 < c < 1.75e-180Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in y around 0
lower-*.f6450.2
Applied rewrites50.2%
if 1.75e-180 < c < 4.79999999999999997e54Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (fma (- z) b (* j t)))))
(if (<= c -6.6e+77)
t_1
(if (<= c -13000.0)
(* -1.0 (* a (- (* t x) (* b i))))
(if (<= c 4.9e+54) (* y (fma -1.0 (* i j) (* x z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(-z, b, (j * t));
double tmp;
if (c <= -6.6e+77) {
tmp = t_1;
} else if (c <= -13000.0) {
tmp = -1.0 * (a * ((t * x) - (b * i)));
} else if (c <= 4.9e+54) {
tmp = y * fma(-1.0, (i * j), (x * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(Float64(-z), b, Float64(j * t))) tmp = 0.0 if (c <= -6.6e+77) tmp = t_1; elseif (c <= -13000.0) tmp = Float64(-1.0 * Float64(a * Float64(Float64(t * x) - Float64(b * i)))); elseif (c <= 4.9e+54) tmp = Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[((-z) * b + N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.6e+77], t$95$1, If[LessEqual[c, -13000.0], N[(-1.0 * N[(a * N[(N[(t * x), $MachinePrecision] - N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.9e+54], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(-z, b, j \cdot t\right)\\
\mathbf{if}\;c \leq -6.6 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -13000:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(t \cdot x - b \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.5999999999999996e77 or 4.90000000000000001e54 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.5
Applied rewrites39.5%
if -6.5999999999999996e77 < c < -13000Initial program 73.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -13000 < c < 4.90000000000000001e54Initial program 73.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.5
Applied rewrites39.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (fma (- z) b (* j t)))))
(if (<= c -7.8e+77)
t_1
(if (<= c 1.75e-180)
(* x (- (* y z) (* a t)))
(if (<= c 4.8e+54) (* (- (* b a) (* j y)) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(-z, b, (j * t));
double tmp;
if (c <= -7.8e+77) {
tmp = t_1;
} else if (c <= 1.75e-180) {
tmp = x * ((y * z) - (a * t));
} else if (c <= 4.8e+54) {
tmp = ((b * a) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(Float64(-z), b, Float64(j * t))) tmp = 0.0 if (c <= -7.8e+77) tmp = t_1; elseif (c <= 1.75e-180) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (c <= 4.8e+54) tmp = Float64(Float64(Float64(b * a) - Float64(j * y)) * i); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[((-z) * b + N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.8e+77], t$95$1, If[LessEqual[c, 1.75e-180], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.8e+54], N[(N[(N[(b * a), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(-z, b, j \cdot t\right)\\
\mathbf{if}\;c \leq -7.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;c \leq 4.8 \cdot 10^{+54}:\\
\;\;\;\;\left(b \cdot a - j \cdot y\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.7999999999999995e77 or 4.79999999999999997e54 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.5
Applied rewrites39.5%
if -7.7999999999999995e77 < c < 1.75e-180Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.75e-180 < c < 4.79999999999999997e54Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* j t) (* b z)))))
(if (<= c -7.8e+77)
t_1
(if (<= c 1.75e-180)
(* x (- (* y z) (* a t)))
(if (<= c 5.8e+54) (* (- (* b a) (* j y)) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((j * t) - (b * z));
double tmp;
if (c <= -7.8e+77) {
tmp = t_1;
} else if (c <= 1.75e-180) {
tmp = x * ((y * z) - (a * t));
} else if (c <= 5.8e+54) {
tmp = ((b * a) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((j * t) - (b * z))
if (c <= (-7.8d+77)) then
tmp = t_1
else if (c <= 1.75d-180) then
tmp = x * ((y * z) - (a * t))
else if (c <= 5.8d+54) then
tmp = ((b * a) - (j * y)) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((j * t) - (b * z));
double tmp;
if (c <= -7.8e+77) {
tmp = t_1;
} else if (c <= 1.75e-180) {
tmp = x * ((y * z) - (a * t));
} else if (c <= 5.8e+54) {
tmp = ((b * a) - (j * y)) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((j * t) - (b * z)) tmp = 0 if c <= -7.8e+77: tmp = t_1 elif c <= 1.75e-180: tmp = x * ((y * z) - (a * t)) elif c <= 5.8e+54: tmp = ((b * a) - (j * y)) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(j * t) - Float64(b * z))) tmp = 0.0 if (c <= -7.8e+77) tmp = t_1; elseif (c <= 1.75e-180) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (c <= 5.8e+54) tmp = Float64(Float64(Float64(b * a) - Float64(j * y)) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((j * t) - (b * z)); tmp = 0.0; if (c <= -7.8e+77) tmp = t_1; elseif (c <= 1.75e-180) tmp = x * ((y * z) - (a * t)); elseif (c <= 5.8e+54) tmp = ((b * a) - (j * y)) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.8e+77], t$95$1, If[LessEqual[c, 1.75e-180], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.8e+54], N[(N[(N[(b * a), $MachinePrecision] - N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t - b \cdot z\right)\\
\mathbf{if}\;c \leq -7.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+54}:\\
\;\;\;\;\left(b \cdot a - j \cdot y\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.7999999999999995e77 or 5.7999999999999997e54 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -7.7999999999999995e77 < c < 1.75e-180Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.75e-180 < c < 5.7999999999999997e54Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (fma (- z) b (* j t)))))
(if (<= c -1.75e-9)
t_1
(if (<= c 4.9e+54) (* y (fma -1.0 (* i j) (* x z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * fma(-z, b, (j * t));
double tmp;
if (c <= -1.75e-9) {
tmp = t_1;
} else if (c <= 4.9e+54) {
tmp = y * fma(-1.0, (i * j), (x * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * fma(Float64(-z), b, Float64(j * t))) tmp = 0.0 if (c <= -1.75e-9) tmp = t_1; elseif (c <= 4.9e+54) tmp = Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[((-z) * b + N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.75e-9], t$95$1, If[LessEqual[c, 4.9e+54], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \mathsf{fma}\left(-z, b, j \cdot t\right)\\
\mathbf{if}\;c \leq -1.75 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.75e-9 or 4.90000000000000001e54 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6439.5
Applied rewrites39.5%
if -1.75e-9 < c < 4.90000000000000001e54Initial program 73.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.5
Applied rewrites39.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (- (* j t) (* b z)))))
(if (<= c -7.8e+77)
t_1
(if (<= c 4e-182)
(* x (- (* y z) (* a t)))
(if (<= c 6e+83) (* b (- (* a i) (* c z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((j * t) - (b * z));
double tmp;
if (c <= -7.8e+77) {
tmp = t_1;
} else if (c <= 4e-182) {
tmp = x * ((y * z) - (a * t));
} else if (c <= 6e+83) {
tmp = b * ((a * i) - (c * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * ((j * t) - (b * z))
if (c <= (-7.8d+77)) then
tmp = t_1
else if (c <= 4d-182) then
tmp = x * ((y * z) - (a * t))
else if (c <= 6d+83) then
tmp = b * ((a * i) - (c * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * ((j * t) - (b * z));
double tmp;
if (c <= -7.8e+77) {
tmp = t_1;
} else if (c <= 4e-182) {
tmp = x * ((y * z) - (a * t));
} else if (c <= 6e+83) {
tmp = b * ((a * i) - (c * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * ((j * t) - (b * z)) tmp = 0 if c <= -7.8e+77: tmp = t_1 elif c <= 4e-182: tmp = x * ((y * z) - (a * t)) elif c <= 6e+83: tmp = b * ((a * i) - (c * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(Float64(j * t) - Float64(b * z))) tmp = 0.0 if (c <= -7.8e+77) tmp = t_1; elseif (c <= 4e-182) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (c <= 6e+83) tmp = Float64(b * Float64(Float64(a * i) - Float64(c * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * ((j * t) - (b * z)); tmp = 0.0; if (c <= -7.8e+77) tmp = t_1; elseif (c <= 4e-182) tmp = x * ((y * z) - (a * t)); elseif (c <= 6e+83) tmp = b * ((a * i) - (c * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(N[(j * t), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.8e+77], t$95$1, If[LessEqual[c, 4e-182], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6e+83], N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t - b \cdot z\right)\\
\mathbf{if}\;c \leq -7.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4 \cdot 10^{-182}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+83}:\\
\;\;\;\;b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -7.7999999999999995e77 or 5.9999999999999999e83 < c Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -7.7999999999999995e77 < c < 4.0000000000000002e-182Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 4.0000000000000002e-182 < c < 5.9999999999999999e83Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* c z)))))
(if (<= b -1.08e+70)
t_1
(if (<= b -3.2e-98)
(* x (- (* y z) (* a t)))
(if (<= b 9.6e+58) (* j (- (* c t) (* i y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.08e+70) {
tmp = t_1;
} else if (b <= -3.2e-98) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 9.6e+58) {
tmp = j * ((c * t) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((a * i) - (c * z))
if (b <= (-1.08d+70)) then
tmp = t_1
else if (b <= (-3.2d-98)) then
tmp = x * ((y * z) - (a * t))
else if (b <= 9.6d+58) then
tmp = j * ((c * t) - (i * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (c * z));
double tmp;
if (b <= -1.08e+70) {
tmp = t_1;
} else if (b <= -3.2e-98) {
tmp = x * ((y * z) - (a * t));
} else if (b <= 9.6e+58) {
tmp = j * ((c * t) - (i * y));
} 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.08e+70: tmp = t_1 elif b <= -3.2e-98: tmp = x * ((y * z) - (a * t)) elif b <= 9.6e+58: tmp = j * ((c * t) - (i * y)) 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.08e+70) tmp = t_1; elseif (b <= -3.2e-98) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); elseif (b <= 9.6e+58) tmp = Float64(j * Float64(Float64(c * t) - Float64(i * y))); 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.08e+70) tmp = t_1; elseif (b <= -3.2e-98) tmp = x * ((y * z) - (a * t)); elseif (b <= 9.6e+58) tmp = j * ((c * t) - (i * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.08e+70], t$95$1, If[LessEqual[b, -3.2e-98], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.6e+58], N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - c \cdot z\right)\\
\mathbf{if}\;b \leq -1.08 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-98}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{elif}\;b \leq 9.6 \cdot 10^{+58}:\\
\;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.0799999999999999e70 or 9.5999999999999999e58 < b Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -1.0799999999999999e70 < b < -3.2000000000000001e-98Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -3.2000000000000001e-98 < b < 9.5999999999999999e58Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in x around 0
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 (* j (- (* c t) (* i y))))) (if (<= j -1.0) t_1 (if (<= j 5.4e-74) (* 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 = j * ((c * t) - (i * y));
double tmp;
if (j <= -1.0) {
tmp = t_1;
} else if (j <= 5.4e-74) {
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 = j * ((c * t) - (i * y))
if (j <= (-1.0d0)) then
tmp = t_1
else if (j <= 5.4d-74) 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 = j * ((c * t) - (i * y));
double tmp;
if (j <= -1.0) {
tmp = t_1;
} else if (j <= 5.4e-74) {
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 = j * ((c * t) - (i * y)) tmp = 0 if j <= -1.0: tmp = t_1 elif j <= 5.4e-74: 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(j * Float64(Float64(c * t) - Float64(i * y))) tmp = 0.0 if (j <= -1.0) tmp = t_1; elseif (j <= 5.4e-74) 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 = j * ((c * t) - (i * y)); tmp = 0.0; if (j <= -1.0) tmp = t_1; elseif (j <= 5.4e-74) 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[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.0], t$95$1, If[LessEqual[j, 5.4e-74], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 5.4 \cdot 10^{-74}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1 or 5.40000000000000036e-74 < j Initial program 73.0%
Taylor expanded in b around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -1 < j < 5.40000000000000036e-74Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -8e+79) (* c (* j t)) (if (<= c 1.05e+55) (* x (- (* y z) (* a t))) (* -1.0 (* b (* c z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -8e+79) {
tmp = c * (j * t);
} else if (c <= 1.05e+55) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = -1.0 * (b * (c * z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-8d+79)) then
tmp = c * (j * t)
else if (c <= 1.05d+55) then
tmp = x * ((y * z) - (a * t))
else
tmp = (-1.0d0) * (b * (c * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -8e+79) {
tmp = c * (j * t);
} else if (c <= 1.05e+55) {
tmp = x * ((y * z) - (a * t));
} else {
tmp = -1.0 * (b * (c * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -8e+79: tmp = c * (j * t) elif c <= 1.05e+55: tmp = x * ((y * z) - (a * t)) else: tmp = -1.0 * (b * (c * z)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -8e+79) tmp = Float64(c * Float64(j * t)); elseif (c <= 1.05e+55) tmp = Float64(x * Float64(Float64(y * z) - Float64(a * t))); else tmp = Float64(-1.0 * Float64(b * Float64(c * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -8e+79) tmp = c * (j * t); elseif (c <= 1.05e+55) tmp = x * ((y * z) - (a * t)); else tmp = -1.0 * (b * (c * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -8e+79], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.05e+55], N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8 \cdot 10^{+79}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\
\mathbf{elif}\;c \leq 1.05 \cdot 10^{+55}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\end{array}
\end{array}
if c < -7.99999999999999974e79Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -7.99999999999999974e79 < c < 1.05e55Initial program 73.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.5
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
Applied rewrites75.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.05e55 < c Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.4e-26)
(* c (* -1.0 (* b z)))
(if (<= b -9e-123)
(* c (* j t))
(if (<= b 1.05e-30)
(- (* (* j y) i))
(if (<= b 4.3e+213) (* -1.0 (* b (* c z))) (* a (* b i)))))))
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.4e-26) {
tmp = c * (-1.0 * (b * z));
} else if (b <= -9e-123) {
tmp = c * (j * t);
} else if (b <= 1.05e-30) {
tmp = -((j * y) * i);
} else if (b <= 4.3e+213) {
tmp = -1.0 * (b * (c * z));
} else {
tmp = a * (b * i);
}
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.4d-26)) then
tmp = c * ((-1.0d0) * (b * z))
else if (b <= (-9d-123)) then
tmp = c * (j * t)
else if (b <= 1.05d-30) then
tmp = -((j * y) * i)
else if (b <= 4.3d+213) then
tmp = (-1.0d0) * (b * (c * z))
else
tmp = a * (b * i)
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.4e-26) {
tmp = c * (-1.0 * (b * z));
} else if (b <= -9e-123) {
tmp = c * (j * t);
} else if (b <= 1.05e-30) {
tmp = -((j * y) * i);
} else if (b <= 4.3e+213) {
tmp = -1.0 * (b * (c * z));
} else {
tmp = a * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.4e-26: tmp = c * (-1.0 * (b * z)) elif b <= -9e-123: tmp = c * (j * t) elif b <= 1.05e-30: tmp = -((j * y) * i) elif b <= 4.3e+213: tmp = -1.0 * (b * (c * z)) else: tmp = a * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.4e-26) tmp = Float64(c * Float64(-1.0 * Float64(b * z))); elseif (b <= -9e-123) tmp = Float64(c * Float64(j * t)); elseif (b <= 1.05e-30) tmp = Float64(-Float64(Float64(j * y) * i)); elseif (b <= 4.3e+213) tmp = Float64(-1.0 * Float64(b * Float64(c * z))); else tmp = Float64(a * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.4e-26) tmp = c * (-1.0 * (b * z)); elseif (b <= -9e-123) tmp = c * (j * t); elseif (b <= 1.05e-30) tmp = -((j * y) * i); elseif (b <= 4.3e+213) tmp = -1.0 * (b * (c * z)); else tmp = a * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.4e-26], N[(c * N[(-1.0 * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -9e-123], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e-30], (-N[(N[(j * y), $MachinePrecision] * i), $MachinePrecision]), If[LessEqual[b, 4.3e+213], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{-26}:\\
\;\;\;\;c \cdot \left(-1 \cdot \left(b \cdot z\right)\right)\\
\mathbf{elif}\;b \leq -9 \cdot 10^{-123}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-30}:\\
\;\;\;\;-\left(j \cdot y\right) \cdot i\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+213}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if b < -1.4000000000000001e-26Initial program 73.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
if -1.4000000000000001e-26 < b < -8.99999999999999986e-123Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -8.99999999999999986e-123 < b < 1.0500000000000001e-30Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.5
Applied rewrites22.5%
if 1.0500000000000001e-30 < b < 4.29999999999999995e213Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
if 4.29999999999999995e213 < b Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -4.2e+119)
(* (* b a) i)
(if (<= b -5e-143)
(* (* (- x) t) a)
(if (<= b 1.05e-30)
(- (* (* j y) i))
(if (<= b 4.3e+213) (* -1.0 (* b (* c z))) (* a (* b i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -4.2e+119) {
tmp = (b * a) * i;
} else if (b <= -5e-143) {
tmp = (-x * t) * a;
} else if (b <= 1.05e-30) {
tmp = -((j * y) * i);
} else if (b <= 4.3e+213) {
tmp = -1.0 * (b * (c * z));
} else {
tmp = a * (b * i);
}
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 <= (-4.2d+119)) then
tmp = (b * a) * i
else if (b <= (-5d-143)) then
tmp = (-x * t) * a
else if (b <= 1.05d-30) then
tmp = -((j * y) * i)
else if (b <= 4.3d+213) then
tmp = (-1.0d0) * (b * (c * z))
else
tmp = a * (b * i)
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 <= -4.2e+119) {
tmp = (b * a) * i;
} else if (b <= -5e-143) {
tmp = (-x * t) * a;
} else if (b <= 1.05e-30) {
tmp = -((j * y) * i);
} else if (b <= 4.3e+213) {
tmp = -1.0 * (b * (c * z));
} else {
tmp = a * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -4.2e+119: tmp = (b * a) * i elif b <= -5e-143: tmp = (-x * t) * a elif b <= 1.05e-30: tmp = -((j * y) * i) elif b <= 4.3e+213: tmp = -1.0 * (b * (c * z)) else: tmp = a * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -4.2e+119) tmp = Float64(Float64(b * a) * i); elseif (b <= -5e-143) tmp = Float64(Float64(Float64(-x) * t) * a); elseif (b <= 1.05e-30) tmp = Float64(-Float64(Float64(j * y) * i)); elseif (b <= 4.3e+213) tmp = Float64(-1.0 * Float64(b * Float64(c * z))); else tmp = Float64(a * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -4.2e+119) tmp = (b * a) * i; elseif (b <= -5e-143) tmp = (-x * t) * a; elseif (b <= 1.05e-30) tmp = -((j * y) * i); elseif (b <= 4.3e+213) tmp = -1.0 * (b * (c * z)); else tmp = a * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -4.2e+119], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[b, -5e-143], N[(N[((-x) * t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.05e-30], (-N[(N[(j * y), $MachinePrecision] * i), $MachinePrecision]), If[LessEqual[b, 4.3e+213], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{+119}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{elif}\;b \leq -5 \cdot 10^{-143}:\\
\;\;\;\;\left(\left(-x\right) \cdot t\right) \cdot a\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-30}:\\
\;\;\;\;-\left(j \cdot y\right) \cdot i\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+213}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if b < -4.19999999999999966e119Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
if -4.19999999999999966e119 < b < -5.0000000000000002e-143Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.3
Applied rewrites22.3%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.3
Applied rewrites22.3%
if -5.0000000000000002e-143 < b < 1.0500000000000001e-30Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.5
Applied rewrites22.5%
if 1.0500000000000001e-30 < b < 4.29999999999999995e213Initial program 73.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
if 4.29999999999999995e213 < b Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -9.2e+78) (* c (* j t)) (if (<= c 5.2e+55) (* x (* y z)) (* t (* c j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -9.2e+78) {
tmp = c * (j * t);
} else if (c <= 5.2e+55) {
tmp = x * (y * z);
} else {
tmp = t * (c * j);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-9.2d+78)) then
tmp = c * (j * t)
else if (c <= 5.2d+55) then
tmp = x * (y * z)
else
tmp = t * (c * j)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -9.2e+78) {
tmp = c * (j * t);
} else if (c <= 5.2e+55) {
tmp = x * (y * z);
} else {
tmp = t * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -9.2e+78: tmp = c * (j * t) elif c <= 5.2e+55: tmp = x * (y * z) else: tmp = t * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -9.2e+78) tmp = Float64(c * Float64(j * t)); elseif (c <= 5.2e+55) tmp = Float64(x * Float64(y * z)); else tmp = Float64(t * Float64(c * j)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -9.2e+78) tmp = c * (j * t); elseif (c <= 5.2e+55) tmp = x * (y * z); else tmp = t * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -9.2e+78], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.2e+55], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -9.2 \cdot 10^{+78}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\
\mathbf{elif}\;c \leq 5.2 \cdot 10^{+55}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if c < -9.2000000000000008e78Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -9.2000000000000008e78 < c < 5.2e55Initial program 73.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
if 5.2e55 < c Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* c (* j t)))) (if (<= c -9.2e+78) t_1 (if (<= c 1.55e+56) (* x (* y z)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (c <= -9.2e+78) {
tmp = t_1;
} else if (c <= 1.55e+56) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * (j * t)
if (c <= (-9.2d+78)) then
tmp = t_1
else if (c <= 1.55d+56) then
tmp = x * (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (c <= -9.2e+78) {
tmp = t_1;
} else if (c <= 1.55e+56) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * (j * t) tmp = 0 if c <= -9.2e+78: tmp = t_1 elif c <= 1.55e+56: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(j * t)) tmp = 0.0 if (c <= -9.2e+78) tmp = t_1; elseif (c <= 1.55e+56) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * (j * t); tmp = 0.0; if (c <= -9.2e+78) tmp = t_1; elseif (c <= 1.55e+56) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -9.2e+78], t$95$1, If[LessEqual[c, 1.55e+56], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;c \leq -9.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -9.2000000000000008e78 or 1.55000000000000002e56 < c Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -9.2000000000000008e78 < c < 1.55000000000000002e56Initial program 73.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* c (* j t)))) (if (<= c -1.3e-74) t_1 (if (<= c 3.8e+52) (* (* b a) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (c <= -1.3e-74) {
tmp = t_1;
} else if (c <= 3.8e+52) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = c * (j * t)
if (c <= (-1.3d-74)) then
tmp = t_1
else if (c <= 3.8d+52) then
tmp = (b * a) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = c * (j * t);
double tmp;
if (c <= -1.3e-74) {
tmp = t_1;
} else if (c <= 3.8e+52) {
tmp = (b * a) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * (j * t) tmp = 0 if c <= -1.3e-74: tmp = t_1 elif c <= 3.8e+52: tmp = (b * a) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(j * t)) tmp = 0.0 if (c <= -1.3e-74) tmp = t_1; elseif (c <= 3.8e+52) tmp = Float64(Float64(b * a) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * (j * t); tmp = 0.0; if (c <= -1.3e-74) tmp = t_1; elseif (c <= 3.8e+52) tmp = (b * a) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.3e-74], t$95$1, If[LessEqual[c, 3.8e+52], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;c \leq -1.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+52}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.3e-74 or 3.8e52 < c Initial program 73.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
if -1.3e-74 < c < 3.8e52Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -1.45e-237) (* a (* b i)) (* (* b a) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.45e-237) {
tmp = a * (b * i);
} else {
tmp = (b * a) * i;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.45d-237)) then
tmp = a * (b * i)
else
tmp = (b * a) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.45e-237) {
tmp = a * (b * i);
} else {
tmp = (b * a) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.45e-237: tmp = a * (b * i) else: tmp = (b * a) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.45e-237) tmp = Float64(a * Float64(b * i)); else tmp = Float64(Float64(b * a) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.45e-237) tmp = a * (b * i); else tmp = (b * a) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.45e-237], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-237}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\end{array}
\end{array}
if z < -1.45000000000000005e-237Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
if -1.45000000000000005e-237 < z Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.8
Applied rewrites22.8%
(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]
\begin{array}{l}
\\
a \cdot \left(b \cdot i\right)
\end{array}
Initial program 73.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
herbie shell --seed 2025155
(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)))))