
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
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)
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
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
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)
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
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)))
(if (<= (+ (- (- x t_1) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)) INFINITY)
(- (fma (- (+ t y) 2.0) b x) (fma (- t 1.0) a t_1))
(* (- b z) y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double tmp;
if ((((x - t_1) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
tmp = fma(((t + y) - 2.0), b, x) - fma((t - 1.0), a, t_1);
} else {
tmp = (b - z) * y;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (Float64(Float64(Float64(x - t_1) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf) tmp = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - fma(Float64(t - 1.0), a, t_1)); else tmp = Float64(Float64(b - z) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - t$95$1), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;\left(\left(x - t\_1\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \mathsf{fma}\left(t - 1, a, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 94.9%
Taylor expanded in x around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6495.3
Applied rewrites95.3%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 94.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.1
Applied rewrites33.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* b y))))
(if (<= y -1.1e+40)
t_1
(if (<= y 1e+21) (- (fma (- t 2.0) b x) (- (* a (- t 1.0)) z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
double tmp;
if (y <= -1.1e+40) {
tmp = t_1;
} else if (y <= 1e+21) {
tmp = fma((t - 2.0), b, x) - ((a * (t - 1.0)) - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y)) tmp = 0.0 if (y <= -1.1e+40) tmp = t_1; elseif (y <= 1e+21) tmp = Float64(fma(Float64(t - 2.0), b, x) - Float64(Float64(a * Float64(t - 1.0)) - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+40], t$95$1, If[LessEqual[y, 1e+21], N[(N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x\right) - \left(a \cdot \left(t - 1\right) - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.0999999999999999e40 or 1e21 < y Initial program 94.9%
Taylor expanded in y around inf
lower-*.f6478.8
Applied rewrites78.8%
if -1.0999999999999999e40 < y < 1e21Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= a -7.5e+97)
(- x (fma a (- t 1.0) (* z (- y 1.0))))
(if (<= a 4.3e+92) (- t_1 (* (- y 1.0) z)) (- t_1 (* (- t 1.0) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (a <= -7.5e+97) {
tmp = x - fma(a, (t - 1.0), (z * (y - 1.0)));
} else if (a <= 4.3e+92) {
tmp = t_1 - ((y - 1.0) * z);
} else {
tmp = t_1 - ((t - 1.0) * a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (a <= -7.5e+97) tmp = Float64(x - fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); elseif (a <= 4.3e+92) tmp = Float64(t_1 - Float64(Float64(y - 1.0) * z)); else tmp = Float64(t_1 - Float64(Float64(t - 1.0) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[a, -7.5e+97], N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e+92], N[(t$95$1 - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;a \leq -7.5 \cdot 10^{+97}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+92}:\\
\;\;\;\;t\_1 - \left(y - 1\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(t - 1\right) \cdot a\\
\end{array}
\end{array}
if a < -7.5000000000000004e97Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lift--.f64N/A
lower-*.f64N/A
lower--.f6468.5
Applied rewrites68.5%
if -7.5000000000000004e97 < a < 4.2999999999999998e92Initial program 94.9%
Taylor expanded in a around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6472.5
Applied rewrites72.5%
if 4.2999999999999998e92 < a Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.3e+89)
(- x (fma a (- t 1.0) (* z (- y 1.0))))
(if (<= z 4.7e+80)
(- (fma (- (+ t y) 2.0) b x) (* (- t 1.0) a))
(+ x (- (fma (- y) z z) (* a (- t 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e+89) {
tmp = x - fma(a, (t - 1.0), (z * (y - 1.0)));
} else if (z <= 4.7e+80) {
tmp = fma(((t + y) - 2.0), b, x) - ((t - 1.0) * a);
} else {
tmp = x + (fma(-y, z, z) - (a * (t - 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e+89) tmp = Float64(x - fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); elseif (z <= 4.7e+80) tmp = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(Float64(t - 1.0) * a)); else tmp = Float64(x + Float64(fma(Float64(-y), z, z) - Float64(a * Float64(t - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e+89], N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+80], N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[((-y) * z + z), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+89}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(t - 1\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + \left(\mathsf{fma}\left(-y, z, z\right) - a \cdot \left(t - 1\right)\right)\\
\end{array}
\end{array}
if z < -2.2999999999999999e89Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lift--.f64N/A
lower-*.f64N/A
lower--.f6468.5
Applied rewrites68.5%
if -2.2999999999999999e89 < z < 4.70000000000000009e80Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
if 4.70000000000000009e80 < z Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma (- (+ t y) 2.0) b x) (- a))))
(if (<= b -1.2e+48)
t_1
(if (<= b 2.4e+41) (+ x (- (fma (- y) z z) (* a (- t 1.0)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x) - -a;
double tmp;
if (b <= -1.2e+48) {
tmp = t_1;
} else if (b <= 2.4e+41) {
tmp = x + (fma(-y, z, z) - (a * (t - 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(-a)) tmp = 0.0 if (b <= -1.2e+48) tmp = t_1; elseif (b <= 2.4e+41) tmp = Float64(x + Float64(fma(Float64(-y), z, z) - Float64(a * Float64(t - 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - (-a)), $MachinePrecision]}, If[LessEqual[b, -1.2e+48], t$95$1, If[LessEqual[b, 2.4e+41], N[(x + N[(N[((-y) * z + z), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(-a\right)\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+41}:\\
\;\;\;\;x + \left(\mathsf{fma}\left(-y, z, z\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.2000000000000001e48 or 2.4000000000000002e41 < b Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6459.9
Applied rewrites59.9%
if -1.2000000000000001e48 < b < 2.4000000000000002e41Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (fma (- (+ t y) 2.0) b x) (- a))))
(if (<= b -1.2e+48)
t_1
(if (<= b 2.4e+41) (- x (fma a (- t 1.0) (* z (- y 1.0)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x) - -a;
double tmp;
if (b <= -1.2e+48) {
tmp = t_1;
} else if (b <= 2.4e+41) {
tmp = x - fma(a, (t - 1.0), (z * (y - 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(-a)) tmp = 0.0 if (b <= -1.2e+48) tmp = t_1; elseif (b <= 2.4e+41) tmp = Float64(x - fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - (-a)), $MachinePrecision]}, If[LessEqual[b, -1.2e+48], t$95$1, If[LessEqual[b, 2.4e+41], N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(-a\right)\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+41}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.2000000000000001e48 or 2.4000000000000002e41 < b Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6459.9
Applied rewrites59.9%
if -1.2000000000000001e48 < b < 2.4000000000000002e41Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lift--.f64N/A
lower-*.f64N/A
lower--.f6468.5
Applied rewrites68.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- (fma (- y) z z) (* a t)))))
(if (<= z -3.5e+74)
t_1
(if (<= z 2.1e-141)
(- (fma (- (+ t y) 2.0) b x) (- a))
(if (<= z 17.0) (+ (* (- a) t) (* (- (+ y t) 2.0) b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (fma(-y, z, z) - (a * t));
double tmp;
if (z <= -3.5e+74) {
tmp = t_1;
} else if (z <= 2.1e-141) {
tmp = fma(((t + y) - 2.0), b, x) - -a;
} else if (z <= 17.0) {
tmp = (-a * t) + (((y + t) - 2.0) * b);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(fma(Float64(-y), z, z) - Float64(a * t))) tmp = 0.0 if (z <= -3.5e+74) tmp = t_1; elseif (z <= 2.1e-141) tmp = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(-a)); elseif (z <= 17.0) tmp = Float64(Float64(Float64(-a) * t) + Float64(Float64(Float64(y + t) - 2.0) * b)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[((-y) * z + z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+74], t$95$1, If[LessEqual[z, 2.1e-141], N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - (-a)), $MachinePrecision], If[LessEqual[z, 17.0], N[(N[((-a) * t), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\mathsf{fma}\left(-y, z, z\right) - a \cdot t\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-141}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(-a\right)\\
\mathbf{elif}\;z \leq 17:\\
\;\;\;\;\left(-a\right) \cdot t + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.50000000000000014e74 or 17 < z Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in t around inf
lower-*.f6458.6
Applied rewrites58.6%
if -3.50000000000000014e74 < z < 2.0999999999999999e-141Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6459.9
Applied rewrites59.9%
if 2.0999999999999999e-141 < z < 17Initial program 94.9%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6449.7
Applied rewrites49.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- (fma (- y) z z) (* a t)))))
(if (<= z -3.5e+74)
t_1
(if (<= z 1.6e+21) (- (fma (- (+ t y) 2.0) b x) (- a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (fma(-y, z, z) - (a * t));
double tmp;
if (z <= -3.5e+74) {
tmp = t_1;
} else if (z <= 1.6e+21) {
tmp = fma(((t + y) - 2.0), b, x) - -a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(fma(Float64(-y), z, z) - Float64(a * t))) tmp = 0.0 if (z <= -3.5e+74) tmp = t_1; elseif (z <= 1.6e+21) tmp = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(-a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[((-y) * z + z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+74], t$95$1, If[LessEqual[z, 1.6e+21], N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - (-a)), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\mathsf{fma}\left(-y, z, z\right) - a \cdot t\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.50000000000000014e74 or 1.6e21 < z Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in t around inf
lower-*.f6458.6
Applied rewrites58.6%
if -3.50000000000000014e74 < z < 1.6e21Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6459.9
Applied rewrites59.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- (fma (- y) z z) (- a)))))
(if (<= z -1.7e+88)
t_1
(if (<= z 7.1e+139) (- (fma (- (+ t y) 2.0) b x) (- a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (fma(-y, z, z) - -a);
double tmp;
if (z <= -1.7e+88) {
tmp = t_1;
} else if (z <= 7.1e+139) {
tmp = fma(((t + y) - 2.0), b, x) - -a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(fma(Float64(-y), z, z) - Float64(-a))) tmp = 0.0 if (z <= -1.7e+88) tmp = t_1; elseif (z <= 7.1e+139) tmp = Float64(fma(Float64(Float64(t + y) - 2.0), b, x) - Float64(-a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[((-y) * z + z), $MachinePrecision] - (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+88], t$95$1, If[LessEqual[z, 7.1e+139], N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - (-a)), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\mathsf{fma}\left(-y, z, z\right) - \left(-a\right)\right)\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.1 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right) - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.70000000000000002e88 or 7.09999999999999964e139 < z Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6451.8
Applied rewrites51.8%
if -1.70000000000000002e88 < z < 7.09999999999999964e139Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6459.9
Applied rewrites59.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.15e+41)
t_1
(if (<= t 1.1e+53) (+ (+ (fma -2.0 b (* b y)) x) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -1.15e+41) {
tmp = t_1;
} else if (t <= 1.1e+53) {
tmp = (fma(-2.0, b, (b * y)) + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.15e+41) tmp = t_1; elseif (t <= 1.1e+53) tmp = Float64(Float64(fma(-2.0, b, Float64(b * y)) + x) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.15e+41], t$95$1, If[LessEqual[t, 1.1e+53], N[(N[(N[(-2.0 * b + N[(b * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+53}:\\
\;\;\;\;\left(\mathsf{fma}\left(-2, b, b \cdot y\right) + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1499999999999999e41 or 1.09999999999999999e53 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -1.1499999999999999e41 < t < 1.09999999999999999e53Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-fma.f64N/A
lower-*.f6447.2
Applied rewrites47.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.15e+41)
t_1
(if (<= t 1.1e+53) (+ (fma (- y 2.0) b x) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -1.15e+41) {
tmp = t_1;
} else if (t <= 1.1e+53) {
tmp = fma((y - 2.0), b, x) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.15e+41) tmp = t_1; elseif (t <= 1.1e+53) tmp = Float64(fma(Float64(y - 2.0), b, x) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.15e+41], t$95$1, If[LessEqual[t, 1.1e+53], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1499999999999999e41 or 1.09999999999999999e53 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -1.1499999999999999e41 < t < 1.09999999999999999e53Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
lift--.f64N/A
lift--.f64N/A
lift-fma.f64N/A
lift-neg.f64N/A
add-flip-revN/A
*-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-fma.f64N/A
lift--.f6447.2
Applied rewrites47.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b) (- (- (+ t y) 2.0))))) (if (<= b -4e+48) t_1 (if (<= b 2.3e+38) (- x (* a (- t 1.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -b * -((t + y) - 2.0);
double tmp;
if (b <= -4e+48) {
tmp = t_1;
} else if (b <= 2.3e+38) {
tmp = x - (a * (t - 1.0));
} 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)
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) :: t_1
real(8) :: tmp
t_1 = -b * -((t + y) - 2.0d0)
if (b <= (-4d+48)) then
tmp = t_1
else if (b <= 2.3d+38) then
tmp = x - (a * (t - 1.0d0))
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 t_1 = -b * -((t + y) - 2.0);
double tmp;
if (b <= -4e+48) {
tmp = t_1;
} else if (b <= 2.3e+38) {
tmp = x - (a * (t - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -b * -((t + y) - 2.0) tmp = 0 if b <= -4e+48: tmp = t_1 elif b <= 2.3e+38: tmp = x - (a * (t - 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-b) * Float64(-Float64(Float64(t + y) - 2.0))) tmp = 0.0 if (b <= -4e+48) tmp = t_1; elseif (b <= 2.3e+38) tmp = Float64(x - Float64(a * Float64(t - 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -b * -((t + y) - 2.0); tmp = 0.0; if (b <= -4e+48) tmp = t_1; elseif (b <= 2.3e+38) tmp = x - (a * (t - 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-b) * (-N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[b, -4e+48], t$95$1, If[LessEqual[b, 2.3e+38], N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(-\left(\left(t + y\right) - 2\right)\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;x - a \cdot \left(t - 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.00000000000000018e48 or 2.3000000000000001e38 < b Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around -inf
associate-*r*N/A
distribute-lft-outN/A
associate--l+N/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f64N/A
lift-+.f6436.5
Applied rewrites36.5%
if -4.00000000000000018e48 < b < 2.3000000000000001e38Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower--.f64N/A
lift--.f64N/A
lift-*.f6443.0
Applied rewrites43.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -3.7e+39)
t_1
(if (<= t 1.7e-20)
(fma (- y 2.0) b a)
(if (<= t 1.1e+53) (+ x (* (- y) z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.7e+39) {
tmp = t_1;
} else if (t <= 1.7e-20) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 1.1e+53) {
tmp = x + (-y * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -3.7e+39) tmp = t_1; elseif (t <= 1.7e-20) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 1.1e+53) tmp = Float64(x + Float64(Float64(-y) * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.7e+39], t$95$1, If[LessEqual[t, 1.7e-20], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 1.1e+53], N[(x + N[((-y) * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-20}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+53}:\\
\;\;\;\;x + \left(-y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.70000000000000012e39 or 1.09999999999999999e53 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -3.70000000000000012e39 < t < 1.6999999999999999e-20Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6433.0
Applied rewrites33.0%
if 1.6999999999999999e-20 < t < 1.09999999999999999e53Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in y around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6433.7
Applied rewrites33.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -2.35e+43)
t_1
(if (<= t -1.12e-105)
(* (- b z) y)
(if (<= t 1.7e-20)
(+ a x)
(if (<= t 1.1e+53) (+ x (* (- y) z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -2.35e+43) {
tmp = t_1;
} else if (t <= -1.12e-105) {
tmp = (b - z) * y;
} else if (t <= 1.7e-20) {
tmp = a + x;
} else if (t <= 1.1e+53) {
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)
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) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-2.35d+43)) then
tmp = t_1
else if (t <= (-1.12d-105)) then
tmp = (b - z) * y
else if (t <= 1.7d-20) then
tmp = a + x
else if (t <= 1.1d+53) 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 t_1 = (b - a) * t;
double tmp;
if (t <= -2.35e+43) {
tmp = t_1;
} else if (t <= -1.12e-105) {
tmp = (b - z) * y;
} else if (t <= 1.7e-20) {
tmp = a + x;
} else if (t <= 1.1e+53) {
tmp = x + (-y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -2.35e+43: tmp = t_1 elif t <= -1.12e-105: tmp = (b - z) * y elif t <= 1.7e-20: tmp = a + x elif t <= 1.1e+53: tmp = x + (-y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -2.35e+43) tmp = t_1; elseif (t <= -1.12e-105) tmp = Float64(Float64(b - z) * y); elseif (t <= 1.7e-20) tmp = Float64(a + x); elseif (t <= 1.1e+53) tmp = Float64(x + Float64(Float64(-y) * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -2.35e+43) tmp = t_1; elseif (t <= -1.12e-105) tmp = (b - z) * y; elseif (t <= 1.7e-20) tmp = a + x; elseif (t <= 1.1e+53) tmp = x + (-y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.35e+43], t$95$1, If[LessEqual[t, -1.12e-105], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.7e-20], N[(a + x), $MachinePrecision], If[LessEqual[t, 1.1e+53], N[(x + N[((-y) * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-105}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-20}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+53}:\\
\;\;\;\;x + \left(-y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.34999999999999999e43 or 1.09999999999999999e53 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -2.34999999999999999e43 < t < -1.11999999999999995e-105Initial program 94.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.1
Applied rewrites33.1%
if -1.11999999999999995e-105 < t < 1.6999999999999999e-20Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
if 1.6999999999999999e-20 < t < 1.09999999999999999e53Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in y around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6433.7
Applied rewrites33.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)) (t_2 (* (- b a) t)))
(if (<= t -2.35e+43)
t_2
(if (<= t -1.12e-105)
t_1
(if (<= t 2.05e-16) (+ a x) (if (<= t 5.8e+31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double t_2 = (b - a) * t;
double tmp;
if (t <= -2.35e+43) {
tmp = t_2;
} else if (t <= -1.12e-105) {
tmp = t_1;
} else if (t <= 2.05e-16) {
tmp = a + x;
} else if (t <= 5.8e+31) {
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)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b - z) * y
t_2 = (b - a) * t
if (t <= (-2.35d+43)) then
tmp = t_2
else if (t <= (-1.12d-105)) then
tmp = t_1
else if (t <= 2.05d-16) then
tmp = a + x
else if (t <= 5.8d+31) 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 t_1 = (b - z) * y;
double t_2 = (b - a) * t;
double tmp;
if (t <= -2.35e+43) {
tmp = t_2;
} else if (t <= -1.12e-105) {
tmp = t_1;
} else if (t <= 2.05e-16) {
tmp = a + x;
} else if (t <= 5.8e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y t_2 = (b - a) * t tmp = 0 if t <= -2.35e+43: tmp = t_2 elif t <= -1.12e-105: tmp = t_1 elif t <= 2.05e-16: tmp = a + x elif t <= 5.8e+31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -2.35e+43) tmp = t_2; elseif (t <= -1.12e-105) tmp = t_1; elseif (t <= 2.05e-16) tmp = Float64(a + x); elseif (t <= 5.8e+31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; t_2 = (b - a) * t; tmp = 0.0; if (t <= -2.35e+43) tmp = t_2; elseif (t <= -1.12e-105) tmp = t_1; elseif (t <= 2.05e-16) tmp = a + x; elseif (t <= 5.8e+31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.35e+43], t$95$2, If[LessEqual[t, -1.12e-105], t$95$1, If[LessEqual[t, 2.05e-16], N[(a + x), $MachinePrecision], If[LessEqual[t, 5.8e+31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.34999999999999999e43 or 5.8000000000000001e31 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -2.34999999999999999e43 < t < -1.11999999999999995e-105 or 2.05000000000000003e-16 < t < 5.8000000000000001e31Initial program 94.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.1
Applied rewrites33.1%
if -1.11999999999999995e-105 < t < 2.05000000000000003e-16Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -3.7e+39)
t_1
(if (<= t -4.6e-71) (* (- y 2.0) b) (if (<= t 1.02e+53) (+ a x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.7e+39) {
tmp = t_1;
} else if (t <= -4.6e-71) {
tmp = (y - 2.0) * b;
} else if (t <= 1.02e+53) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-3.7d+39)) then
tmp = t_1
else if (t <= (-4.6d-71)) then
tmp = (y - 2.0d0) * b
else if (t <= 1.02d+53) then
tmp = a + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.7e+39) {
tmp = t_1;
} else if (t <= -4.6e-71) {
tmp = (y - 2.0) * b;
} else if (t <= 1.02e+53) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -3.7e+39: tmp = t_1 elif t <= -4.6e-71: tmp = (y - 2.0) * b elif t <= 1.02e+53: tmp = a + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -3.7e+39) tmp = t_1; elseif (t <= -4.6e-71) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 1.02e+53) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -3.7e+39) tmp = t_1; elseif (t <= -4.6e-71) tmp = (y - 2.0) * b; elseif (t <= 1.02e+53) tmp = a + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.7e+39], t$95$1, If[LessEqual[t, -4.6e-71], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.02e+53], N[(a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-71}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+53}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.70000000000000012e39 or 1.01999999999999999e53 < t Initial program 94.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.9
Applied rewrites32.9%
if -3.70000000000000012e39 < t < -4.5999999999999997e-71Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6423.8
Applied rewrites23.8%
if -4.5999999999999997e-71 < t < 1.01999999999999999e53Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -7.4e+56)
t_1
(if (<= a 8e-275)
(* (- y 2.0) b)
(if (<= a 1.2e+34) (* (- 1.0 y) z) (if (<= a 5.5e+89) (+ a x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -7.4e+56) {
tmp = t_1;
} else if (a <= 8e-275) {
tmp = (y - 2.0) * b;
} else if (a <= 1.2e+34) {
tmp = (1.0 - y) * z;
} else if (a <= 5.5e+89) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - t) * a
if (a <= (-7.4d+56)) then
tmp = t_1
else if (a <= 8d-275) then
tmp = (y - 2.0d0) * b
else if (a <= 1.2d+34) then
tmp = (1.0d0 - y) * z
else if (a <= 5.5d+89) then
tmp = a + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -7.4e+56) {
tmp = t_1;
} else if (a <= 8e-275) {
tmp = (y - 2.0) * b;
} else if (a <= 1.2e+34) {
tmp = (1.0 - y) * z;
} else if (a <= 5.5e+89) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if a <= -7.4e+56: tmp = t_1 elif a <= 8e-275: tmp = (y - 2.0) * b elif a <= 1.2e+34: tmp = (1.0 - y) * z elif a <= 5.5e+89: tmp = a + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -7.4e+56) tmp = t_1; elseif (a <= 8e-275) tmp = Float64(Float64(y - 2.0) * b); elseif (a <= 1.2e+34) tmp = Float64(Float64(1.0 - y) * z); elseif (a <= 5.5e+89) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; tmp = 0.0; if (a <= -7.4e+56) tmp = t_1; elseif (a <= 8e-275) tmp = (y - 2.0) * b; elseif (a <= 1.2e+34) tmp = (1.0 - y) * z; elseif (a <= 5.5e+89) tmp = a + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -7.4e+56], t$95$1, If[LessEqual[a, 8e-275], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 1.2e+34], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 5.5e+89], N[(a + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-275}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+34}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+89}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.39999999999999994e56 or 5.49999999999999976e89 < a Initial program 94.9%
Taylor expanded in a around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.8
Applied rewrites28.8%
if -7.39999999999999994e56 < a < 7.99999999999999947e-275Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6423.8
Applied rewrites23.8%
if 7.99999999999999947e-275 < a < 1.19999999999999993e34Initial program 94.9%
Taylor expanded in z around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.4
Applied rewrites28.4%
if 1.19999999999999993e34 < a < 5.49999999999999976e89Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -7.4e+56)
t_1
(if (<= a 5.8e-304) (* (- y 2.0) b) (if (<= a 9.5e+132) (+ z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -7.4e+56) {
tmp = t_1;
} else if (a <= 5.8e-304) {
tmp = (y - 2.0) * b;
} else if (a <= 9.5e+132) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - t) * a
if (a <= (-7.4d+56)) then
tmp = t_1
else if (a <= 5.8d-304) then
tmp = (y - 2.0d0) * b
else if (a <= 9.5d+132) then
tmp = z + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -7.4e+56) {
tmp = t_1;
} else if (a <= 5.8e-304) {
tmp = (y - 2.0) * b;
} else if (a <= 9.5e+132) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if a <= -7.4e+56: tmp = t_1 elif a <= 5.8e-304: tmp = (y - 2.0) * b elif a <= 9.5e+132: tmp = z + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -7.4e+56) tmp = t_1; elseif (a <= 5.8e-304) tmp = Float64(Float64(y - 2.0) * b); elseif (a <= 9.5e+132) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; tmp = 0.0; if (a <= -7.4e+56) tmp = t_1; elseif (a <= 5.8e-304) tmp = (y - 2.0) * b; elseif (a <= 9.5e+132) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -7.4e+56], t$95$1, If[LessEqual[a, 5.8e-304], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 9.5e+132], N[(z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -7.4 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-304}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+132}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.39999999999999994e56 or 9.5000000000000005e132 < a Initial program 94.9%
Taylor expanded in a around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.8
Applied rewrites28.8%
if -7.39999999999999994e56 < a < 5.8e-304Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6423.8
Applied rewrites23.8%
if 5.8e-304 < a < 9.5000000000000005e132Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t) a)))
(if (<= t -8.5e+39)
t_1
(if (<= t 1.02e+53) (+ a x) (if (<= t 1.35e+190) t_1 (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -t * a;
double tmp;
if (t <= -8.5e+39) {
tmp = t_1;
} else if (t <= 1.02e+53) {
tmp = a + x;
} else if (t <= 1.35e+190) {
tmp = t_1;
} else {
tmp = b * t;
}
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)
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) :: t_1
real(8) :: tmp
t_1 = -t * a
if (t <= (-8.5d+39)) then
tmp = t_1
else if (t <= 1.02d+53) then
tmp = a + x
else if (t <= 1.35d+190) then
tmp = t_1
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -t * a;
double tmp;
if (t <= -8.5e+39) {
tmp = t_1;
} else if (t <= 1.02e+53) {
tmp = a + x;
} else if (t <= 1.35e+190) {
tmp = t_1;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -t * a tmp = 0 if t <= -8.5e+39: tmp = t_1 elif t <= 1.02e+53: tmp = a + x elif t <= 1.35e+190: tmp = t_1 else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-t) * a) tmp = 0.0 if (t <= -8.5e+39) tmp = t_1; elseif (t <= 1.02e+53) tmp = Float64(a + x); elseif (t <= 1.35e+190) tmp = t_1; else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -t * a; tmp = 0.0; if (t <= -8.5e+39) tmp = t_1; elseif (t <= 1.02e+53) tmp = a + x; elseif (t <= 1.35e+190) tmp = t_1; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) * a), $MachinePrecision]}, If[LessEqual[t, -8.5e+39], t$95$1, If[LessEqual[t, 1.02e+53], N[(a + x), $MachinePrecision], If[LessEqual[t, 1.35e+190], t$95$1, N[(b * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t\right) \cdot a\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+53}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -8.49999999999999971e39 or 1.01999999999999999e53 < t < 1.35000000000000002e190Initial program 94.9%
Taylor expanded in a around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.8
Applied rewrites28.8%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6419.8
Applied rewrites19.8%
if -8.49999999999999971e39 < t < 1.01999999999999999e53Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
if 1.35000000000000002e190 < t Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in t around inf
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y 2.0) b))) (if (<= b -4.8e+64) t_1 (if (<= b 4e+78) (+ a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double tmp;
if (b <= -4.8e+64) {
tmp = t_1;
} else if (b <= 4e+78) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = (y - 2.0d0) * b
if (b <= (-4.8d+64)) then
tmp = t_1
else if (b <= 4d+78) then
tmp = a + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double tmp;
if (b <= -4.8e+64) {
tmp = t_1;
} else if (b <= 4e+78) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y - 2.0) * b tmp = 0 if b <= -4.8e+64: tmp = t_1 elif b <= 4e+78: tmp = a + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 2.0) * b) tmp = 0.0 if (b <= -4.8e+64) tmp = t_1; elseif (b <= 4e+78) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y - 2.0) * b; tmp = 0.0; if (b <= -4.8e+64) tmp = t_1; elseif (b <= 4e+78) tmp = a + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.8e+64], t$95$1, If[LessEqual[b, 4e+78], N[(a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 2\right) \cdot b\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+78}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.79999999999999999e64 or 4.00000000000000003e78 < b Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6423.8
Applied rewrites23.8%
if -4.79999999999999999e64 < b < 4.00000000000000003e78Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
(if (<= t_1 -2e+298) (* b y) (if (<= t_1 1e+307) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -2e+298) {
tmp = b * y;
} else if (t_1 <= 1e+307) {
tmp = a + x;
} else {
tmp = b * t;
}
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)
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) :: t_1
real(8) :: tmp
t_1 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
if (t_1 <= (-2d+298)) then
tmp = b * y
else if (t_1 <= 1d+307) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -2e+298) {
tmp = b * y;
} else if (t_1 <= 1e+307) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= -2e+298: tmp = b * y elif t_1 <= 1e+307: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= -2e+298) tmp = Float64(b * y); elseif (t_1 <= 1e+307) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= -2e+298) tmp = b * y; elseif (t_1 <= 1e+307) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+298], N[(b * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+298}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -1.9999999999999999e298Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in y around inf
lower-*.f6417.9
Applied rewrites17.9%
if -1.9999999999999999e298 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.99999999999999986e306Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
if 9.99999999999999986e306 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in t around inf
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.8e+229) (* b t) (if (<= t 4.5e+53) (+ a x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.8e+229) {
tmp = b * t;
} else if (t <= 4.5e+53) {
tmp = a + x;
} else {
tmp = b * t;
}
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)
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) :: tmp
if (t <= (-5.8d+229)) then
tmp = b * t
else if (t <= 4.5d+53) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.8e+229) {
tmp = b * t;
} else if (t <= 4.5e+53) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.8e+229: tmp = b * t elif t <= 4.5e+53: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.8e+229) tmp = Float64(b * t); elseif (t <= 4.5e+53) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.8e+229) tmp = b * t; elseif (t <= 4.5e+53) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.8e+229], N[(b * t), $MachinePrecision], If[LessEqual[t, 4.5e+53], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+229}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+53}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -5.79999999999999963e229 or 4.5000000000000002e53 < t Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in t around inf
lower-*.f6417.0
Applied rewrites17.0%
if -5.79999999999999963e229 < t < 4.5000000000000002e53Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8e+91) (+ a x) (if (<= a 56000.0) (+ z x) (+ a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e+91) {
tmp = a + x;
} else if (a <= 56000.0) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (a <= (-8d+91)) then
tmp = a + x
else if (a <= 56000.0d0) then
tmp = z + x
else
tmp = a + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8e+91) {
tmp = a + x;
} else if (a <= 56000.0) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8e+91: tmp = a + x elif a <= 56000.0: tmp = z + x else: tmp = a + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8e+91) tmp = Float64(a + x); elseif (a <= 56000.0) tmp = Float64(z + x); else tmp = Float64(a + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8e+91) tmp = a + x; elseif (a <= 56000.0) tmp = z + x; else tmp = a + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8e+91], N[(a + x), $MachinePrecision], If[LessEqual[a, 56000.0], N[(z + x), $MachinePrecision], N[(a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{+91}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;a \leq 56000:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + x\\
\end{array}
\end{array}
if a < -8.00000000000000064e91 or 56000 < a Initial program 94.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6473.3
Applied rewrites73.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6447.2
Applied rewrites47.2%
Taylor expanded in b around 0
lower-+.f6425.4
Applied rewrites25.4%
if -8.00000000000000064e91 < a < 56000Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.18e+92) a (if (<= a 2.1e+166) (+ z x) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.18e+92) {
tmp = a;
} else if (a <= 2.1e+166) {
tmp = z + x;
} else {
tmp = a;
}
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)
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) :: tmp
if (a <= (-1.18d+92)) then
tmp = a
else if (a <= 2.1d+166) then
tmp = z + x
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.18e+92) {
tmp = a;
} else if (a <= 2.1e+166) {
tmp = z + x;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.18e+92: tmp = a elif a <= 2.1e+166: tmp = z + x else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.18e+92) tmp = a; elseif (a <= 2.1e+166) tmp = Float64(z + x); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.18e+92) tmp = a; elseif (a <= 2.1e+166) tmp = z + x; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.18e+92], a, If[LessEqual[a, 2.1e+166], N[(z + x), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.18 \cdot 10^{+92}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+166}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.18e92 or 2.1000000000000001e166 < a Initial program 94.9%
Taylor expanded in a around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.8
Applied rewrites28.8%
Taylor expanded in t around 0
Applied rewrites11.2%
if -1.18e92 < a < 2.1000000000000001e166Initial program 94.9%
Taylor expanded in y around 0
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
mul-1-negN/A
lower-neg.f6496.0
Applied rewrites96.0%
Taylor expanded in y around 0
mul-1-negN/A
lift-neg.f64N/A
+-commutativeN/A
*-commutativeN/A
lift-neg.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
sub-flip-reverseN/A
*-commutativeN/A
lower--.f64N/A
lower-*.f64N/A
lift--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6446.0
Applied rewrites46.0%
Taylor expanded in b around 0
+-commutativeN/A
lower-+.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 94.9%
Taylor expanded in a around inf
sub-negate-revN/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f6428.8
Applied rewrites28.8%
Taylor expanded in t around 0
Applied rewrites11.2%
herbie shell --seed 2025136
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))