
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) 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), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) 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), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $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
(if (<=
(+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b))
INFINITY)
(- (- (+ (* (- 1 t) a) x) (* z (- y 1))) (* (- 2 (+ t y)) b))
(* y (- b z))))double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b);
} else {
tmp = y * (b - z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= Double.POSITIVE_INFINITY) {
tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b);
} else {
tmp = y * (b - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= math.inf: tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b) else: tmp = y * (b - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(1.0 - t) * a) + x) - Float64(z * Float64(y - 1.0))) - Float64(Float64(2.0 - Float64(t + y)) * b)); else tmp = Float64(y * Float64(b - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= Inf) tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b); else tmp = y * (b - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(1 - t), $MachinePrecision] * a), $MachinePrecision] + x), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\left(\left(\left(1 - t\right) \cdot a + x\right) - z \cdot \left(y - 1\right)\right) - \left(2 - \left(t + y\right)\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 95.2%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
Applied rewrites95.2%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(- (- x (* (- y 1) z)) (* (- t 1) a))
(* (- (+ y t) 2) b))))
(if (<= t_1 INFINITY) t_1 (* y (- b z)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = y * (b - z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(b - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = y * (b - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 95.2%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ y t) 2) b)))
(if (<= b -10499999999999999928819961080797093752847938640412672)
(+ (- x (* a (- t 1))) t_1)
(if (<= b 5700000000000000197784854593536)
(+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* b y))
(+ (* a (- 1 t)) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -1.05e+52) {
tmp = (x - (a * (t - 1.0))) + t_1;
} else if (b <= 5.7e+30) {
tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
} else {
tmp = (a * (1.0 - t)) + t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 + t) - 2.0d0) * b
if (b <= (-1.05d+52)) then
tmp = (x - (a * (t - 1.0d0))) + t_1
else if (b <= 5.7d+30) then
tmp = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (b * y)
else
tmp = (a * (1.0d0 - t)) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -1.05e+52) {
tmp = (x - (a * (t - 1.0))) + t_1;
} else if (b <= 5.7e+30) {
tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
} else {
tmp = (a * (1.0 - t)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y + t) - 2.0) * b tmp = 0 if b <= -1.05e+52: tmp = (x - (a * (t - 1.0))) + t_1 elif b <= 5.7e+30: tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y) else: tmp = (a * (1.0 - t)) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -1.05e+52) tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + t_1); elseif (b <= 5.7e+30) tmp = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y)); else tmp = Float64(Float64(a * Float64(1.0 - t)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y + t) - 2.0) * b; tmp = 0.0; if (b <= -1.05e+52) tmp = (x - (a * (t - 1.0))) + t_1; elseif (b <= 5.7e+30) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y); else tmp = (a * (1.0 - t)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -10499999999999999928819961080797093752847938640412672], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 5700000000000000197784854593536], N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -10499999999999999928819961080797093752847938640412672:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + t\_1\\
\mathbf{elif}\;b \leq 5700000000000000197784854593536:\\
\;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right) + t\_1\\
\end{array}
if b < -1.05e52Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
if -1.05e52 < b < 5.7000000000000002e30Initial program 95.2%
Taylor expanded in y around inf
lower-*.f6477.8%
Applied rewrites77.8%
if 5.7000000000000002e30 < b Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x (* b (- (+ t y) 2))) (* z (- y 1)))))
(if (<=
z
-2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480)
t_1
(if (<=
z
249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264)
(+ (- x (* a (- t 1))) (* (- (+ y t) 2) b))
t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
double tmp;
if (z <= -2.2e+132) {
tmp = t_1;
} else if (z <= 2.5e+119) {
tmp = (x - (a * (t - 1.0))) + (((y + t) - 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 = (x + (b * ((t + y) - 2.0d0))) - (z * (y - 1.0d0))
if (z <= (-2.2d+132)) then
tmp = t_1
else if (z <= 2.5d+119) then
tmp = (x - (a * (t - 1.0d0))) + (((y + t) - 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 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
double tmp;
if (z <= -2.2e+132) {
tmp = t_1;
} else if (z <= 2.5e+119) {
tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0)) tmp = 0 if z <= -2.2e+132: tmp = t_1 elif z <= 2.5e+119: tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) - Float64(z * Float64(y - 1.0))) tmp = 0.0 if (z <= -2.2e+132) tmp = t_1; elseif (z <= 2.5e+119) tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(Float64(Float64(y + t) - 2.0) * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0)); tmp = 0.0; if (z <= -2.2e+132) tmp = t_1; elseif (z <= 2.5e+119) tmp = (x - (a * (t - 1.0))) + (((y + t) - 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[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480], t$95$1, If[LessEqual[z, 249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\
\mathbf{if}\;z \leq -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -2.1999999999999999e132 or 2.5e119 < z Initial program 95.2%
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%
if -2.1999999999999999e132 < z < 2.5e119Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (- x (* a (- t 1))) (* b y))))
(if (<=
a
-37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832)
t_1
(if (<= a 4499999999999999969494269034627325894077687988748288)
(- (+ x (* b (- (+ t y) 2))) (* z (- y 1)))
t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x - (a * (t - 1.0))) + (b * y);
double tmp;
if (a <= -3.7e+217) {
tmp = t_1;
} else if (a <= 4.5e+51) {
tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (a * (t - 1.0d0))) + (b * y)
if (a <= (-3.7d+217)) then
tmp = t_1
else if (a <= 4.5d+51) then
tmp = (x + (b * ((t + y) - 2.0d0))) - (z * (y - 1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x - (a * (t - 1.0))) + (b * y);
double tmp;
if (a <= -3.7e+217) {
tmp = t_1;
} else if (a <= 4.5e+51) {
tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x - (a * (t - 1.0))) + (b * y) tmp = 0 if a <= -3.7e+217: tmp = t_1 elif a <= 4.5e+51: tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y)) tmp = 0.0 if (a <= -3.7e+217) tmp = t_1; elseif (a <= 4.5e+51) tmp = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) - Float64(z * Float64(y - 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x - (a * (t - 1.0))) + (b * y); tmp = 0.0; if (a <= -3.7e+217) tmp = t_1; elseif (a <= 4.5e+51) tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832], t$95$1, If[LessEqual[a, 4499999999999999969494269034627325894077687988748288], N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{if}\;a \leq -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4499999999999999969494269034627325894077687988748288:\\
\;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -3.7000000000000001e217 or 4.5e51 < a Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f6455.1%
Applied rewrites55.1%
if -3.7000000000000001e217 < a < 4.5e51Initial program 95.2%
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%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (- (- x (* y z)) (* a t)) (* b y))))
(if (<= y -2400000)
t_1
(if (<=
y
93076680405667/21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192)
(- (+ x (* b (- t 2))) (* -1 z))
(if (<=
y
155000000000000009583071010805379319582021290744086528)
(+ (* a (- 1 t)) (* (- (+ y t) 2) b))
t_1)))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (y * z)) - (a * t)) + (b * y);
double tmp;
if (y <= -2400000.0) {
tmp = t_1;
} else if (y <= 4.4e-111) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.55e+53) {
tmp = (a * (1.0 - t)) + (((y + t) - 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 = ((x - (y * z)) - (a * t)) + (b * y)
if (y <= (-2400000.0d0)) then
tmp = t_1
else if (y <= 4.4d-111) then
tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
else if (y <= 1.55d+53) then
tmp = (a * (1.0d0 - t)) + (((y + t) - 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 = ((x - (y * z)) - (a * t)) + (b * y);
double tmp;
if (y <= -2400000.0) {
tmp = t_1;
} else if (y <= 4.4e-111) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.55e+53) {
tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - (y * z)) - (a * t)) + (b * y) tmp = 0 if y <= -2400000.0: tmp = t_1 elif y <= 4.4e-111: tmp = (x + (b * (t - 2.0))) - (-1.0 * z) elif y <= 1.55e+53: tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(y * z)) - Float64(a * t)) + Float64(b * y)) tmp = 0.0 if (y <= -2400000.0) tmp = t_1; elseif (y <= 4.4e-111) tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z)); elseif (y <= 1.55e+53) tmp = Float64(Float64(a * Float64(1.0 - t)) + Float64(Float64(Float64(y + t) - 2.0) * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - (y * z)) - (a * t)) + (b * y); tmp = 0.0; if (y <= -2400000.0) tmp = t_1; elseif (y <= 4.4e-111) tmp = (x + (b * (t - 2.0))) - (-1.0 * z); elseif (y <= 1.55e+53) tmp = (a * (1.0 - t)) + (((y + t) - 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[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2400000], t$95$1, If[LessEqual[y, 93076680405667/21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000000000000009583071010805379319582021290744086528], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \left(\left(x - y \cdot z\right) - a \cdot t\right) + b \cdot y\\
\mathbf{if}\;y \leq -2400000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq \frac{93076680405667}{21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192}:\\
\;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
\mathbf{elif}\;y \leq 155000000000000009583071010805379319582021290744086528:\\
\;\;\;\;a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -2.4e6 or 1.5500000000000001e53 < y Initial program 95.2%
Taylor expanded in y around inf
lower-*.f6477.8%
Applied rewrites77.8%
Taylor expanded in t around inf
lower-*.f6467.9%
Applied rewrites67.9%
Taylor expanded in y around inf
lower-*.f6458.4%
Applied rewrites58.4%
if -2.4e6 < y < 4.3999999999999999e-111Initial program 95.2%
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-*.f6446.5%
Applied rewrites46.5%
if 4.3999999999999999e-111 < y < 1.5500000000000001e53Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1 y))))
(if (<=
z
-7000000000000000195090964334063318778005827328862580230404690162898436096)
(- t_1 (* (- 2 (+ t y)) b))
(if (<=
z
6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560)
(+ (- x (* a (- t 1))) (* b y))
(- t_1 (* (- 2 t) b))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double tmp;
if (z <= -7e+72) {
tmp = t_1 - ((2.0 - (t + y)) * b);
} else if (z <= 6.4e+87) {
tmp = (x - (a * (t - 1.0))) + (b * y);
} else {
tmp = t_1 - ((2.0 - t) * b);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 = z * (1.0d0 - y)
if (z <= (-7d+72)) then
tmp = t_1 - ((2.0d0 - (t + y)) * b)
else if (z <= 6.4d+87) then
tmp = (x - (a * (t - 1.0d0))) + (b * y)
else
tmp = t_1 - ((2.0d0 - t) * b)
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 = z * (1.0 - y);
double tmp;
if (z <= -7e+72) {
tmp = t_1 - ((2.0 - (t + y)) * b);
} else if (z <= 6.4e+87) {
tmp = (x - (a * (t - 1.0))) + (b * y);
} else {
tmp = t_1 - ((2.0 - t) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) tmp = 0 if z <= -7e+72: tmp = t_1 - ((2.0 - (t + y)) * b) elif z <= 6.4e+87: tmp = (x - (a * (t - 1.0))) + (b * y) else: tmp = t_1 - ((2.0 - t) * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (z <= -7e+72) tmp = Float64(t_1 - Float64(Float64(2.0 - Float64(t + y)) * b)); elseif (z <= 6.4e+87) tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y)); else tmp = Float64(t_1 - Float64(Float64(2.0 - t) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - y); tmp = 0.0; if (z <= -7e+72) tmp = t_1 - ((2.0 - (t + y)) * b); elseif (z <= 6.4e+87) tmp = (x - (a * (t - 1.0))) + (b * y); else tmp = t_1 - ((2.0 - t) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7000000000000000195090964334063318778005827328862580230404690162898436096], N[(t$95$1 - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(2 - t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\
\;\;\;\;t\_1 - \left(2 - \left(t + y\right)\right) \cdot b\\
\mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1 - \left(2 - t\right) \cdot b\\
\end{array}
if z < -7.0000000000000002e72Initial program 95.2%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
Applied rewrites95.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6460.5%
Applied rewrites60.5%
if -7.0000000000000002e72 < z < 6.4000000000000001e87Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f6455.1%
Applied rewrites55.1%
if 6.4000000000000001e87 < z Initial program 95.2%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
Applied rewrites95.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6460.5%
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites49.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* z (- 1 y)) (* (- 2 t) b))))
(if (<=
z
-7000000000000000195090964334063318778005827328862580230404690162898436096)
t_1
(if (<=
z
6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560)
(+ (- x (* a (- t 1))) (* b y))
t_1))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 - y)) - ((2.0 - t) * b);
double tmp;
if (z <= -7e+72) {
tmp = t_1;
} else if (z <= 6.4e+87) {
tmp = (x - (a * (t - 1.0))) + (b * 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 = (z * (1.0d0 - y)) - ((2.0d0 - t) * b)
if (z <= (-7d+72)) then
tmp = t_1
else if (z <= 6.4d+87) then
tmp = (x - (a * (t - 1.0d0))) + (b * 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 = (z * (1.0 - y)) - ((2.0 - t) * b);
double tmp;
if (z <= -7e+72) {
tmp = t_1;
} else if (z <= 6.4e+87) {
tmp = (x - (a * (t - 1.0))) + (b * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (1.0 - y)) - ((2.0 - t) * b) tmp = 0 if z <= -7e+72: tmp = t_1 elif z <= 6.4e+87: tmp = (x - (a * (t - 1.0))) + (b * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(1.0 - y)) - Float64(Float64(2.0 - t) * b)) tmp = 0.0 if (z <= -7e+72) tmp = t_1; elseif (z <= 6.4e+87) tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (1.0 - y)) - ((2.0 - t) * b); tmp = 0.0; if (z <= -7e+72) tmp = t_1; elseif (z <= 6.4e+87) tmp = (x - (a * (t - 1.0))) + (b * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision] - N[(N[(2 - t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7000000000000000195090964334063318778005827328862580230404690162898436096], t$95$1, If[LessEqual[z, 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right) - \left(2 - t\right) \cdot b\\
\mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -7.0000000000000002e72 or 6.4000000000000001e87 < z Initial program 95.2%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
Applied rewrites95.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6460.5%
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites49.7%
if -7.0000000000000002e72 < z < 6.4000000000000001e87Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f6455.1%
Applied rewrites55.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (- x (* a (- t 1))) (* b y))))
(if (<= y -1960000)
t_1
(if (<=
y
5648671608315113/5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448)
(- (+ x (* b (- t 2))) (* -1 z))
(if (<=
y
57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176)
t_1
(* y (- b z)))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x - (a * (t - 1.0))) + (b * y);
double tmp;
if (y <= -1960000.0) {
tmp = t_1;
} else if (y <= 1.12e-102) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 5.7e+109) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (a * (t - 1.0d0))) + (b * y)
if (y <= (-1960000.0d0)) then
tmp = t_1
else if (y <= 1.12d-102) then
tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
else if (y <= 5.7d+109) then
tmp = t_1
else
tmp = y * (b - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x - (a * (t - 1.0))) + (b * y);
double tmp;
if (y <= -1960000.0) {
tmp = t_1;
} else if (y <= 1.12e-102) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 5.7e+109) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x - (a * (t - 1.0))) + (b * y) tmp = 0 if y <= -1960000.0: tmp = t_1 elif y <= 1.12e-102: tmp = (x + (b * (t - 2.0))) - (-1.0 * z) elif y <= 5.7e+109: tmp = t_1 else: tmp = y * (b - z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y)) tmp = 0.0 if (y <= -1960000.0) tmp = t_1; elseif (y <= 1.12e-102) tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z)); elseif (y <= 5.7e+109) tmp = t_1; else tmp = Float64(y * Float64(b - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x - (a * (t - 1.0))) + (b * y); tmp = 0.0; if (y <= -1960000.0) tmp = t_1; elseif (y <= 1.12e-102) tmp = (x + (b * (t - 2.0))) - (-1.0 * z); elseif (y <= 5.7e+109) tmp = t_1; else tmp = y * (b - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1960000], t$95$1, If[LessEqual[y, 5648671608315113/5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{if}\;y \leq -1960000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq \frac{5648671608315113}{5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448}:\\
\;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
\mathbf{elif}\;y \leq 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
if y < -1.96e6 or 1.1200000000000001e-102 < y < 5.7000000000000002e109Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f6455.1%
Applied rewrites55.1%
if -1.96e6 < y < 1.1200000000000001e-102Initial program 95.2%
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-*.f6446.5%
Applied rewrites46.5%
if 5.7000000000000002e109 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -4800000)
t_1
(if (<=
y
4160851854339257/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224)
(- (+ x (* b (- t 2))) (* -1 z))
(if (<=
y
164999999999999989746501660396935349620099883912192960188787403991810048)
(+ (* a (- 1 t)) (* (- y 2) b))
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 <= -4800000.0) {
tmp = t_1;
} else if (y <= 1.65e-102) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.65e+71) {
tmp = (a * (1.0 - 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 = y * (b - z)
if (y <= (-4800000.0d0)) then
tmp = t_1
else if (y <= 1.65d-102) then
tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
else if (y <= 1.65d+71) then
tmp = (a * (1.0d0 - 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 = y * (b - z);
double tmp;
if (y <= -4800000.0) {
tmp = t_1;
} else if (y <= 1.65e-102) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.65e+71) {
tmp = (a * (1.0 - t)) + ((y - 2.0) * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -4800000.0: tmp = t_1 elif y <= 1.65e-102: tmp = (x + (b * (t - 2.0))) - (-1.0 * z) elif y <= 1.65e+71: tmp = (a * (1.0 - t)) + ((y - 2.0) * b) 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 <= -4800000.0) tmp = t_1; elseif (y <= 1.65e-102) tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z)); elseif (y <= 1.65e+71) tmp = Float64(Float64(a * Float64(1.0 - t)) + Float64(Float64(y - 2.0) * b)); 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 <= -4800000.0) tmp = t_1; elseif (y <= 1.65e-102) tmp = (x + (b * (t - 2.0))) - (-1.0 * z); elseif (y <= 1.65e+71) tmp = (a * (1.0 - 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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4800000], t$95$1, If[LessEqual[y, 4160851854339257/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -4800000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq \frac{4160851854339257}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\
\;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
\mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
\;\;\;\;a \cdot \left(1 - t\right) + \left(y - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -4.8e6 or 1.6499999999999999e71 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
if -4.8e6 < y < 1.65e-102Initial program 95.2%
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-*.f6446.5%
Applied rewrites46.5%
if 1.65e-102 < y < 1.6499999999999999e71Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in t around 0
lower--.f6448.1%
Applied rewrites48.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -4800000)
t_1
(if (<=
y
1891296297426935/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224)
(- (+ x (* b (- t 2))) (* -1 z))
(if (<=
y
164999999999999989746501660396935349620099883912192960188787403991810048)
(* t (- b a))
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 <= -4800000.0) {
tmp = t_1;
} else if (y <= 7.5e-103) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.65e+71) {
tmp = t * (b - 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 * (b - z)
if (y <= (-4800000.0d0)) then
tmp = t_1
else if (y <= 7.5d-103) then
tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
else if (y <= 1.65d+71) then
tmp = t * (b - 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 * (b - z);
double tmp;
if (y <= -4800000.0) {
tmp = t_1;
} else if (y <= 7.5e-103) {
tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
} else if (y <= 1.65e+71) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -4800000.0: tmp = t_1 elif y <= 7.5e-103: tmp = (x + (b * (t - 2.0))) - (-1.0 * z) elif y <= 1.65e+71: tmp = t * (b - a) 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 <= -4800000.0) tmp = t_1; elseif (y <= 7.5e-103) tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z)); elseif (y <= 1.65e+71) tmp = Float64(t * Float64(b - a)); 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 <= -4800000.0) tmp = t_1; elseif (y <= 7.5e-103) tmp = (x + (b * (t - 2.0))) - (-1.0 * z); elseif (y <= 1.65e+71) tmp = t * (b - a); 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, -4800000], t$95$1, If[LessEqual[y, 1891296297426935/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -4800000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq \frac{1891296297426935}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\
\;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
\mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -4.8e6 or 1.6499999999999999e71 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
if -4.8e6 < y < 7.5e-103Initial program 95.2%
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-*.f6446.5%
Applied rewrites46.5%
if 7.5e-103 < y < 1.6499999999999999e71Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -3400000000)
t_1
(if (<=
y
2420859260706477/80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168)
(- z (* (- 2 (+ t y)) b))
(if (<=
y
164999999999999989746501660396935349620099883912192960188787403991810048)
(* t (- b a))
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 <= -3400000000.0) {
tmp = t_1;
} else if (y <= 3e-104) {
tmp = z - ((2.0 - (t + y)) * b);
} else if (y <= 1.65e+71) {
tmp = t * (b - 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 * (b - z)
if (y <= (-3400000000.0d0)) then
tmp = t_1
else if (y <= 3d-104) then
tmp = z - ((2.0d0 - (t + y)) * b)
else if (y <= 1.65d+71) then
tmp = t * (b - 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 * (b - z);
double tmp;
if (y <= -3400000000.0) {
tmp = t_1;
} else if (y <= 3e-104) {
tmp = z - ((2.0 - (t + y)) * b);
} else if (y <= 1.65e+71) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -3400000000.0: tmp = t_1 elif y <= 3e-104: tmp = z - ((2.0 - (t + y)) * b) elif y <= 1.65e+71: tmp = t * (b - a) 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 <= -3400000000.0) tmp = t_1; elseif (y <= 3e-104) tmp = Float64(z - Float64(Float64(2.0 - Float64(t + y)) * b)); elseif (y <= 1.65e+71) tmp = Float64(t * Float64(b - a)); 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 <= -3400000000.0) tmp = t_1; elseif (y <= 3e-104) tmp = z - ((2.0 - (t + y)) * b); elseif (y <= 1.65e+71) tmp = t * (b - a); 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, -3400000000], t$95$1, If[LessEqual[y, 2420859260706477/80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168], N[(z - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -3400000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq \frac{2420859260706477}{80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168}:\\
\;\;\;\;z - \left(2 - \left(t + y\right)\right) \cdot b\\
\mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -3.4e9 or 1.6499999999999999e71 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
if -3.4e9 < y < 3.0000000000000002e-104Initial program 95.2%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
Applied rewrites95.2%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6460.5%
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites46.8%
if 3.0000000000000002e-104 < y < 1.6499999999999999e71Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<=
t
-23999999999999998558342357087346829272603695633019749798744112831287262393139200)
t_2
(if (<=
t
-1478383000718271/1606938044258990275541962092341162602522202993782792835301376)
t_1
(if (<=
t
3302638007025703/36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984)
(+ a (* (- y 2) b))
(if (<= t 1770887431076117/1180591620717411303424)
t_1
t_2))))))double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -2.4e+79) {
tmp = t_2;
} else if (t <= -9.2e-46) {
tmp = t_1;
} else if (t <= 9e-92) {
tmp = a + ((y - 2.0) * b);
} else if (t <= 1.5e-6) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-2.4d+79)) then
tmp = t_2
else if (t <= (-9.2d-46)) then
tmp = t_1
else if (t <= 9d-92) then
tmp = a + ((y - 2.0d0) * b)
else if (t <= 1.5d-6) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -2.4e+79) {
tmp = t_2;
} else if (t <= -9.2e-46) {
tmp = t_1;
} else if (t <= 9e-92) {
tmp = a + ((y - 2.0) * b);
} else if (t <= 1.5e-6) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if t <= -2.4e+79: tmp = t_2 elif t <= -9.2e-46: tmp = t_1 elif t <= 9e-92: tmp = a + ((y - 2.0) * b) elif t <= 1.5e-6: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -2.4e+79) tmp = t_2; elseif (t <= -9.2e-46) tmp = t_1; elseif (t <= 9e-92) tmp = Float64(a + Float64(Float64(y - 2.0) * b)); elseif (t <= 1.5e-6) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = t * (b - a); tmp = 0.0; if (t <= -2.4e+79) tmp = t_2; elseif (t <= -9.2e-46) tmp = t_1; elseif (t <= 9e-92) tmp = a + ((y - 2.0) * b); elseif (t <= 1.5e-6) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -23999999999999998558342357087346829272603695633019749798744112831287262393139200], t$95$2, If[LessEqual[t, -1478383000718271/1606938044258990275541962092341162602522202993782792835301376], t$95$1, If[LessEqual[t, 3302638007025703/36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984], N[(a + N[(N[(y - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1770887431076117/1180591620717411303424], t$95$1, t$95$2]]]]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -23999999999999998558342357087346829272603695633019749798744112831287262393139200:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq \frac{-1478383000718271}{1606938044258990275541962092341162602522202993782792835301376}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{3302638007025703}{36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984}:\\
\;\;\;\;a + \left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq \frac{1770887431076117}{1180591620717411303424}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if t < -2.3999999999999999e79 or 1.5e-6 < t Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
if -2.3999999999999999e79 < t < -9.1999999999999997e-46 or 9.0000000000000001e-92 < t < 1.5e-6Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
if -9.1999999999999997e-46 < t < 9.0000000000000001e-92Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in t around 0
lower--.f6448.1%
Applied rewrites48.1%
Taylor expanded in t around 0
Applied rewrites33.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -255000000000000000)
t_1
(if (<=
y
164999999999999989746501660396935349620099883912192960188787403991810048)
(* t (- b a))
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 <= -2.55e+17) {
tmp = t_1;
} else if (y <= 1.65e+71) {
tmp = t * (b - 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 * (b - z)
if (y <= (-2.55d+17)) then
tmp = t_1
else if (y <= 1.65d+71) then
tmp = t * (b - 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 * (b - z);
double tmp;
if (y <= -2.55e+17) {
tmp = t_1;
} else if (y <= 1.65e+71) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -2.55e+17: tmp = t_1 elif y <= 1.65e+71: tmp = t * (b - a) 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 <= -2.55e+17) tmp = t_1; elseif (y <= 1.65e+71) tmp = Float64(t * Float64(b - a)); 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 <= -2.55e+17) tmp = t_1; elseif (y <= 1.65e+71) tmp = t * (b - a); 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, -255000000000000000], t$95$1, If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -255000000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -2.55e17 or 1.6499999999999999e71 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
if -2.55e17 < y < 1.6499999999999999e71Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -8341588155340941/604462909807314587353088)
t_1
(if (<= t 1470053796651389/154742504910672534362390528)
(* y b)
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 <= -1.38e-8) {
tmp = t_1;
} else if (t <= 9.5e-12) {
tmp = y * 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 = t * (b - a)
if (t <= (-1.38d-8)) then
tmp = t_1
else if (t <= 9.5d-12) then
tmp = y * 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 = t * (b - a);
double tmp;
if (t <= -1.38e-8) {
tmp = t_1;
} else if (t <= 9.5e-12) {
tmp = y * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1.38e-8: tmp = t_1 elif t <= 9.5e-12: tmp = y * b 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 <= -1.38e-8) tmp = t_1; elseif (t <= 9.5e-12) tmp = Float64(y * b); 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 <= -1.38e-8) tmp = t_1; elseif (t <= 9.5e-12) tmp = y * b; 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, -8341588155340941/604462909807314587353088], t$95$1, If[LessEqual[t, 1470053796651389/154742504910672534362390528], N[(y * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq \frac{-8341588155340941}{604462909807314587353088}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{1470053796651389}{154742504910672534362390528}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.3799999999999999e-8 or 9.4999999999999995e-12 < t Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
if -1.3799999999999999e-8 < t < 9.4999999999999995e-12Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites17.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4800000)
(* y b)
(if (<=
y
160000000000000011605029821044677620185339905543443512882913624876646400)
(* t b)
(* y b))))double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4800000.0) {
tmp = y * b;
} else if (y <= 1.6e+71) {
tmp = t * b;
} else {
tmp = y * b;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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 (y <= (-4800000.0d0)) then
tmp = y * b
else if (y <= 1.6d+71) then
tmp = t * b
else
tmp = y * b
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 (y <= -4800000.0) {
tmp = y * b;
} else if (y <= 1.6e+71) {
tmp = t * b;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4800000.0: tmp = y * b elif y <= 1.6e+71: tmp = t * b else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4800000.0) tmp = Float64(y * b); elseif (y <= 1.6e+71) tmp = Float64(t * b); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4800000.0) tmp = y * b; elseif (y <= 1.6e+71) tmp = t * b; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4800000], N[(y * b), $MachinePrecision], If[LessEqual[y, 160000000000000011605029821044677620185339905543443512882913624876646400], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y \leq -4800000:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 160000000000000011605029821044677620185339905543443512882913624876646400:\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
if y < -4.8e6 or 1.6000000000000001e71 < y Initial program 95.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f6459.0%
Applied rewrites59.0%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6472.5%
Applied rewrites72.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6433.4%
Applied rewrites33.4%
Taylor expanded in z around 0
Applied rewrites17.6%
if -4.8e6 < y < 1.6000000000000001e71Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
Taylor expanded in a around 0
Applied rewrites18.0%
(FPCore (x y z t a b) :precision binary64 (* t b))
double code(double x, double y, double z, double t, double a, double b) {
return t * 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 = t * b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return t * b;
}
def code(x, y, z, t, a, b): return t * b
function code(x, y, z, t, a, b) return Float64(t * b) end
function tmp = code(x, y, z, t, a, b) tmp = t * b; end
code[x_, y_, z_, t_, a_, b_] := N[(t * b), $MachinePrecision]
t \cdot b
Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6432.5%
Applied rewrites32.5%
Taylor expanded in a around 0
Applied rewrites18.0%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b)))