
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(* (fma (- i) j (/ (fma (* j c) a (* (fma (- a) x (* i b)) t)) y)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-i, j, (fma((j * c), a, (fma(-a, x, (i * b)) * t)) / y)) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-i), j, Float64(fma(Float64(j * c), a, Float64(fma(Float64(-a), x, Float64(i * b)) * t)) / y)) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-i) * j + N[(N[(N[(j * c), $MachinePrecision] * a + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, \frac{\mathsf{fma}\left(j \cdot c, a, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\right)}{y}\right) \cdot y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 73.3%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t)))
(t_2 (- (* c a) (* i y)))
(t_3 (* t_1 x))
(t_4 (* (* c b) z)))
(if (<= x -4.8e+71)
(fma t_2 j t_3)
(if (<= x 9e+18)
(fma t_2 j (- (* (fma (- a) x (* i b)) t) t_4))
(if (<= x 2e+160) (- (fma t_1 x (* (* j c) a)) t_4) t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double t_2 = (c * a) - (i * y);
double t_3 = t_1 * x;
double t_4 = (c * b) * z;
double tmp;
if (x <= -4.8e+71) {
tmp = fma(t_2, j, t_3);
} else if (x <= 9e+18) {
tmp = fma(t_2, j, ((fma(-a, x, (i * b)) * t) - t_4));
} else if (x <= 2e+160) {
tmp = fma(t_1, x, ((j * c) * a)) - t_4;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) t_2 = Float64(Float64(c * a) - Float64(i * y)) t_3 = Float64(t_1 * x) t_4 = Float64(Float64(c * b) * z) tmp = 0.0 if (x <= -4.8e+71) tmp = fma(t_2, j, t_3); elseif (x <= 9e+18) tmp = fma(t_2, j, Float64(Float64(fma(Float64(-a), x, Float64(i * b)) * t) - t_4)); elseif (x <= 2e+160) tmp = Float64(fma(t_1, x, Float64(Float64(j * c) * a)) - t_4); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * x), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[x, -4.8e+71], N[(t$95$2 * j + t$95$3), $MachinePrecision], If[LessEqual[x, 9e+18], N[(t$95$2 * j + N[(N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+160], N[(N[(t$95$1 * x + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
t_2 := c \cdot a - i \cdot y\\
t_3 := t\_1 \cdot x\\
t_4 := \left(c \cdot b\right) \cdot z\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, j, t\_3\right)\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, j, \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t - t\_4\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+160}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(j \cdot c\right) \cdot a\right) - t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -4.79999999999999961e71Initial program 73.3%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if -4.79999999999999961e71 < x < 9e18Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites68.8%
if 9e18 < x < 2.00000000000000001e160Initial program 73.3%
Taylor expanded in i around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites58.6%
if 2.00000000000000001e160 < x Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -2.4e+128)
(* (* (+ (/ (* (- c) z) i) t) i) b)
(if (<= b 3400000.0)
(fma (fma (- a) x (* i b)) t (* (- (* c a) (* i y)) j))
(- (* (- (* z y) (* a t)) x) (* (- (* c z) (* i t)) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.4e+128) {
tmp = ((((-c * z) / i) + t) * i) * b;
} else if (b <= 3400000.0) {
tmp = fma(fma(-a, x, (i * b)), t, (((c * a) - (i * y)) * j));
} else {
tmp = (((z * y) - (a * t)) * x) - (((c * z) - (i * t)) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -2.4e+128) tmp = Float64(Float64(Float64(Float64(Float64(Float64(-c) * z) / i) + t) * i) * b); elseif (b <= 3400000.0) tmp = fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -2.4e+128], N[(N[(N[(N[(N[((-c) * z), $MachinePrecision] / i), $MachinePrecision] + t), $MachinePrecision] * i), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 3400000.0], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+128}:\\
\;\;\;\;\left(\left(\frac{\left(-c\right) \cdot z}{i} + t\right) \cdot i\right) \cdot b\\
\mathbf{elif}\;b \leq 3400000:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \left(c \cdot a - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -2.4000000000000002e128Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6439.8
Applied rewrites39.8%
if -2.4000000000000002e128 < b < 3.4e6Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
if 3.4e6 < b Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in y around 0
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites68.8%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6458.7
Applied rewrites58.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c a) (* i y))))
(if (<= b -2.4e+128)
(* (* (+ (/ (* (- c) z) i) t) i) b)
(if (<= b 1.56e-58)
(fma (fma (- a) x (* i b)) t (* t_1 j))
(if (<= b 8e+93)
(fma t_1 j (* (- (* z y) (* a t)) x))
(* (- (* i t) (* c z)) b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * a) - (i * y);
double tmp;
if (b <= -2.4e+128) {
tmp = ((((-c * z) / i) + t) * i) * b;
} else if (b <= 1.56e-58) {
tmp = fma(fma(-a, x, (i * b)), t, (t_1 * j));
} else if (b <= 8e+93) {
tmp = fma(t_1, j, (((z * y) - (a * t)) * x));
} else {
tmp = ((i * t) - (c * z)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * a) - Float64(i * y)) tmp = 0.0 if (b <= -2.4e+128) tmp = Float64(Float64(Float64(Float64(Float64(Float64(-c) * z) / i) + t) * i) * b); elseif (b <= 1.56e-58) tmp = fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(t_1 * j)); elseif (b <= 8e+93) tmp = fma(t_1, j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x)); else tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.4e+128], N[(N[(N[(N[(N[((-c) * z), $MachinePrecision] / i), $MachinePrecision] + t), $MachinePrecision] * i), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.56e-58], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(t$95$1 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e+93], N[(t$95$1 * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot a - i \cdot y\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{+128}:\\
\;\;\;\;\left(\left(\frac{\left(-c\right) \cdot z}{i} + t\right) \cdot i\right) \cdot b\\
\mathbf{elif}\;b \leq 1.56 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, t\_1 \cdot j\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\end{array}
\end{array}
if b < -2.4000000000000002e128Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6439.8
Applied rewrites39.8%
if -2.4000000000000002e128 < b < 1.56000000000000008e-58Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
if 1.56000000000000008e-58 < b < 8.00000000000000035e93Initial program 73.3%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if 8.00000000000000035e93 < b Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -8e+44)
(* (* (- t) (fma c (/ z t) (- i))) b)
(if (<= b 8e+93)
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x))
(* (- (* i t) (* c z)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -8e+44) {
tmp = (-t * fma(c, (z / t), -i)) * b;
} else if (b <= 8e+93) {
tmp = fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x));
} else {
tmp = ((i * t) - (c * z)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -8e+44) tmp = Float64(Float64(Float64(-t) * fma(c, Float64(z / t), Float64(-i))) * b); elseif (b <= 8e+93) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x)); else tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -8e+44], N[(N[((-t) * N[(c * N[(z / t), $MachinePrecision] + (-i)), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 8e+93], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+44}:\\
\;\;\;\;\left(\left(-t\right) \cdot \mathsf{fma}\left(c, \frac{z}{t}, -i\right)\right) \cdot b\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\end{array}
\end{array}
if b < -8.0000000000000007e44Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in t around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-neg.f6440.0
Applied rewrites40.0%
if -8.0000000000000007e44 < b < 8.00000000000000035e93Initial program 73.3%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6460.5
Applied rewrites60.5%
if 8.00000000000000035e93 < b Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -1.05e+66)
t_1
(if (<= x -5.5e-53)
(- (* (* z y) x) (* (* c z) b))
(if (<= x 9e+18) (fma (- (* c a) (* i y)) j (* (* i t) b)) 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -1.05e+66) {
tmp = t_1;
} else if (x <= -5.5e-53) {
tmp = ((z * y) * x) - ((c * z) * b);
} else if (x <= 9e+18) {
tmp = fma(((c * a) - (i * y)), j, ((i * t) * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -1.05e+66) tmp = t_1; elseif (x <= -5.5e-53) tmp = Float64(Float64(Float64(z * y) * x) - Float64(Float64(c * z) * b)); elseif (x <= 9e+18) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(i * t) * b)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.05e+66], t$95$1, If[LessEqual[x, -5.5e-53], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+18], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-53}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x - \left(c \cdot z\right) \cdot b\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(i \cdot t\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.05000000000000003e66 or 9e18 < x Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
if -1.05000000000000003e66 < x < -5.50000000000000023e-53Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around 0
associate-*r*N/A
mul-1-negN/A
+-commutativeN/A
fp-cancel-sub-sign-invN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.6
Applied rewrites34.6%
if -5.50000000000000023e-53 < x < 9e18Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.9
Applied rewrites50.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -5.9e+63)
(* (* (- c) (- (* (/ x c) t) j)) a)
(if (<= a -1.76e-205)
(* (fma (- i) j (* z x)) y)
(if (<= a -5.5e-298)
(* (- (* y x) (* c b)) z)
(if (<= a 26000000000000.0)
(* (fma (- j) y (* b t)) i)
(* (fma (- t) x (* j c)) a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -5.9e+63) {
tmp = (-c * (((x / c) * t) - j)) * a;
} else if (a <= -1.76e-205) {
tmp = fma(-i, j, (z * x)) * y;
} else if (a <= -5.5e-298) {
tmp = ((y * x) - (c * b)) * z;
} else if (a <= 26000000000000.0) {
tmp = fma(-j, y, (b * t)) * i;
} else {
tmp = fma(-t, x, (j * c)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -5.9e+63) tmp = Float64(Float64(Float64(-c) * Float64(Float64(Float64(x / c) * t) - j)) * a); elseif (a <= -1.76e-205) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (a <= -5.5e-298) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); elseif (a <= 26000000000000.0) tmp = Float64(fma(Float64(-j), y, Float64(b * t)) * i); else tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -5.9e+63], N[(N[((-c) * N[(N[(N[(x / c), $MachinePrecision] * t), $MachinePrecision] - j), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, -1.76e-205], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, -5.5e-298], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 26000000000000.0], N[(N[((-j) * y + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.9 \cdot 10^{+63}:\\
\;\;\;\;\left(\left(-c\right) \cdot \left(\frac{x}{c} \cdot t - j\right)\right) \cdot a\\
\mathbf{elif}\;a \leq -1.76 \cdot 10^{-205}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-298}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{elif}\;a \leq 26000000000000:\\
\;\;\;\;\mathsf{fma}\left(-j, y, b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if a < -5.90000000000000029e63Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in c around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-neg.f6440.0
Applied rewrites40.0%
Taylor expanded in x around 0
lower--.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f6440.0
Applied rewrites40.0%
if -5.90000000000000029e63 < a < -1.7599999999999999e-205Initial program 73.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
if -1.7599999999999999e-205 < a < -5.4999999999999996e-298Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
if -5.4999999999999996e-298 < a < 2.6e13Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 2.6e13 < a Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* i b)) t)))
(if (<= t -5.8e+68)
t_1
(if (<= t -4e-183)
(* (- (* y x) (* c b)) z)
(if (<= t 2.5e-273)
(* (- (* j a) (* b z)) c)
(if (<= t 1.7e+105) (* (fma (- i) j (* z x)) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (i * b)) * t;
double tmp;
if (t <= -5.8e+68) {
tmp = t_1;
} else if (t <= -4e-183) {
tmp = ((y * x) - (c * b)) * z;
} else if (t <= 2.5e-273) {
tmp = ((j * a) - (b * z)) * c;
} else if (t <= 1.7e+105) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), x, Float64(i * b)) * t) tmp = 0.0 if (t <= -5.8e+68) tmp = t_1; elseif (t <= -4e-183) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); elseif (t <= 2.5e-273) tmp = Float64(Float64(Float64(j * a) - Float64(b * z)) * c); elseif (t <= 1.7e+105) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.8e+68], t$95$1, If[LessEqual[t, -4e-183], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 2.5e-273], N[(N[(N[(j * a), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t, 1.7e+105], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-183}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-273}:\\
\;\;\;\;\left(j \cdot a - b \cdot z\right) \cdot c\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+105}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.80000000000000023e68 or 1.7e105 < t Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in t around inf
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.0%
if -5.80000000000000023e68 < t < -4.00000000000000002e-183Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
if -4.00000000000000002e-183 < t < 2.49999999999999983e-273Initial program 73.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.5
Applied rewrites39.5%
if 2.49999999999999983e-273 < t < 1.7e105Initial program 73.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -1.3e+23)
t_1
(if (<= x 3.5e+34) (fma (fma (- j) y (* b t)) i (* (* j c) a)) 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -1.3e+23) {
tmp = t_1;
} else if (x <= 3.5e+34) {
tmp = fma(fma(-j, y, (b * t)), i, ((j * c) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -1.3e+23) tmp = t_1; elseif (x <= 3.5e+34) tmp = fma(fma(Float64(-j), y, Float64(b * t)), i, Float64(Float64(j * c) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.3e+23], t$95$1, If[LessEqual[x, 3.5e+34], N[(N[((-j) * y + N[(b * t), $MachinePrecision]), $MachinePrecision] * i + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, y, b \cdot t\right), i, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.29999999999999996e23 or 3.49999999999999998e34 < x Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
if -1.29999999999999996e23 < x < 3.49999999999999998e34Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6450.9
Applied rewrites50.9%
Taylor expanded in i around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6450.9
Applied rewrites50.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* i b)) t)))
(if (<= t -5.8e+68)
t_1
(if (<= t 5.8e-179)
(* (- (* y x) (* c b)) z)
(if (<= t 3.1e+106) (* (- (* c a) (* i y)) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (i * b)) * t;
double tmp;
if (t <= -5.8e+68) {
tmp = t_1;
} else if (t <= 5.8e-179) {
tmp = ((y * x) - (c * b)) * z;
} else if (t <= 3.1e+106) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), x, Float64(i * b)) * t) tmp = 0.0 if (t <= -5.8e+68) tmp = t_1; elseif (t <= 5.8e-179) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); elseif (t <= 3.1e+106) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.8e+68], t$95$1, If[LessEqual[t, 5.8e-179], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 3.1e+106], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-179}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+106}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.80000000000000023e68 or 3.0999999999999999e106 < t Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in t around inf
*-commutativeN/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.0%
if -5.80000000000000023e68 < t < 5.7999999999999998e-179Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
if 5.7999999999999998e-179 < t < 3.0999999999999999e106Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -5.4e+90)
t_1
(if (<= x 2.35e+48) (* (- (* i t) (* c z)) b) 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -5.4e+90) {
tmp = t_1;
} else if (x <= 2.35e+48) {
tmp = ((i * t) - (c * z)) * b;
} 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 = ((z * y) - (a * t)) * x
if (x <= (-5.4d+90)) then
tmp = t_1
else if (x <= 2.35d+48) then
tmp = ((i * t) - (c * z)) * b
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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -5.4e+90) {
tmp = t_1;
} else if (x <= 2.35e+48) {
tmp = ((i * t) - (c * z)) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((z * y) - (a * t)) * x tmp = 0 if x <= -5.4e+90: tmp = t_1 elif x <= 2.35e+48: tmp = ((i * t) - (c * z)) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -5.4e+90) tmp = t_1; elseif (x <= 2.35e+48) tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((z * y) - (a * t)) * x; tmp = 0.0; if (x <= -5.4e+90) tmp = t_1; elseif (x <= 2.35e+48) tmp = ((i * t) - (c * z)) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -5.4e+90], t$95$1, If[LessEqual[x, 2.35e+48], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+48}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.4e90 or 2.35000000000000006e48 < x Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
if -5.4e90 < x < 2.35000000000000006e48Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* z y) (* a t)) x))) (if (<= x -1.25e+26) t_1 (if (<= x 21.0) (* (- (* c a) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -1.25e+26) {
tmp = t_1;
} else if (x <= 21.0) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((z * y) - (a * t)) * x
if (x <= (-1.25d+26)) then
tmp = t_1
else if (x <= 21.0d0) then
tmp = ((c * a) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -1.25e+26) {
tmp = t_1;
} else if (x <= 21.0) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((z * y) - (a * t)) * x tmp = 0 if x <= -1.25e+26: tmp = t_1 elif x <= 21.0: tmp = ((c * a) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -1.25e+26) tmp = t_1; elseif (x <= 21.0) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((z * y) - (a * t)) * x; tmp = 0.0; if (x <= -1.25e+26) tmp = t_1; elseif (x <= 21.0) tmp = ((c * a) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.25e+26], t$95$1, If[LessEqual[x, 21.0], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 21:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.25e26 or 21 < x Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
if -1.25e26 < x < 21Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -1.75e+130) (* (* (- b) c) z) (if (<= b 4.85e+27) (* (- (* c a) (* i y)) j) (* (* i t) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.75e+130) {
tmp = (-b * c) * z;
} else if (b <= 4.85e+27) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = (i * t) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.75d+130)) then
tmp = (-b * c) * z
else if (b <= 4.85d+27) then
tmp = ((c * a) - (i * y)) * j
else
tmp = (i * t) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.75e+130) {
tmp = (-b * c) * z;
} else if (b <= 4.85e+27) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.75e+130: tmp = (-b * c) * z elif b <= 4.85e+27: tmp = ((c * a) - (i * y)) * j else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.75e+130) tmp = Float64(Float64(Float64(-b) * c) * z); elseif (b <= 4.85e+27) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.75e+130) tmp = (-b * c) * z; elseif (b <= 4.85e+27) tmp = ((c * a) - (i * y)) * j; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.75e+130], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 4.85e+27], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;b \leq 4.85 \cdot 10^{+27}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -1.75e130Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around 0
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6422.6
Applied rewrites22.6%
if -1.75e130 < b < 4.8500000000000001e27Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
if 4.8500000000000001e27 < b Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- i) y) j)) (t_2 (* (* i t) b)))
(if (<= b -1e-6)
t_2
(if (<= b -3.1e-165)
(* (* j c) a)
(if (<= b 2.7e-238)
t_1
(if (<= b 1.86e-149)
(* (* (- t) x) a)
(if (<= b 2.8e+25) 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 = (-i * y) * j;
double t_2 = (i * t) * b;
double tmp;
if (b <= -1e-6) {
tmp = t_2;
} else if (b <= -3.1e-165) {
tmp = (j * c) * a;
} else if (b <= 2.7e-238) {
tmp = t_1;
} else if (b <= 1.86e-149) {
tmp = (-t * x) * a;
} else if (b <= 2.8e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-i * y) * j
t_2 = (i * t) * b
if (b <= (-1d-6)) then
tmp = t_2
else if (b <= (-3.1d-165)) then
tmp = (j * c) * a
else if (b <= 2.7d-238) then
tmp = t_1
else if (b <= 1.86d-149) then
tmp = (-t * x) * a
else if (b <= 2.8d+25) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = (i * t) * b;
double tmp;
if (b <= -1e-6) {
tmp = t_2;
} else if (b <= -3.1e-165) {
tmp = (j * c) * a;
} else if (b <= 2.7e-238) {
tmp = t_1;
} else if (b <= 1.86e-149) {
tmp = (-t * x) * a;
} else if (b <= 2.8e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-i * y) * j t_2 = (i * t) * b tmp = 0 if b <= -1e-6: tmp = t_2 elif b <= -3.1e-165: tmp = (j * c) * a elif b <= 2.7e-238: tmp = t_1 elif b <= 1.86e-149: tmp = (-t * x) * a elif b <= 2.8e+25: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-i) * y) * j) t_2 = Float64(Float64(i * t) * b) tmp = 0.0 if (b <= -1e-6) tmp = t_2; elseif (b <= -3.1e-165) tmp = Float64(Float64(j * c) * a); elseif (b <= 2.7e-238) tmp = t_1; elseif (b <= 1.86e-149) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 2.8e+25) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-i * y) * j; t_2 = (i * t) * b; tmp = 0.0; if (b <= -1e-6) tmp = t_2; elseif (b <= -3.1e-165) tmp = (j * c) * a; elseif (b <= 2.7e-238) tmp = t_1; elseif (b <= 1.86e-149) tmp = (-t * x) * a; elseif (b <= 2.8e+25) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1e-6], t$95$2, If[LessEqual[b, -3.1e-165], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 2.7e-238], t$95$1, If[LessEqual[b, 1.86e-149], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 2.8e+25], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot y\right) \cdot j\\
t_2 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-165}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.86 \cdot 10^{-149}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -9.99999999999999955e-7 or 2.8000000000000002e25 < b Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if -9.99999999999999955e-7 < b < -3.09999999999999996e-165Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6423.2
Applied rewrites23.2%
if -3.09999999999999996e-165 < b < 2.69999999999999991e-238 or 1.8600000000000001e-149 < b < 2.8000000000000002e25Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
if 2.69999999999999991e-238 < b < 1.8600000000000001e-149Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6421.6
Applied rewrites21.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.6e-82)
(* (* y x) z)
(if (<= y -4e-207)
(* (* j c) a)
(if (<= y 4.15e-69) (* (* i t) b) (* (- i) (* j y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.6e-82) {
tmp = (y * x) * z;
} else if (y <= -4e-207) {
tmp = (j * c) * a;
} else if (y <= 4.15e-69) {
tmp = (i * t) * b;
} else {
tmp = -i * (j * y);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-1.6d-82)) then
tmp = (y * x) * z
else if (y <= (-4d-207)) then
tmp = (j * c) * a
else if (y <= 4.15d-69) then
tmp = (i * t) * b
else
tmp = -i * (j * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.6e-82) {
tmp = (y * x) * z;
} else if (y <= -4e-207) {
tmp = (j * c) * a;
} else if (y <= 4.15e-69) {
tmp = (i * t) * b;
} else {
tmp = -i * (j * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -1.6e-82: tmp = (y * x) * z elif y <= -4e-207: tmp = (j * c) * a elif y <= 4.15e-69: tmp = (i * t) * b else: tmp = -i * (j * y) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1.6e-82) tmp = Float64(Float64(y * x) * z); elseif (y <= -4e-207) tmp = Float64(Float64(j * c) * a); elseif (y <= 4.15e-69) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(-i) * Float64(j * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -1.6e-82) tmp = (y * x) * z; elseif (y <= -4e-207) tmp = (j * c) * a; elseif (y <= 4.15e-69) tmp = (i * t) * b; else tmp = -i * (j * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.6e-82], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[y, -4e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 4.15e-69], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-82}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 4.15 \cdot 10^{-69}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\end{array}
\end{array}
if y < -1.6000000000000001e-82Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
if -1.6000000000000001e-82 < y < -3.9999999999999997e-207Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6423.2
Applied rewrites23.2%
if -3.9999999999999997e-207 < y < 4.1500000000000002e-69Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if 4.1500000000000002e-69 < y Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.6e-82)
(* (* y x) z)
(if (<= y -4e-207)
(* (* j c) a)
(if (<= y 4.15e-69) (* (* i t) b) (* (* (- i) y) j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.6e-82) {
tmp = (y * x) * z;
} else if (y <= -4e-207) {
tmp = (j * c) * a;
} else if (y <= 4.15e-69) {
tmp = (i * t) * b;
} else {
tmp = (-i * y) * j;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (y <= (-1.6d-82)) then
tmp = (y * x) * z
else if (y <= (-4d-207)) then
tmp = (j * c) * a
else if (y <= 4.15d-69) then
tmp = (i * t) * b
else
tmp = (-i * y) * j
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -1.6e-82) {
tmp = (y * x) * z;
} else if (y <= -4e-207) {
tmp = (j * c) * a;
} else if (y <= 4.15e-69) {
tmp = (i * t) * b;
} else {
tmp = (-i * y) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -1.6e-82: tmp = (y * x) * z elif y <= -4e-207: tmp = (j * c) * a elif y <= 4.15e-69: tmp = (i * t) * b else: tmp = (-i * y) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -1.6e-82) tmp = Float64(Float64(y * x) * z); elseif (y <= -4e-207) tmp = Float64(Float64(j * c) * a); elseif (y <= 4.15e-69) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(Float64(-i) * y) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -1.6e-82) tmp = (y * x) * z; elseif (y <= -4e-207) tmp = (j * c) * a; elseif (y <= 4.15e-69) tmp = (i * t) * b; else tmp = (-i * y) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.6e-82], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[y, -4e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 4.15e-69], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-82}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;y \leq 4.15 \cdot 10^{-69}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\
\end{array}
\end{array}
if y < -1.6000000000000001e-82Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
if -1.6000000000000001e-82 < y < -3.9999999999999997e-207Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6423.2
Applied rewrites23.2%
if -3.9999999999999997e-207 < y < 4.1500000000000002e-69Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if 4.1500000000000002e-69 < y Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6422.2
Applied rewrites22.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -3.4e+44) (* (* y x) z) (if (<= z 1.72e+21) (* (* (- t) x) a) (* (* (- c) z) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -3.4e+44) {
tmp = (y * x) * z;
} else if (z <= 1.72e+21) {
tmp = (-t * x) * a;
} else {
tmp = (-c * z) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-3.4d+44)) then
tmp = (y * x) * z
else if (z <= 1.72d+21) then
tmp = (-t * x) * a
else
tmp = (-c * z) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -3.4e+44) {
tmp = (y * x) * z;
} else if (z <= 1.72e+21) {
tmp = (-t * x) * a;
} else {
tmp = (-c * z) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -3.4e+44: tmp = (y * x) * z elif z <= 1.72e+21: tmp = (-t * x) * a else: tmp = (-c * z) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -3.4e+44) tmp = Float64(Float64(y * x) * z); elseif (z <= 1.72e+21) tmp = Float64(Float64(Float64(-t) * x) * a); else tmp = Float64(Float64(Float64(-c) * z) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -3.4e+44) tmp = (y * x) * z; elseif (z <= 1.72e+21) tmp = (-t * x) * a; else tmp = (-c * z) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -3.4e+44], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.72e+21], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+44}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{+21}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\end{array}
\end{array}
if z < -3.4e44Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
if -3.4e44 < z < 1.72e21Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6421.6
Applied rewrites21.6%
if 1.72e21 < z Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6422.5
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -4.2e+20) (* (* y x) z) (if (<= z 1.9e+55) (* (* i t) b) (* (* z y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -4.2e+20) {
tmp = (y * x) * z;
} else if (z <= 1.9e+55) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-4.2d+20)) then
tmp = (y * x) * z
else if (z <= 1.9d+55) then
tmp = (i * t) * b
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -4.2e+20) {
tmp = (y * x) * z;
} else if (z <= 1.9e+55) {
tmp = (i * t) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -4.2e+20: tmp = (y * x) * z elif z <= 1.9e+55: tmp = (i * t) * b else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -4.2e+20) tmp = Float64(Float64(y * x) * z); elseif (z <= 1.9e+55) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -4.2e+20) tmp = (y * x) * z; elseif (z <= 1.9e+55) tmp = (i * t) * b; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -4.2e+20], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.9e+55], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+20}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+55}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if z < -4.2e20Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
if -4.2e20 < z < 1.9e55Initial program 73.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6439.3
Applied rewrites39.3%
Taylor expanded in z around 0
lift-*.f6422.2
Applied rewrites22.2%
if 1.9e55 < z Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* y x) z))) (if (<= z -9.2e-69) t_1 (if (<= z 3.7e+176) (* (* j c) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (z <= -9.2e-69) {
tmp = t_1;
} else if (z <= 3.7e+176) {
tmp = (j * c) * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (y * x) * z
if (z <= (-9.2d-69)) then
tmp = t_1
else if (z <= 3.7d+176) then
tmp = (j * c) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (y * x) * z;
double tmp;
if (z <= -9.2e-69) {
tmp = t_1;
} else if (z <= 3.7e+176) {
tmp = (j * c) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (y * x) * z tmp = 0 if z <= -9.2e-69: tmp = t_1 elif z <= 3.7e+176: tmp = (j * c) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(y * x) * z) tmp = 0.0 if (z <= -9.2e-69) tmp = t_1; elseif (z <= 3.7e+176) tmp = Float64(Float64(j * c) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (y * x) * z; tmp = 0.0; if (z <= -9.2e-69) tmp = t_1; elseif (z <= 3.7e+176) tmp = (j * c) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -9.2e-69], t$95$1, If[LessEqual[z, 3.7e+176], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+176}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.2000000000000003e-69 or 3.6999999999999998e176 < z Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
if -9.2000000000000003e-69 < z < 3.6999999999999998e176Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.6
Applied rewrites39.6%
Taylor expanded in x around 0
*-commutativeN/A
lift-*.f6423.2
Applied rewrites23.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c a) j))) (if (<= a -60000000.0) t_1 (if (<= a 8.8e+83) (* (* y 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 * a) * j;
double tmp;
if (a <= -60000000.0) {
tmp = t_1;
} else if (a <= 8.8e+83) {
tmp = (y * x) * 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 * a) * j
if (a <= (-60000000.0d0)) then
tmp = t_1
else if (a <= 8.8d+83) then
tmp = (y * x) * 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 * a) * j;
double tmp;
if (a <= -60000000.0) {
tmp = t_1;
} else if (a <= 8.8e+83) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * a) * j tmp = 0 if a <= -60000000.0: tmp = t_1 elif a <= 8.8e+83: tmp = (y * x) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * a) * j) tmp = 0.0 if (a <= -60000000.0) tmp = t_1; elseif (a <= 8.8e+83) tmp = Float64(Float64(y * x) * 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 * a) * j; tmp = 0.0; if (a <= -60000000.0) tmp = t_1; elseif (a <= 8.8e+83) tmp = (y * x) * 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[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[a, -60000000.0], t$95$1, If[LessEqual[a, 8.8e+83], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a\right) \cdot j\\
\mathbf{if}\;a \leq -60000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{+83}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6e7 or 8.79999999999999995e83 < a Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in t around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6423.4
Applied rewrites23.4%
if -6e7 < a < 8.79999999999999995e83Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
(FPCore (x y z t a b c i j) :precision binary64 (* (* y x) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (y * x) * z;
}
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 = (y * x) * z
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 (y * x) * z;
}
def code(x, y, z, t, a, b, c, i, j): return (y * x) * z
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(y * x) * z) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (y * x) * z; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot x\right) \cdot z
\end{array}
Initial program 73.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.0
Applied rewrites22.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6421.7
Applied rewrites21.7%
herbie shell --seed 2025131
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))