
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
INFINITY)
(fma
(- (* i t) (* c z))
b
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x)))
(* (fma (- t) x (* j c)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = fma(((i * t) - (c * z)), b, fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x)));
} else {
tmp = fma(-t, x, (j * c)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = fma(Float64(Float64(i * t) - Float64(c * z)), b, fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x))); else tmp = Float64(fma(Float64(-t), x, Float64(j * c)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, x, j \cdot c\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 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites91.5%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.6
Applied rewrites44.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= j -4e+105)
(+ (* (- (* y x) (* c b)) z) (* j (- (* c a) (* y i))))
(if (<= j -9e-255)
(- (* t_1 x) (* (- (* c z) (* i t)) b))
(if (<= j 1.35e+77)
(fma (fma (- a) x (* i b)) t (- (* (* z y) x) (* (* c b) z)))
(fma t_1 x (* (- (* c a) (* i y)) j)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (j <= -4e+105) {
tmp = (((y * x) - (c * b)) * z) + (j * ((c * a) - (y * i)));
} else if (j <= -9e-255) {
tmp = (t_1 * x) - (((c * z) - (i * t)) * b);
} else if (j <= 1.35e+77) {
tmp = fma(fma(-a, x, (i * b)), t, (((z * y) * x) - ((c * b) * z)));
} else {
tmp = fma(t_1, x, (((c * a) - (i * y)) * j));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (j <= -4e+105) tmp = Float64(Float64(Float64(Float64(y * x) - Float64(c * b)) * z) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (j <= -9e-255) tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); elseif (j <= 1.35e+77) tmp = fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(Float64(Float64(z * y) * x) - Float64(Float64(c * b) * z))); else tmp = fma(t_1, x, Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4e+105], N[(N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9e-255], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.35e+77], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;j \leq -4 \cdot 10^{+105}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;j \leq -9 \cdot 10^{-255}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot t\right) \cdot b\\
\mathbf{elif}\;j \leq 1.35 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \left(z \cdot y\right) \cdot x - \left(c \cdot b\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot a - i \cdot y\right) \cdot j\right)\\
\end{array}
\end{array}
if j < -3.9999999999999998e105Initial program 71.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.9
Applied rewrites70.9%
if -3.9999999999999998e105 < j < -8.99999999999999959e-255Initial program 74.9%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6465.7
Applied rewrites65.7%
if -8.99999999999999959e-255 < j < 1.3499999999999999e77Initial program 72.9%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6468.5
Applied rewrites68.5%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower--.f64N/A
Applied rewrites67.9%
if 1.3499999999999999e77 < j Initial program 73.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6471.8
Applied rewrites71.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= j -4e+105)
(+ (* (- (* y x) (* c b)) z) (* j (- (* c a) (* y i))))
(if (<= j 4.6e-74)
(- (* t_1 x) (* (- (* c z) (* i t)) b))
(fma t_1 x (* (- (* c a) (* i y)) j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (j <= -4e+105) {
tmp = (((y * x) - (c * b)) * z) + (j * ((c * a) - (y * i)));
} else if (j <= 4.6e-74) {
tmp = (t_1 * x) - (((c * z) - (i * t)) * b);
} else {
tmp = fma(t_1, x, (((c * a) - (i * y)) * j));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (j <= -4e+105) tmp = Float64(Float64(Float64(Float64(y * x) - Float64(c * b)) * z) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (j <= 4.6e-74) tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); else tmp = fma(t_1, x, Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4e+105], N[(N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.6e-74], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;j \leq -4 \cdot 10^{+105}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;j \leq 4.6 \cdot 10^{-74}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot a - i \cdot y\right) \cdot j\right)\\
\end{array}
\end{array}
if j < -3.9999999999999998e105Initial program 71.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.9
Applied rewrites70.9%
if -3.9999999999999998e105 < j < 4.59999999999999961e-74Initial program 73.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6469.5
Applied rewrites69.5%
if 4.59999999999999961e-74 < j Initial program 74.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.4%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6468.6
Applied rewrites68.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* z y) (* a t))))
(if (<= j -7.5e+105)
(+ (- (* (* c b) z)) (* j (- (* c a) (* y i))))
(if (<= j 4.6e-74)
(- (* t_1 x) (* (- (* c z) (* i t)) b))
(fma t_1 x (* (- (* c a) (* i y)) j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) - (a * t);
double tmp;
if (j <= -7.5e+105) {
tmp = -((c * b) * z) + (j * ((c * a) - (y * i)));
} else if (j <= 4.6e-74) {
tmp = (t_1 * x) - (((c * z) - (i * t)) * b);
} else {
tmp = fma(t_1, x, (((c * a) - (i * y)) * j));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) - Float64(a * t)) tmp = 0.0 if (j <= -7.5e+105) tmp = Float64(Float64(-Float64(Float64(c * b) * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (j <= 4.6e-74) tmp = Float64(Float64(t_1 * x) - Float64(Float64(Float64(c * z) - Float64(i * t)) * b)); else tmp = fma(t_1, x, Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.5e+105], N[((-N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]) + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.6e-74], N[(N[(t$95$1 * x), $MachinePrecision] - N[(N[(N[(c * z), $MachinePrecision] - N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - a \cdot t\\
\mathbf{if}\;j \leq -7.5 \cdot 10^{+105}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;j \leq 4.6 \cdot 10^{-74}:\\
\;\;\;\;t\_1 \cdot x - \left(c \cdot z - i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \left(c \cdot a - i \cdot y\right) \cdot j\right)\\
\end{array}
\end{array}
if j < -7.5000000000000002e105Initial program 71.4%
Taylor expanded in c around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.8
Applied rewrites67.8%
if -7.5000000000000002e105 < j < 4.59999999999999961e-74Initial program 73.5%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6469.4
Applied rewrites69.4%
if 4.59999999999999961e-74 < j Initial program 74.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.4%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6468.6
Applied rewrites68.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i t) (* c z))))
(if (<= b -4e+41)
(fma t_1 b (* (* j c) a))
(if (<= b 3.2e+72)
(fma (- (* z y) (* a t)) x (* (- (* c a) (* i y)) j))
(fma t_1 b (* (* z y) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) - (c * z);
double tmp;
if (b <= -4e+41) {
tmp = fma(t_1, b, ((j * c) * a));
} else if (b <= 3.2e+72) {
tmp = fma(((z * y) - (a * t)), x, (((c * a) - (i * y)) * j));
} else {
tmp = fma(t_1, b, ((z * y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) - Float64(c * z)) tmp = 0.0 if (b <= -4e+41) tmp = fma(t_1, b, Float64(Float64(j * c) * a)); elseif (b <= 3.2e+72) tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = fma(t_1, b, Float64(Float64(z * y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+41], N[(t$95$1 * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e+72], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot t - c \cdot z\\
\mathbf{if}\;b \leq -4 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot a - i \cdot y\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if b < -4.00000000000000002e41Initial program 71.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -4.00000000000000002e41 < b < 3.2000000000000001e72Initial program 74.0%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites75.2%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6470.4
Applied rewrites70.4%
if 3.2000000000000001e72 < b Initial program 74.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6468.2
Applied rewrites68.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i t) (* c z))))
(if (<= b -4e+41)
(fma t_1 b (* (* j c) a))
(if (<= b 3.2e+72)
(fma (- (* c a) (* i y)) j (* (- (* z y) (* a t)) x))
(fma t_1 b (* (* z y) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) - (c * z);
double tmp;
if (b <= -4e+41) {
tmp = fma(t_1, b, ((j * c) * a));
} else if (b <= 3.2e+72) {
tmp = fma(((c * a) - (i * y)), j, (((z * y) - (a * t)) * x));
} else {
tmp = fma(t_1, b, ((z * y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) - Float64(c * z)) tmp = 0.0 if (b <= -4e+41) tmp = fma(t_1, b, Float64(Float64(j * c) * a)); elseif (b <= 3.2e+72) tmp = fma(Float64(Float64(c * a) - Float64(i * y)), j, Float64(Float64(Float64(z * y) - Float64(a * t)) * x)); else tmp = fma(t_1, b, Float64(Float64(z * y) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+41], N[(t$95$1 * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.2e+72], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j + N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot t - c \cdot z\\
\mathbf{if}\;b \leq -4 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(z \cdot y - a \cdot t\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if b < -4.00000000000000002e41Initial program 71.1%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -4.00000000000000002e41 < b < 3.2000000000000001e72Initial program 74.0%
Taylor expanded in b around 0
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.3
Applied rewrites70.3%
if 3.2000000000000001e72 < b Initial program 74.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6468.2
Applied rewrites68.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* i t) (* c z))) (t_2 (* (fma (- t) x (* j c)) a)))
(if (<= a -2.75e+191)
t_2
(if (<= a -1.35e-60)
(fma t_1 b (* (- a) (* t x)))
(if (<= a 1.05e+51) (fma t_1 b (* (* z y) x)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) - (c * z);
double t_2 = fma(-t, x, (j * c)) * a;
double tmp;
if (a <= -2.75e+191) {
tmp = t_2;
} else if (a <= -1.35e-60) {
tmp = fma(t_1, b, (-a * (t * x)));
} else if (a <= 1.05e+51) {
tmp = fma(t_1, b, ((z * y) * x));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) - Float64(c * z)) t_2 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -2.75e+191) tmp = t_2; elseif (a <= -1.35e-60) tmp = fma(t_1, b, Float64(Float64(-a) * Float64(t * x))); elseif (a <= 1.05e+51) tmp = fma(t_1, b, Float64(Float64(z * y) * x)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -2.75e+191], t$95$2, If[LessEqual[a, -1.35e-60], N[(t$95$1 * b + N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e+51], N[(t$95$1 * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot t - c \cdot z\\
t_2 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -2.75 \cdot 10^{+191}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-60}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.7500000000000001e191 or 1.0500000000000001e51 < a Initial program 62.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -2.7500000000000001e191 < a < -1.35e-60Initial program 72.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites75.8%
Taylor expanded in t around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6451.1
Applied rewrites51.1%
if -1.35e-60 < a < 1.0500000000000001e51Initial program 80.3%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites82.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6459.5
Applied rewrites59.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) x (* j c)) a)))
(if (<= a -7e+175)
t_1
(if (<= a 1.05e+51) (fma (- (* i t) (* c z)) b (* (* z y) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, x, (j * c)) * a;
double tmp;
if (a <= -7e+175) {
tmp = t_1;
} else if (a <= 1.05e+51) {
tmp = fma(((i * t) - (c * z)), b, ((z * y) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -7e+175) tmp = t_1; elseif (a <= 1.05e+51) tmp = fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(z * y) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -7e+175], t$95$1, If[LessEqual[a, 1.05e+51], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -7 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.0000000000000006e175 or 1.0500000000000001e51 < a Initial program 62.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -7.0000000000000006e175 < a < 1.0500000000000001e51Initial program 78.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites80.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f6455.4
Applied rewrites55.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) x (* j c)) a)))
(if (<= a -8.8e+175)
t_1
(if (<= a -3.3e-156)
(fma (- (* i t) (* c z)) b (* (* j c) a))
(if (<= a 6200000000000.0) (* (- (* y x) (* c b)) 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(-t, x, (j * c)) * a;
double tmp;
if (a <= -8.8e+175) {
tmp = t_1;
} else if (a <= -3.3e-156) {
tmp = fma(((i * t) - (c * z)), b, ((j * c) * a));
} else if (a <= 6200000000000.0) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -8.8e+175) tmp = t_1; elseif (a <= -3.3e-156) tmp = fma(Float64(Float64(i * t) - Float64(c * z)), b, Float64(Float64(j * c) * a)); elseif (a <= 6200000000000.0) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * 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[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -8.8e+175], t$95$1, If[LessEqual[a, -3.3e-156], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b + N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6200000000000.0], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-156}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(j \cdot c\right) \cdot a\right)\\
\mathbf{elif}\;a \leq 6200000000000:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.7999999999999997e175 or 6.2e12 < a Initial program 64.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.7
Applied rewrites63.7%
if -8.7999999999999997e175 < a < -3.2999999999999999e-156Initial program 75.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites77.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6449.9
Applied rewrites49.9%
if -3.2999999999999999e-156 < a < 6.2e12Initial program 80.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) x (* j c)) a)))
(if (<= a -7e+175)
t_1
(if (<= a -3.4e-156)
(* (- (* i t) (* c z)) b)
(if (<= a 6200000000000.0) (* (- (* y x) (* c b)) 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(-t, x, (j * c)) * a;
double tmp;
if (a <= -7e+175) {
tmp = t_1;
} else if (a <= -3.4e-156) {
tmp = ((i * t) - (c * z)) * b;
} else if (a <= 6200000000000.0) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), x, Float64(j * c)) * a) tmp = 0.0 if (a <= -7e+175) tmp = t_1; elseif (a <= -3.4e-156) tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); elseif (a <= 6200000000000.0) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * 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[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -7e+175], t$95$1, If[LessEqual[a, -3.4e-156], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 6200000000000.0], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -7 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-156}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{elif}\;a \leq 6200000000000:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.0000000000000006e175 or 6.2e12 < a Initial program 64.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.7
Applied rewrites63.7%
if -7.0000000000000006e175 < a < -3.3999999999999999e-156Initial program 75.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6438.5
Applied rewrites38.5%
if -3.3999999999999999e-156 < a < 6.2e12Initial program 80.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied rewrites46.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* c a) (* i y)) j)) (t_2 (* (- (* i t) (* c z)) b)))
(if (<= b -9.2e+48)
t_2
(if (<= b -8.8e-156)
t_1
(if (<= b 3.8e-275)
(* (- (* z y) (* a t)) x)
(if (<= b 0.14) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((c * a) - (i * y)) * j;
double t_2 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -9.2e+48) {
tmp = t_2;
} else if (b <= -8.8e-156) {
tmp = t_1;
} else if (b <= 3.8e-275) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 0.14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((c * a) - (i * y)) * j
t_2 = ((i * t) - (c * z)) * b
if (b <= (-9.2d+48)) then
tmp = t_2
else if (b <= (-8.8d-156)) then
tmp = t_1
else if (b <= 3.8d-275) then
tmp = ((z * y) - (a * t)) * x
else if (b <= 0.14d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((c * a) - (i * y)) * j;
double t_2 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -9.2e+48) {
tmp = t_2;
} else if (b <= -8.8e-156) {
tmp = t_1;
} else if (b <= 3.8e-275) {
tmp = ((z * y) - (a * t)) * x;
} else if (b <= 0.14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((c * a) - (i * y)) * j t_2 = ((i * t) - (c * z)) * b tmp = 0 if b <= -9.2e+48: tmp = t_2 elif b <= -8.8e-156: tmp = t_1 elif b <= 3.8e-275: tmp = ((z * y) - (a * t)) * x elif b <= 0.14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(c * a) - Float64(i * y)) * j) t_2 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -9.2e+48) tmp = t_2; elseif (b <= -8.8e-156) tmp = t_1; elseif (b <= 3.8e-275) tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x); elseif (b <= 0.14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((c * a) - (i * y)) * j; t_2 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -9.2e+48) tmp = t_2; elseif (b <= -8.8e-156) tmp = t_1; elseif (b <= 3.8e-275) tmp = ((z * y) - (a * t)) * x; elseif (b <= 0.14) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -9.2e+48], t$95$2, If[LessEqual[b, -8.8e-156], t$95$1, If[LessEqual[b, 3.8e-275], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 0.14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j\\
t_2 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -8.8 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-275}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x\\
\mathbf{elif}\;b \leq 0.14:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -9.2000000000000001e48 or 0.14000000000000001 < b Initial program 72.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6461.2
Applied rewrites61.2%
if -9.2000000000000001e48 < b < -8.7999999999999996e-156 or 3.79999999999999972e-275 < b < 0.14000000000000001Initial program 75.0%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.5
Applied rewrites45.5%
if -8.7999999999999996e-156 < b < 3.79999999999999972e-275Initial program 71.0%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6446.2
Applied rewrites46.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* c a) (* i y)) j)))
(if (<= j -8.2e+105)
t_1
(if (<= j 1.04e-265)
(* (- (* i t) (* c z)) b)
(if (<= j 1.15e-50) (* (- (* y x) (* c b)) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((c * a) - (i * y)) * j;
double tmp;
if (j <= -8.2e+105) {
tmp = t_1;
} else if (j <= 1.04e-265) {
tmp = ((i * t) - (c * z)) * b;
} else if (j <= 1.15e-50) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((c * a) - (i * y)) * j
if (j <= (-8.2d+105)) then
tmp = t_1
else if (j <= 1.04d-265) then
tmp = ((i * t) - (c * z)) * b
else if (j <= 1.15d-50) then
tmp = ((y * x) - (c * b)) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((c * a) - (i * y)) * j;
double tmp;
if (j <= -8.2e+105) {
tmp = t_1;
} else if (j <= 1.04e-265) {
tmp = ((i * t) - (c * z)) * b;
} else if (j <= 1.15e-50) {
tmp = ((y * x) - (c * b)) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((c * a) - (i * y)) * j tmp = 0 if j <= -8.2e+105: tmp = t_1 elif j <= 1.04e-265: tmp = ((i * t) - (c * z)) * b elif j <= 1.15e-50: tmp = ((y * x) - (c * b)) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(c * a) - Float64(i * y)) * j) tmp = 0.0 if (j <= -8.2e+105) tmp = t_1; elseif (j <= 1.04e-265) tmp = Float64(Float64(Float64(i * t) - Float64(c * z)) * b); elseif (j <= 1.15e-50) tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((c * a) - (i * y)) * j; tmp = 0.0; if (j <= -8.2e+105) tmp = t_1; elseif (j <= 1.04e-265) tmp = ((i * t) - (c * z)) * b; elseif (j <= 1.15e-50) tmp = ((y * x) - (c * b)) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -8.2e+105], t$95$1, If[LessEqual[j, 1.04e-265], N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[j, 1.15e-50], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -8.2 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.04 \cdot 10^{-265}:\\
\;\;\;\;\left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{elif}\;j \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -8.2000000000000005e105 or 1.1500000000000001e-50 < j Initial program 73.2%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.6
Applied rewrites60.6%
if -8.2000000000000005e105 < j < 1.04e-265Initial program 73.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6445.2
Applied rewrites45.2%
if 1.04e-265 < j < 1.1500000000000001e-50Initial 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-*.f6446.1
Applied rewrites46.1%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (- (* i t) (* c z)) b))) (if (<= b -9.2e+48) t_1 (if (<= b 0.14) (* (- (* c a) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -9.2e+48) {
tmp = t_1;
} else if (b <= 0.14) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((i * t) - (c * z)) * b
if (b <= (-9.2d+48)) then
tmp = t_1
else if (b <= 0.14d0) then
tmp = ((c * a) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((i * t) - (c * z)) * b;
double tmp;
if (b <= -9.2e+48) {
tmp = t_1;
} else if (b <= 0.14) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((i * t) - (c * z)) * b tmp = 0 if b <= -9.2e+48: tmp = t_1 elif b <= 0.14: tmp = ((c * a) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * t) - Float64(c * z)) * b) tmp = 0.0 if (b <= -9.2e+48) tmp = t_1; elseif (b <= 0.14) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((i * t) - (c * z)) * b; tmp = 0.0; if (b <= -9.2e+48) tmp = t_1; elseif (b <= 0.14) tmp = ((c * a) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -9.2e+48], t$95$1, If[LessEqual[b, 0.14], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 0.14:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.2000000000000001e48 or 0.14000000000000001 < b Initial program 72.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f6461.2
Applied rewrites61.2%
if -9.2000000000000001e48 < b < 0.14000000000000001Initial program 73.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.3
Applied rewrites46.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -1.3e+171)
t_1
(if (<= z 1.55e+16) (* (- (* c a) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -b * (c * z);
double tmp;
if (z <= -1.3e+171) {
tmp = t_1;
} else if (z <= 1.55e+16) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = -b * (c * z)
if (z <= (-1.3d+171)) then
tmp = t_1
else if (z <= 1.55d+16) then
tmp = ((c * a) - (i * y)) * j
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -b * (c * z);
double tmp;
if (z <= -1.3e+171) {
tmp = t_1;
} else if (z <= 1.55e+16) {
tmp = ((c * a) - (i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -1.3e+171: tmp = t_1 elif z <= 1.55e+16: tmp = ((c * a) - (i * y)) * j else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -1.3e+171) tmp = t_1; elseif (z <= 1.55e+16) tmp = Float64(Float64(Float64(c * a) - Float64(i * y)) * j); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -b * (c * z); tmp = 0.0; if (z <= -1.3e+171) tmp = t_1; elseif (z <= 1.55e+16) tmp = ((c * a) - (i * y)) * j; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+171], t$95$1, If[LessEqual[z, 1.55e+16], N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+16}:\\
\;\;\;\;\left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e171 or 1.55e16 < z Initial program 63.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6463.1
Applied rewrites63.1%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
if -1.3e171 < z < 1.55e16Initial program 78.6%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- i) y) j)) (t_2 (* (- b) (* c z))))
(if (<= z -7.4e+31)
t_2
(if (<= z -7e-106)
t_1
(if (<= z 9.6e-192)
(* (- t) (* a x))
(if (<= z 6e-11) t_1 (if (<= z 1.2e+37) (* (* (- a) t) x) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = -t * (a * x);
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 1.2e+37) {
tmp = (-a * t) * x;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-i * y) * j
t_2 = -b * (c * z)
if (z <= (-7.4d+31)) then
tmp = t_2
else if (z <= (-7d-106)) then
tmp = t_1
else if (z <= 9.6d-192) then
tmp = -t * (a * x)
else if (z <= 6d-11) then
tmp = t_1
else if (z <= 1.2d+37) then
tmp = (-a * t) * x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = -t * (a * x);
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 1.2e+37) {
tmp = (-a * t) * x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-i * y) * j t_2 = -b * (c * z) tmp = 0 if z <= -7.4e+31: tmp = t_2 elif z <= -7e-106: tmp = t_1 elif z <= 9.6e-192: tmp = -t * (a * x) elif z <= 6e-11: tmp = t_1 elif z <= 1.2e+37: tmp = (-a * t) * x else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-i) * y) * j) t_2 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = Float64(Float64(-t) * Float64(a * x)); elseif (z <= 6e-11) tmp = t_1; elseif (z <= 1.2e+37) tmp = Float64(Float64(Float64(-a) * t) * x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-i * y) * j; t_2 = -b * (c * z); tmp = 0.0; if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = -t * (a * x); elseif (z <= 6e-11) tmp = t_1; elseif (z <= 1.2e+37) tmp = (-a * t) * x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+31], t$95$2, If[LessEqual[z, -7e-106], t$95$1, If[LessEqual[z, 9.6e-192], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-11], t$95$1, If[LessEqual[z, 1.2e+37], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot y\right) \cdot j\\
t_2 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-192}:\\
\;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+37}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.3999999999999996e31 or 1.2e37 < z Initial program 64.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6437.5
Applied rewrites37.5%
if -7.3999999999999996e31 < z < -7e-106 or 9.5999999999999997e-192 < z < 6e-11Initial program 80.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6424.8
Applied rewrites24.8%
if -7e-106 < z < 9.5999999999999997e-192Initial program 80.8%
Taylor expanded in t 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-*.f6447.7
Applied rewrites47.7%
Taylor expanded in x around inf
lift-*.f6426.4
Applied rewrites26.4%
if 6e-11 < z < 1.2e37Initial program 80.8%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.1
Applied rewrites34.1%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6424.3
Applied rewrites24.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- i) y) j)) (t_2 (* (- b) (* c z))))
(if (<= z -7.4e+31)
t_2
(if (<= z -7e-106)
t_1
(if (<= z 9.6e-192)
(* (- a) (* t x))
(if (<= z 6e-11) t_1 (if (<= z 1.2e+37) (* (* (- a) t) x) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = -a * (t * x);
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 1.2e+37) {
tmp = (-a * t) * x;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-i * y) * j
t_2 = -b * (c * z)
if (z <= (-7.4d+31)) then
tmp = t_2
else if (z <= (-7d-106)) then
tmp = t_1
else if (z <= 9.6d-192) then
tmp = -a * (t * x)
else if (z <= 6d-11) then
tmp = t_1
else if (z <= 1.2d+37) then
tmp = (-a * t) * x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = -a * (t * x);
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 1.2e+37) {
tmp = (-a * t) * x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-i * y) * j t_2 = -b * (c * z) tmp = 0 if z <= -7.4e+31: tmp = t_2 elif z <= -7e-106: tmp = t_1 elif z <= 9.6e-192: tmp = -a * (t * x) elif z <= 6e-11: tmp = t_1 elif z <= 1.2e+37: tmp = (-a * t) * x else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-i) * y) * j) t_2 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = Float64(Float64(-a) * Float64(t * x)); elseif (z <= 6e-11) tmp = t_1; elseif (z <= 1.2e+37) tmp = Float64(Float64(Float64(-a) * t) * x); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-i * y) * j; t_2 = -b * (c * z); tmp = 0.0; if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = -a * (t * x); elseif (z <= 6e-11) tmp = t_1; elseif (z <= 1.2e+37) tmp = (-a * t) * x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+31], t$95$2, If[LessEqual[z, -7e-106], t$95$1, If[LessEqual[z, 9.6e-192], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-11], t$95$1, If[LessEqual[z, 1.2e+37], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot y\right) \cdot j\\
t_2 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-192}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+37}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.3999999999999996e31 or 1.2e37 < z Initial program 64.6%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6437.5
Applied rewrites37.5%
if -7.3999999999999996e31 < z < -7e-106 or 9.5999999999999997e-192 < z < 6e-11Initial program 80.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6424.8
Applied rewrites24.8%
if -7e-106 < z < 9.5999999999999997e-192Initial program 80.8%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 6e-11 < z < 1.2e37Initial program 80.8%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.1
Applied rewrites34.1%
Taylor expanded in y around 0
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6424.3
Applied rewrites24.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- i) y) j))
(t_2 (* (- b) (* c z)))
(t_3 (* (- a) (* t x))))
(if (<= z -7.4e+31)
t_2
(if (<= z -7e-106)
t_1
(if (<= z 9.6e-192)
t_3
(if (<= z 6e-11) t_1 (if (<= z 3.5e+38) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double t_3 = -a * (t * x);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = t_3;
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 3.5e+38) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (-i * y) * j
t_2 = -b * (c * z)
t_3 = -a * (t * x)
if (z <= (-7.4d+31)) then
tmp = t_2
else if (z <= (-7d-106)) then
tmp = t_1
else if (z <= 9.6d-192) then
tmp = t_3
else if (z <= 6d-11) then
tmp = t_1
else if (z <= 3.5d+38) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-i * y) * j;
double t_2 = -b * (c * z);
double t_3 = -a * (t * x);
double tmp;
if (z <= -7.4e+31) {
tmp = t_2;
} else if (z <= -7e-106) {
tmp = t_1;
} else if (z <= 9.6e-192) {
tmp = t_3;
} else if (z <= 6e-11) {
tmp = t_1;
} else if (z <= 3.5e+38) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-i * y) * j t_2 = -b * (c * z) t_3 = -a * (t * x) tmp = 0 if z <= -7.4e+31: tmp = t_2 elif z <= -7e-106: tmp = t_1 elif z <= 9.6e-192: tmp = t_3 elif z <= 6e-11: tmp = t_1 elif z <= 3.5e+38: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-i) * y) * j) t_2 = Float64(Float64(-b) * Float64(c * z)) t_3 = Float64(Float64(-a) * Float64(t * x)) tmp = 0.0 if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = t_3; elseif (z <= 6e-11) tmp = t_1; elseif (z <= 3.5e+38) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-i * y) * j; t_2 = -b * (c * z); t_3 = -a * (t * x); tmp = 0.0; if (z <= -7.4e+31) tmp = t_2; elseif (z <= -7e-106) tmp = t_1; elseif (z <= 9.6e-192) tmp = t_3; elseif (z <= 6e-11) tmp = t_1; elseif (z <= 3.5e+38) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+31], t$95$2, If[LessEqual[z, -7e-106], t$95$1, If[LessEqual[z, 9.6e-192], t$95$3, If[LessEqual[z, 6e-11], t$95$1, If[LessEqual[z, 3.5e+38], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-i\right) \cdot y\right) \cdot j\\
t_2 := \left(-b\right) \cdot \left(c \cdot z\right)\\
t_3 := \left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-192}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+38}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.3999999999999996e31 or 3.50000000000000002e38 < z Initial program 64.5%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6437.5
Applied rewrites37.5%
if -7.3999999999999996e31 < z < -7e-106 or 9.5999999999999997e-192 < z < 6e-11Initial program 80.8%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.9
Applied rewrites43.9%
Taylor expanded in y around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6424.8
Applied rewrites24.8%
if -7e-106 < z < 9.5999999999999997e-192 or 6e-11 < z < 3.50000000000000002e38Initial program 80.2%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6452.6
Applied rewrites52.6%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -7.5e+52)
t_1
(if (<= z -8.2e-69)
(* (* b t) i)
(if (<= z 3.5e+38) (* (- a) (* t x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -b * (c * z);
double tmp;
if (z <= -7.5e+52) {
tmp = t_1;
} else if (z <= -8.2e-69) {
tmp = (b * t) * i;
} else if (z <= 3.5e+38) {
tmp = -a * (t * x);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = -b * (c * z)
if (z <= (-7.5d+52)) then
tmp = t_1
else if (z <= (-8.2d-69)) then
tmp = (b * t) * i
else if (z <= 3.5d+38) then
tmp = -a * (t * x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -b * (c * z);
double tmp;
if (z <= -7.5e+52) {
tmp = t_1;
} else if (z <= -8.2e-69) {
tmp = (b * t) * i;
} else if (z <= 3.5e+38) {
tmp = -a * (t * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -7.5e+52: tmp = t_1 elif z <= -8.2e-69: tmp = (b * t) * i elif z <= 3.5e+38: tmp = -a * (t * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -7.5e+52) tmp = t_1; elseif (z <= -8.2e-69) tmp = Float64(Float64(b * t) * i); elseif (z <= 3.5e+38) tmp = Float64(Float64(-a) * Float64(t * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -b * (c * z); tmp = 0.0; if (z <= -7.5e+52) tmp = t_1; elseif (z <= -8.2e-69) tmp = (b * t) * i; elseif (z <= 3.5e+38) tmp = -a * (t * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+52], t$95$1, If[LessEqual[z, -8.2e-69], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 3.5e+38], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-69}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+38}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.49999999999999995e52 or 3.50000000000000002e38 < z Initial program 64.3%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6463.3
Applied rewrites63.3%
Taylor expanded in c around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-*.f6438.1
Applied rewrites38.1%
if -7.49999999999999995e52 < z < -8.1999999999999998e-69Initial program 78.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites81.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6437.9
Applied rewrites37.9%
Taylor expanded in y around 0
lower-*.f6419.6
Applied rewrites19.6%
if -8.1999999999999998e-69 < z < 3.50000000000000002e38Initial program 80.7%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6453.8
Applied rewrites53.8%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6425.5
Applied rewrites25.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- a) (* t x))))
(if (<= a -8.5)
t_1
(if (<= a -3.3e-156)
(* (* b t) i)
(if (<= a 1.9e+21) (* (* z y) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -a * (t * x);
double tmp;
if (a <= -8.5) {
tmp = t_1;
} else if (a <= -3.3e-156) {
tmp = (b * t) * i;
} else if (a <= 1.9e+21) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = -a * (t * x)
if (a <= (-8.5d0)) then
tmp = t_1
else if (a <= (-3.3d-156)) then
tmp = (b * t) * i
else if (a <= 1.9d+21) then
tmp = (z * y) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = -a * (t * x);
double tmp;
if (a <= -8.5) {
tmp = t_1;
} else if (a <= -3.3e-156) {
tmp = (b * t) * i;
} else if (a <= 1.9e+21) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -a * (t * x) tmp = 0 if a <= -8.5: tmp = t_1 elif a <= -3.3e-156: tmp = (b * t) * i elif a <= 1.9e+21: tmp = (z * y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-a) * Float64(t * x)) tmp = 0.0 if (a <= -8.5) tmp = t_1; elseif (a <= -3.3e-156) tmp = Float64(Float64(b * t) * i); elseif (a <= 1.9e+21) tmp = Float64(Float64(z * y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -a * (t * x); tmp = 0.0; if (a <= -8.5) tmp = t_1; elseif (a <= -3.3e-156) tmp = (b * t) * i; elseif (a <= 1.9e+21) tmp = (z * y) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5], t$95$1, If[LessEqual[a, -3.3e-156], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[a, 1.9e+21], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\
\mathbf{if}\;a \leq -8.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-156}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+21}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.5 or 1.9e21 < a Initial program 66.4%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6432.8
Applied rewrites32.8%
if -8.5 < a < -3.2999999999999999e-156Initial program 79.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites81.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6444.1
Applied rewrites44.1%
Taylor expanded in y around 0
lower-*.f6423.6
Applied rewrites23.6%
if -3.2999999999999999e-156 < a < 1.9e21Initial program 80.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6431.9
Applied rewrites31.9%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6425.8
Applied rewrites25.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -6.6e+14)
(* (* j c) a)
(if (<= a -3.3e-156)
(* (* b t) i)
(if (<= a 7500000000000.0) (* (* z y) x) (* (* c a) j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -6.6e+14) {
tmp = (j * c) * a;
} else if (a <= -3.3e-156) {
tmp = (b * t) * i;
} else if (a <= 7500000000000.0) {
tmp = (z * y) * x;
} else {
tmp = (c * a) * j;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (a <= (-6.6d+14)) then
tmp = (j * c) * a
else if (a <= (-3.3d-156)) then
tmp = (b * t) * i
else if (a <= 7500000000000.0d0) then
tmp = (z * y) * x
else
tmp = (c * a) * j
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -6.6e+14) {
tmp = (j * c) * a;
} else if (a <= -3.3e-156) {
tmp = (b * t) * i;
} else if (a <= 7500000000000.0) {
tmp = (z * y) * x;
} else {
tmp = (c * a) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -6.6e+14: tmp = (j * c) * a elif a <= -3.3e-156: tmp = (b * t) * i elif a <= 7500000000000.0: tmp = (z * y) * x else: tmp = (c * a) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -6.6e+14) tmp = Float64(Float64(j * c) * a); elseif (a <= -3.3e-156) tmp = Float64(Float64(b * t) * i); elseif (a <= 7500000000000.0) tmp = Float64(Float64(z * y) * x); else tmp = Float64(Float64(c * a) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -6.6e+14) tmp = (j * c) * a; elseif (a <= -3.3e-156) tmp = (b * t) * i; elseif (a <= 7500000000000.0) tmp = (z * y) * x; else tmp = (c * a) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -6.6e+14], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, -3.3e-156], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[a, 7500000000000.0], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+14}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-156}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{elif}\;a \leq 7500000000000:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if a < -6.6e14Initial program 66.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6449.2
Applied rewrites49.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.6
Applied rewrites36.6%
if -6.6e14 < a < -3.2999999999999999e-156Initial program 78.9%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites81.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6443.1
Applied rewrites43.1%
Taylor expanded in y around 0
lower-*.f6423.0
Applied rewrites23.0%
if -3.2999999999999999e-156 < a < 7.5e12Initial program 80.5%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6431.9
Applied rewrites31.9%
Taylor expanded in y around inf
*-commutativeN/A
lift-*.f6425.9
Applied rewrites25.9%
if 7.5e12 < a Initial program 65.9%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.3
Applied rewrites46.3%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6435.2
Applied rewrites35.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c a) j))) (if (<= c -3e+171) t_1 (if (<= c 12000.0) (* (* b t) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * a) * j;
double tmp;
if (c <= -3e+171) {
tmp = t_1;
} else if (c <= 12000.0) {
tmp = (b * t) * i;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (c * a) * j
if (c <= (-3d+171)) then
tmp = t_1
else if (c <= 12000.0d0) then
tmp = (b * t) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (c * a) * j;
double tmp;
if (c <= -3e+171) {
tmp = t_1;
} else if (c <= 12000.0) {
tmp = (b * t) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * a) * j tmp = 0 if c <= -3e+171: tmp = t_1 elif c <= 12000.0: tmp = (b * t) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * a) * j) tmp = 0.0 if (c <= -3e+171) tmp = t_1; elseif (c <= 12000.0) tmp = Float64(Float64(b * t) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (c * a) * j; tmp = 0.0; if (c <= -3e+171) tmp = t_1; elseif (c <= 12000.0) tmp = (b * t) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -3e+171], t$95$1, If[LessEqual[c, 12000.0], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a\right) \cdot j\\
\mathbf{if}\;c \leq -3 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 12000:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.0000000000000001e171 or 12000 < c Initial program 64.5%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.9
Applied rewrites46.9%
Taylor expanded in y around 0
*-commutativeN/A
lift-*.f6437.9
Applied rewrites37.9%
if -3.0000000000000001e171 < c < 12000Initial program 78.5%
Taylor expanded in b around 0
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites81.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in y around 0
lower-*.f6424.6
Applied rewrites24.6%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j c) a))) (if (<= j -3200000000000.0) t_1 (if (<= j 9e-72) (* (* i t) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (j <= -3200000000000.0) {
tmp = t_1;
} else if (j <= 9e-72) {
tmp = (i * t) * 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 = (j * c) * a
if (j <= (-3200000000000.0d0)) then
tmp = t_1
else if (j <= 9d-72) then
tmp = (i * t) * 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 = (j * c) * a;
double tmp;
if (j <= -3200000000000.0) {
tmp = t_1;
} else if (j <= 9e-72) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if j <= -3200000000000.0: tmp = t_1 elif j <= 9e-72: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (j <= -3200000000000.0) tmp = t_1; elseif (j <= 9e-72) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (j <= -3200000000000.0) tmp = t_1; elseif (j <= 9e-72) tmp = (i * t) * 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[j, -3200000000000.0], t$95$1, If[LessEqual[j, 9e-72], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;j \leq -3200000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 9 \cdot 10^{-72}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -3.2e12 or 9e-72 < j Initial program 73.7%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6457.7
Applied rewrites57.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6432.9
Applied rewrites32.9%
if -3.2e12 < j < 9e-72Initial program 73.1%
Taylor expanded in j around 0
lower--.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f6425.2
Applied rewrites25.2%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j c) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * c) * 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 = (j * c) * 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 (j * c) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (j * c) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * c) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * c) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot c\right) \cdot a
\end{array}
Initial program 73.4%
Taylor expanded in j around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
Applied rewrites40.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6422.7
Applied rewrites22.7%
herbie shell --seed 2025120
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))