
(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 z) (* i a)))
(t_2 (- (* c t) (* i y)))
(t_3 (+ (- (* x (- (* y z) (* t a))) (* b t_1)) (* j t_2))))
(if (<= t_3 (- INFINITY))
(-
(fma (- a) (* t x) (fma (* j c) t (* (fma (- i) j (* z x)) y)))
(* t_1 b))
(if (<= t_3 INFINITY)
t_3
(* (fma (- t) x (- (* j (/ t_2 a)) (- (* i b)))) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * z) - (i * a);
double t_2 = (c * t) - (i * y);
double t_3 = ((x * ((y * z) - (t * a))) - (b * t_1)) + (j * t_2);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = fma(-a, (t * x), fma((j * c), t, (fma(-i, j, (z * x)) * y))) - (t_1 * b);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = fma(-t, x, ((j * (t_2 / a)) - -(i * b))) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * z) - Float64(i * a)) t_2 = Float64(Float64(c * t) - Float64(i * y)) t_3 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * t_1)) + Float64(j * t_2)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(fma(Float64(-a), Float64(t * x), fma(Float64(j * c), t, Float64(fma(Float64(-i), j, Float64(z * x)) * y))) - Float64(t_1 * b)); elseif (t_3 <= Inf) tmp = t_3; else tmp = Float64(fma(Float64(-t), x, Float64(Float64(j * Float64(t_2 / a)) - Float64(-Float64(i * b)))) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(j * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * c), $MachinePrecision] * t + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[((-t) * x + N[(N[(j * N[(t$95$2 / a), $MachinePrecision]), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot z - i \cdot a\\
t_2 := c \cdot t - i \cdot y\\
t_3 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot t\_1\right) + j \cdot t\_2\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot c, t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right) - t\_1 \cdot b\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot \frac{t\_2}{a} - \left(-i \cdot b\right)\right) \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < -inf.0Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
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)))) < +inf.0Initial program 73.0%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y)))
(t_2
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(* j t_1))))
(if (<= t_2 INFINITY)
t_2
(* (fma (- t) x (- (* j (/ t_1 a)) (- (* i b)))) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) - (i * y);
double t_2 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * t_1);
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = fma(-t, x, ((j * (t_1 / a)) - -(i * b))) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) - Float64(i * y)) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * t_1)) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(fma(Float64(-t), x, Float64(Float64(j * Float64(t_1 / a)) - Float64(-Float64(i * b)))) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(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]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[((-t) * x + N[(N[(j * N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
t_2 := \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\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot \frac{t\_1}{a} - \left(-i \cdot b\right)\right) \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 73.0%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c z) (* i a)))
(t_2
(+ (* (- (fma z y (- (* b (/ t_1 x)))) (* a t)) x) (* j (* c t)))))
(if (<= b -7e-34)
t_2
(if (<= b 3.2e-102)
(fma
-1.0
(* a (* t x))
(fma c (* j t) (* y (fma -1.0 (* i j) (* x z)))))
(if (<= b 7.5e+97)
(- (fma (- a) (* t x) (fma (* j t) c (* (* z y) x))) (* t_1 b))
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * z) - (i * a);
double t_2 = ((fma(z, y, -(b * (t_1 / x))) - (a * t)) * x) + (j * (c * t));
double tmp;
if (b <= -7e-34) {
tmp = t_2;
} else if (b <= 3.2e-102) {
tmp = fma(-1.0, (a * (t * x)), fma(c, (j * t), (y * fma(-1.0, (i * j), (x * z)))));
} else if (b <= 7.5e+97) {
tmp = fma(-a, (t * x), fma((j * t), c, ((z * y) * x))) - (t_1 * b);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * z) - Float64(i * a)) t_2 = Float64(Float64(Float64(fma(z, y, Float64(-Float64(b * Float64(t_1 / x)))) - Float64(a * t)) * x) + Float64(j * Float64(c * t))) tmp = 0.0 if (b <= -7e-34) tmp = t_2; elseif (b <= 3.2e-102) tmp = fma(-1.0, Float64(a * Float64(t * x)), fma(c, Float64(j * t), Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))))); elseif (b <= 7.5e+97) tmp = Float64(fma(Float64(-a), Float64(t * x), fma(Float64(j * t), c, Float64(Float64(z * y) * x))) - Float64(t_1 * b)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * y + (-N[(b * N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(j * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e-34], t$95$2, If[LessEqual[b, 3.2e-102], N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(c * N[(j * t), $MachinePrecision] + N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+97], N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * t), $MachinePrecision] * c + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * b), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot z - i \cdot a\\
t_2 := \left(\mathsf{fma}\left(z, y, -b \cdot \frac{t\_1}{x}\right) - a \cdot t\right) \cdot x + j \cdot \left(c \cdot t\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{-34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-102}:\\
\;\;\;\;\mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+97}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - t\_1 \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7e-34 or 7.5000000000000004e97 < b Initial program 73.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites68.0%
Taylor expanded in y around 0
lift-*.f6463.1
Applied rewrites63.1%
if -7e-34 < b < 3.19999999999999986e-102Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-*.f6439.4
Applied rewrites39.4%
Taylor expanded in b around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6458.4
Applied rewrites58.4%
if 3.19999999999999986e-102 < b < 7.5000000000000004e97Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in i around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6466.4
Applied rewrites66.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* c z) (* i a)) b)))
(if (<= z -5.8e+119)
(* (fma (- i) j (* z x)) y)
(if (<= z -8.5e-243)
(- (* (fma (- a) t (* z y)) x) t_1)
(if (<= z 1.38e-207)
(fma
-1.0
(* a (* t x))
(fma c (* j t) (* y (fma -1.0 (* i j) (* x z)))))
(if (<= z 5.5e+41)
(fma (- (* (- t) x) (- (* i b))) a (* (- (* c t) (* i y)) j))
(if (<= z 4e+188)
(- (fma (* y x) z (* (- i) (* j y))) t_1)
(* (- (* 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 * z) - (i * a)) * b;
double tmp;
if (z <= -5.8e+119) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -8.5e-243) {
tmp = (fma(-a, t, (z * y)) * x) - t_1;
} else if (z <= 1.38e-207) {
tmp = fma(-1.0, (a * (t * x)), fma(c, (j * t), (y * fma(-1.0, (i * j), (x * z)))));
} else if (z <= 5.5e+41) {
tmp = fma(((-t * x) - -(i * b)), a, (((c * t) - (i * y)) * j));
} else if (z <= 4e+188) {
tmp = fma((y * x), z, (-i * (j * y))) - t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(c * z) - Float64(i * a)) * b) tmp = 0.0 if (z <= -5.8e+119) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -8.5e-243) tmp = Float64(Float64(fma(Float64(-a), t, Float64(z * y)) * x) - t_1); elseif (z <= 1.38e-207) tmp = fma(-1.0, Float64(a * Float64(t * x)), fma(c, Float64(j * t), Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))))); elseif (z <= 5.5e+41) tmp = fma(Float64(Float64(Float64(-t) * x) - Float64(-Float64(i * b))), a, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); elseif (z <= 4e+188) tmp = Float64(fma(Float64(y * x), z, Float64(Float64(-i) * Float64(j * y))) - t_1); else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[z, -5.8e+119], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -8.5e-243], N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 1.38e-207], N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(c * N[(j * t), $MachinePrecision] + N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+41], N[(N[(N[((-t) * x), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision] * a + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+188], N[(N[(N[(y * x), $MachinePrecision] * z + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - t\_1\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{-207}:\\
\;\;\;\;\mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+188}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -5.80000000000000014e119Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
if -5.80000000000000014e119 < z < -8.5000000000000002e-243Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around 0
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6459.7
Applied rewrites59.7%
if -8.5000000000000002e-243 < z < 1.38000000000000007e-207Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-*.f6439.4
Applied rewrites39.4%
Taylor expanded in b around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6458.4
Applied rewrites58.4%
if 1.38000000000000007e-207 < z < 5.5000000000000003e41Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
if 5.5000000000000003e41 < z < 4.0000000000000001e188Initial program 73.0%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
if 4.0000000000000001e188 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(fma (- a) (* t x) (fma (* j t) c (* (* z y) x)))
(* (- (* c z) (* i a)) b))))
(if (<= b -9e-20)
t_1
(if (<= b -7.8e-41)
(* (fma (- t) x (- (* j (/ (- (* c t) (* i y)) a)) (- (* i b)))) a)
(if (<= b 3.2e-102)
(fma
-1.0
(* a (* t x))
(fma c (* j t) (* y (fma -1.0 (* i j) (* x z)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, (t * x), fma((j * t), c, ((z * y) * x))) - (((c * z) - (i * a)) * b);
double tmp;
if (b <= -9e-20) {
tmp = t_1;
} else if (b <= -7.8e-41) {
tmp = fma(-t, x, ((j * (((c * t) - (i * y)) / a)) - -(i * b))) * a;
} else if (b <= 3.2e-102) {
tmp = fma(-1.0, (a * (t * x)), fma(c, (j * t), (y * fma(-1.0, (i * j), (x * z)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), Float64(t * x), fma(Float64(j * t), c, Float64(Float64(z * y) * x))) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (b <= -9e-20) tmp = t_1; elseif (b <= -7.8e-41) tmp = Float64(fma(Float64(-t), x, Float64(Float64(j * Float64(Float64(Float64(c * t) - Float64(i * y)) / a)) - Float64(-Float64(i * b)))) * a); elseif (b <= 3.2e-102) tmp = fma(-1.0, Float64(a * Float64(t * x)), fma(c, Float64(j * t), Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(j * t), $MachinePrecision] * c + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e-20], t$95$1, If[LessEqual[b, -7.8e-41], N[(N[((-t) * x + N[(N[(j * N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.2e-102], N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision] + N[(c * N[(j * t), $MachinePrecision] + N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;b \leq -9 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot \frac{c \cdot t - i \cdot y}{a} - \left(-i \cdot b\right)\right) \cdot a\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-102}:\\
\;\;\;\;\mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.0000000000000003e-20 or 3.19999999999999986e-102 < b Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in i around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6466.4
Applied rewrites66.4%
if -9.0000000000000003e-20 < b < -7.79999999999999982e-41Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.5%
if -7.79999999999999982e-41 < b < 3.19999999999999986e-102Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-*.f6439.4
Applied rewrites39.4%
Taylor expanded in b around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6458.4
Applied rewrites58.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* (fma (- a) t (* z y)) x) (* (- (* c z) (* i a)) b))))
(if (<= z -5.8e+119)
(* (fma (- i) j (* z x)) y)
(if (<= z -1.6e-40)
t_1
(if (<= z 5.1e+63)
(fma (- (* (- t) x) (- (* i b))) a (* (fma c t (* (- i) y)) j))
(if (<= z 1.12e+194) t_1 (* (- (* 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 = (fma(-a, t, (z * y)) * x) - (((c * z) - (i * a)) * b);
double tmp;
if (z <= -5.8e+119) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -1.6e-40) {
tmp = t_1;
} else if (z <= 5.1e+63) {
tmp = fma(((-t * x) - -(i * b)), a, (fma(c, t, (-i * y)) * j));
} else if (z <= 1.12e+194) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(fma(Float64(-a), t, Float64(z * y)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (z <= -5.8e+119) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -1.6e-40) tmp = t_1; elseif (z <= 5.1e+63) tmp = fma(Float64(Float64(Float64(-t) * x) - Float64(-Float64(i * b))), a, Float64(fma(c, t, Float64(Float64(-i) * y)) * j)); elseif (z <= 1.12e+194) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+119], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -1.6e-40], t$95$1, If[LessEqual[z, 5.1e+63], N[(N[(N[((-t) * x), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision] * a + N[(N[(c * t + N[((-i) * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+194], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \mathsf{fma}\left(c, t, \left(-i\right) \cdot y\right) \cdot j\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -5.80000000000000014e119Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
if -5.80000000000000014e119 < z < -1.60000000000000001e-40 or 5.0999999999999998e63 < z < 1.11999999999999994e194Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around 0
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6459.7
Applied rewrites59.7%
if -1.60000000000000001e-40 < z < 5.0999999999999998e63Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6460.3
Applied rewrites60.3%
if 1.11999999999999994e194 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* (fma (- a) t (* z y)) x) (* (- (* c z) (* i a)) b))))
(if (<= z -5.8e+119)
(* (fma (- i) j (* z x)) y)
(if (<= z -1.6e-40)
t_1
(if (<= z 6.2e+41)
(fma (- (* (- t) x) (- (* i b))) a (* (- (* c t) (* i y)) j))
(if (<= z 1.12e+194) t_1 (* (- (* 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 = (fma(-a, t, (z * y)) * x) - (((c * z) - (i * a)) * b);
double tmp;
if (z <= -5.8e+119) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -1.6e-40) {
tmp = t_1;
} else if (z <= 6.2e+41) {
tmp = fma(((-t * x) - -(i * b)), a, (((c * t) - (i * y)) * j));
} else if (z <= 1.12e+194) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(fma(Float64(-a), t, Float64(z * y)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (z <= -5.8e+119) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -1.6e-40) tmp = t_1; elseif (z <= 6.2e+41) tmp = fma(Float64(Float64(Float64(-t) * x) - Float64(-Float64(i * b))), a, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); elseif (z <= 1.12e+194) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+119], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -1.6e-40], t$95$1, If[LessEqual[z, 6.2e+41], N[(N[(N[((-t) * x), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision] * a + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+194], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -5.80000000000000014e119Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
if -5.80000000000000014e119 < z < -1.60000000000000001e-40 or 6.2e41 < z < 1.11999999999999994e194Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around 0
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6459.7
Applied rewrites59.7%
if -1.60000000000000001e-40 < z < 6.2e41Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
if 1.11999999999999994e194 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (fma (* y x) z (* (- i) (* j y))) (* (- (* c z) (* i a)) b))))
(if (<= z -2.15e-8)
t_1
(if (<= z 5.5e+41)
(fma (- (* (- t) x) (- (* i b))) a (* (- (* c t) (* i y)) j))
(if (<= z 4e+188) t_1 (* (- (* 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 = fma((y * x), z, (-i * (j * y))) - (((c * z) - (i * a)) * b);
double tmp;
if (z <= -2.15e-8) {
tmp = t_1;
} else if (z <= 5.5e+41) {
tmp = fma(((-t * x) - -(i * b)), a, (((c * t) - (i * y)) * j));
} else if (z <= 4e+188) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(y * x), z, Float64(Float64(-i) * Float64(j * y))) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (z <= -2.15e-8) tmp = t_1; elseif (z <= 5.5e+41) tmp = fma(Float64(Float64(Float64(-t) * x) - Float64(-Float64(i * b))), a, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); elseif (z <= 4e+188) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] * z + N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e-8], t$95$1, If[LessEqual[z, 5.5e+41], N[(N[(N[((-t) * x), $MachinePrecision] - (-N[(i * b), $MachinePrecision])), $MachinePrecision] * a + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+188], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -2.1500000000000001e-8 or 5.5000000000000003e41 < z < 4.0000000000000001e188Initial program 73.0%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6459.0
Applied rewrites59.0%
if -2.1500000000000001e-8 < z < 5.5000000000000003e41Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
if 4.0000000000000001e188 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* (fma (- a) t (* z y)) x) (* (- (* c z) (* i a)) b))))
(if (<= z -5.8e+119)
(* (fma (- i) j (* z x)) y)
(if (<= z -8.5e-243)
t_1
(if (<= z 1.85e-20)
(fma (- (* z y) (* a t)) x (* (- (* c t) (* i y)) j))
(if (<= z 1.12e+194) t_1 (* (- (* 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 = (fma(-a, t, (z * y)) * x) - (((c * z) - (i * a)) * b);
double tmp;
if (z <= -5.8e+119) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -8.5e-243) {
tmp = t_1;
} else if (z <= 1.85e-20) {
tmp = fma(((z * y) - (a * t)), x, (((c * t) - (i * y)) * j));
} else if (z <= 1.12e+194) {
tmp = t_1;
} else {
tmp = ((y * x) - (c * b)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(fma(Float64(-a), t, Float64(z * y)) * x) - Float64(Float64(Float64(c * z) - Float64(i * a)) * b)) tmp = 0.0 if (z <= -5.8e+119) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -8.5e-243) tmp = t_1; elseif (z <= 1.85e-20) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); elseif (z <= 1.12e+194) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+119], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -8.5e-243], t$95$1, If[LessEqual[z, 1.85e-20], 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], If[LessEqual[z, 1.12e+194], t$95$1, N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-20}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -5.80000000000000014e119Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
if -5.80000000000000014e119 < z < -8.5000000000000002e-243 or 1.85e-20 < z < 1.11999999999999994e194Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around 0
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6459.7
Applied rewrites59.7%
if -8.5000000000000002e-243 < z < 1.85e-20Initial program 73.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6461.2
Applied rewrites61.2%
if 1.11999999999999994e194 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* c t) (* i y))) (t_2 (- (* z y) (* a t))))
(if (<= x -3.2e+77)
(* t_2 x)
(if (<= x 3.5e-112) (fma t_1 j (* (* i b) a)) (fma t_2 x (* t_1 j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) - (i * y);
double t_2 = (z * y) - (a * t);
double tmp;
if (x <= -3.2e+77) {
tmp = t_2 * x;
} else if (x <= 3.5e-112) {
tmp = fma(t_1, j, ((i * b) * a));
} else {
tmp = fma(t_2, x, (t_1 * j));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) - Float64(i * y)) t_2 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (x <= -3.2e+77) tmp = Float64(t_2 * x); elseif (x <= 3.5e-112) tmp = fma(t_1, j, Float64(Float64(i * b) * a)); else tmp = fma(t_2, x, Float64(t_1 * j)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+77], N[(t$95$2 * x), $MachinePrecision], If[LessEqual[x, 3.5e-112], N[(t$95$1 * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * x + N[(t$95$1 * j), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
t_2 := z \cdot y - a \cdot t\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+77}:\\
\;\;\;\;t\_2 \cdot x\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, j, \left(i \cdot b\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, x, t\_1 \cdot j\right)\\
\end{array}
\end{array}
if x < -3.2000000000000002e77Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if -3.2000000000000002e77 < x < 3.49999999999999994e-112Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in x around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
*-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
fp-cancel-sign-subN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites49.6%
if 3.49999999999999994e-112 < x Initial program 73.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6461.2
Applied rewrites61.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -3.2e+77)
t_1
(if (<= x 6.2e+34) (fma (- (* c t) (* i y)) j (* (* 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -3.2e+77) {
tmp = t_1;
} else if (x <= 6.2e+34) {
tmp = fma(((c * t) - (i * y)), j, ((i * b) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -3.2e+77) tmp = t_1; elseif (x <= 6.2e+34) tmp = fma(Float64(Float64(c * t) - Float64(i * y)), j, Float64(Float64(i * b) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3.2e+77], t$95$1, If[LessEqual[x, 6.2e+34], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(i \cdot b\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.2000000000000002e77 or 6.19999999999999955e34 < x Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if -3.2000000000000002e77 < x < 6.19999999999999955e34Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in x around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
*-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
fp-cancel-sign-subN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites49.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* z y) (* a t)) x)))
(if (<= x -7.5e+45)
t_1
(if (<= x 4.8e-27) (* (- j) (fma (- c) t (* i y))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -7.5e+45) {
tmp = t_1;
} else if (x <= 4.8e-27) {
tmp = -j * fma(-c, t, (i * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -7.5e+45) tmp = t_1; elseif (x <= 4.8e-27) tmp = Float64(Float64(-j) * fma(Float64(-c), t, Float64(i * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7.5e+45], t$95$1, If[LessEqual[x, 4.8e-27], N[((-j) * N[((-c) * t + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-27}:\\
\;\;\;\;\left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.50000000000000058e45 or 4.80000000000000004e-27 < x Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if -7.50000000000000058e45 < x < 4.80000000000000004e-27Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in j around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* z y) (* a t)) x))) (if (<= x -7.5e+45) t_1 (if (<= x 4.8e-27) (* (- (* 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -7.5e+45) {
tmp = t_1;
} else if (x <= 4.8e-27) {
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 = ((z * y) - (a * t)) * x
if (x <= (-7.5d+45)) then
tmp = t_1
else if (x <= 4.8d-27) 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 = ((z * y) - (a * t)) * x;
double tmp;
if (x <= -7.5e+45) {
tmp = t_1;
} else if (x <= 4.8e-27) {
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 = ((z * y) - (a * t)) * x tmp = 0 if x <= -7.5e+45: tmp = t_1 elif x <= 4.8e-27: 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(z * y) - Float64(a * t)) * x) tmp = 0.0 if (x <= -7.5e+45) tmp = t_1; elseif (x <= 4.8e-27) 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 = ((z * y) - (a * t)) * x; tmp = 0.0; if (x <= -7.5e+45) tmp = t_1; elseif (x <= 4.8e-27) 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[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7.5e+45], t$95$1, If[LessEqual[x, 4.8e-27], 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(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-27}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.50000000000000058e45 or 4.80000000000000004e-27 < x Initial program 73.0%
Taylor expanded in y around 0
lower--.f64N/A
Applied rewrites73.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if -7.50000000000000058e45 < x < 4.80000000000000004e-27Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* y x) (* c b)) z)))
(if (<= z -8e-40)
t_1
(if (<= z -8.5e-243)
(* (- (* i a) (* c z)) b)
(if (<= z 6.5e+63) (* (- (* 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 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -8e-40) {
tmp = t_1;
} else if (z <= -8.5e-243) {
tmp = ((i * a) - (c * z)) * b;
} else if (z <= 6.5e+63) {
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 = ((y * x) - (c * b)) * z
if (z <= (-8d-40)) then
tmp = t_1
else if (z <= (-8.5d-243)) then
tmp = ((i * a) - (c * z)) * b
else if (z <= 6.5d+63) 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 = ((y * x) - (c * b)) * z;
double tmp;
if (z <= -8e-40) {
tmp = t_1;
} else if (z <= -8.5e-243) {
tmp = ((i * a) - (c * z)) * b;
} else if (z <= 6.5e+63) {
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 = ((y * x) - (c * b)) * z tmp = 0 if z <= -8e-40: tmp = t_1 elif z <= -8.5e-243: tmp = ((i * a) - (c * z)) * b elif z <= 6.5e+63: 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(y * x) - Float64(c * b)) * z) tmp = 0.0 if (z <= -8e-40) tmp = t_1; elseif (z <= -8.5e-243) tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b); elseif (z <= 6.5e+63) 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 = ((y * x) - (c * b)) * z; tmp = 0.0; if (z <= -8e-40) tmp = t_1; elseif (z <= -8.5e-243) tmp = ((i * a) - (c * z)) * b; elseif (z <= 6.5e+63) 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[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e-40], t$95$1, If[LessEqual[z, -8.5e-243], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 6.5e+63], 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(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -8 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+63}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999994e-40 or 6.49999999999999992e63 < z Initial program 73.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6439.9
Applied rewrites39.9%
if -7.9999999999999994e-40 < z < -8.5000000000000002e-243Initial program 73.0%
Taylor expanded in b around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -8.5000000000000002e-243 < z < 6.49999999999999992e63Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* i a) (* c z)) b))) (if (<= b -1.3e-24) t_1 (if (<= b 3.4e-88) (* (- (* 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 <= -1.3e-24) {
tmp = t_1;
} else if (b <= 3.4e-88) {
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 <= (-1.3d-24)) then
tmp = t_1
else if (b <= 3.4d-88) 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 <= -1.3e-24) {
tmp = t_1;
} else if (b <= 3.4e-88) {
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 <= -1.3e-24: tmp = t_1 elif b <= 3.4e-88: 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 <= -1.3e-24) tmp = t_1; elseif (b <= 3.4e-88) 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 <= -1.3e-24) tmp = t_1; elseif (b <= 3.4e-88) 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, -1.3e-24], t$95$1, If[LessEqual[b, 3.4e-88], 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 -1.3 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-88}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.3e-24 or 3.39999999999999975e-88 < b Initial program 73.0%
Taylor expanded in b around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
if -1.3e-24 < b < 3.39999999999999975e-88Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* -1.0 (* a (* t x)))))
(if (<= x -1.05e+77)
t_1
(if (<= x 2.5e+56) (* (- (* 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 = -1.0 * (a * (t * x));
double tmp;
if (x <= -1.05e+77) {
tmp = t_1;
} else if (x <= 2.5e+56) {
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 = (-1.0d0) * (a * (t * x))
if (x <= (-1.05d+77)) then
tmp = t_1
else if (x <= 2.5d+56) 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 = -1.0 * (a * (t * x));
double tmp;
if (x <= -1.05e+77) {
tmp = t_1;
} else if (x <= 2.5e+56) {
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 = -1.0 * (a * (t * x)) tmp = 0 if x <= -1.05e+77: tmp = t_1 elif x <= 2.5e+56: 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(-1.0 * Float64(a * Float64(t * x))) tmp = 0.0 if (x <= -1.05e+77) tmp = t_1; elseif (x <= 2.5e+56) 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 = -1.0 * (a * (t * x)); tmp = 0.0; if (x <= -1.05e+77) tmp = t_1; elseif (x <= 2.5e+56) 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[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+77], t$95$1, If[LessEqual[x, 2.5e+56], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+56}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.0499999999999999e77 or 2.50000000000000012e56 < x Initial program 73.0%
Taylor expanded in a around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6421.9
Applied rewrites21.9%
if -1.0499999999999999e77 < x < 2.50000000000000012e56Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* c t) j)) (t_2 (* (* (- a) t) x)))
(if (<= t -4e+225)
t_2
(if (<= t -900000000000.0)
t_1
(if (<= t 1.05e-87) (* (- i) (* j y)) (if (<= t 7.5e+20) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) * j;
double t_2 = (-a * t) * x;
double tmp;
if (t <= -4e+225) {
tmp = t_2;
} else if (t <= -900000000000.0) {
tmp = t_1;
} else if (t <= 1.05e-87) {
tmp = -i * (j * y);
} else if (t <= 7.5e+20) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (c * t) * j
t_2 = (-a * t) * x
if (t <= (-4d+225)) then
tmp = t_2
else if (t <= (-900000000000.0d0)) then
tmp = t_1
else if (t <= 1.05d-87) then
tmp = -i * (j * y)
else if (t <= 7.5d+20) then
tmp = t_2
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 t_2 = (-a * t) * x;
double tmp;
if (t <= -4e+225) {
tmp = t_2;
} else if (t <= -900000000000.0) {
tmp = t_1;
} else if (t <= 1.05e-87) {
tmp = -i * (j * y);
} else if (t <= 7.5e+20) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * t) * j t_2 = (-a * t) * x tmp = 0 if t <= -4e+225: tmp = t_2 elif t <= -900000000000.0: tmp = t_1 elif t <= 1.05e-87: tmp = -i * (j * y) elif t <= 7.5e+20: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * t) * j) t_2 = Float64(Float64(Float64(-a) * t) * x) tmp = 0.0 if (t <= -4e+225) tmp = t_2; elseif (t <= -900000000000.0) tmp = t_1; elseif (t <= 1.05e-87) tmp = Float64(Float64(-i) * Float64(j * y)); elseif (t <= 7.5e+20) tmp = t_2; 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; t_2 = (-a * t) * x; tmp = 0.0; if (t <= -4e+225) tmp = t_2; elseif (t <= -900000000000.0) tmp = t_1; elseif (t <= 1.05e-87) tmp = -i * (j * y); elseif (t <= 7.5e+20) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -4e+225], t$95$2, If[LessEqual[t, -900000000000.0], t$95$1, If[LessEqual[t, 1.05e-87], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+20], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
t_2 := \left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{if}\;t \leq -4 \cdot 10^{+225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -900000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-87}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.99999999999999971e225 or 1.05000000000000004e-87 < t < 7.5e20Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in x around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
associate-*r*N/A
lift-neg.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6421.8
Applied rewrites21.8%
if -3.99999999999999971e225 < t < -9e11 or 7.5e20 < t Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
Taylor expanded in y around 0
lift-*.f6421.9
Applied rewrites21.9%
if -9e11 < t < 1.05000000000000004e-87Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c t) j))) (if (<= t -900000000000.0) t_1 (if (<= t 4.8e+32) (* (- i) (* j y)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) * j;
double tmp;
if (t <= -900000000000.0) {
tmp = t_1;
} else if (t <= 4.8e+32) {
tmp = -i * (j * y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (c * t) * j
if (t <= (-900000000000.0d0)) then
tmp = t_1
else if (t <= 4.8d+32) then
tmp = -i * (j * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) * j;
double tmp;
if (t <= -900000000000.0) {
tmp = t_1;
} else if (t <= 4.8e+32) {
tmp = -i * (j * y);
} 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 <= -900000000000.0: tmp = t_1 elif t <= 4.8e+32: tmp = -i * (j * y) 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 <= -900000000000.0) tmp = t_1; elseif (t <= 4.8e+32) tmp = Float64(Float64(-i) * Float64(j * y)); 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 <= -900000000000.0) tmp = t_1; elseif (t <= 4.8e+32) tmp = -i * (j * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[t, -900000000000.0], t$95$1, If[LessEqual[t, 4.8e+32], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;t \leq -900000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+32}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9e11 or 4.79999999999999983e32 < t Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
Taylor expanded in y around 0
lift-*.f6421.9
Applied rewrites21.9%
if -9e11 < t < 4.79999999999999983e32Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.1
Applied rewrites41.1%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c t) j))) (if (<= c -6e+76) t_1 (if (<= c 1.45e+42) (* (* i a) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) * j;
double tmp;
if (c <= -6e+76) {
tmp = t_1;
} else if (c <= 1.45e+42) {
tmp = (i * a) * b;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (c * t) * j
if (c <= (-6d+76)) then
tmp = t_1
else if (c <= 1.45d+42) then
tmp = (i * a) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * t) * j;
double tmp;
if (c <= -6e+76) {
tmp = t_1;
} else if (c <= 1.45e+42) {
tmp = (i * a) * b;
} 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 c <= -6e+76: tmp = t_1 elif c <= 1.45e+42: tmp = (i * a) * b 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 (c <= -6e+76) tmp = t_1; elseif (c <= 1.45e+42) tmp = Float64(Float64(i * a) * b); 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 (c <= -6e+76) tmp = t_1; elseif (c <= 1.45e+42) tmp = (i * a) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -6e+76], t$95$1, If[LessEqual[c, 1.45e+42], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;c \leq -6 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{+42}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.9999999999999996e76 or 1.4499999999999999e42 < c Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
Taylor expanded in y around 0
lift-*.f6421.9
Applied rewrites21.9%
if -5.9999999999999996e76 < c < 1.4499999999999999e42Initial program 73.0%
Taylor expanded in b around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in z around 0
*-commutativeN/A
lift-*.f6422.5
Applied rewrites22.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c t) j))) (if (<= c -6e+76) t_1 (if (<= c 9.5e+33) (* (* 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 (c <= -6e+76) {
tmp = t_1;
} else if (c <= 9.5e+33) {
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 (c <= (-6d+76)) then
tmp = t_1
else if (c <= 9.5d+33) 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 (c <= -6e+76) {
tmp = t_1;
} else if (c <= 9.5e+33) {
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 c <= -6e+76: tmp = t_1 elif c <= 9.5e+33: 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 (c <= -6e+76) tmp = t_1; elseif (c <= 9.5e+33) 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 (c <= -6e+76) tmp = t_1; elseif (c <= 9.5e+33) 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[c, -6e+76], t$95$1, If[LessEqual[c, 9.5e+33], 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}\;c \leq -6 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.5 \cdot 10^{+33}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.9999999999999996e76 or 9.5000000000000003e33 < c Initial program 73.0%
Taylor expanded in z around 0
associate--l+N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites58.3%
Taylor expanded in a around 0
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
Taylor expanded in y around 0
lift-*.f6421.9
Applied rewrites21.9%
if -5.9999999999999996e76 < c < 9.5000000000000003e33Initial program 73.0%
Taylor expanded in b around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (i * b) * a;
}
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 = (i * b) * a
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 (i * b) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (i * b) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(i * b) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (i * b) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(i \cdot b\right) \cdot a
\end{array}
Initial program 73.0%
Taylor expanded in b around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f6439.2
Applied rewrites39.2%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6422.4
Applied rewrites22.4%
herbie shell --seed 2025134
(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)))))