
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))))
(if (<= (+ t_1 (* j (- (* c a) (* y i)))) INFINITY)
(+ t_1 (* j (fma (- y) i (* c a))))
(* (- (* j c) (* t x)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)));
double tmp;
if ((t_1 + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = t_1 + (j * fma(-y, i, (c * a)));
} else {
tmp = ((j * c) - (t * x)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) tmp = 0.0 if (Float64(t_1 + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = Float64(t_1 + Float64(j * fma(Float64(-y), i, Float64(c * a)))); else tmp = Float64(Float64(Float64(j * c) - Float64(t * x)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = 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]}, If[LessEqual[N[(t$95$1 + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 + N[(j * N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\\
\mathbf{if}\;t\_1 + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;t\_1 + j \cdot \mathsf{fma}\left(-y, i, c \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c - t \cdot x\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 73.5%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6473.7
Applied rewrites73.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* (- (* j c) (* t x)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = ((j * c) - (t * x)) * a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = ((j * c) - (t * x)) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = ((j * c) - (t * x)) * a return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(Float64(j * c) - Float64(t * x)) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = ((j * c) - (t * x)) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c - t \cdot x\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 73.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 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (fma -1.0 (* j y) (* b t)))))
(if (<= i -6.9e+143)
t_1
(if (<= i 1.7e+73)
(- (fma a (* c j) (* x (- (* y z) (* a t)))) (* b (* c z)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * fma(-1.0, (j * y), (b * t));
double tmp;
if (i <= -6.9e+143) {
tmp = t_1;
} else if (i <= 1.7e+73) {
tmp = fma(a, (c * j), (x * ((y * z) - (a * t)))) - (b * (c * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * fma(-1.0, Float64(j * y), Float64(b * t))) tmp = 0.0 if (i <= -6.9e+143) tmp = t_1; elseif (i <= 1.7e+73) tmp = Float64(fma(a, Float64(c * j), Float64(x * Float64(Float64(y * z) - Float64(a * t)))) - Float64(b * Float64(c * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(-1.0 * N[(j * y), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -6.9e+143], t$95$1, If[LessEqual[i, 1.7e+73], N[(N[(a * N[(c * j), $MachinePrecision] + N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \mathsf{fma}\left(-1, j \cdot y, b \cdot t\right)\\
\mathbf{if}\;i \leq -6.9 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(a, c \cdot j, x \cdot \left(y \cdot z - a \cdot t\right)\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -6.8999999999999999e143 or 1.7000000000000001e73 < i Initial program 73.5%
Applied rewrites75.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -6.8999999999999999e143 < i < 1.7000000000000001e73Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (fma -1.0 (* j y) (* b t)))))
(if (<= i -5.5e+109)
t_1
(if (<= i 2.15e-43)
(- (* x (- (* y z) (* a t))) (* b (* c z)))
(if (<= i 1.2e+71) (* (- (* j c) (* t x)) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * fma(-1.0, (j * y), (b * t));
double tmp;
if (i <= -5.5e+109) {
tmp = t_1;
} else if (i <= 2.15e-43) {
tmp = (x * ((y * z) - (a * t))) - (b * (c * z));
} else if (i <= 1.2e+71) {
tmp = ((j * c) - (t * x)) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * fma(-1.0, Float64(j * y), Float64(b * t))) tmp = 0.0 if (i <= -5.5e+109) tmp = t_1; elseif (i <= 2.15e-43) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(a * t))) - Float64(b * Float64(c * z))); elseif (i <= 1.2e+71) tmp = Float64(Float64(Float64(j * c) - Float64(t * x)) * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(-1.0 * N[(j * y), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5.5e+109], t$95$1, If[LessEqual[i, 2.15e-43], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.2e+71], N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \mathsf{fma}\left(-1, j \cdot y, b \cdot t\right)\\
\mathbf{if}\;i \leq -5.5 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.15 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{+71}:\\
\;\;\;\;\left(j \cdot c - t \cdot x\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -5.4999999999999998e109 or 1.1999999999999999e71 < i Initial program 73.5%
Applied rewrites75.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -5.4999999999999998e109 < i < 2.14999999999999982e-43Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.6
Applied rewrites49.6%
if 2.14999999999999982e-43 < i < 1.1999999999999999e71Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* c z))))
(if (<= x -9e-57)
(- (* x (- (* y z) (* a t))) t_1)
(if (<= x 1.75e+89)
(+ (* -1.0 t_1) (* j (fma (- y) i (* c a))))
(fma (* z x) y (* (* (- t) x) a))))))
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 (x <= -9e-57) {
tmp = (x * ((y * z) - (a * t))) - t_1;
} else if (x <= 1.75e+89) {
tmp = (-1.0 * t_1) + (j * fma(-y, i, (c * a)));
} else {
tmp = fma((z * x), y, ((-t * x) * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(c * z)) tmp = 0.0 if (x <= -9e-57) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(a * t))) - t_1); elseif (x <= 1.75e+89) tmp = Float64(Float64(-1.0 * t_1) + Float64(j * fma(Float64(-y), i, Float64(c * a)))); else tmp = fma(Float64(z * x), y, Float64(Float64(Float64(-t) * x) * a)); end return 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[x, -9e-57], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 1.75e+89], N[(N[(-1.0 * t$95$1), $MachinePrecision] + N[(j * N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y + N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(c \cdot z\right)\\
\mathbf{if}\;x \leq -9 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right) - t\_1\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+89}:\\
\;\;\;\;-1 \cdot t\_1 + j \cdot \mathsf{fma}\left(-y, i, c \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot x, y, \left(\left(-t\right) \cdot x\right) \cdot a\right)\\
\end{array}
\end{array}
if x < -8.99999999999999945e-57Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.6
Applied rewrites49.6%
if -8.99999999999999945e-57 < x < 1.75e89Initial program 73.5%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6473.7
Applied rewrites73.7%
Taylor expanded in t around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
if 1.75e89 < x Initial program 73.5%
Applied rewrites75.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-*.f64N/A
lower-neg.f6435.3
Applied rewrites35.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i)))))
(if (<= j -5.6e+51)
(+ (* x (* y z)) t_1)
(if (<= j 1.08e-52)
(- (* x (- (* y z) (* a t))) (* b (* c z)))
(+ (* b (* i t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double tmp;
if (j <= -5.6e+51) {
tmp = (x * (y * z)) + t_1;
} else if (j <= 1.08e-52) {
tmp = (x * ((y * z) - (a * t))) - (b * (c * z));
} else {
tmp = (b * (i * t)) + 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) - (y * i))
if (j <= (-5.6d+51)) then
tmp = (x * (y * z)) + t_1
else if (j <= 1.08d-52) then
tmp = (x * ((y * z) - (a * t))) - (b * (c * z))
else
tmp = (b * (i * t)) + 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) - (y * i));
double tmp;
if (j <= -5.6e+51) {
tmp = (x * (y * z)) + t_1;
} else if (j <= 1.08e-52) {
tmp = (x * ((y * z) - (a * t))) - (b * (c * z));
} else {
tmp = (b * (i * t)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) tmp = 0 if j <= -5.6e+51: tmp = (x * (y * z)) + t_1 elif j <= 1.08e-52: tmp = (x * ((y * z) - (a * t))) - (b * (c * z)) else: tmp = (b * (i * t)) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (j <= -5.6e+51) tmp = Float64(Float64(x * Float64(y * z)) + t_1); elseif (j <= 1.08e-52) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(a * t))) - Float64(b * Float64(c * z))); else tmp = Float64(Float64(b * Float64(i * t)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); tmp = 0.0; if (j <= -5.6e+51) tmp = (x * (y * z)) + t_1; elseif (j <= 1.08e-52) tmp = (x * ((y * z) - (a * t))) - (b * (c * z)); else tmp = (b * (i * t)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.6e+51], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[j, 1.08e-52], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;j \leq -5.6 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) + t\_1\\
\mathbf{elif}\;j \leq 1.08 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right) + t\_1\\
\end{array}
\end{array}
if j < -5.60000000000000009e51Initial program 73.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6449.6
Applied rewrites49.6%
if -5.60000000000000009e51 < j < 1.08e-52Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.6
Applied rewrites49.6%
if 1.08e-52 < j Initial program 73.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6449.2
Applied rewrites49.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (* b (* i t)) (* j (- (* c a) (* y i))))))
(if (<= j -1.9e+48)
t_1
(if (<= j 1.08e-52) (- (* x (- (* y z) (* a t))) (* b (* c z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * (i * t)) + (j * ((c * a) - (y * i)));
double tmp;
if (j <= -1.9e+48) {
tmp = t_1;
} else if (j <= 1.08e-52) {
tmp = (x * ((y * z) - (a * t))) - (b * (c * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (b * (i * t)) + (j * ((c * a) - (y * i)))
if (j <= (-1.9d+48)) then
tmp = t_1
else if (j <= 1.08d-52) then
tmp = (x * ((y * z) - (a * t))) - (b * (c * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * (i * t)) + (j * ((c * a) - (y * i)));
double tmp;
if (j <= -1.9e+48) {
tmp = t_1;
} else if (j <= 1.08e-52) {
tmp = (x * ((y * z) - (a * t))) - (b * (c * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (b * (i * t)) + (j * ((c * a) - (y * i))) tmp = 0 if j <= -1.9e+48: tmp = t_1 elif j <= 1.08e-52: tmp = (x * ((y * z) - (a * t))) - (b * (c * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(b * Float64(i * t)) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (j <= -1.9e+48) tmp = t_1; elseif (j <= 1.08e-52) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(a * t))) - Float64(b * Float64(c * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (b * (i * t)) + (j * ((c * a) - (y * i))); tmp = 0.0; if (j <= -1.9e+48) tmp = t_1; elseif (j <= 1.08e-52) tmp = (x * ((y * z) - (a * t))) - (b * (c * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.9e+48], t$95$1, If[LessEqual[j, 1.08e-52], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;j \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.08 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.9e48 or 1.08e-52 < j Initial program 73.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6449.2
Applied rewrites49.2%
if -1.9e48 < j < 1.08e-52Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.6
Applied rewrites49.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* i (fma -1.0 (* j y) (* b t)))))
(if (<= i -1.38e+100)
t_1
(if (<= i -3.7e-19)
(* c (- (* a j) (* b z)))
(if (<= i 2.5e-47)
(* z (- (* x y) (* b c)))
(if (<= i 1.2e+71) (* (- (* j c) (* t x)) a) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = i * fma(-1.0, (j * y), (b * t));
double tmp;
if (i <= -1.38e+100) {
tmp = t_1;
} else if (i <= -3.7e-19) {
tmp = c * ((a * j) - (b * z));
} else if (i <= 2.5e-47) {
tmp = z * ((x * y) - (b * c));
} else if (i <= 1.2e+71) {
tmp = ((j * c) - (t * x)) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(i * fma(-1.0, Float64(j * y), Float64(b * t))) tmp = 0.0 if (i <= -1.38e+100) tmp = t_1; elseif (i <= -3.7e-19) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (i <= 2.5e-47) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); elseif (i <= 1.2e+71) tmp = Float64(Float64(Float64(j * c) - Float64(t * x)) * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(-1.0 * N[(j * y), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.38e+100], t$95$1, If[LessEqual[i, -3.7e-19], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.5e-47], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.2e+71], N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \mathsf{fma}\left(-1, j \cdot y, b \cdot t\right)\\
\mathbf{if}\;i \leq -1.38 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -3.7 \cdot 10^{-19}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{-47}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{+71}:\\
\;\;\;\;\left(j \cdot c - t \cdot x\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.38e100 or 1.1999999999999999e71 < i Initial program 73.5%
Applied rewrites75.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -1.38e100 < i < -3.70000000000000005e-19Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -3.70000000000000005e-19 < i < 2.50000000000000006e-47Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
if 2.50000000000000006e-47 < i < 1.1999999999999999e71Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* j c) (* t x)) a)))
(if (<= a -5.2e+114)
t_1
(if (<= a 1.15e+51) (* y (fma -1.0 (* i j) (* x z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * c) - (t * x)) * a;
double tmp;
if (a <= -5.2e+114) {
tmp = t_1;
} else if (a <= 1.15e+51) {
tmp = y * fma(-1.0, (i * j), (x * z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * c) - Float64(t * x)) * a) tmp = 0.0 if (a <= -5.2e+114) tmp = t_1; elseif (a <= 1.15e+51) tmp = Float64(y * fma(-1.0, Float64(i * j), Float64(x * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -5.2e+114], t$95$1, If[LessEqual[a, 1.15e+51], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c - t \cdot x\right) \cdot a\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+51}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.2000000000000001e114 or 1.15000000000000003e51 < a Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
if -5.2000000000000001e114 < a < 1.15000000000000003e51Initial program 73.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.4
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* b i) (* a x)) t)))
(if (<= t -7e-8)
t_1
(if (<= t -3.9e-104)
(* j (- (* a c) (* i y)))
(if (<= t 2.8e-160)
(* c (- (* a j) (* b z)))
(if (<= t 1.85e+167) (* z (- (* x y) (* b c))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((b * i) - (a * x)) * t;
double tmp;
if (t <= -7e-8) {
tmp = t_1;
} else if (t <= -3.9e-104) {
tmp = j * ((a * c) - (i * y));
} else if (t <= 2.8e-160) {
tmp = c * ((a * j) - (b * z));
} else if (t <= 1.85e+167) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((b * i) - (a * x)) * t
if (t <= (-7d-8)) then
tmp = t_1
else if (t <= (-3.9d-104)) then
tmp = j * ((a * c) - (i * y))
else if (t <= 2.8d-160) then
tmp = c * ((a * j) - (b * z))
else if (t <= 1.85d+167) then
tmp = z * ((x * y) - (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((b * i) - (a * x)) * t;
double tmp;
if (t <= -7e-8) {
tmp = t_1;
} else if (t <= -3.9e-104) {
tmp = j * ((a * c) - (i * y));
} else if (t <= 2.8e-160) {
tmp = c * ((a * j) - (b * z));
} else if (t <= 1.85e+167) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((b * i) - (a * x)) * t tmp = 0 if t <= -7e-8: tmp = t_1 elif t <= -3.9e-104: tmp = j * ((a * c) - (i * y)) elif t <= 2.8e-160: tmp = c * ((a * j) - (b * z)) elif t <= 1.85e+167: tmp = z * ((x * y) - (b * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(b * i) - Float64(a * x)) * t) tmp = 0.0 if (t <= -7e-8) tmp = t_1; elseif (t <= -3.9e-104) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); elseif (t <= 2.8e-160) tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z))); elseif (t <= 1.85e+167) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((b * i) - (a * x)) * t; tmp = 0.0; if (t <= -7e-8) tmp = t_1; elseif (t <= -3.9e-104) tmp = j * ((a * c) - (i * y)); elseif (t <= 2.8e-160) tmp = c * ((a * j) - (b * z)); elseif (t <= 1.85e+167) tmp = z * ((x * y) - (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(b * i), $MachinePrecision] - N[(a * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -7e-8], t$95$1, If[LessEqual[t, -3.9e-104], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-160], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+167], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot i - a \cdot x\right) \cdot t\\
\mathbf{if}\;t \leq -7 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.9 \cdot 10^{-104}:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-160}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+167}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.00000000000000048e-8 or 1.85e167 < t Initial program 73.5%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0
Applied rewrites39.0%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lower-*.f64N/A
lower--.f6439.0
Applied rewrites39.0%
if -7.00000000000000048e-8 < t < -3.9000000000000002e-104Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -3.9000000000000002e-104 < t < 2.80000000000000016e-160Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if 2.80000000000000016e-160 < t < 1.85e167Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* j c) (* t x)) a)))
(if (<= a -5.2e+114)
t_1
(if (<= a 5.1e+51) (* z (- (* x y) (* b c))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * c) - (t * x)) * a;
double tmp;
if (a <= -5.2e+114) {
tmp = t_1;
} else if (a <= 5.1e+51) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = ((j * c) - (t * x)) * a
if (a <= (-5.2d+114)) then
tmp = t_1
else if (a <= 5.1d+51) then
tmp = z * ((x * y) - (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((j * c) - (t * x)) * a;
double tmp;
if (a <= -5.2e+114) {
tmp = t_1;
} else if (a <= 5.1e+51) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((j * c) - (t * x)) * a tmp = 0 if a <= -5.2e+114: tmp = t_1 elif a <= 5.1e+51: tmp = z * ((x * y) - (b * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(j * c) - Float64(t * x)) * a) tmp = 0.0 if (a <= -5.2e+114) tmp = t_1; elseif (a <= 5.1e+51) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((j * c) - (t * x)) * a; tmp = 0.0; if (a <= -5.2e+114) tmp = t_1; elseif (a <= 5.1e+51) tmp = z * ((x * y) - (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(j * c), $MachinePrecision] - N[(t * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -5.2e+114], t$95$1, If[LessEqual[a, 5.1e+51], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c - t \cdot x\right) \cdot a\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{+51}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.2000000000000001e114 or 5.1000000000000001e51 < a Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6438.9
lift-fma.f64N/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity38.9
Applied rewrites38.9%
if -5.2000000000000001e114 < a < 5.1000000000000001e51Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* j (- (* a c) (* i y))))) (if (<= j -3.8e+83) t_1 (if (<= j 5.2e+16) (* z (- (* x y) (* b c))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -3.8e+83) {
tmp = t_1;
} else if (j <= 5.2e+16) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (i * y))
if (j <= (-3.8d+83)) then
tmp = t_1
else if (j <= 5.2d+16) then
tmp = z * ((x * y) - (b * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (i * y));
double tmp;
if (j <= -3.8e+83) {
tmp = t_1;
} else if (j <= 5.2e+16) {
tmp = z * ((x * y) - (b * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (i * y)) tmp = 0 if j <= -3.8e+83: tmp = t_1 elif j <= 5.2e+16: tmp = z * ((x * y) - (b * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(i * y))) tmp = 0.0 if (j <= -3.8e+83) tmp = t_1; elseif (j <= 5.2e+16) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (i * y)); tmp = 0.0; if (j <= -3.8e+83) tmp = t_1; elseif (j <= 5.2e+16) tmp = z * ((x * y) - (b * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -3.8e+83], t$95$1, If[LessEqual[j, 5.2e+16], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{if}\;j \leq -3.8 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 5.2 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -3.8000000000000002e83 or 5.2e16 < j Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
if -3.8000000000000002e83 < j < 5.2e16Initial program 73.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* i t) (* c z)))))
(if (<= b -3.2e+96)
t_1
(if (<= b 14500000000.0) (* j (- (* a c) (* i y))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.2e+96) {
tmp = t_1;
} else if (b <= 14500000000.0) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((i * t) - (c * z))
if (b <= (-3.2d+96)) then
tmp = t_1
else if (b <= 14500000000.0d0) then
tmp = j * ((a * c) - (i * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((i * t) - (c * z));
double tmp;
if (b <= -3.2e+96) {
tmp = t_1;
} else if (b <= 14500000000.0) {
tmp = j * ((a * c) - (i * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((i * t) - (c * z)) tmp = 0 if b <= -3.2e+96: tmp = t_1 elif b <= 14500000000.0: tmp = j * ((a * c) - (i * y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(i * t) - Float64(c * z))) tmp = 0.0 if (b <= -3.2e+96) tmp = t_1; elseif (b <= 14500000000.0) tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((i * t) - (c * z)); tmp = 0.0; if (b <= -3.2e+96) tmp = t_1; elseif (b <= 14500000000.0) tmp = j * ((a * c) - (i * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+96], t$95$1, If[LessEqual[b, 14500000000.0], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 14500000000:\\
\;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.20000000000000006e96 or 1.45e10 < b Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -3.20000000000000006e96 < b < 1.45e10Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (* -1.0 (* t x)))))
(if (<= a -1.65e+188)
t_1
(if (<= a 2.5e-63)
(* b (- (* i t) (* c z)))
(if (<= a 1.6e+228) (* c (- (* a j) (* 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 = a * (-1.0 * (t * x));
double tmp;
if (a <= -1.65e+188) {
tmp = t_1;
} else if (a <= 2.5e-63) {
tmp = b * ((i * t) - (c * z));
} else if (a <= 1.6e+228) {
tmp = c * ((a * j) - (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 = a * ((-1.0d0) * (t * x))
if (a <= (-1.65d+188)) then
tmp = t_1
else if (a <= 2.5d-63) then
tmp = b * ((i * t) - (c * z))
else if (a <= 1.6d+228) then
tmp = c * ((a * j) - (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 = a * (-1.0 * (t * x));
double tmp;
if (a <= -1.65e+188) {
tmp = t_1;
} else if (a <= 2.5e-63) {
tmp = b * ((i * t) - (c * z));
} else if (a <= 1.6e+228) {
tmp = c * ((a * j) - (b * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (-1.0 * (t * x)) tmp = 0 if a <= -1.65e+188: tmp = t_1 elif a <= 2.5e-63: tmp = b * ((i * t) - (c * z)) elif a <= 1.6e+228: tmp = c * ((a * j) - (b * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(-1.0 * Float64(t * x))) tmp = 0.0 if (a <= -1.65e+188) tmp = t_1; elseif (a <= 2.5e-63) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); elseif (a <= 1.6e+228) tmp = Float64(c * Float64(Float64(a * j) - Float64(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 = a * (-1.0 * (t * x)); tmp = 0.0; if (a <= -1.65e+188) tmp = t_1; elseif (a <= 2.5e-63) tmp = b * ((i * t) - (c * z)); elseif (a <= 1.6e+228) tmp = c * ((a * j) - (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[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.65e+188], t$95$1, If[LessEqual[a, 2.5e-63], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+228], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-63}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+228}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.64999999999999991e188 or 1.6000000000000001e228 < a Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -1.64999999999999991e188 < a < 2.5000000000000001e-63Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if 2.5000000000000001e-63 < a < 1.6000000000000001e228Initial program 73.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (* -1.0 (* t x)))))
(if (<= a -1.65e+188)
t_1
(if (<= a 2.5e+138) (* b (- (* i t) (* c z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (-1.0 * (t * x));
double tmp;
if (a <= -1.65e+188) {
tmp = t_1;
} else if (a <= 2.5e+138) {
tmp = b * ((i * t) - (c * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((-1.0d0) * (t * x))
if (a <= (-1.65d+188)) then
tmp = t_1
else if (a <= 2.5d+138) then
tmp = b * ((i * t) - (c * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * (-1.0 * (t * x));
double tmp;
if (a <= -1.65e+188) {
tmp = t_1;
} else if (a <= 2.5e+138) {
tmp = b * ((i * t) - (c * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (-1.0 * (t * x)) tmp = 0 if a <= -1.65e+188: tmp = t_1 elif a <= 2.5e+138: tmp = b * ((i * t) - (c * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(-1.0 * Float64(t * x))) tmp = 0.0 if (a <= -1.65e+188) tmp = t_1; elseif (a <= 2.5e+138) tmp = Float64(b * Float64(Float64(i * t) - Float64(c * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * (-1.0 * (t * x)); tmp = 0.0; if (a <= -1.65e+188) tmp = t_1; elseif (a <= 2.5e+138) tmp = b * ((i * t) - (c * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.65e+188], t$95$1, If[LessEqual[a, 2.5e+138], N[(b * N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+138}:\\
\;\;\;\;b \cdot \left(i \cdot t - c \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.64999999999999991e188 or 2.50000000000000008e138 < a Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -1.64999999999999991e188 < a < 2.50000000000000008e138Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))) (t_2 (* a (* -1.0 (* t x)))))
(if (<= a -2.9e+182)
t_2
(if (<= a -3.3e-199)
t_1
(if (<= a 2.9e-171) (* (* (- z) c) b) (if (<= a 1.02e+149) 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 = x * (y * z);
double t_2 = a * (-1.0 * (t * x));
double tmp;
if (a <= -2.9e+182) {
tmp = t_2;
} else if (a <= -3.3e-199) {
tmp = t_1;
} else if (a <= 2.9e-171) {
tmp = (-z * c) * b;
} else if (a <= 1.02e+149) {
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 = x * (y * z)
t_2 = a * ((-1.0d0) * (t * x))
if (a <= (-2.9d+182)) then
tmp = t_2
else if (a <= (-3.3d-199)) then
tmp = t_1
else if (a <= 2.9d-171) then
tmp = (-z * c) * b
else if (a <= 1.02d+149) 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 = x * (y * z);
double t_2 = a * (-1.0 * (t * x));
double tmp;
if (a <= -2.9e+182) {
tmp = t_2;
} else if (a <= -3.3e-199) {
tmp = t_1;
} else if (a <= 2.9e-171) {
tmp = (-z * c) * b;
} else if (a <= 1.02e+149) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) t_2 = a * (-1.0 * (t * x)) tmp = 0 if a <= -2.9e+182: tmp = t_2 elif a <= -3.3e-199: tmp = t_1 elif a <= 2.9e-171: tmp = (-z * c) * b elif a <= 1.02e+149: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(a * Float64(-1.0 * Float64(t * x))) tmp = 0.0 if (a <= -2.9e+182) tmp = t_2; elseif (a <= -3.3e-199) tmp = t_1; elseif (a <= 2.9e-171) tmp = Float64(Float64(Float64(-z) * c) * b); elseif (a <= 1.02e+149) 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 = x * (y * z); t_2 = a * (-1.0 * (t * x)); tmp = 0.0; if (a <= -2.9e+182) tmp = t_2; elseif (a <= -3.3e-199) tmp = t_1; elseif (a <= 2.9e-171) tmp = (-z * c) * b; elseif (a <= 1.02e+149) 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e+182], t$95$2, If[LessEqual[a, -3.3e-199], t$95$1, If[LessEqual[a, 2.9e-171], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 1.02e+149], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+182}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-171}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.8999999999999998e182 or 1.01999999999999997e149 < a Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6422.0
Applied rewrites22.0%
if -2.8999999999999998e182 < a < -3.3000000000000002e-199 or 2.8999999999999999e-171 < a < 1.01999999999999997e149Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
if -3.3000000000000002e-199 < a < 2.8999999999999999e-171Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.5
lift-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.5
Applied rewrites22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -3.9e+87)
(* b (* i t))
(if (<= b -3.4e-18)
(* a (* c j))
(if (<= b 52000.0) (* x (* y z)) (* (* (- z) c) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -3.9e+87) {
tmp = b * (i * t);
} else if (b <= -3.4e-18) {
tmp = a * (c * j);
} else if (b <= 52000.0) {
tmp = x * (y * z);
} else {
tmp = (-z * c) * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-3.9d+87)) then
tmp = b * (i * t)
else if (b <= (-3.4d-18)) then
tmp = a * (c * j)
else if (b <= 52000.0d0) then
tmp = x * (y * z)
else
tmp = (-z * c) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -3.9e+87) {
tmp = b * (i * t);
} else if (b <= -3.4e-18) {
tmp = a * (c * j);
} else if (b <= 52000.0) {
tmp = x * (y * z);
} else {
tmp = (-z * c) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -3.9e+87: tmp = b * (i * t) elif b <= -3.4e-18: tmp = a * (c * j) elif b <= 52000.0: tmp = x * (y * z) else: tmp = (-z * c) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -3.9e+87) tmp = Float64(b * Float64(i * t)); elseif (b <= -3.4e-18) tmp = Float64(a * Float64(c * j)); elseif (b <= 52000.0) tmp = Float64(x * Float64(y * z)); else tmp = Float64(Float64(Float64(-z) * c) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -3.9e+87) tmp = b * (i * t); elseif (b <= -3.4e-18) tmp = a * (c * j); elseif (b <= 52000.0) tmp = x * (y * z); else tmp = (-z * c) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -3.9e+87], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.4e-18], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 52000.0], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.9 \cdot 10^{+87}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-18}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;b \leq 52000:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\end{array}
\end{array}
if b < -3.9000000000000002e87Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around 0
lower-*.f6422.0
Applied rewrites22.0%
if -3.9000000000000002e87 < b < -3.40000000000000001e-18Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around 0
lower-*.f6422.4
Applied rewrites22.4%
if -3.40000000000000001e-18 < b < 52000Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
if 52000 < b Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6422.5
Applied rewrites22.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6422.5
lift-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6422.5
Applied rewrites22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* i t))))
(if (<= b -3.9e+87)
t_1
(if (<= b -3.4e-18)
(* a (* c j))
(if (<= b 5.2e+88) (* x (* y z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (i * t);
double tmp;
if (b <= -3.9e+87) {
tmp = t_1;
} else if (b <= -3.4e-18) {
tmp = a * (c * j);
} else if (b <= 5.2e+88) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * (i * t)
if (b <= (-3.9d+87)) then
tmp = t_1
else if (b <= (-3.4d-18)) then
tmp = a * (c * j)
else if (b <= 5.2d+88) then
tmp = x * (y * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (i * t);
double tmp;
if (b <= -3.9e+87) {
tmp = t_1;
} else if (b <= -3.4e-18) {
tmp = a * (c * j);
} else if (b <= 5.2e+88) {
tmp = x * (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (i * t) tmp = 0 if b <= -3.9e+87: tmp = t_1 elif b <= -3.4e-18: tmp = a * (c * j) elif b <= 5.2e+88: tmp = x * (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(i * t)) tmp = 0.0 if (b <= -3.9e+87) tmp = t_1; elseif (b <= -3.4e-18) tmp = Float64(a * Float64(c * j)); elseif (b <= 5.2e+88) tmp = Float64(x * Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * (i * t); tmp = 0.0; if (b <= -3.9e+87) tmp = t_1; elseif (b <= -3.4e-18) tmp = a * (c * j); elseif (b <= 5.2e+88) tmp = x * (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.9e+87], t$95$1, If[LessEqual[b, -3.4e-18], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e+88], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(i \cdot t\right)\\
\mathbf{if}\;b \leq -3.9 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-18}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.9000000000000002e87 or 5.2000000000000001e88 < b Initial program 73.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around 0
lower-*.f6422.0
Applied rewrites22.0%
if -3.9000000000000002e87 < b < -3.40000000000000001e-18Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around 0
lower-*.f6422.4
Applied rewrites22.4%
if -3.40000000000000001e-18 < b < 5.2000000000000001e88Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c 1.75e-102) (* (* z x) y) (* a (* c j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= 1.75e-102) {
tmp = (z * x) * y;
} else {
tmp = a * (c * j);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= 1.75d-102) then
tmp = (z * x) * y
else
tmp = a * (c * j)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= 1.75e-102) {
tmp = (z * x) * y;
} else {
tmp = a * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= 1.75e-102: tmp = (z * x) * y else: tmp = a * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= 1.75e-102) tmp = Float64(Float64(z * x) * y); else tmp = Float64(a * Float64(c * j)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= 1.75e-102) tmp = (z * x) * y; else tmp = a * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, 1.75e-102], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.75 \cdot 10^{-102}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if c < 1.74999999999999993e-102Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
if 1.74999999999999993e-102 < c Initial program 73.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around 0
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b c i j) :precision binary64 (* x (* y z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return x * (y * z);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = x * (y * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return x * (y * z);
}
def code(x, y, z, t, a, b, c, i, j): return x * (y * z)
function code(x, y, z, t, a, b, c, i, j) return Float64(x * Float64(y * z)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = x * (y * z); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(y \cdot z\right)
\end{array}
Initial program 73.5%
Taylor expanded in i around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.7
Applied rewrites22.7%
herbie shell --seed 2025143
(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)))))