
(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]
\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
Herbie found 18 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]
\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
(FPCore (x y z t a b) :precision binary64 (fma (- t (- 2.0 y)) b (fma (- 1.0 t) a (fma (- 1.0 y) z x))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((t - (2.0 - y)), b, fma((1.0 - t), a, fma((1.0 - y), z, x)));
}
function code(x, y, z, t, a, b) return fma(Float64(t - Float64(2.0 - y)), b, fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(t - \left(2 - y\right), b, \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\right)
Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2e+28)
(+ x (+ z (fma a (- 1.0 t) (* b (- t 2.0)))))
(if (<= t 1.75e+41)
(+ a (+ x (fma b (- y 2.0) (* z (- 1.0 y)))))
(fma (- t (- 2.0 y)) b (+ x (* a (- 1.0 t)))))))double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2e+28) {
tmp = x + (z + fma(a, (1.0 - t), (b * (t - 2.0))));
} else if (t <= 1.75e+41) {
tmp = a + (x + fma(b, (y - 2.0), (z * (1.0 - y))));
} else {
tmp = fma((t - (2.0 - y)), b, (x + (a * (1.0 - t))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2e+28) tmp = Float64(x + Float64(z + fma(a, Float64(1.0 - t), Float64(b * Float64(t - 2.0))))); elseif (t <= 1.75e+41) tmp = Float64(a + Float64(x + fma(b, Float64(y - 2.0), Float64(z * Float64(1.0 - y))))); else tmp = fma(Float64(t - Float64(2.0 - y)), b, Float64(x + Float64(a * Float64(1.0 - t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2e+28], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision] + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+41], N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+28}:\\
\;\;\;\;x + \left(z + \mathsf{fma}\left(a, 1 - t, b \cdot \left(t - 2\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\
\;\;\;\;a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - \left(2 - y\right), b, x + a \cdot \left(1 - t\right)\right)\\
\end{array}
if t < -1.99999999999999992e28Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in y around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6470.6
Applied rewrites70.6%
if -1.99999999999999992e28 < t < 1.75e41Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6470.7
Applied rewrites70.7%
if 1.75e41 < t Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- t (- 2.0 y)) b (+ x (* a (- 1.0 t))))))
(if (<= t -1.75e+19)
t_1
(if (<= t 1.75e+41) (+ a (+ x (fma b (- y 2.0) (* z (- 1.0 y))))) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - (2.0 - y)), b, (x + (a * (1.0 - t))));
double tmp;
if (t <= -1.75e+19) {
tmp = t_1;
} else if (t <= 1.75e+41) {
tmp = a + (x + fma(b, (y - 2.0), (z * (1.0 - y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(t - Float64(2.0 - y)), b, Float64(x + Float64(a * Float64(1.0 - t)))) tmp = 0.0 if (t <= -1.75e+19) tmp = t_1; elseif (t <= 1.75e+41) tmp = Float64(a + Float64(x + fma(b, Float64(y - 2.0), Float64(z * Float64(1.0 - y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+19], t$95$1, If[LessEqual[t, 1.75e+41], N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - \left(2 - y\right), b, x + a \cdot \left(1 - t\right)\right)\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\
\;\;\;\;a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.75e19 or 1.75e41 < t Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
if -1.75e19 < t < 1.75e41Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in t around 0
lower-+.f64N/A
lower-+.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6470.7
Applied rewrites70.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (fma a (- t 1.0) (* z (- y 1.0))))))
(if (<= a -7.5e+145)
t_1
(if (<= a 8.5e+71) (fma (- t (- 2.0 y)) b (fma z (- 1.0 y) x)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - fma(a, (t - 1.0), (z * (y - 1.0)));
double tmp;
if (a <= -7.5e+145) {
tmp = t_1;
} else if (a <= 8.5e+71) {
tmp = fma((t - (2.0 - y)), b, fma(z, (1.0 - y), x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x - fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))) tmp = 0.0 if (a <= -7.5e+145) tmp = t_1; elseif (a <= 8.5e+71) tmp = fma(Float64(t - Float64(2.0 - y)), b, fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.5e+145], t$95$1, If[LessEqual[a, 8.5e+71], N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{if}\;a \leq -7.5 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(t - \left(2 - y\right), b, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -7.50000000000000006e145 or 8.4999999999999996e71 < a Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around 0
Applied rewrites11.3%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6467.6
Applied rewrites67.6%
if -7.50000000000000006e145 < a < 8.4999999999999996e71Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
lift--.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lift-*.f64N/A
associate--l+N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lower-fma.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
lift--.f64N/A
lift--.f64N/A
Applied rewrites74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- t (- 2.0 y)) b (+ x a))))
(if (<= b -1.5e+68)
t_1
(if (<= b 1.25e+83) (- x (fma a (- t 1.0) (* z (- y 1.0)))) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - (2.0 - y)), b, (x + a));
double tmp;
if (b <= -1.5e+68) {
tmp = t_1;
} else if (b <= 1.25e+83) {
tmp = x - fma(a, (t - 1.0), (z * (y - 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(t - Float64(2.0 - y)), b, Float64(x + a)) tmp = 0.0 if (b <= -1.5e+68) tmp = t_1; elseif (b <= 1.25e+83) tmp = Float64(x - fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(x + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e+68], t$95$1, If[LessEqual[b, 1.25e+83], N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - \left(2 - y\right), b, x + a\right)\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+83}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.5000000000000001e68 or 1.25000000000000007e83 < b Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
Taylor expanded in t around 0
Applied rewrites60.5%
if -1.5000000000000001e68 < b < 1.25000000000000007e83Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around 0
Applied rewrites11.3%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6467.6
Applied rewrites67.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (* z (- (/ b z) 1.0)))))
(if (<= y -1.12e+61)
t_1
(if (<= y 2.02e-113)
(fma (- t 2.0) b (+ x z))
(if (<= y 1.86e+130) (fma (- t (- 2.0 y)) b (+ x a)) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (z * ((b / z) - 1.0));
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= 2.02e-113) {
tmp = fma((t - 2.0), b, (x + z));
} else if (y <= 1.86e+130) {
tmp = fma((t - (2.0 - y)), b, (x + a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(z * Float64(Float64(b / z) - 1.0))) tmp = 0.0 if (y <= -1.12e+61) tmp = t_1; elseif (y <= 2.02e-113) tmp = fma(Float64(t - 2.0), b, Float64(x + z)); elseif (y <= 1.86e+130) tmp = fma(Float64(t - Float64(2.0 - y)), b, Float64(x + a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(z * N[(N[(b / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+61], t$95$1, If[LessEqual[y, 2.02e-113], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.86e+130], N[(N[(t - N[(2.0 - y), $MachinePrecision]), $MachinePrecision] * b + N[(x + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y \cdot \left(z \cdot \left(\frac{b}{z} - 1\right)\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.02 \cdot 10^{-113}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\
\mathbf{elif}\;y \leq 1.86 \cdot 10^{+130}:\\
\;\;\;\;\mathsf{fma}\left(t - \left(2 - y\right), b, x + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.12e61 or 1.86e130 < y Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f6433.6
Applied rewrites33.6%
if -1.12e61 < y < 2.0200000000000001e-113Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
lift--.f64N/A
sub-flipN/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity47.1
Applied rewrites47.1%
if 2.0200000000000001e-113 < y < 1.86e130Initial program 95.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.0
lift--.f64N/A
sub-negate-revN/A
lift-+.f64N/A
associate--r+N/A
sub-negateN/A
lower--.f64N/A
lower--.f6497.0
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
lower-fma.f64N/A
lower--.f6497.5
lift--.f64N/A
Applied rewrites97.5%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
Taylor expanded in t around 0
Applied rewrites60.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (* z (- (/ b z) 1.0)))))
(if (<= y -1.12e+61)
t_1
(if (<= y 1.02e+21) (fma (- t 2.0) b (+ x z)) t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (z * ((b / z) - 1.0));
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= 1.02e+21) {
tmp = fma((t - 2.0), b, (x + z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(z * Float64(Float64(b / z) - 1.0))) tmp = 0.0 if (y <= -1.12e+61) tmp = t_1; elseif (y <= 1.02e+21) tmp = fma(Float64(t - 2.0), b, Float64(x + z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(z * N[(N[(b / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+61], t$95$1, If[LessEqual[y, 1.02e+21], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \left(z \cdot \left(\frac{b}{z} - 1\right)\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.12e61 or 1.02e21 < y Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f6433.6
Applied rewrites33.6%
if -1.12e61 < y < 1.02e21Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
lift--.f64N/A
sub-flipN/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity47.1
Applied rewrites47.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -1.12e+61) t_1 (if (<= y 9e+67) (fma (- t 2.0) b (+ x z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= 9e+67) {
tmp = fma((t - 2.0), b, (x + z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.12e+61) tmp = t_1; elseif (y <= 9e+67) tmp = fma(Float64(t - 2.0), b, Float64(x + z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+61], t$95$1, If[LessEqual[y, 9e+67], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.12e61 or 8.9999999999999997e67 < y Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
if -1.12e61 < y < 8.9999999999999997e67Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
lift--.f64N/A
sub-flipN/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identity47.1
Applied rewrites47.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -1.12e+61)
t_1
(if (<= y -5.7e-142)
(- x (* -1.0 z))
(if (<= y 1.06e-69)
(* t (- b a))
(if (<= y 8.6e+67) (* a (- 1.0 t)) t_1))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= -5.7e-142) {
tmp = x - (-1.0 * z);
} else if (y <= 1.06e-69) {
tmp = t * (b - a);
} else if (y <= 8.6e+67) {
tmp = a * (1.0 - 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 = y * (b - z)
if (y <= (-1.12d+61)) then
tmp = t_1
else if (y <= (-5.7d-142)) then
tmp = x - ((-1.0d0) * z)
else if (y <= 1.06d-69) then
tmp = t * (b - a)
else if (y <= 8.6d+67) then
tmp = a * (1.0d0 - 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 = y * (b - z);
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= -5.7e-142) {
tmp = x - (-1.0 * z);
} else if (y <= 1.06e-69) {
tmp = t * (b - a);
} else if (y <= 8.6e+67) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -1.12e+61: tmp = t_1 elif y <= -5.7e-142: tmp = x - (-1.0 * z) elif y <= 1.06e-69: tmp = t * (b - a) elif y <= 8.6e+67: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.12e+61) tmp = t_1; elseif (y <= -5.7e-142) tmp = Float64(x - Float64(-1.0 * z)); elseif (y <= 1.06e-69) tmp = Float64(t * Float64(b - a)); elseif (y <= 8.6e+67) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -1.12e+61) tmp = t_1; elseif (y <= -5.7e-142) tmp = x - (-1.0 * z); elseif (y <= 1.06e-69) tmp = t * (b - a); elseif (y <= 8.6e+67) tmp = a * (1.0 - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+61], t$95$1, If[LessEqual[y, -5.7e-142], N[(x - N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e-69], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+67], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.7 \cdot 10^{-142}:\\
\;\;\;\;x - -1 \cdot z\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-69}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+67}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.12e61 or 8.6000000000000002e67 < y Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
if -1.12e61 < y < -5.69999999999999995e-142Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
if -5.69999999999999995e-142 < y < 1.05999999999999997e-69Initial program 95.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.6
Applied rewrites32.6%
if 1.05999999999999997e-69 < y < 8.6000000000000002e67Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -2e+28)
t_1
(if (<= t 4.3e-290)
(* y (- b z))
(if (<= t 1.75e+41) (+ z (* -1.0 (* y z))) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -2e+28) {
tmp = t_1;
} else if (t <= 4.3e-290) {
tmp = y * (b - z);
} else if (t <= 1.75e+41) {
tmp = z + (-1.0 * (y * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-2d+28)) then
tmp = t_1
else if (t <= 4.3d-290) then
tmp = y * (b - z)
else if (t <= 1.75d+41) then
tmp = z + ((-1.0d0) * (y * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -2e+28) {
tmp = t_1;
} else if (t <= 4.3e-290) {
tmp = y * (b - z);
} else if (t <= 1.75e+41) {
tmp = z + (-1.0 * (y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -2e+28: tmp = t_1 elif t <= 4.3e-290: tmp = y * (b - z) elif t <= 1.75e+41: tmp = z + (-1.0 * (y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -2e+28) tmp = t_1; elseif (t <= 4.3e-290) tmp = Float64(y * Float64(b - z)); elseif (t <= 1.75e+41) tmp = Float64(z + Float64(-1.0 * Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -2e+28) tmp = t_1; elseif (t <= 4.3e-290) tmp = y * (b - z); elseif (t <= 1.75e+41) tmp = z + (-1.0 * (y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+28], t$95$1, If[LessEqual[t, 4.3e-290], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+41], N[(z + N[(-1.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-290}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\
\;\;\;\;z + -1 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.99999999999999992e28 or 1.75e41 < t Initial program 95.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.6
Applied rewrites32.6%
if -1.99999999999999992e28 < t < 4.3000000000000002e-290Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
if 4.3000000000000002e-290 < t < 1.75e41Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6428.5
Applied rewrites28.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -2e+28)
t_1
(if (<= t 4.3e-290)
(* y (- b z))
(if (<= t 1.75e+41) (* z (- 1.0 y)) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -2e+28) {
tmp = t_1;
} else if (t <= 4.3e-290) {
tmp = y * (b - z);
} else if (t <= 1.75e+41) {
tmp = z * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-2d+28)) then
tmp = t_1
else if (t <= 4.3d-290) then
tmp = y * (b - z)
else if (t <= 1.75d+41) then
tmp = z * (1.0d0 - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -2e+28) {
tmp = t_1;
} else if (t <= 4.3e-290) {
tmp = y * (b - z);
} else if (t <= 1.75e+41) {
tmp = z * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -2e+28: tmp = t_1 elif t <= 4.3e-290: tmp = y * (b - z) elif t <= 1.75e+41: tmp = z * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -2e+28) tmp = t_1; elseif (t <= 4.3e-290) tmp = Float64(y * Float64(b - z)); elseif (t <= 1.75e+41) tmp = Float64(z * Float64(1.0 - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -2e+28) tmp = t_1; elseif (t <= 4.3e-290) tmp = y * (b - z); elseif (t <= 1.75e+41) tmp = z * (1.0 - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+28], t$95$1, If[LessEqual[t, 4.3e-290], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+41], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-290}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+41}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.99999999999999992e28 or 1.75e41 < t Initial program 95.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.6
Applied rewrites32.6%
if -1.99999999999999992e28 < t < 4.3000000000000002e-290Initial program 95.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6432.8
Applied rewrites32.8%
if 4.3000000000000002e-290 < t < 1.75e41Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -6.2e+31)
t_1
(if (<= a -2.3e-23) (* b t) (if (<= a 1.5e+96) (- x (* -1.0 z)) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -6.2e+31) {
tmp = t_1;
} else if (a <= -2.3e-23) {
tmp = b * t;
} else if (a <= 1.5e+96) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if (a <= (-6.2d+31)) then
tmp = t_1
else if (a <= (-2.3d-23)) then
tmp = b * t
else if (a <= 1.5d+96) then
tmp = x - ((-1.0d0) * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -6.2e+31) {
tmp = t_1;
} else if (a <= -2.3e-23) {
tmp = b * t;
} else if (a <= 1.5e+96) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -6.2e+31: tmp = t_1 elif a <= -2.3e-23: tmp = b * t elif a <= 1.5e+96: tmp = x - (-1.0 * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -6.2e+31) tmp = t_1; elseif (a <= -2.3e-23) tmp = Float64(b * t); elseif (a <= 1.5e+96) tmp = Float64(x - Float64(-1.0 * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if (a <= -6.2e+31) tmp = t_1; elseif (a <= -2.3e-23) tmp = b * t; elseif (a <= 1.5e+96) tmp = x - (-1.0 * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+31], t$95$1, If[LessEqual[a, -2.3e-23], N[(b * t), $MachinePrecision], If[LessEqual[a, 1.5e+96], N[(x - N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-23}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+96}:\\
\;\;\;\;x - -1 \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -6.2000000000000004e31 or 1.5e96 < a Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
if -6.2000000000000004e31 < a < -2.3000000000000001e-23Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in t around inf
lower-*.f6417.9
Applied rewrites17.9%
if -2.3000000000000001e-23 < a < 1.5e96Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* t (- b a)))) (if (<= t -63000000.0) t_1 (if (<= t 2.4e+24) (- x (* -1.0 z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -63000000.0) {
tmp = t_1;
} else if (t <= 2.4e+24) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-63000000.0d0)) then
tmp = t_1
else if (t <= 2.4d+24) then
tmp = x - ((-1.0d0) * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -63000000.0) {
tmp = t_1;
} else if (t <= 2.4e+24) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -63000000.0: tmp = t_1 elif t <= 2.4e+24: tmp = x - (-1.0 * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -63000000.0) tmp = t_1; elseif (t <= 2.4e+24) tmp = Float64(x - Float64(-1.0 * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -63000000.0) tmp = t_1; elseif (t <= 2.4e+24) tmp = x - (-1.0 * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -63000000.0], t$95$1, If[LessEqual[t, 2.4e+24], N[(x - N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -63000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+24}:\\
\;\;\;\;x - -1 \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -6.3e7 or 2.4000000000000001e24 < t Initial program 95.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.6
Applied rewrites32.6%
if -6.3e7 < t < 2.4000000000000001e24Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y) z))) (if (<= y -1.12e+61) t_1 (if (<= y 9e+67) (- x (* -1.0 z)) 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 <= -1.12e+61) {
tmp = t_1;
} else if (y <= 9e+67) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -y * z
if (y <= (-1.12d+61)) then
tmp = t_1
else if (y <= 9d+67) then
tmp = x - ((-1.0d0) * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (y <= -1.12e+61) {
tmp = t_1;
} else if (y <= 9e+67) {
tmp = x - (-1.0 * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if y <= -1.12e+61: tmp = t_1 elif y <= 9e+67: tmp = x - (-1.0 * z) 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 <= -1.12e+61) tmp = t_1; elseif (y <= 9e+67) tmp = Float64(x - Float64(-1.0 * z)); 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 <= -1.12e+61) tmp = t_1; elseif (y <= 9e+67) tmp = x - (-1.0 * z); 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, -1.12e+61], t$95$1, If[LessEqual[y, 9e+67], N[(x - N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+67}:\\
\;\;\;\;x - -1 \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.12e61 or 8.9999999999999997e67 < y Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around inf
lower-*.f6419.3
Applied rewrites19.3%
lift-*.f64N/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
Applied rewrites19.3%
if -1.12e61 < y < 8.9999999999999997e67Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in b around 0
lower--.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y) z)))
(if (<= y -1.5e-62)
t_1
(if (<= y 5.2e-59) (* b t) (if (<= y 262000000.0) 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 (y <= -1.5e-62) {
tmp = t_1;
} else if (y <= 5.2e-59) {
tmp = b * t;
} else if (y <= 262000000.0) {
tmp = 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 (y <= (-1.5d-62)) then
tmp = t_1
else if (y <= 5.2d-59) then
tmp = b * t
else if (y <= 262000000.0d0) then
tmp = 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 (y <= -1.5e-62) {
tmp = t_1;
} else if (y <= 5.2e-59) {
tmp = b * t;
} else if (y <= 262000000.0) {
tmp = a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if y <= -1.5e-62: tmp = t_1 elif y <= 5.2e-59: tmp = b * t elif y <= 262000000.0: tmp = 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 (y <= -1.5e-62) tmp = t_1; elseif (y <= 5.2e-59) tmp = Float64(b * t); elseif (y <= 262000000.0) tmp = 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 (y <= -1.5e-62) tmp = t_1; elseif (y <= 5.2e-59) tmp = b * t; elseif (y <= 262000000.0) tmp = 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[y, -1.5e-62], t$95$1, If[LessEqual[y, 5.2e-59], N[(b * t), $MachinePrecision], If[LessEqual[y, 262000000.0], a, t$95$1]]]]
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-59}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 262000000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.5000000000000001e-62 or 2.62e8 < y Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around inf
lower-*.f6419.3
Applied rewrites19.3%
lift-*.f64N/A
*-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
lower-neg.f64N/A
Applied rewrites19.3%
if -1.5000000000000001e-62 < y < 5.19999999999999996e-59Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in t around inf
lower-*.f6417.9
Applied rewrites17.9%
if 5.19999999999999996e-59 < y < 2.62e8Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
Taylor expanded in t around 0
Applied rewrites11.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1e-10) (* b t) (if (<= t 2.8e-24) a (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-10) {
tmp = b * t;
} else if (t <= 2.8e-24) {
tmp = a;
} else {
tmp = b * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1d-10)) then
tmp = b * t
else if (t <= 2.8d-24) then
tmp = a
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-10) {
tmp = b * t;
} else if (t <= 2.8e-24) {
tmp = a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e-10: tmp = b * t elif t <= 2.8e-24: tmp = a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e-10) tmp = Float64(b * t); elseif (t <= 2.8e-24) tmp = a; else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1e-10) tmp = b * t; elseif (t <= 2.8e-24) tmp = a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e-10], N[(b * t), $MachinePrecision], If[LessEqual[t, 2.8e-24], a, N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-10}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-24}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
if t < -1.00000000000000004e-10 or 2.8000000000000002e-24 < t Initial program 95.4%
Taylor expanded in a around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6473.8
Applied rewrites73.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
Taylor expanded in t around inf
lower-*.f6417.9
Applied rewrites17.9%
if -1.00000000000000004e-10 < t < 2.8000000000000002e-24Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
Taylor expanded in t around 0
Applied rewrites11.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.15e+156) a (if (<= a 1.32e+33) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.15e+156) {
tmp = a;
} else if (a <= 1.32e+33) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.15d+156)) then
tmp = a
else if (a <= 1.32d+33) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.15e+156) {
tmp = a;
} else if (a <= 1.32e+33) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.15e+156: tmp = a elif a <= 1.32e+33: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.15e+156) tmp = a; elseif (a <= 1.32e+33) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.15e+156) tmp = a; elseif (a <= 1.32e+33) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.15e+156], a, If[LessEqual[a, 1.32e+33], z, a]]
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+156}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1.32 \cdot 10^{+33}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
if a < -1.1499999999999999e156 or 1.32000000000000008e33 < a Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
Taylor expanded in t around 0
Applied rewrites11.4%
if -1.1499999999999999e156 < a < 1.32000000000000008e33Initial program 95.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in y around 0
Applied rewrites11.3%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
a
Initial program 95.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6427.9
Applied rewrites27.9%
Taylor expanded in t around 0
Applied rewrites11.4%
herbie shell --seed 2025172
(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)))