
(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 27 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 (fma (- (+ t y) 2.0) b (- (fma (- 1.0 y) z x) (* (- t 1.0) a))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(((t + y) - 2.0), b, (fma((1.0 - y), z, x) - ((t - 1.0) * a)));
}
function code(x, y, z, t, a, b) return fma(Float64(Float64(t + y) - 2.0), b, Float64(fma(Float64(1.0 - y), z, x) - Float64(Float64(t - 1.0) * a))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)
\end{array}
Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)))
(if (<= t -2.7e+77)
(+ a (- (fma (- y 2.0) b (* (- b a) t)) t_1))
(if (<= t 2.3)
(- (fma (- y 2.0) b x) (- t_1 a))
(+ (- (- (fma (- z) y x) (- z)) (* (- t 1.0) a)) (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double tmp;
if (t <= -2.7e+77) {
tmp = a + (fma((y - 2.0), b, ((b - a) * t)) - t_1);
} else if (t <= 2.3) {
tmp = fma((y - 2.0), b, x) - (t_1 - a);
} else {
tmp = ((fma(-z, y, x) - -z) - ((t - 1.0) * a)) + (b * t);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (t <= -2.7e+77) tmp = Float64(a + Float64(fma(Float64(y - 2.0), b, Float64(Float64(b - a) * t)) - t_1)); elseif (t <= 2.3) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_1 - a)); else tmp = Float64(Float64(Float64(fma(Float64(-z), y, x) - Float64(-z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * t)); 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[t, -2.7e+77], N[(a + N[(N[(N[(y - 2.0), $MachinePrecision] * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$1 - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[((-z) * y + x), $MachinePrecision] - (-z)), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(y - 2, b, \left(b - a\right) \cdot t\right) - t\_1\right)\\
\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(-z\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t\\
\end{array}
\end{array}
if t < -2.6999999999999998e77Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
if -2.6999999999999998e77 < t < 2.2999999999999998Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if 2.2999999999999998 < t Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower--.f64N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f6477.6
Applied rewrites77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)))
(if (<= t -2.7e+77)
(+ a (- (fma -2.0 b (* (- b a) t)) t_1))
(if (<= t 2.3)
(- (fma (- y 2.0) b x) (- t_1 a))
(+ (- (- (fma (- z) y x) (- z)) (* (- t 1.0) a)) (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double tmp;
if (t <= -2.7e+77) {
tmp = a + (fma(-2.0, b, ((b - a) * t)) - t_1);
} else if (t <= 2.3) {
tmp = fma((y - 2.0), b, x) - (t_1 - a);
} else {
tmp = ((fma(-z, y, x) - -z) - ((t - 1.0) * a)) + (b * t);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (t <= -2.7e+77) tmp = Float64(a + Float64(fma(-2.0, b, Float64(Float64(b - a) * t)) - t_1)); elseif (t <= 2.3) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_1 - a)); else tmp = Float64(Float64(Float64(fma(Float64(-z), y, x) - Float64(-z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * t)); 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[t, -2.7e+77], N[(a + N[(N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$1 - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[((-z) * y + x), $MachinePrecision] - (-z)), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) - t\_1\right)\\
\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(-z, y, x\right) - \left(-z\right)\right) - \left(t - 1\right) \cdot a\right) + b \cdot t\\
\end{array}
\end{array}
if t < -2.6999999999999998e77Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around 0
Applied rewrites71.3%
if -2.6999999999999998e77 < t < 2.2999999999999998Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if 2.2999999999999998 < t Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower--.f64N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
mul-1-negN/A
lower-neg.f6477.6
Applied rewrites77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)))
(if (<= t -2.7e+77)
(+ a (- (fma -2.0 b (* (- b a) t)) t_1))
(if (<= t 2.3)
(- (fma (- y 2.0) b x) (- t_1 a))
(- (fma (- 1.0 y) z x) (- (* (- t 1.0) a) (* b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double tmp;
if (t <= -2.7e+77) {
tmp = a + (fma(-2.0, b, ((b - a) * t)) - t_1);
} else if (t <= 2.3) {
tmp = fma((y - 2.0), b, x) - (t_1 - a);
} else {
tmp = fma((1.0 - y), z, x) - (((t - 1.0) * a) - (b * t));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (t <= -2.7e+77) tmp = Float64(a + Float64(fma(-2.0, b, Float64(Float64(b - a) * t)) - t_1)); elseif (t <= 2.3) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_1 - a)); else tmp = Float64(fma(Float64(1.0 - y), z, x) - Float64(Float64(Float64(t - 1.0) * a) - Float64(b * t))); 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[t, -2.7e+77], N[(a + N[(N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$1 - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - N[(N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision] - N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right) - t\_1\right)\\
\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - \left(\left(t - 1\right) \cdot a - b \cdot t\right)\\
\end{array}
\end{array}
if t < -2.6999999999999998e77Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around 0
Applied rewrites71.3%
if -2.6999999999999998e77 < t < 2.2999999999999998Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if 2.2999999999999998 < t Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-+l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)))
(if (<= t -2.7e+77)
(+ (- (- x t_1) (* a t)) (* b t))
(if (<= t 2.3)
(- (fma (- y 2.0) b x) (- t_1 a))
(- (fma (- 1.0 y) z x) (- (* (- t 1.0) a) (* b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double tmp;
if (t <= -2.7e+77) {
tmp = ((x - t_1) - (a * t)) + (b * t);
} else if (t <= 2.3) {
tmp = fma((y - 2.0), b, x) - (t_1 - a);
} else {
tmp = fma((1.0 - y), z, x) - (((t - 1.0) * a) - (b * t));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (t <= -2.7e+77) tmp = Float64(Float64(Float64(x - t_1) - Float64(a * t)) + Float64(b * t)); elseif (t <= 2.3) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_1 - a)); else tmp = Float64(fma(Float64(1.0 - y), z, x) - Float64(Float64(Float64(t - 1.0) * a) - Float64(b * t))); 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[t, -2.7e+77], N[(N[(N[(x - t$95$1), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$1 - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - N[(N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision] - N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;\left(\left(x - t\_1\right) - a \cdot t\right) + b \cdot t\\
\mathbf{elif}\;t \leq 2.3:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - \left(\left(t - 1\right) \cdot a - b \cdot t\right)\\
\end{array}
\end{array}
if t < -2.6999999999999998e77Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in t around inf
lower-*.f6468.6
Applied rewrites68.6%
if -2.6999999999999998e77 < t < 2.2999999999999998Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if 2.2999999999999998 < t Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-+l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 1.0) z)) (t_2 (+ (- (- x t_1) (* a t)) (* b t))))
(if (<= t -2.7e+77)
t_2
(if (<= t 3.2) (- (fma (- y 2.0) b x) (- t_1 a)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 1.0) * z;
double t_2 = ((x - t_1) - (a * t)) + (b * t);
double tmp;
if (t <= -2.7e+77) {
tmp = t_2;
} else if (t <= 3.2) {
tmp = fma((y - 2.0), b, x) - (t_1 - a);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 1.0) * z) t_2 = Float64(Float64(Float64(x - t_1) - Float64(a * t)) + Float64(b * t)) tmp = 0.0 if (t <= -2.7e+77) tmp = t_2; elseif (t <= 3.2) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_1 - a)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - t$95$1), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+77], t$95$2, If[LessEqual[t, 3.2], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$1 - a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 1\right) \cdot z\\
t_2 := \left(\left(x - t\_1\right) - a \cdot t\right) + b \cdot t\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.2:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_1 - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.6999999999999998e77 or 3.2000000000000002 < t Initial program 95.0%
Taylor expanded in t around inf
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in t around inf
lower-*.f6468.6
Applied rewrites68.6%
if -2.6999999999999998e77 < t < 3.2000000000000002Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -5.6e+123)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(if (<= z 0.0056)
(fma (- (+ t y) 2.0) b (- x (* (- t 1.0) a)))
(+ (fma (- 1.0 y) z (* (- (+ y t) 2.0) b)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.6e+123) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else if (z <= 0.0056) {
tmp = fma(((t + y) - 2.0), b, (x - ((t - 1.0) * a)));
} else {
tmp = fma((1.0 - y), z, (((y + t) - 2.0) * b)) + x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.6e+123) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); elseif (z <= 0.0056) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(Float64(t - 1.0) * a))); else tmp = Float64(fma(Float64(1.0 - y), z, Float64(Float64(Float64(y + t) - 2.0) * b)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.6e+123], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0056], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{elif}\;z \leq 0.0056:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(t - 1\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \left(\left(y + t\right) - 2\right) \cdot b\right) + x\\
\end{array}
\end{array}
if z < -5.60000000000000023e123Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate--l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
+-commutativeN/A
associate--l+N/A
sub-negate-revN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
sub-flipN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites67.8%
if -5.60000000000000023e123 < z < 0.00559999999999999994Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
if 0.00559999999999999994 < z Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in a around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites74.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)) (t_2 (* (- y 1.0) z)))
(if (<= t -5.4e+79)
(fma t_1 b (* (- a) t))
(if (<= t 3.5e-9)
(- (fma (- y 2.0) b x) (- t_2 a))
(if (<= t 9e+230)
(- (fma t_1 b x) t_2)
(- (fma a (- t 1.0) (* z (- y 1.0)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double t_2 = (y - 1.0) * z;
double tmp;
if (t <= -5.4e+79) {
tmp = fma(t_1, b, (-a * t));
} else if (t <= 3.5e-9) {
tmp = fma((y - 2.0), b, x) - (t_2 - a);
} else if (t <= 9e+230) {
tmp = fma(t_1, b, x) - t_2;
} else {
tmp = -fma(a, (t - 1.0), (z * (y - 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) t_2 = Float64(Float64(y - 1.0) * z) tmp = 0.0 if (t <= -5.4e+79) tmp = fma(t_1, b, Float64(Float64(-a) * t)); elseif (t <= 3.5e-9) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(t_2 - a)); elseif (t <= 9e+230) tmp = Float64(fma(t_1, b, x) - t_2); else tmp = Float64(-fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t, -5.4e+79], N[(t$95$1 * b + N[((-a) * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-9], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(t$95$2 - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+230], N[(N[(t$95$1 * b + x), $MachinePrecision] - t$95$2), $MachinePrecision], (-N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
t_2 := \left(y - 1\right) \cdot z\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(-a\right) \cdot t\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(t\_2 - a\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+230}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;-\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\end{array}
\end{array}
if t < -5.3999999999999999e79Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6451.0
Applied rewrites51.0%
if -5.3999999999999999e79 < t < 3.4999999999999999e-9Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if 3.4999999999999999e-9 < t < 8.9999999999999998e230Initial program 95.0%
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-*.f6473.2
Applied rewrites73.2%
if 8.9999999999999998e230 < t Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in b around 0
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
lower-neg.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower-*.f64N/A
lift--.f6453.6
Applied rewrites53.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)))
(if (<= z -5.6e+123)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(if (<= z 0.0056)
(fma t_1 b (- x (* (- t 1.0) a)))
(- (fma t_1 b x) (* (- y 1.0) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double tmp;
if (z <= -5.6e+123) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else if (z <= 0.0056) {
tmp = fma(t_1, b, (x - ((t - 1.0) * a)));
} else {
tmp = fma(t_1, b, x) - ((y - 1.0) * z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) tmp = 0.0 if (z <= -5.6e+123) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); elseif (z <= 0.0056) tmp = fma(t_1, b, Float64(x - Float64(Float64(t - 1.0) * a))); else tmp = Float64(fma(t_1, b, x) - Float64(Float64(y - 1.0) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[z, -5.6e+123], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0056], N[(t$95$1 * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * b + x), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{elif}\;z \leq 0.0056:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x - \left(t - 1\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x\right) - \left(y - 1\right) \cdot z\\
\end{array}
\end{array}
if z < -5.60000000000000023e123Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate--l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
+-commutativeN/A
associate--l+N/A
sub-negate-revN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
sub-flipN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites67.8%
if -5.60000000000000023e123 < z < 0.00559999999999999994Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
if 0.00559999999999999994 < z Initial program 95.0%
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-*.f6473.2
Applied rewrites73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)))
(if (<= b -2.8e+63)
(- (fma t_1 b x) (* (- t 1.0) a))
(if (<= b -2.2e-104)
(- (fma (- y 2.0) b x) (- (* (- y 1.0) z) a))
(if (<= b 1.42e+85)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(fma t_1 b (- x (- a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double tmp;
if (b <= -2.8e+63) {
tmp = fma(t_1, b, x) - ((t - 1.0) * a);
} else if (b <= -2.2e-104) {
tmp = fma((y - 2.0), b, x) - (((y - 1.0) * z) - a);
} else if (b <= 1.42e+85) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = fma(t_1, b, (x - -a));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) tmp = 0.0 if (b <= -2.8e+63) tmp = Float64(fma(t_1, b, x) - Float64(Float64(t - 1.0) * a)); elseif (b <= -2.2e-104) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(Float64(Float64(y - 1.0) * z) - a)); elseif (b <= 1.42e+85) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = fma(t_1, b, Float64(x - Float64(-a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[b, -2.8e+63], N[(N[(t$95$1 * b + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.2e-104], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.42e+85], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + N[(x - (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x\right) - \left(t - 1\right) \cdot a\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{-104}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(\left(y - 1\right) \cdot z - a\right)\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x - \left(-a\right)\right)\\
\end{array}
\end{array}
if b < -2.79999999999999987e63Initial program 95.0%
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.2
Applied rewrites73.2%
if -2.79999999999999987e63 < b < -2.20000000000000012e-104Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if -2.20000000000000012e-104 < b < 1.42e85Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate--l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
+-commutativeN/A
associate--l+N/A
sub-negate-revN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
sub-flipN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites67.8%
if 1.42e85 < b Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b (- x (- a)))))
(if (<= b -2.95e+63)
t_1
(if (<= b -2.2e-104)
(- (fma (- y 2.0) b x) (- (* (- y 1.0) z) a))
(if (<= b 1.42e+85) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) 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 <= -2.95e+63) {
tmp = t_1;
} else if (b <= -2.2e-104) {
tmp = fma((y - 2.0), b, x) - (((y - 1.0) * z) - a);
} else if (b <= 1.42e+85) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a))) tmp = 0.0 if (b <= -2.95e+63) tmp = t_1; elseif (b <= -2.2e-104) tmp = Float64(fma(Float64(y - 2.0), b, x) - Float64(Float64(Float64(y - 1.0) * z) - a)); elseif (b <= 1.42e+85) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; 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 + N[(x - (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.95e+63], t$95$1, If[LessEqual[b, -2.2e-104], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] - N[(N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.42e+85], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
\mathbf{if}\;b \leq -2.95 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{-104}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) - \left(\left(y - 1\right) \cdot z - a\right)\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.95000000000000014e63 or 1.42e85 < b Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
if -2.95000000000000014e63 < b < -2.20000000000000012e-104Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites69.8%
if -2.20000000000000012e-104 < b < 1.42e85Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate--l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
+-commutativeN/A
associate--l+N/A
sub-negate-revN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
sub-flipN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites67.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b (- x (- a)))))
(if (<= b -9.8e+146)
t_1
(if (<= b 1.42e+85) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) 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 <= -9.8e+146) {
tmp = t_1;
} else if (b <= 1.42e+85) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a))) tmp = 0.0 if (b <= -9.8e+146) tmp = t_1; elseif (b <= 1.42e+85) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; 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 + N[(x - (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.8e+146], t$95$1, If[LessEqual[b, 1.42e+85], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
\mathbf{if}\;b \leq -9.8 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.8000000000000003e146 or 1.42e85 < b Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
if -9.8000000000000003e146 < b < 1.42e85Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate--l-N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
+-commutativeN/A
associate--l+N/A
sub-negate-revN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negate-revN/A
lower--.f64N/A
fp-cancel-sub-sign-invN/A
sub-negate-revN/A
sub-flipN/A
mul-1-negN/A
*-commutativeN/A
Applied rewrites67.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.023)
(- (fma a (- t 1.0) (* z (- y 1.0))))
(if (<= z 1.6e+64)
(fma (- (+ t y) 2.0) b (- x (- a)))
(+ a (- (* b y) (* (- y 1.0) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.023) {
tmp = -fma(a, (t - 1.0), (z * (y - 1.0)));
} else if (z <= 1.6e+64) {
tmp = fma(((t + y) - 2.0), b, (x - -a));
} else {
tmp = a + ((b * y) - ((y - 1.0) * z));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.023) tmp = Float64(-fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); elseif (z <= 1.6e+64) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a))); else tmp = Float64(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.023], (-N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 1.6e+64], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - (-a)), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.023:\\
\;\;\;\;-\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.023Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in b around 0
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
lower-neg.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower-*.f64N/A
lift--.f6453.6
Applied rewrites53.6%
if -0.023 < z < 1.60000000000000009e64Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
if 1.60000000000000009e64 < z Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around inf
lower-*.f6449.1
Applied rewrites49.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.023)
(- (fma (- a) t a) (* z (- y 1.0)))
(if (<= z 1.6e+64)
(fma (- (+ t y) 2.0) b (- x (- a)))
(+ a (- (* b y) (* (- y 1.0) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.023) {
tmp = fma(-a, t, a) - (z * (y - 1.0));
} else if (z <= 1.6e+64) {
tmp = fma(((t + y) - 2.0), b, (x - -a));
} else {
tmp = a + ((b * y) - ((y - 1.0) * z));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.023) tmp = Float64(fma(Float64(-a), t, a) - Float64(z * Float64(y - 1.0))); elseif (z <= 1.6e+64) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a))); else tmp = Float64(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.023], N[(N[((-a) * t + a), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+64], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - (-a)), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.023:\\
\;\;\;\;\mathsf{fma}\left(-a, t, a\right) - z \cdot \left(y - 1\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.023Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f64N/A
lift--.f6453.2
Applied rewrites53.2%
if -0.023 < z < 1.60000000000000009e64Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
if 1.60000000000000009e64 < z Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around inf
lower-*.f6449.1
Applied rewrites49.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (- (* b y) (* (- y 1.0) z)))))
(if (<= z -0.023)
t_1
(if (<= z 1.6e+64) (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 = a + ((b * y) - ((y - 1.0) * z));
double tmp;
if (z <= -0.023) {
tmp = t_1;
} else if (z <= 1.6e+64) {
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(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z))) tmp = 0.0 if (z <= -0.023) tmp = t_1; elseif (z <= 1.6e+64) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(x - Float64(-a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.023], t$95$1, If[LessEqual[z, 1.6e+64], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.023:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x - \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.023 or 1.60000000000000009e64 < z Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around inf
lower-*.f6449.1
Applied rewrites49.1%
if -0.023 < z < 1.60000000000000009e64Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6474.2
Applied rewrites74.2%
Taylor expanded in t around 0
mul-1-negN/A
lift-neg.f6459.7
Applied rewrites59.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (- (* b y) (* (- y 1.0) z)))))
(if (<= z -4e-6)
t_1
(if (<= z 7.5e+57) (+ a (fma -2.0 b (* (- b a) t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + ((b * y) - ((y - 1.0) * z));
double tmp;
if (z <= -4e-6) {
tmp = t_1;
} else if (z <= 7.5e+57) {
tmp = a + fma(-2.0, b, ((b - a) * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(Float64(b * y) - Float64(Float64(y - 1.0) * z))) tmp = 0.0 if (z <= -4e-6) tmp = t_1; elseif (z <= 7.5e+57) tmp = Float64(a + fma(-2.0, b, Float64(Float64(b - a) * t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(N[(b * y), $MachinePrecision] - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e-6], t$95$1, If[LessEqual[z, 7.5e+57], N[(a + N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(b \cdot y - \left(y - 1\right) \cdot z\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+57}:\\
\;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999982e-6 or 7.5000000000000006e57 < z Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in y around inf
lower-*.f6449.1
Applied rewrites49.1%
if -3.99999999999999982e-6 < z < 7.5000000000000006e57Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
Taylor expanded in y around 0
Applied rewrites47.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)))
(if (<= z -1.02e+130)
t_1
(if (<= z 1.8e+69) (+ a (fma -2.0 b (* (- b a) t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -1.02e+130) {
tmp = t_1;
} else if (z <= 1.8e+69) {
tmp = a + fma(-2.0, b, ((b - a) * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -1.02e+130) tmp = t_1; elseif (z <= 1.8e+69) tmp = Float64(a + fma(-2.0, b, Float64(Float64(b - a) * t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.02e+130], t$95$1, If[LessEqual[z, 1.8e+69], N[(a + N[(-2.0 * b + N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+69}:\\
\;\;\;\;a + \mathsf{fma}\left(-2, b, \left(b - a\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.01999999999999999e130 or 1.8000000000000001e69 < z Initial program 95.0%
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.5
Applied rewrites28.5%
if -1.01999999999999999e130 < z < 1.8000000000000001e69Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6460.0
Applied rewrites60.0%
Taylor expanded in y around 0
Applied rewrites47.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)))
(if (<= z -2.6e+87)
t_1
(if (<= z -5.1e-289)
(* (- 1.0 t) a)
(if (<= z 8.5e+63) (* (- (+ t y) 2.0) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= -5.1e-289) {
tmp = (1.0 - t) * a;
} else if (z <= 8.5e+63) {
tmp = ((t + y) - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 - y) * z
if (z <= (-2.6d+87)) then
tmp = t_1
else if (z <= (-5.1d-289)) then
tmp = (1.0d0 - t) * a
else if (z <= 8.5d+63) then
tmp = ((t + y) - 2.0d0) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= -5.1e-289) {
tmp = (1.0 - t) * a;
} else if (z <= 8.5e+63) {
tmp = ((t + y) - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - y) * z tmp = 0 if z <= -2.6e+87: tmp = t_1 elif z <= -5.1e-289: tmp = (1.0 - t) * a elif z <= 8.5e+63: tmp = ((t + y) - 2.0) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -2.6e+87) tmp = t_1; elseif (z <= -5.1e-289) tmp = Float64(Float64(1.0 - t) * a); elseif (z <= 8.5e+63) tmp = Float64(Float64(Float64(t + y) - 2.0) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - y) * z; tmp = 0.0; if (z <= -2.6e+87) tmp = t_1; elseif (z <= -5.1e-289) tmp = (1.0 - t) * a; elseif (z <= 8.5e+63) tmp = ((t + y) - 2.0) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, -5.1e-289], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 8.5e+63], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-289}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.59999999999999998e87 or 8.5000000000000004e63 < z Initial program 95.0%
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.5
Applied rewrites28.5%
if -2.59999999999999998e87 < z < -5.0999999999999996e-289Initial program 95.0%
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.1
Applied rewrites28.1%
if -5.0999999999999996e-289 < z < 8.5000000000000004e63Initial program 95.0%
Taylor expanded in t 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.2
Applied rewrites96.2%
Taylor expanded in x around 0
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites81.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-+.f6436.7
Applied rewrites36.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)))
(if (<= z -8e+40)
t_1
(if (<= z 1.26e+64) (fma (- t 2.0) b (* (- a) t)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -8e+40) {
tmp = t_1;
} else if (z <= 1.26e+64) {
tmp = fma((t - 2.0), b, (-a * t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -8e+40) tmp = t_1; elseif (z <= 1.26e+64) tmp = fma(Float64(t - 2.0), b, Float64(Float64(-a) * t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e+40], t$95$1, If[LessEqual[z, 1.26e+64], N[(N[(t - 2.0), $MachinePrecision] * b + N[((-a) * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -8 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, \left(-a\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000024e40 or 1.26e64 < z Initial program 95.0%
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.5
Applied rewrites28.5%
if -8.00000000000000024e40 < z < 1.26e64Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.0%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f6451.0
Applied rewrites51.0%
Taylor expanded in y around 0
Applied rewrites37.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)))
(if (<= z -2.6e+87)
t_1
(if (<= z 3.6e-31)
(* (- 1.0 t) a)
(if (<= z 7.5e+63) (* (- b a) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= 3.6e-31) {
tmp = (1.0 - t) * a;
} else if (z <= 7.5e+63) {
tmp = (b - a) * t;
} 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 - y) * z
if (z <= (-2.6d+87)) then
tmp = t_1
else if (z <= 3.6d-31) then
tmp = (1.0d0 - t) * a
else if (z <= 7.5d+63) then
tmp = (b - a) * t
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 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= 3.6e-31) {
tmp = (1.0 - t) * a;
} else if (z <= 7.5e+63) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - y) * z tmp = 0 if z <= -2.6e+87: tmp = t_1 elif z <= 3.6e-31: tmp = (1.0 - t) * a elif z <= 7.5e+63: tmp = (b - a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -2.6e+87) tmp = t_1; elseif (z <= 3.6e-31) tmp = Float64(Float64(1.0 - t) * a); elseif (z <= 7.5e+63) tmp = Float64(Float64(b - a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - y) * z; tmp = 0.0; if (z <= -2.6e+87) tmp = t_1; elseif (z <= 3.6e-31) tmp = (1.0 - t) * a; elseif (z <= 7.5e+63) tmp = (b - a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, 3.6e-31], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 7.5e+63], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-31}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.59999999999999998e87 or 7.5000000000000005e63 < z Initial program 95.0%
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.5
Applied rewrites28.5%
if -2.59999999999999998e87 < z < 3.60000000000000004e-31Initial program 95.0%
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.1
Applied rewrites28.1%
if 3.60000000000000004e-31 < z < 7.5000000000000005e63Initial program 95.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6432.0
Applied rewrites32.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- 1.0 y) z))) (if (<= z -2.6e+87) t_1 (if (<= z 0.0076) (* (- 1.0 t) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= 0.0076) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 - y) * z
if (z <= (-2.6d+87)) then
tmp = t_1
else if (z <= 0.0076d0) then
tmp = (1.0d0 - t) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -2.6e+87) {
tmp = t_1;
} else if (z <= 0.0076) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - y) * z tmp = 0 if z <= -2.6e+87: tmp = t_1 elif z <= 0.0076: tmp = (1.0 - t) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -2.6e+87) tmp = t_1; elseif (z <= 0.0076) tmp = Float64(Float64(1.0 - t) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - y) * z; tmp = 0.0; if (z <= -2.6e+87) tmp = t_1; elseif (z <= 0.0076) tmp = (1.0 - t) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.6e+87], t$95$1, If[LessEqual[z, 0.0076], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0076:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.59999999999999998e87 or 0.00759999999999999998 < z Initial program 95.0%
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.5
Applied rewrites28.5%
if -2.59999999999999998e87 < z < 0.00759999999999999998Initial program 95.0%
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.1
Applied rewrites28.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y) z))) (if (<= z -1.8e+129) t_1 (if (<= z 0.008) (* (- 1.0 t) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (z <= -1.8e+129) {
tmp = t_1;
} else if (z <= 0.008) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 * z
if (z <= (-1.8d+129)) then
tmp = t_1
else if (z <= 0.008d0) then
tmp = (1.0d0 - t) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (z <= -1.8e+129) {
tmp = t_1;
} else if (z <= 0.008) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if z <= -1.8e+129: tmp = t_1 elif z <= 0.008: tmp = (1.0 - t) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (z <= -1.8e+129) tmp = t_1; elseif (z <= 0.008) tmp = Float64(Float64(1.0 - t) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (z <= -1.8e+129) tmp = t_1; elseif (z <= 0.008) tmp = (1.0 - t) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[z, -1.8e+129], t$95$1, If[LessEqual[z, 0.008], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.008:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8000000000000001e129 or 0.0080000000000000002 < z Initial program 95.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.4
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites18.0%
Taylor expanded in z around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6419.4
Applied rewrites19.4%
if -1.8000000000000001e129 < z < 0.0080000000000000002Initial program 95.0%
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.1
Applied rewrites28.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y) z)))
(if (<= y -700000000.0)
t_1
(if (<= y 1.45e-110) (* (- t) a) (if (<= y 5.4e+68) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (y <= -700000000.0) {
tmp = t_1;
} else if (y <= 1.45e-110) {
tmp = -t * a;
} else if (y <= 5.4e+68) {
tmp = 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 * z
if (y <= (-700000000.0d0)) then
tmp = t_1
else if (y <= 1.45d-110) then
tmp = -t * a
else if (y <= 5.4d+68) then
tmp = 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 * z;
double tmp;
if (y <= -700000000.0) {
tmp = t_1;
} else if (y <= 1.45e-110) {
tmp = -t * a;
} else if (y <= 5.4e+68) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if y <= -700000000.0: tmp = t_1 elif y <= 1.45e-110: tmp = -t * a elif y <= 5.4e+68: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (y <= -700000000.0) tmp = t_1; elseif (y <= 1.45e-110) tmp = Float64(Float64(-t) * a); elseif (y <= 5.4e+68) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (y <= -700000000.0) tmp = t_1; elseif (y <= 1.45e-110) tmp = -t * a; elseif (y <= 5.4e+68) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[y, -700000000.0], t$95$1, If[LessEqual[y, 1.45e-110], N[((-t) * a), $MachinePrecision], If[LessEqual[y, 5.4e+68], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;y \leq -700000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-110}:\\
\;\;\;\;\left(-t\right) \cdot a\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7e8 or 5.39999999999999982e68 < y Initial program 95.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.4
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites18.0%
Taylor expanded in z around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6419.4
Applied rewrites19.4%
if -7e8 < y < 1.4500000000000001e-110Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6419.3
Applied rewrites19.3%
if 1.4500000000000001e-110 < y < 5.39999999999999982e68Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around inf
Applied rewrites16.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y) z))) (if (<= z -3.3e+99) t_1 (if (<= z 9.2e+35) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (z <= -3.3e+99) {
tmp = t_1;
} else if (z <= 9.2e+35) {
tmp = 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 * z
if (z <= (-3.3d+99)) then
tmp = t_1
else if (z <= 9.2d+35) then
tmp = 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 * z;
double tmp;
if (z <= -3.3e+99) {
tmp = t_1;
} else if (z <= 9.2e+35) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if z <= -3.3e+99: tmp = t_1 elif z <= 9.2e+35: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (z <= -3.3e+99) tmp = t_1; elseif (z <= 9.2e+35) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (z <= -3.3e+99) tmp = t_1; elseif (z <= 9.2e+35) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[z, -3.3e+99], t$95$1, If[LessEqual[z, 9.2e+35], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+35}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.2999999999999999e99 or 9.1999999999999993e35 < z Initial program 95.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.4
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites18.0%
Taylor expanded in z around inf
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-*.f6419.4
Applied rewrites19.4%
if -3.2999999999999999e99 < z < 9.1999999999999993e35Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around inf
Applied rewrites16.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.2e+164) x (if (<= x 4.3e-206) a (if (<= x 7.5e+66) (* b y) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.2e+164) {
tmp = x;
} else if (x <= 4.3e-206) {
tmp = a;
} else if (x <= 7.5e+66) {
tmp = b * y;
} else {
tmp = 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 (x <= (-8.2d+164)) then
tmp = x
else if (x <= 4.3d-206) then
tmp = a
else if (x <= 7.5d+66) then
tmp = b * y
else
tmp = 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 (x <= -8.2e+164) {
tmp = x;
} else if (x <= 4.3e-206) {
tmp = a;
} else if (x <= 7.5e+66) {
tmp = b * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.2e+164: tmp = x elif x <= 4.3e-206: tmp = a elif x <= 7.5e+66: tmp = b * y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.2e+164) tmp = x; elseif (x <= 4.3e-206) tmp = a; elseif (x <= 7.5e+66) tmp = Float64(b * y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8.2e+164) tmp = x; elseif (x <= 4.3e-206) tmp = a; elseif (x <= 7.5e+66) tmp = b * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.2e+164], x, If[LessEqual[x, 4.3e-206], a, If[LessEqual[x, 7.5e+66], N[(b * y), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-206}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+66}:\\
\;\;\;\;b \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.20000000000000032e164 or 7.50000000000000024e66 < x Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around inf
Applied rewrites16.1%
if -8.20000000000000032e164 < x < 4.30000000000000025e-206Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
Applied rewrites10.9%
if 4.30000000000000025e-206 < x < 7.50000000000000024e66Initial program 95.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6433.4
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites18.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.2e+164) x (if (<= x 2.9e-15) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.2e+164) {
tmp = x;
} else if (x <= 2.9e-15) {
tmp = a;
} else {
tmp = 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 (x <= (-8.2d+164)) then
tmp = x
else if (x <= 2.9d-15) then
tmp = a
else
tmp = 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 (x <= -8.2e+164) {
tmp = x;
} else if (x <= 2.9e-15) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.2e+164: tmp = x elif x <= 2.9e-15: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.2e+164) tmp = x; elseif (x <= 2.9e-15) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8.2e+164) tmp = x; elseif (x <= 2.9e-15) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.2e+164], x, If[LessEqual[x, 2.9e-15], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-15}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.20000000000000032e164 or 2.90000000000000019e-15 < x Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around inf
Applied rewrites16.1%
if -8.20000000000000032e164 < x < 2.90000000000000019e-15Initial program 95.0%
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.1
Applied rewrites28.1%
Taylor expanded in t around 0
Applied rewrites10.9%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.0%
Taylor expanded in x around 0
lower--.f64N/A
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.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-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around inf
Applied rewrites16.1%
herbie shell --seed 2025134
(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)))