
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (fma (- (+ t y) 2.0) b (+ (fma (- 1.0 t) a x) (* (- 1.0 y) z))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(((t + y) - 2.0), b, (fma((1.0 - t), a, x) + ((1.0 - y) * z)));
}
function code(x, y, z, t, a, b) return fma(Float64(Float64(t + y) - 2.0), b, Float64(fma(Float64(1.0 - t), a, x) + Float64(Float64(1.0 - y) * z))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision] + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - t, a, x\right) + \left(1 - y\right) \cdot z\right)
\end{array}
Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.2%
Taylor expanded in a around 0
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6497.2
Applied rewrites97.2%
(FPCore (x y z t a b) :precision binary64 (fma (- (+ t y) 2.0) b (- (fma (- 1.0 y) z x) (* (- t 1.0) a))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(((t + y) - 2.0), b, (fma((1.0 - y), z, x) - ((t - 1.0) * a)));
}
function code(x, y, z, t, a, b) return fma(Float64(Float64(t + y) - 2.0), b, Float64(fma(Float64(1.0 - y), z, x) - Float64(Float64(t - 1.0) * a))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right) - \left(t - 1\right) \cdot a\right)
\end{array}
Initial program 95.0%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (fma (- b z) y (fma (- t 2.0) b z)) x)))
(if (<= b -9.5e-20)
t_1
(if (<= b 1.95e+33) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - z), y, fma((t - 2.0), b, z)) + x;
double tmp;
if (b <= -9.5e-20) {
tmp = t_1;
} else if (b <= 1.95e+33) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(b - z), y, fma(Float64(t - 2.0), b, z)) + x) tmp = 0.0 if (b <= -9.5e-20) tmp = t_1; elseif (b <= 1.95e+33) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[b, -9.5e-20], t$95$1, If[LessEqual[b, 1.95e+33], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z\right)\right) + x\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.5e-20 or 1.9500000000000001e33 < b Initial program 90.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites95.0%
Taylor expanded in y around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower--.f64N/A
Applied rewrites92.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
lower-+.f64N/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f6484.4
Applied rewrites84.4%
if -9.5e-20 < b < 1.9500000000000001e33Initial program 99.1%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6490.6
Applied rewrites90.6%
lift--.f64N/A
lift-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
negate-sub2N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f64N/A
+-commutativeN/A
Applied rewrites90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)))
(if (<= b -2e-16)
(fma t_1 b (* (- 1.0 y) z))
(if (<= b 5.7e+87) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) (fma t_1 b x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double tmp;
if (b <= -2e-16) {
tmp = fma(t_1, b, ((1.0 - y) * z));
} else if (b <= 5.7e+87) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = fma(t_1, b, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) tmp = 0.0 if (b <= -2e-16) tmp = fma(t_1, b, Float64(Float64(1.0 - y) * z)); elseif (b <= 5.7e+87) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = fma(t_1, b, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[b, -2e-16], N[(t$95$1 * b + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.7e+87], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
\mathbf{if}\;b \leq -2 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(1 - y\right) \cdot z\right)\\
\mathbf{elif}\;b \leq 5.7 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x\right)\\
\end{array}
\end{array}
if b < -2e-16Initial program 91.4%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites95.8%
Taylor expanded in z around inf
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6476.3
Applied rewrites76.3%
if -2e-16 < b < 5.70000000000000039e87Initial program 98.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6488.2
Applied rewrites88.2%
lift--.f64N/A
lift-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
negate-sub2N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f64N/A
+-commutativeN/A
Applied rewrites88.2%
if 5.70000000000000039e87 < b Initial program 88.3%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites92.7%
Taylor expanded in x around inf
+-commutative81.8
negate-sub281.8
fp-cancel-sub-sign-inv81.8
Applied rewrites81.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -4e+43)
t_1
(if (<= b 5.7e+87) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -4e+43) {
tmp = t_1;
} else if (b <= 5.7e+87) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -4e+43) tmp = t_1; elseif (b <= 5.7e+87) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -4e+43], t$95$1, If[LessEqual[b, 5.7e+87], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.7 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.00000000000000006e43 or 5.70000000000000039e87 < b Initial program 89.1%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites93.9%
Taylor expanded in x around inf
+-commutative80.0
negate-sub280.0
fp-cancel-sub-sign-inv80.0
Applied rewrites80.0%
if -4.00000000000000006e43 < b < 5.70000000000000039e87Initial program 98.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6486.9
Applied rewrites86.9%
lift--.f64N/A
lift-fma.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
fp-cancel-sub-sign-invN/A
negate-sub2N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f64N/A
+-commutativeN/A
Applied rewrites86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -1.55e+43)
t_1
(if (<= b 1.22e+87) (fma (- 1.0 y) z (- x (* t a))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -1.55e+43) {
tmp = t_1;
} else if (b <= 1.22e+87) {
tmp = fma((1.0 - y), z, (x - (t * a)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -1.55e+43) tmp = t_1; elseif (b <= 1.22e+87) tmp = fma(Float64(1.0 - y), z, Float64(x - Float64(t * a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -1.55e+43], t$95$1, If[LessEqual[b, 1.22e+87], N[(N[(1.0 - y), $MachinePrecision] * z + N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x - t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.5500000000000001e43 or 1.2200000000000001e87 < b Initial program 89.2%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites93.9%
Taylor expanded in x around inf
+-commutative80.0
negate-sub280.0
fp-cancel-sub-sign-inv80.0
Applied rewrites80.0%
if -1.5500000000000001e43 < b < 1.2200000000000001e87Initial program 98.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6486.9
Applied rewrites86.9%
Taylor expanded in t around inf
Applied rewrites74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -3.9e-19)
t_1
(if (<= b 1.2e+87) (- (+ z x) (* a (- t 1.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -3.9e-19) {
tmp = t_1;
} else if (b <= 1.2e+87) {
tmp = (z + x) - (a * (t - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -3.9e-19) tmp = t_1; elseif (b <= 1.2e+87) tmp = Float64(Float64(z + x) - Float64(a * Float64(t - 1.0))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -3.9e-19], t$95$1, If[LessEqual[b, 1.2e+87], N[(N[(z + x), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+87}:\\
\;\;\;\;\left(z + x\right) - a \cdot \left(t - 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.89999999999999995e-19 or 1.19999999999999991e87 < b Initial program 90.2%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites94.6%
Taylor expanded in x around inf
+-commutative76.2
negate-sub276.2
fp-cancel-sub-sign-inv76.2
Applied rewrites76.2%
if -3.89999999999999995e-19 < b < 1.19999999999999991e87Initial program 98.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6488.3
Applied rewrites88.3%
Taylor expanded in y around 0
associate-+r-N/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-*.f64N/A
lift--.f6466.8
Applied rewrites66.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- (+ t y) 2.0) b x))) (if (<= b -2.6e-19) t_1 (if (<= b 5.6e+33) (fma (- 1.0 t) a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -2.6e-19) {
tmp = t_1;
} else if (b <= 5.6e+33) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -2.6e-19) tmp = t_1; elseif (b <= 5.6e+33) tmp = fma(Float64(1.0 - t), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -2.6e-19], t$95$1, If[LessEqual[b, 5.6e+33], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.60000000000000013e-19 or 5.6000000000000002e33 < b Initial program 90.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites95.0%
Taylor expanded in x around inf
+-commutative74.5
negate-sub274.5
fp-cancel-sub-sign-inv74.5
Applied rewrites74.5%
if -2.60000000000000013e-19 < b < 5.6000000000000002e33Initial program 99.1%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6490.6
Applied rewrites90.6%
Taylor expanded in t around inf
Applied rewrites77.9%
Taylor expanded in z around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
negate-sub2N/A
+-commutativeN/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f6456.0
Applied rewrites56.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- (+ t y) 2.0) b))) (if (<= b -2e-16) t_1 (if (<= b 2.45e+87) (fma (- 1.0 t) a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t + y) - 2.0) * b;
double tmp;
if (b <= -2e-16) {
tmp = t_1;
} else if (b <= 2.45e+87) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t + y) - 2.0) * b) tmp = 0.0 if (b <= -2e-16) tmp = t_1; elseif (b <= 2.45e+87) tmp = fma(Float64(1.0 - t), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2e-16], t$95$1, If[LessEqual[b, 2.45e+87], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.45 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2e-16 or 2.44999999999999986e87 < b Initial program 90.1%
Taylor expanded in b around inf
*-commutativeN/A
+-commutativeN/A
lift--.f64N/A
lift-+.f64N/A
lift-*.f6469.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6469.9
Applied rewrites69.9%
if -2e-16 < b < 2.44999999999999986e87Initial program 98.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6488.2
Applied rewrites88.2%
Taylor expanded in t around inf
Applied rewrites76.0%
Taylor expanded in z around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
negate-sub2N/A
+-commutativeN/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f6454.4
Applied rewrites54.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -4.7e+61) t_1 (if (<= t 2.65e+26) (fma (- y 2.0) b x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -4.7e+61) {
tmp = t_1;
} else if (t <= 2.65e+26) {
tmp = fma((y - 2.0), b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -4.7e+61) tmp = t_1; elseif (t <= 2.65e+26) tmp = fma(Float64(y - 2.0), b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.7e+61], t$95$1, If[LessEqual[t, 2.65e+26], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -4.7 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+26}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.6999999999999998e61 or 2.64999999999999984e26 < t Initial program 91.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.8
Applied rewrites67.8%
if -4.6999999999999998e61 < t < 2.64999999999999984e26Initial program 97.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites98.7%
Taylor expanded in x around inf
+-commutative52.2
negate-sub252.2
fp-cancel-sub-sign-inv52.2
Applied rewrites52.2%
Taylor expanded in y around inf
Applied rewrites50.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- 1.0 y) z x))) (if (<= z -6.2e+113) t_1 (if (<= z 1020000000.0) (fma (- 1.0 t) a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, x);
double tmp;
if (z <= -6.2e+113) {
tmp = t_1;
} else if (z <= 1020000000.0) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, x) tmp = 0.0 if (z <= -6.2e+113) tmp = t_1; elseif (z <= 1020000000.0) tmp = fma(Float64(1.0 - t), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[z, -6.2e+113], t$95$1, If[LessEqual[z, 1020000000.0], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1020000000:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.19999999999999982e113 or 1.02e9 < z Initial program 91.3%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites94.9%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6478.0
Applied rewrites78.0%
Taylor expanded in t around inf
Applied rewrites73.4%
Taylor expanded in x around inf
Applied rewrites62.7%
if -6.19999999999999982e113 < z < 1.02e9Initial program 97.4%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites98.7%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6459.9
Applied rewrites59.9%
Taylor expanded in t around inf
Applied rewrites48.0%
Taylor expanded in z around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
negate-sub2N/A
+-commutativeN/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f6451.8
Applied rewrites51.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- 1.0 y) z))) (if (<= z -1.1e+131) t_1 (if (<= z 8e+157) (fma (- 1.0 t) a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -1.1e+131) {
tmp = t_1;
} else if (z <= 8e+157) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -1.1e+131) tmp = t_1; elseif (z <= 8e+157) tmp = fma(Float64(1.0 - t), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.1e+131], t$95$1, If[LessEqual[z, 8e+157], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+157}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0999999999999999e131 or 7.99999999999999987e157 < z Initial program 90.1%
Taylor expanded in z around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6467.1
Applied rewrites67.1%
if -1.0999999999999999e131 < z < 7.99999999999999987e157Initial program 96.7%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites98.1%
Taylor expanded in b around 0
+-commutativeN/A
+-commutativeN/A
negate-sub2N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
lower--.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6461.3
Applied rewrites61.3%
Taylor expanded in t around inf
Applied rewrites50.2%
Taylor expanded in z around 0
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
*-commutativeN/A
mul-1-negN/A
negate-sub2N/A
+-commutativeN/A
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
negate-sub2N/A
lift--.f6448.9
Applied rewrites48.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -2.45e+29)
t_1
(if (<= t -1.22e-26) (* (- b z) y) (if (<= t 1.9e+26) (- x (- a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -2.45e+29) {
tmp = t_1;
} else if (t <= -1.22e-26) {
tmp = (b - z) * y;
} else if (t <= 1.9e+26) {
tmp = x - -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 = (b - a) * t
if (t <= (-2.45d+29)) then
tmp = t_1
else if (t <= (-1.22d-26)) then
tmp = (b - z) * y
else if (t <= 1.9d+26) then
tmp = x - -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 = (b - a) * t;
double tmp;
if (t <= -2.45e+29) {
tmp = t_1;
} else if (t <= -1.22e-26) {
tmp = (b - z) * y;
} else if (t <= 1.9e+26) {
tmp = x - -a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -2.45e+29: tmp = t_1 elif t <= -1.22e-26: tmp = (b - z) * y elif t <= 1.9e+26: tmp = x - -a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -2.45e+29) tmp = t_1; elseif (t <= -1.22e-26) tmp = Float64(Float64(b - z) * y); elseif (t <= 1.9e+26) tmp = Float64(x - Float64(-a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -2.45e+29) tmp = t_1; elseif (t <= -1.22e-26) tmp = (b - z) * y; elseif (t <= 1.9e+26) tmp = x - -a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.45e+29], t$95$1, If[LessEqual[t, -1.22e-26], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.9e+26], N[(x - (-a)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{-26}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\
\;\;\;\;x - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.4500000000000001e29 or 1.9000000000000001e26 < t Initial program 92.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6466.4
Applied rewrites66.4%
if -2.4500000000000001e29 < t < -1.22e-26Initial program 95.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6438.8
Applied rewrites38.8%
if -1.22e-26 < t < 1.9000000000000001e26Initial program 97.7%
Taylor expanded in z around 0
lower--.f64N/A
Applied rewrites98.9%
Taylor expanded in x around inf
Applied rewrites37.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6436.3
Applied rewrites36.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.95e+28)
t_1
(if (<= t -1.9e-23)
(* (- 1.0 y) z)
(if (<= t 1.9e+26) (- x (- a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -1.95e+28) {
tmp = t_1;
} else if (t <= -1.9e-23) {
tmp = (1.0 - y) * z;
} else if (t <= 1.9e+26) {
tmp = x - -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 = (b - a) * t
if (t <= (-1.95d+28)) then
tmp = t_1
else if (t <= (-1.9d-23)) then
tmp = (1.0d0 - y) * z
else if (t <= 1.9d+26) then
tmp = x - -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 = (b - a) * t;
double tmp;
if (t <= -1.95e+28) {
tmp = t_1;
} else if (t <= -1.9e-23) {
tmp = (1.0 - y) * z;
} else if (t <= 1.9e+26) {
tmp = x - -a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -1.95e+28: tmp = t_1 elif t <= -1.9e-23: tmp = (1.0 - y) * z elif t <= 1.9e+26: tmp = x - -a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.95e+28) tmp = t_1; elseif (t <= -1.9e-23) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= 1.9e+26) tmp = Float64(x - Float64(-a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -1.95e+28) tmp = t_1; elseif (t <= -1.9e-23) tmp = (1.0 - y) * z; elseif (t <= 1.9e+26) tmp = x - -a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.95e+28], t$95$1, If[LessEqual[t, -1.9e-23], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.9e+26], N[(x - (-a)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-23}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+26}:\\
\;\;\;\;x - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.9499999999999999e28 or 1.9000000000000001e26 < t Initial program 92.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6466.4
Applied rewrites66.4%
if -1.9499999999999999e28 < t < -1.90000000000000006e-23Initial program 95.6%
Taylor expanded in z around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6432.9
Applied rewrites32.9%
if -1.90000000000000006e-23 < t < 1.9000000000000001e26Initial program 97.7%
Taylor expanded in z around 0
lower--.f64N/A
Applied rewrites98.9%
Taylor expanded in x around inf
Applied rewrites37.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6436.3
Applied rewrites36.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)))
(if (<= z -7.7e+130)
t_1
(if (<= z 7.5e-281)
(fma t b x)
(if (<= z 8.5e-178)
(* (- 1.0 t) a)
(if (<= z 1.9e+189) (fma t b x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -7.7e+130) {
tmp = t_1;
} else if (z <= 7.5e-281) {
tmp = fma(t, b, x);
} else if (z <= 8.5e-178) {
tmp = (1.0 - t) * a;
} else if (z <= 1.9e+189) {
tmp = fma(t, b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -7.7e+130) tmp = t_1; elseif (z <= 7.5e-281) tmp = fma(t, b, x); elseif (z <= 8.5e-178) tmp = Float64(Float64(1.0 - t) * a); elseif (z <= 1.9e+189) tmp = fma(t, b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7.7e+130], t$95$1, If[LessEqual[z, 7.5e-281], N[(t * b + x), $MachinePrecision], If[LessEqual[z, 8.5e-178], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.9e+189], N[(t * b + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -7.7 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-281}:\\
\;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-178}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+189}:\\
\;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.7000000000000004e130 or 1.8999999999999999e189 < z Initial program 90.0%
Taylor expanded in z around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6468.5
Applied rewrites68.5%
if -7.7000000000000004e130 < z < 7.49999999999999968e-281 or 8.5000000000000001e-178 < z < 1.8999999999999999e189Initial program 96.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites97.9%
Taylor expanded in x around inf
+-commutative58.0
negate-sub258.0
fp-cancel-sub-sign-inv58.0
Applied rewrites58.0%
Taylor expanded in t around inf
Applied rewrites35.1%
if 7.49999999999999968e-281 < z < 8.5000000000000001e-178Initial program 96.1%
Taylor expanded in a around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6437.5
Applied rewrites37.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- 1.0 t) a))) (if (<= a -6.2e+17) t_1 (if (<= a 1.6e+73) (fma t b x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -6.2e+17) {
tmp = t_1;
} else if (a <= 1.6e+73) {
tmp = fma(t, b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -6.2e+17) tmp = t_1; elseif (a <= 1.6e+73) tmp = fma(t, b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -6.2e+17], t$95$1, If[LessEqual[a, 1.6e+73], N[(t * b + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.2e17 or 1.59999999999999991e73 < a Initial program 91.4%
Taylor expanded in a around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6454.2
Applied rewrites54.2%
if -6.2e17 < a < 1.59999999999999991e73Initial program 97.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites98.8%
Taylor expanded in x around inf
+-commutative62.9
negate-sub262.9
fp-cancel-sub-sign-inv62.9
Applied rewrites62.9%
Taylor expanded in t around inf
Applied rewrites40.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.3e+128) (* b y) (if (<= y 6.5e+32) (fma t b x) (* (- z) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.3e+128) {
tmp = b * y;
} else if (y <= 6.5e+32) {
tmp = fma(t, b, x);
} else {
tmp = -z * y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.3e+128) tmp = Float64(b * y); elseif (y <= 6.5e+32) tmp = fma(t, b, x); else tmp = Float64(Float64(-z) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.3e+128], N[(b * y), $MachinePrecision], If[LessEqual[y, 6.5e+32], N[(t * b + x), $MachinePrecision], N[((-z) * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+128}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\end{array}
\end{array}
if y < -2.29999999999999998e128Initial program 88.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.7
Applied rewrites77.7%
Taylor expanded in z around 0
Applied rewrites41.5%
if -2.29999999999999998e128 < y < 6.4999999999999994e32Initial program 97.6%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
Applied rewrites98.7%
Taylor expanded in x around inf
+-commutative52.0
negate-sub252.0
fp-cancel-sub-sign-inv52.0
Applied rewrites52.0%
Taylor expanded in t around inf
Applied rewrites38.8%
if 6.4999999999999994e32 < y Initial program 91.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.3
Applied rewrites68.3%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6438.4
Applied rewrites38.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4.1e+66) (* b t) (if (<= t 5.8e+26) (- x (- a)) (* (- a) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.1e+66) {
tmp = b * t;
} else if (t <= 5.8e+26) {
tmp = x - -a;
} else {
tmp = -a * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.1d+66)) then
tmp = b * t
else if (t <= 5.8d+26) then
tmp = x - -a
else
tmp = -a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.1e+66) {
tmp = b * t;
} else if (t <= 5.8e+26) {
tmp = x - -a;
} else {
tmp = -a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.1e+66: tmp = b * t elif t <= 5.8e+26: tmp = x - -a else: tmp = -a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.1e+66) tmp = Float64(b * t); elseif (t <= 5.8e+26) tmp = Float64(x - Float64(-a)); else tmp = Float64(Float64(-a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.1e+66) tmp = b * t; elseif (t <= 5.8e+26) tmp = x - -a; else tmp = -a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.1e+66], N[(b * t), $MachinePrecision], If[LessEqual[t, 5.8e+26], N[(x - (-a)), $MachinePrecision], N[((-a) * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+66}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+26}:\\
\;\;\;\;x - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\end{array}
\end{array}
if t < -4.09999999999999994e66Initial program 91.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
Taylor expanded in a around 0
Applied rewrites37.7%
if -4.09999999999999994e66 < t < 5.8e26Initial program 97.6%
Taylor expanded in z around 0
lower--.f64N/A
Applied rewrites98.8%
Taylor expanded in x around inf
Applied rewrites37.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6434.5
Applied rewrites34.5%
if 5.8e26 < t Initial program 91.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6466.5
Applied rewrites66.5%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6438.2
Applied rewrites38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4.1e+66) (* b t) (if (<= t 8.5e+65) (- x (- a)) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.1e+66) {
tmp = b * t;
} else if (t <= 8.5e+65) {
tmp = x - -a;
} else {
tmp = b * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.1d+66)) then
tmp = b * t
else if (t <= 8.5d+65) then
tmp = x - -a
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.1e+66) {
tmp = b * t;
} else if (t <= 8.5e+65) {
tmp = x - -a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.1e+66: tmp = b * t elif t <= 8.5e+65: tmp = x - -a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.1e+66) tmp = Float64(b * t); elseif (t <= 8.5e+65) tmp = Float64(x - Float64(-a)); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.1e+66) tmp = b * t; elseif (t <= 8.5e+65) tmp = x - -a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.1e+66], N[(b * t), $MachinePrecision], If[LessEqual[t, 8.5e+65], N[(x - (-a)), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+66}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+65}:\\
\;\;\;\;x - \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -4.09999999999999994e66 or 8.50000000000000075e65 < t Initial program 91.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.7
Applied rewrites69.7%
Taylor expanded in a around 0
Applied rewrites37.2%
if -4.09999999999999994e66 < t < 8.50000000000000075e65Initial program 97.5%
Taylor expanded in z around 0
lower--.f64N/A
Applied rewrites98.8%
Taylor expanded in x around inf
Applied rewrites37.8%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6433.4
Applied rewrites33.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.8e+47) (* b t) (if (<= t -1.38e-244) (* b y) (if (<= t 1.25e+71) x (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.8e+47) {
tmp = b * t;
} else if (t <= -1.38e-244) {
tmp = b * y;
} else if (t <= 1.25e+71) {
tmp = x;
} else {
tmp = b * t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.8d+47)) then
tmp = b * t
else if (t <= (-1.38d-244)) then
tmp = b * y
else if (t <= 1.25d+71) then
tmp = x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.8e+47) {
tmp = b * t;
} else if (t <= -1.38e-244) {
tmp = b * y;
} else if (t <= 1.25e+71) {
tmp = x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.8e+47: tmp = b * t elif t <= -1.38e-244: tmp = b * y elif t <= 1.25e+71: tmp = x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.8e+47) tmp = Float64(b * t); elseif (t <= -1.38e-244) tmp = Float64(b * y); elseif (t <= 1.25e+71) tmp = x; else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.8e+47) tmp = b * t; elseif (t <= -1.38e-244) tmp = b * y; elseif (t <= 1.25e+71) tmp = x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.8e+47], N[(b * t), $MachinePrecision], If[LessEqual[t, -1.38e-244], N[(b * y), $MachinePrecision], If[LessEqual[t, 1.25e+71], x, N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+47}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq -1.38 \cdot 10^{-244}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -2.79999999999999988e47 or 1.24999999999999993e71 < t Initial program 91.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around 0
Applied rewrites36.8%
if -2.79999999999999988e47 < t < -1.3799999999999999e-244Initial program 97.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6439.1
Applied rewrites39.1%
Taylor expanded in z around 0
Applied rewrites21.8%
if -1.3799999999999999e-244 < t < 1.24999999999999993e71Initial program 97.6%
Taylor expanded in x around inf
Applied rewrites17.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.8e+119) x (if (<= x 4.3e+105) (* b t) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.8e+119) {
tmp = x;
} else if (x <= 4.3e+105) {
tmp = b * t;
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-4.8d+119)) then
tmp = x
else if (x <= 4.3d+105) then
tmp = b * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.8e+119) {
tmp = x;
} else if (x <= 4.3e+105) {
tmp = b * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.8e+119: tmp = x elif x <= 4.3e+105: tmp = b * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.8e+119) tmp = x; elseif (x <= 4.3e+105) tmp = Float64(b * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.8e+119) tmp = x; elseif (x <= 4.3e+105) tmp = b * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.8e+119], x, If[LessEqual[x, 4.3e+105], N[(b * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+119}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+105}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.8e119 or 4.3000000000000002e105 < x Initial program 94.9%
Taylor expanded in x around inf
Applied rewrites37.4%
if -4.8e119 < x < 4.3000000000000002e105Initial program 95.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6435.9
Applied rewrites35.9%
Taylor expanded in a around 0
Applied rewrites19.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -6.4e+106) x (if (<= x 5.6e+109) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.4e+106) {
tmp = x;
} else if (x <= 5.6e+109) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-6.4d+106)) then
tmp = x
else if (x <= 5.6d+109) then
tmp = a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.4e+106) {
tmp = x;
} else if (x <= 5.6e+109) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -6.4e+106: tmp = x elif x <= 5.6e+109: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -6.4e+106) tmp = x; elseif (x <= 5.6e+109) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -6.4e+106) tmp = x; elseif (x <= 5.6e+109) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.4e+106], x, If[LessEqual[x, 5.6e+109], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+106}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+109}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.3999999999999996e106 or 5.6000000000000004e109 < x Initial program 94.9%
Taylor expanded in x around inf
Applied rewrites37.0%
if -6.3999999999999996e106 < x < 5.6000000000000004e109Initial program 95.1%
Taylor expanded in a around inf
negate-sub2N/A
mul-1-negN/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
negate-sub2N/A
lower--.f6431.5
Applied rewrites31.5%
Taylor expanded in t around 0
Applied rewrites12.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.0%
Taylor expanded in x around inf
Applied rewrites15.6%
herbie shell --seed 2025110
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))