
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Herbie found 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) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y))))
(if (<=
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j t_1))
INFINITY)
(fma (- (* i a) (* c z)) b (fma (- (* z y) (* a t)) x (* t_1 j)))
(fma (fma (- t) x (* i b)) a (- (* (* z y) x) (* (* c b) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) - (i * y);
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * t_1)) <= ((double) INFINITY)) {
tmp = fma(((i * a) - (c * z)), b, fma(((z * y) - (a * t)), x, (t_1 * j)));
} else {
tmp = fma(fma(-t, x, (i * b)), a, (((z * y) * x) - ((c * b) * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) - Float64(i * y)) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * t_1)) <= Inf) tmp = fma(Float64(Float64(i * a) - Float64(c * z)), b, fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(t_1 * j))); else tmp = fma(fma(Float64(-t), x, Float64(i * b)), a, Float64(Float64(Float64(z * y) * x) - Float64(Float64(c * b) * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * t$95$1), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(t$95$1 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(z \cdot y - a \cdot t, x, t\_1 \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, i \cdot b\right), a, \left(z \cdot y\right) \cdot x - \left(c \cdot b\right) \cdot z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites91.3%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.0
Applied rewrites26.0%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
lower-fma.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
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= b -7.2e+131)
(fma (- (* i a) (* c z)) b (* (- i) (* j y)))
(if (<= b -1.88e-34)
(fma (fma (- t) x (* i b)) a (- (* (* z y) x) (* (* c b) z)))
(if (<= b 4.5e+72)
(fma t_1 x (* (- (* c t) (* i y)) j))
(fma t_1 x (* (- (- (* c z) (* i a))) b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (b <= -7.2e+131) {
tmp = fma(((i * a) - (c * z)), b, (-i * (j * y)));
} else if (b <= -1.88e-34) {
tmp = fma(fma(-t, x, (i * b)), a, (((z * y) * x) - ((c * b) * z)));
} else if (b <= 4.5e+72) {
tmp = fma(t_1, x, (((c * t) - (i * y)) * j));
} else {
tmp = fma(t_1, x, (-((c * z) - (i * a)) * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (b <= -7.2e+131) tmp = fma(Float64(Float64(i * a) - Float64(c * z)), b, Float64(Float64(-i) * Float64(j * y))); elseif (b <= -1.88e-34) tmp = fma(fma(Float64(-t), x, Float64(i * b)), a, Float64(Float64(Float64(z * y) * x) - Float64(Float64(c * b) * z))); elseif (b <= 4.5e+72) tmp = fma(t_1, x, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); else tmp = fma(t_1, x, Float64(Float64(-Float64(Float64(c * z) - Float64(i * a))) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.2e+131], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.88e-34], N[(N[((-t) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+72], N[(t$95$1 * x + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[((-N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]) * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(-i\right) \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;b \leq -1.88 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, i \cdot b\right), a, \left(z \cdot y\right) \cdot x - \left(c \cdot b\right) \cdot z\right)\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(-\left(c \cdot z - i \cdot a\right)\right) \cdot b\right)\\
\end{array}
\end{array}
if b < -7.20000000000000063e131Initial program 72.4%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites77.8%
Taylor expanded in i around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift-*.f6472.2
Applied rewrites72.2%
if -7.20000000000000063e131 < b < -1.88e-34Initial program 74.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6461.6
Applied rewrites61.6%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
lower-fma.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
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites60.7%
if -1.88e-34 < b < 4.4999999999999998e72Initial program 73.9%
Taylor expanded in b around 0
+-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
lift--.f64N/A
lift-*.f64N/A
lift-*.f6470.7
Applied rewrites70.7%
if 4.4999999999999998e72 < b Initial program 75.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6469.5
Applied rewrites69.5%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites71.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t)))
(t_2 (fma t_1 x (* (- (- (* c z) (* i a))) b))))
(if (<= b -6.2e-32)
t_2
(if (<= b 4.5e+72) (fma t_1 x (* (- (* c t) (* i y)) j)) 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 = (z * y) - (a * t);
double t_2 = fma(t_1, x, (-((c * z) - (i * a)) * b));
double tmp;
if (b <= -6.2e-32) {
tmp = t_2;
} else if (b <= 4.5e+72) {
tmp = fma(t_1, x, (((c * t) - (i * y)) * j));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) t_2 = fma(t_1, x, Float64(Float64(-Float64(Float64(c * z) - Float64(i * a))) * b)) tmp = 0.0 if (b <= -6.2e-32) tmp = t_2; elseif (b <= 4.5e+72) tmp = fma(t_1, x, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); else tmp = t_2; 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[(t$95$1 * x + N[((-N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]) * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.2e-32], t$95$2, If[LessEqual[b, 4.5e+72], N[(t$95$1 * x + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
t_2 := \mathsf{fma}\left(t\_1, x, \left(-\left(c \cdot z - i \cdot a\right)\right) \cdot b\right)\\
\mathbf{if}\;b \leq -6.2 \cdot 10^{-32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -6.20000000000000021e-32 or 4.4999999999999998e72 < b Initial program 74.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6467.8
Applied rewrites67.8%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites69.8%
if -6.20000000000000021e-32 < b < 4.4999999999999998e72Initial program 73.8%
Taylor expanded in b around 0
+-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
lift--.f64N/A
lift-*.f64N/A
lift-*.f6470.7
Applied rewrites70.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= b -3e+21)
(fma (- (* i a) (* c z)) b (* (- i) (* j y)))
(if (<= b 5.6e+72)
(fma t_1 x (* (- (* c t) (* i y)) j))
(- (* t_1 x) (* (- (* c z) (* i a)) b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (b <= -3e+21) {
tmp = fma(((i * a) - (c * z)), b, (-i * (j * y)));
} else if (b <= 5.6e+72) {
tmp = fma(t_1, x, (((c * t) - (i * y)) * j));
} else {
tmp = (t_1 * x) - (((c * z) - (i * a)) * b);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (b <= -3e+21) tmp = fma(Float64(Float64(i * a) - Float64(c * z)), b, Float64(Float64(-i) * Float64(j * y))); elseif (b <= 5.6e+72) tmp = fma(t_1, x, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); else tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e+21], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e+72], N[(t$95$1 * x + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;b \leq -3 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(-i\right) \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\end{array}
\end{array}
if b < -3e21Initial program 72.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites77.4%
Taylor expanded in i around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift-*.f6468.0
Applied rewrites68.0%
if -3e21 < b < 5.5999999999999998e72Initial program 74.1%
Taylor expanded in b around 0
+-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
lift--.f64N/A
lift-*.f64N/A
lift-*.f6470.0
Applied rewrites70.0%
if 5.5999999999999998e72 < b Initial program 75.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6469.5
Applied rewrites69.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i a) (* c z))))
(if (<= b -3e+21)
(fma t_1 b (* (- i) (* j y)))
(if (<= b 3.4e+74)
(fma (- (* z y) (* a t)) x (* (- (* c t) (* i y)) j))
(fma t_1 b (* (- a) (* t x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * a) - (c * z);
double tmp;
if (b <= -3e+21) {
tmp = fma(t_1, b, (-i * (j * y)));
} else if (b <= 3.4e+74) {
tmp = fma(((z * y) - (a * t)), x, (((c * t) - (i * y)) * j));
} else {
tmp = fma(t_1, b, (-a * (t * x)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * a) - Float64(c * z)) tmp = 0.0 if (b <= -3e+21) tmp = fma(t_1, b, Float64(Float64(-i) * Float64(j * y))); elseif (b <= 3.4e+74) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); else tmp = fma(t_1, b, Float64(Float64(-a) * Float64(t * x))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e+21], N[(t$95$1 * b + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+74], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot a - c \cdot z\\
\mathbf{if}\;b \leq -3 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-i\right) \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\
\end{array}
\end{array}
if b < -3e21Initial program 72.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites77.4%
Taylor expanded in i around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift-*.f6468.0
Applied rewrites68.0%
if -3e21 < b < 3.3999999999999999e74Initial program 74.1%
Taylor expanded in b around 0
+-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
lift--.f64N/A
lift-*.f64N/A
lift-*.f6469.9
Applied rewrites69.9%
if 3.3999999999999999e74 < b Initial program 75.2%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites80.4%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i a) (* c z))) (t_2 (fma t_1 b (* (- a) (* t x)))))
(if (<= b -1.55e+62)
(fma t_1 b (* (- i) (* j y)))
(if (<= b -3e-46)
t_2
(if (<= b 3.7e-272)
(- (* (- (* z y) (* a t)) x) (* (* c z) b))
(if (<= b 6.6e+97)
(+ (- (* (* c b) z)) (* j (- (* c t) (* i y))))
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 * a) - (c * z);
double t_2 = fma(t_1, b, (-a * (t * x)));
double tmp;
if (b <= -1.55e+62) {
tmp = fma(t_1, b, (-i * (j * y)));
} else if (b <= -3e-46) {
tmp = t_2;
} else if (b <= 3.7e-272) {
tmp = (((z * y) - (a * t)) * x) - ((c * z) * b);
} else if (b <= 6.6e+97) {
tmp = -((c * b) * z) + (j * ((c * t) - (i * y)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * a) - Float64(c * z)) t_2 = fma(t_1, b, Float64(Float64(-a) * Float64(t * x))) tmp = 0.0 if (b <= -1.55e+62) tmp = fma(t_1, b, Float64(Float64(-i) * Float64(j * y))); elseif (b <= -3e-46) tmp = t_2; elseif (b <= 3.7e-272) tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * z) * b)); elseif (b <= 6.6e+97) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * b + N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+62], N[(t$95$1 * b + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3e-46], t$95$2, If[LessEqual[b, 3.7e-272], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e+97], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot a - c \cdot z\\
t_2 := \mathsf{fma}\left(t\_1, b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-i\right) \cdot \left(j \cdot y\right)\right)\\
\mathbf{elif}\;b \leq -3 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-272}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z\right) \cdot b\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{+97}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.55000000000000007e62Initial program 72.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites77.3%
Taylor expanded in i around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift-*.f6469.9
Applied rewrites69.9%
if -1.55000000000000007e62 < b < -2.99999999999999987e-46 or 6.6000000000000003e97 < b Initial program 75.2%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6465.4
Applied rewrites65.4%
if -2.99999999999999987e-46 < b < 3.6999999999999997e-272Initial program 72.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6448.5
Applied rewrites48.5%
Taylor expanded in z around inf
lift-*.f6445.5
Applied rewrites45.5%
if 3.6999999999999997e-272 < b < 6.6000000000000003e97Initial program 75.3%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6451.9
Applied rewrites51.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i a) (* c z))) (t_2 (* (fma (- a) x (* j c)) t)))
(if (<= t -3.7e+28)
t_2
(if (<= t 4.5e-84)
(fma t_1 b (* (* z y) x))
(if (<= t 3.3e+38) (fma t_1 b (* (- i) (* j y))) 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 * a) - (c * z);
double t_2 = fma(-a, x, (j * c)) * t;
double tmp;
if (t <= -3.7e+28) {
tmp = t_2;
} else if (t <= 4.5e-84) {
tmp = fma(t_1, b, ((z * y) * x));
} else if (t <= 3.3e+38) {
tmp = fma(t_1, b, (-i * (j * y)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * a) - Float64(c * z)) t_2 = Float64(fma(Float64(-a), x, Float64(j * c)) * t) tmp = 0.0 if (t <= -3.7e+28) tmp = t_2; elseif (t <= 4.5e-84) tmp = fma(t_1, b, Float64(Float64(z * y) * x)); elseif (t <= 3.3e+38) tmp = fma(t_1, b, Float64(Float64(-i) * Float64(j * y))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.7e+28], t$95$2, If[LessEqual[t, 4.5e-84], N[(t$95$1 * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+38], N[(t$95$1 * b + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot a - c \cdot z\\
t_2 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-84}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-i\right) \cdot \left(j \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.6999999999999999e28 or 3.2999999999999999e38 < t Initial program 65.1%
Taylor expanded in t 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-*.f6461.3
Applied rewrites61.3%
if -3.6999999999999999e28 < t < 4.50000000000000016e-84Initial program 81.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites83.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6460.4
Applied rewrites60.4%
if 4.50000000000000016e-84 < t < 3.2999999999999999e38Initial program 77.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.7%
Taylor expanded in i around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift-*.f6452.4
Applied rewrites52.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* j c)) t)))
(if (<= t -3.7e+28)
t_1
(if (<= t 3.3e+38) (fma (- (* i a) (* c z)) b (* (* z y) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, x, (j * c)) * t;
double tmp;
if (t <= -3.7e+28) {
tmp = t_1;
} else if (t <= 3.3e+38) {
tmp = fma(((i * a) - (c * z)), b, ((z * y) * x));
} 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(j * c)) * t) tmp = 0.0 if (t <= -3.7e+28) tmp = t_1; elseif (t <= 3.3e+38) tmp = fma(Float64(Float64(i * a) - Float64(c * z)), b, Float64(Float64(z * y) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.7e+28], t$95$1, If[LessEqual[t, 3.3e+38], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.6999999999999999e28 or 3.2999999999999999e38 < t Initial program 65.1%
Taylor expanded in t 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-*.f6461.3
Applied rewrites61.3%
if -3.6999999999999999e28 < t < 3.2999999999999999e38Initial program 80.6%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites83.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6458.7
Applied rewrites58.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i a) (* c z))))
(if (<= b -2.05e+21)
(* t_1 b)
(if (<= b 3.7e-272)
(* (- (* z y) (* a t)) x)
(if (<= b 2.5e+74)
(* (* (- t) (fma i (/ y t) (- c))) j)
(fma t_1 b (* (* j t) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * a) - (c * z);
double tmp;
if (b <= -2.05e+21) {
tmp = t_1 * b;
} else if (b <= 3.7e-272) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 2.5e+74) {
tmp = (-t * fma(i, (y / t), -c)) * j;
} else {
tmp = fma(t_1, b, ((j * t) * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * a) - Float64(c * z)) tmp = 0.0 if (b <= -2.05e+21) tmp = Float64(t_1 * b); elseif (b <= 3.7e-272) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (b <= 2.5e+74) tmp = Float64(Float64(Float64(-t) * fma(i, Float64(y / t), Float64(-c))) * j); else tmp = fma(t_1, b, Float64(Float64(j * t) * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.05e+21], N[(t$95$1 * b), $MachinePrecision], If[LessEqual[b, 3.7e-272], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 2.5e+74], N[(N[((-t) * N[(i * N[(y / t), $MachinePrecision] + (-c)), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(t$95$1 * b + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot a - c \cdot z\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1 \cdot b\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-272}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+74}:\\
\;\;\;\;\left(\left(-t\right) \cdot \mathsf{fma}\left(i, \frac{y}{t}, -c\right)\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(j \cdot t\right) \cdot c\right)\\
\end{array}
\end{array}
if b < -2.05e21Initial program 72.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6460.9
Applied rewrites60.9%
if -2.05e21 < b < 3.6999999999999997e-272Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
if 3.6999999999999997e-272 < b < 2.49999999999999982e74Initial program 74.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6444.2
Applied rewrites44.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6443.8
Applied rewrites43.8%
if 2.49999999999999982e74 < b Initial program 75.2%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites80.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6471.7
Applied rewrites71.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i a) (* c z)) b)))
(if (<= b -2.05e+21)
t_1
(if (<= b 3.7e-272)
(* (- (* z y) (* a t)) x)
(if (<= b 2.5e+74) (* (* (- t) (fma i (/ y t) (- c))) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -2.05e+21) {
tmp = t_1;
} else if (b <= 3.7e-272) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 2.5e+74) {
tmp = (-t * fma(i, (y / t), -c)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * a) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.05e+21) tmp = t_1; elseif (b <= 3.7e-272) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (b <= 2.5e+74) tmp = Float64(Float64(Float64(-t) * fma(i, Float64(y / t), Float64(-c))) * 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[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.05e+21], t$95$1, If[LessEqual[b, 3.7e-272], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 2.5e+74], N[(N[((-t) * N[(i * N[(y / t), $MachinePrecision] + (-c)), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-272}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+74}:\\
\;\;\;\;\left(\left(-t\right) \cdot \mathsf{fma}\left(i, \frac{y}{t}, -c\right)\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.05e21 or 2.49999999999999982e74 < b Initial program 73.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6463.5
Applied rewrites63.5%
if -2.05e21 < b < 3.6999999999999997e-272Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
if 3.6999999999999997e-272 < b < 2.49999999999999982e74Initial program 74.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6444.2
Applied rewrites44.2%
Taylor expanded in t around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6443.8
Applied rewrites43.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i a) (* c z)) b)))
(if (<= b -2.05e+21)
t_1
(if (<= b 3.7e-272)
(* (- (* z y) (* a t)) x)
(if (<= b 4.5e+72) (* (- (* c t) (* 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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -2.05e+21) {
tmp = t_1;
} else if (b <= 3.7e-272) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 4.5e+72) {
tmp = ((c * t) - (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 = ((i * a) - (c * z)) * b
if (b <= (-2.05d+21)) then
tmp = t_1
else if (b <= 3.7d-272) then
tmp = ((z * y) - (a * t)) * x
else if (b <= 4.5d+72) then
tmp = ((c * t) - (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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -2.05e+21) {
tmp = t_1;
} else if (b <= 3.7e-272) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 4.5e+72) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * a) - (c * z)) * b tmp = 0 if b <= -2.05e+21: tmp = t_1 elif b <= 3.7e-272: tmp = ((z * y) - (a * t)) * x elif b <= 4.5e+72: tmp = ((c * t) - (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(i * a) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.05e+21) tmp = t_1; elseif (b <= 3.7e-272) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (b <= 4.5e+72) tmp = Float64(Float64(Float64(c * t) - 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 = ((i * a) - (c * z)) * b; tmp = 0.0; if (b <= -2.05e+21) tmp = t_1; elseif (b <= 3.7e-272) tmp = ((z * y) - (a * t)) * x; elseif (b <= 4.5e+72) tmp = ((c * t) - (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[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.05e+21], t$95$1, If[LessEqual[b, 3.7e-272], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 4.5e+72], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-272}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.05e21 or 4.4999999999999998e72 < b Initial program 73.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6463.4
Applied rewrites63.4%
if -2.05e21 < b < 3.6999999999999997e-272Initial program 73.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
if 3.6999999999999997e-272 < b < 4.4999999999999998e72Initial program 74.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6444.2
Applied rewrites44.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* i a) (* c z)) b))) (if (<= b -2.9e+19) t_1 (if (<= b 4.5e+72) (* (- (* c t) (* 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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -2.9e+19) {
tmp = t_1;
} else if (b <= 4.5e+72) {
tmp = ((c * t) - (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 = ((i * a) - (c * z)) * b
if (b <= (-2.9d+19)) then
tmp = t_1
else if (b <= 4.5d+72) then
tmp = ((c * t) - (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 = ((i * a) - (c * z)) * b;
double tmp;
if (b <= -2.9e+19) {
tmp = t_1;
} else if (b <= 4.5e+72) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * a) - (c * z)) * b tmp = 0 if b <= -2.9e+19: tmp = t_1 elif b <= 4.5e+72: tmp = ((c * t) - (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(i * a) - Float64(c * z)) * b) tmp = 0.0 if (b <= -2.9e+19) tmp = t_1; elseif (b <= 4.5e+72) tmp = Float64(Float64(Float64(c * t) - 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 = ((i * a) - (c * z)) * b; tmp = 0.0; if (b <= -2.9e+19) tmp = t_1; elseif (b <= 4.5e+72) tmp = ((c * t) - (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[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.9e+19], t$95$1, If[LessEqual[b, 4.5e+72], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+72}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.9e19 or 4.4999999999999998e72 < b Initial program 73.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6463.3
Applied rewrites63.3%
if -2.9e19 < b < 4.4999999999999998e72Initial program 74.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.1
Applied rewrites45.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -1.15e+65)
t_1
(if (<= z 2.9e+17) (* (- (* c t) (* 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 = -b * (c * z);
double tmp;
if (z <= -1.15e+65) {
tmp = t_1;
} else if (z <= 2.9e+17) {
tmp = ((c * t) - (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 = -b * (c * z)
if (z <= (-1.15d+65)) then
tmp = t_1
else if (z <= 2.9d+17) then
tmp = ((c * t) - (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 = -b * (c * z);
double tmp;
if (z <= -1.15e+65) {
tmp = t_1;
} else if (z <= 2.9e+17) {
tmp = ((c * t) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -1.15e+65: tmp = t_1 elif z <= 2.9e+17: tmp = ((c * t) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -1.15e+65) tmp = t_1; elseif (z <= 2.9e+17) tmp = Float64(Float64(Float64(c * t) - 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 = -b * (c * z); tmp = 0.0; if (z <= -1.15e+65) tmp = t_1; elseif (z <= 2.9e+17) tmp = ((c * t) - (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[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+65], t$95$1, If[LessEqual[z, 2.9e+17], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+17}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.15e65 or 2.9e17 < z Initial program 65.9%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6464.2
Applied rewrites64.2%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6437.1
Applied rewrites37.1%
if -1.15e65 < z < 2.9e17Initial program 80.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.2
Applied rewrites45.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -1e+65)
t_1
(if (<= z -6e-61)
(* (* c t) j)
(if (<= z 3.4e-157)
(* (- a) (* t x))
(if (<= z 4.6e+36) (* (* i b) 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 = -b * (c * z);
double tmp;
if (z <= -1e+65) {
tmp = t_1;
} else if (z <= -6e-61) {
tmp = (c * t) * j;
} else if (z <= 3.4e-157) {
tmp = -a * (t * x);
} else if (z <= 4.6e+36) {
tmp = (i * b) * 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 = -b * (c * z)
if (z <= (-1d+65)) then
tmp = t_1
else if (z <= (-6d-61)) then
tmp = (c * t) * j
else if (z <= 3.4d-157) then
tmp = -a * (t * x)
else if (z <= 4.6d+36) then
tmp = (i * b) * 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 = -b * (c * z);
double tmp;
if (z <= -1e+65) {
tmp = t_1;
} else if (z <= -6e-61) {
tmp = (c * t) * j;
} else if (z <= 3.4e-157) {
tmp = -a * (t * x);
} else if (z <= 4.6e+36) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -1e+65: tmp = t_1 elif z <= -6e-61: tmp = (c * t) * j elif z <= 3.4e-157: tmp = -a * (t * x) elif z <= 4.6e+36: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -1e+65) tmp = t_1; elseif (z <= -6e-61) tmp = Float64(Float64(c * t) * j); elseif (z <= 3.4e-157) tmp = Float64(Float64(-a) * Float64(t * x)); elseif (z <= 4.6e+36) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -b * (c * z); tmp = 0.0; if (z <= -1e+65) tmp = t_1; elseif (z <= -6e-61) tmp = (c * t) * j; elseif (z <= 3.4e-157) tmp = -a * (t * x); elseif (z <= 4.6e+36) tmp = (i * b) * 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[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+65], t$95$1, If[LessEqual[z, -6e-61], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 3.4e-157], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+36], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-61}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-157}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+36}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.9999999999999999e64 or 4.59999999999999993e36 < z Initial program 65.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6464.2
Applied rewrites64.2%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6437.8
Applied rewrites37.8%
if -9.9999999999999999e64 < z < -6.00000000000000024e-61Initial program 77.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6440.6
Applied rewrites40.6%
Taylor expanded in y around 0
lift-*.f6421.6
Applied rewrites21.6%
if -6.00000000000000024e-61 < z < 3.39999999999999977e-157Initial program 81.0%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6452.6
Applied rewrites52.6%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
if 3.39999999999999977e-157 < z < 4.59999999999999993e36Initial program 79.3%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6457.4
Applied rewrites57.4%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- a) (* t x))))
(if (<= t -1.05e+42)
t_1
(if (<= t 1.55e-83)
(* (* z y) x)
(if (<= t 3200000000.0)
(* (* i b) a)
(if (<= t 2.5e+175) (* (* c t) 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 = -a * (t * x);
double tmp;
if (t <= -1.05e+42) {
tmp = t_1;
} else if (t <= 1.55e-83) {
tmp = (z * y) * x;
} else if (t <= 3200000000.0) {
tmp = (i * b) * a;
} else if (t <= 2.5e+175) {
tmp = (c * t) * 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 = -a * (t * x)
if (t <= (-1.05d+42)) then
tmp = t_1
else if (t <= 1.55d-83) then
tmp = (z * y) * x
else if (t <= 3200000000.0d0) then
tmp = (i * b) * a
else if (t <= 2.5d+175) then
tmp = (c * t) * 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 = -a * (t * x);
double tmp;
if (t <= -1.05e+42) {
tmp = t_1;
} else if (t <= 1.55e-83) {
tmp = (z * y) * x;
} else if (t <= 3200000000.0) {
tmp = (i * b) * a;
} else if (t <= 2.5e+175) {
tmp = (c * t) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -a * (t * x) tmp = 0 if t <= -1.05e+42: tmp = t_1 elif t <= 1.55e-83: tmp = (z * y) * x elif t <= 3200000000.0: tmp = (i * b) * a elif t <= 2.5e+175: tmp = (c * t) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-a) * Float64(t * x)) tmp = 0.0 if (t <= -1.05e+42) tmp = t_1; elseif (t <= 1.55e-83) tmp = Float64(Float64(z * y) * x); elseif (t <= 3200000000.0) tmp = Float64(Float64(i * b) * a); elseif (t <= 2.5e+175) tmp = Float64(Float64(c * t) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -a * (t * x); tmp = 0.0; if (t <= -1.05e+42) tmp = t_1; elseif (t <= 1.55e-83) tmp = (z * y) * x; elseif (t <= 3200000000.0) tmp = (i * b) * a; elseif (t <= 2.5e+175) tmp = (c * t) * 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[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+42], t$95$1, If[LessEqual[t, 1.55e-83], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 3200000000.0], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 2.5e+175], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-83}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;t \leq 3200000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+175}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.04999999999999998e42 or 2.5e175 < t Initial program 63.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6453.4
Applied rewrites53.4%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
if -1.04999999999999998e42 < t < 1.54999999999999996e-83Initial program 81.2%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6425.3
Applied rewrites25.3%
if 1.54999999999999996e-83 < t < 3.2e9Initial program 75.7%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6458.9
Applied rewrites58.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.8
Applied rewrites24.8%
if 3.2e9 < t < 2.5e175Initial program 71.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6443.7
Applied rewrites43.7%
Taylor expanded in y around 0
lift-*.f6428.4
Applied rewrites28.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* c t) j)))
(if (<= t -4e+56)
t_1
(if (<= t 1.55e-83)
(* (* z y) x)
(if (<= t 3200000000.0) (* (* i b) 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 = (c * t) * j;
double tmp;
if (t <= -4e+56) {
tmp = t_1;
} else if (t <= 1.55e-83) {
tmp = (z * y) * x;
} else if (t <= 3200000000.0) {
tmp = (i * b) * 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 = (c * t) * j
if (t <= (-4d+56)) then
tmp = t_1
else if (t <= 1.55d-83) then
tmp = (z * y) * x
else if (t <= 3200000000.0d0) then
tmp = (i * b) * 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 = (c * t) * j;
double tmp;
if (t <= -4e+56) {
tmp = t_1;
} else if (t <= 1.55e-83) {
tmp = (z * y) * x;
} else if (t <= 3200000000.0) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * t) * j tmp = 0 if t <= -4e+56: tmp = t_1 elif t <= 1.55e-83: tmp = (z * y) * x elif t <= 3200000000.0: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) * j) tmp = 0.0 if (t <= -4e+56) tmp = t_1; elseif (t <= 1.55e-83) tmp = Float64(Float64(z * y) * x); elseif (t <= 3200000000.0) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (c * t) * j; tmp = 0.0; if (t <= -4e+56) tmp = t_1; elseif (t <= 1.55e-83) tmp = (z * y) * x; elseif (t <= 3200000000.0) tmp = (i * b) * 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[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[t, -4e+56], t$95$1, If[LessEqual[t, 1.55e-83], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 3200000000.0], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;t \leq -4 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-83}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;t \leq 3200000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.00000000000000037e56 or 3.2e9 < t Initial program 65.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.9
Applied rewrites45.9%
Taylor expanded in y around 0
lift-*.f6435.5
Applied rewrites35.5%
if -4.00000000000000037e56 < t < 1.54999999999999996e-83Initial program 81.0%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6425.2
Applied rewrites25.2%
if 1.54999999999999996e-83 < t < 3.2e9Initial program 75.7%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6458.9
Applied rewrites58.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.8
Applied rewrites24.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -5.2e-27)
(* (* i b) a)
(if (<= b 7.5e-180)
(* (* x z) y)
(if (<= b 1.36e+66) (* (* c t) j) (* (* b a) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.2e-27) {
tmp = (i * b) * a;
} else if (b <= 7.5e-180) {
tmp = (x * z) * y;
} else if (b <= 1.36e+66) {
tmp = (c * t) * j;
} else {
tmp = (b * a) * i;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-5.2d-27)) then
tmp = (i * b) * a
else if (b <= 7.5d-180) then
tmp = (x * z) * y
else if (b <= 1.36d+66) then
tmp = (c * t) * j
else
tmp = (b * a) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.2e-27) {
tmp = (i * b) * a;
} else if (b <= 7.5e-180) {
tmp = (x * z) * y;
} else if (b <= 1.36e+66) {
tmp = (c * t) * j;
} else {
tmp = (b * a) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -5.2e-27: tmp = (i * b) * a elif b <= 7.5e-180: tmp = (x * z) * y elif b <= 1.36e+66: tmp = (c * t) * j else: tmp = (b * a) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -5.2e-27) tmp = Float64(Float64(i * b) * a); elseif (b <= 7.5e-180) tmp = Float64(Float64(x * z) * y); elseif (b <= 1.36e+66) tmp = Float64(Float64(c * t) * j); else tmp = Float64(Float64(b * a) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -5.2e-27) tmp = (i * b) * a; elseif (b <= 7.5e-180) tmp = (x * z) * y; elseif (b <= 1.36e+66) tmp = (c * t) * j; else tmp = (b * a) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -5.2e-27], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 7.5e-180], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 1.36e+66], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;b \leq 1.36 \cdot 10^{+66}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\end{array}
\end{array}
if b < -5.20000000000000034e-27Initial program 73.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6466.7
Applied rewrites66.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.6
Applied rewrites34.6%
if -5.20000000000000034e-27 < b < 7.50000000000000015e-180Initial program 71.9%
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-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
lower-*.f6425.1
Applied rewrites25.1%
if 7.50000000000000015e-180 < b < 1.36e66Initial program 76.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6443.2
Applied rewrites43.2%
Taylor expanded in y around 0
lift-*.f6424.3
Applied rewrites24.3%
if 1.36e66 < b Initial program 75.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites80.3%
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
*-commutativeN/A
lift-*.f6449.7
Applied rewrites49.7%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -5.2e-27)
(* (* i b) a)
(if (<= b 7.5e-180)
(* (* x z) y)
(if (<= b 3.3e+65) (* (* j t) c) (* (* b a) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.2e-27) {
tmp = (i * b) * a;
} else if (b <= 7.5e-180) {
tmp = (x * z) * y;
} else if (b <= 3.3e+65) {
tmp = (j * t) * c;
} else {
tmp = (b * a) * i;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-5.2d-27)) then
tmp = (i * b) * a
else if (b <= 7.5d-180) then
tmp = (x * z) * y
else if (b <= 3.3d+65) then
tmp = (j * t) * c
else
tmp = (b * a) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.2e-27) {
tmp = (i * b) * a;
} else if (b <= 7.5e-180) {
tmp = (x * z) * y;
} else if (b <= 3.3e+65) {
tmp = (j * t) * c;
} else {
tmp = (b * a) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -5.2e-27: tmp = (i * b) * a elif b <= 7.5e-180: tmp = (x * z) * y elif b <= 3.3e+65: tmp = (j * t) * c else: tmp = (b * a) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -5.2e-27) tmp = Float64(Float64(i * b) * a); elseif (b <= 7.5e-180) tmp = Float64(Float64(x * z) * y); elseif (b <= 3.3e+65) tmp = Float64(Float64(j * t) * c); else tmp = Float64(Float64(b * a) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -5.2e-27) tmp = (i * b) * a; elseif (b <= 7.5e-180) tmp = (x * z) * y; elseif (b <= 3.3e+65) tmp = (j * t) * c; else tmp = (b * a) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -5.2e-27], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 7.5e-180], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 3.3e+65], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\end{array}
\end{array}
if b < -5.20000000000000034e-27Initial program 73.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6466.7
Applied rewrites66.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.6
Applied rewrites34.6%
if -5.20000000000000034e-27 < b < 7.50000000000000015e-180Initial program 71.9%
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-*.f6446.8
Applied rewrites46.8%
Taylor expanded in x around inf
lower-*.f6425.1
Applied rewrites25.1%
if 7.50000000000000015e-180 < b < 3.30000000000000023e65Initial program 76.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6443.2
Applied rewrites43.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6424.7
Applied rewrites24.7%
if 3.30000000000000023e65 < b Initial program 75.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites80.4%
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
*-commutativeN/A
lift-*.f6449.8
Applied rewrites49.8%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* x z) y)))
(if (<= z -1.06e+61)
t_1
(if (<= z -3.3e-60)
(* (* j t) c)
(if (<= z 1.35e+81) (* (* i b) 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 = (x * z) * y;
double tmp;
if (z <= -1.06e+61) {
tmp = t_1;
} else if (z <= -3.3e-60) {
tmp = (j * t) * c;
} else if (z <= 1.35e+81) {
tmp = (i * b) * 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 = (x * z) * y
if (z <= (-1.06d+61)) then
tmp = t_1
else if (z <= (-3.3d-60)) then
tmp = (j * t) * c
else if (z <= 1.35d+81) then
tmp = (i * b) * 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 = (x * z) * y;
double tmp;
if (z <= -1.06e+61) {
tmp = t_1;
} else if (z <= -3.3e-60) {
tmp = (j * t) * c;
} else if (z <= 1.35e+81) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (x * z) * y tmp = 0 if z <= -1.06e+61: tmp = t_1 elif z <= -3.3e-60: tmp = (j * t) * c elif z <= 1.35e+81: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(x * z) * y) tmp = 0.0 if (z <= -1.06e+61) tmp = t_1; elseif (z <= -3.3e-60) tmp = Float64(Float64(j * t) * c); elseif (z <= 1.35e+81) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (x * z) * y; tmp = 0.0; if (z <= -1.06e+61) tmp = t_1; elseif (z <= -3.3e-60) tmp = (j * t) * c; elseif (z <= 1.35e+81) tmp = (i * b) * 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[(x * z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1.06e+61], t$95$1, If[LessEqual[z, -3.3e-60], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.35e+81], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot z\right) \cdot y\\
\mathbf{if}\;z \leq -1.06 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-60}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+81}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0599999999999999e61 or 1.35e81 < z Initial program 64.4%
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-*.f6447.7
Applied rewrites47.7%
Taylor expanded in x around inf
lower-*.f6437.5
Applied rewrites37.5%
if -1.0599999999999999e61 < z < -3.2999999999999998e-60Initial program 77.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6440.5
Applied rewrites40.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6421.9
Applied rewrites21.9%
if -3.2999999999999998e-60 < z < 1.35e81Initial program 80.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6454.9
Applied rewrites54.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* i b) a))) (if (<= b -3e-28) t_1 (if (<= b 3.3e+65) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * b) * a;
double tmp;
if (b <= -3e-28) {
tmp = t_1;
} else if (b <= 3.3e+65) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (i * b) * a
if (b <= (-3d-28)) then
tmp = t_1
else if (b <= 3.3d+65) then
tmp = (j * t) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * b) * a;
double tmp;
if (b <= -3e-28) {
tmp = t_1;
} else if (b <= 3.3e+65) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * b) * a tmp = 0 if b <= -3e-28: tmp = t_1 elif b <= 3.3e+65: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * b) * a) tmp = 0.0 if (b <= -3e-28) tmp = t_1; elseif (b <= 3.3e+65) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * b) * a; tmp = 0.0; if (b <= -3e-28) tmp = t_1; elseif (b <= 3.3e+65) tmp = (j * t) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[b, -3e-28], t$95$1, If[LessEqual[b, 3.3e+65], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a\\
\mathbf{if}\;b \leq -3 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.00000000000000003e-28 or 3.30000000000000023e65 < b Initial program 74.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6467.7
Applied rewrites67.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.0
Applied rewrites37.0%
if -3.00000000000000003e-28 < b < 3.30000000000000023e65Initial program 73.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6445.7
Applied rewrites45.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6425.6
Applied rewrites25.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j t) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * t) * c;
}
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 = (j * t) * c
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 (j * t) * c;
}
def code(x, y, z, t, a, b, c, i, j): return (j * t) * c
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * t) * c) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * t) * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot t\right) \cdot c
\end{array}
Initial program 74.0%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6439.9
Applied rewrites39.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-*.f6421.7
Applied rewrites21.7%
herbie shell --seed 2025120
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))