
(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}
Sampling outcomes in binary64 precision:
Herbie found 20 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 (- b a) t (fma (- y 2.0) b (- x (fma (- y 1.0) z (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((b - a), t, fma((y - 2.0), b, (x - fma((y - 1.0), z, -a))));
}
function code(x, y, z, t, a, b) return fma(Float64(b - a), t, fma(Float64(y - 2.0), b, Float64(x - fma(Float64(y - 1.0), z, Float64(-a))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + N[(x - N[(N[(y - 1.0), $MachinePrecision] * z + (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, -a\right)\right)\right)
\end{array}
Initial program 93.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
(if (<= t_1 -5e+296) (* b t) (if (<= t_1 2e+300) (+ (+ a x) z) (* b y)))))
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 <= -5e+296) {
tmp = b * t;
} else if (t_1 <= 2e+300) {
tmp = (a + x) + z;
} else {
tmp = b * y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
if (t_1 <= (-5d+296)) then
tmp = b * t
else if (t_1 <= 2d+300) then
tmp = (a + x) + z
else
tmp = b * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -5e+296) {
tmp = b * t;
} else if (t_1 <= 2e+300) {
tmp = (a + x) + z;
} else {
tmp = b * y;
}
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 <= -5e+296: tmp = b * t elif t_1 <= 2e+300: tmp = (a + x) + z else: tmp = b * y 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 <= -5e+296) tmp = Float64(b * t); elseif (t_1 <= 2e+300) tmp = Float64(Float64(a + x) + z); else tmp = Float64(b * y); 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 <= -5e+296) tmp = b * t; elseif (t_1 <= 2e+300) tmp = (a + x) + z; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+296], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], N[(N[(a + x), $MachinePrecision] + z), $MachinePrecision], N[(b * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+296}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;\left(a + x\right) + z\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -5.0000000000000001e296Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites96.9%
Taylor expanded in b around -inf
Applied rewrites60.5%
Taylor expanded in t around inf
Applied rewrites45.1%
if -5.0000000000000001e296 < (+.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)) < 2.0000000000000001e300Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6479.1
Applied rewrites79.1%
Taylor expanded in t around 0
Applied rewrites56.9%
Taylor expanded in b around 0
Applied rewrites50.9%
if 2.0000000000000001e300 < (+.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 70.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites93.1%
Taylor expanded in b around -inf
Applied rewrites52.6%
Taylor expanded in y around inf
Applied rewrites37.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
(if (or (<= t_1 -5e+296) (not (<= t_1 2e+292))) (* b t) (+ z x))))
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 <= -5e+296) || !(t_1 <= 2e+292)) {
tmp = b * t;
} else {
tmp = z + 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) :: t_1
real(8) :: tmp
t_1 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
if ((t_1 <= (-5d+296)) .or. (.not. (t_1 <= 2d+292))) then
tmp = b * t
else
tmp = z + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if ((t_1 <= -5e+296) || !(t_1 <= 2e+292)) {
tmp = b * t;
} else {
tmp = z + x;
}
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 <= -5e+296) or not (t_1 <= 2e+292): tmp = b * t else: tmp = z + x 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 <= -5e+296) || !(t_1 <= 2e+292)) tmp = Float64(b * t); else tmp = Float64(z + x); 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 <= -5e+296) || ~((t_1 <= 2e+292))) tmp = b * t; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+296], N[Not[LessEqual[t$95$1, 2e+292]], $MachinePrecision]], N[(b * t), $MachinePrecision], N[(z + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+296} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+292}\right):\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -5.0000000000000001e296 or 2e292 < (+.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 82.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites94.8%
Taylor expanded in b around -inf
Applied rewrites56.1%
Taylor expanded in t around inf
Applied rewrites35.9%
if -5.0000000000000001e296 < (+.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)) < 2e292Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6478.9
Applied rewrites78.9%
Taylor expanded in t around 0
Applied rewrites57.8%
Taylor expanded in b around 0
Applied rewrites51.5%
Taylor expanded in a around 0
Applied rewrites41.6%
Final simplification39.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b a) t (+ (fma (- y 2.0) b x) a))) (t_2 (* (- b z) y)))
(if (<= y -9.4e+213)
t_2
(if (<= y -4.7e-13)
t_1
(if (<= y 0.065)
(fma (- t 2.0) b (- x (fma (- t 1.0) a (- z))))
(if (<= y 6.8e+183) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - a), t, (fma((y - 2.0), b, x) + a));
double t_2 = (b - z) * y;
double tmp;
if (y <= -9.4e+213) {
tmp = t_2;
} else if (y <= -4.7e-13) {
tmp = t_1;
} else if (y <= 0.065) {
tmp = fma((t - 2.0), b, (x - fma((t - 1.0), a, -z)));
} else if (y <= 6.8e+183) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - a), t, Float64(fma(Float64(y - 2.0), b, x) + a)) t_2 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -9.4e+213) tmp = t_2; elseif (y <= -4.7e-13) tmp = t_1; elseif (y <= 0.065) tmp = fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z)))); elseif (y <= 6.8e+183) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -9.4e+213], t$95$2, If[LessEqual[y, -4.7e-13], t$95$1, If[LessEqual[y, 0.065], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+183], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
t_2 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -9.4 \cdot 10^{+213}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.065:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -9.3999999999999995e213 or 6.8e183 < y Initial program 80.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6490.0
Applied rewrites90.0%
if -9.3999999999999995e213 < y < -4.7000000000000002e-13 or 0.065000000000000002 < y < 6.8e183Initial program 93.4%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites96.0%
Taylor expanded in z around 0
Applied rewrites83.7%
if -4.7000000000000002e-13 < y < 0.065000000000000002Initial program 99.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6498.6
Applied rewrites98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -4.6e+209)
t_1
(if (<= y -8e-59)
(fma (- b a) t (+ a x))
(if (<= y 1.86e-116)
(fma (- t 2.0) b (+ z x))
(if (<= y 4.7e+94) (fma (- b a) t (fma (- y 2.0) b a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -4.6e+209) {
tmp = t_1;
} else if (y <= -8e-59) {
tmp = fma((b - a), t, (a + x));
} else if (y <= 1.86e-116) {
tmp = fma((t - 2.0), b, (z + x));
} else if (y <= 4.7e+94) {
tmp = fma((b - a), t, fma((y - 2.0), b, a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -4.6e+209) tmp = t_1; elseif (y <= -8e-59) tmp = fma(Float64(b - a), t, Float64(a + x)); elseif (y <= 1.86e-116) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); elseif (y <= 4.7e+94) tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+209], t$95$1, If[LessEqual[y, -8e-59], N[(N[(b - a), $MachinePrecision] * t + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.86e-116], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e+94], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, a + x\right)\\
\mathbf{elif}\;y \leq 1.86 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.60000000000000019e209 or 4.70000000000000017e94 < y Initial program 84.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6483.5
Applied rewrites83.5%
if -4.60000000000000019e209 < y < -8.0000000000000002e-59Initial program 95.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites85.0%
Taylor expanded in b around 0
Applied rewrites69.2%
if -8.0000000000000002e-59 < y < 1.86e-116Initial program 99.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6499.0
Applied rewrites99.0%
Taylor expanded in a around 0
Applied rewrites79.0%
if 1.86e-116 < y < 4.70000000000000017e94Initial program 94.4%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites83.0%
Taylor expanded in x around 0
Applied rewrites74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y 2.0) b (- x (fma (- y 1.0) z (- a))))))
(if (<= y -1.96e+93)
t_1
(if (<= y -4.7e-13)
(fma (- b a) t (+ (fma (- y 2.0) b x) a))
(if (<= y 2.25e+80)
(fma (- t 2.0) b (- x (fma (- t 1.0) a (- z))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y - 2.0), b, (x - fma((y - 1.0), z, -a)));
double tmp;
if (y <= -1.96e+93) {
tmp = t_1;
} else if (y <= -4.7e-13) {
tmp = fma((b - a), t, (fma((y - 2.0), b, x) + a));
} else if (y <= 2.25e+80) {
tmp = fma((t - 2.0), b, (x - fma((t - 1.0), a, -z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(y - 2.0), b, Float64(x - fma(Float64(y - 1.0), z, Float64(-a)))) tmp = 0.0 if (y <= -1.96e+93) tmp = t_1; elseif (y <= -4.7e-13) tmp = fma(Float64(b - a), t, Float64(fma(Float64(y - 2.0), b, x) + a)); elseif (y <= 2.25e+80) tmp = fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b + N[(x - N[(N[(y - 1.0), $MachinePrecision] * z + (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.96e+93], t$95$1, If[LessEqual[y, -4.7e-13], N[(N[(b - a), $MachinePrecision] * t + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+80], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, -a\right)\right)\\
\mathbf{if}\;y \leq -1.96 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.9600000000000001e93 or 2.25000000000000003e80 < y Initial program 84.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6487.4
Applied rewrites87.4%
if -1.9600000000000001e93 < y < -4.7000000000000002e-13Initial program 96.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites96.4%
Taylor expanded in z around 0
Applied rewrites89.5%
if -4.7000000000000002e-13 < y < 2.25000000000000003e80Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6497.1
Applied rewrites97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b a) t (+ a x))) (t_2 (* (- b z) y)))
(if (<= y -4.6e+209)
t_2
(if (<= y -8e-59)
t_1
(if (<= y 1.9e-116)
(fma (- t 2.0) b (+ z x))
(if (<= y 4.7e+94) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - a), t, (a + x));
double t_2 = (b - z) * y;
double tmp;
if (y <= -4.6e+209) {
tmp = t_2;
} else if (y <= -8e-59) {
tmp = t_1;
} else if (y <= 1.9e-116) {
tmp = fma((t - 2.0), b, (z + x));
} else if (y <= 4.7e+94) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - a), t, Float64(a + x)) t_2 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -4.6e+209) tmp = t_2; elseif (y <= -8e-59) tmp = t_1; elseif (y <= 1.9e-116) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); elseif (y <= 4.7e+94) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t + N[(a + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+209], t$95$2, If[LessEqual[y, -8e-59], t$95$1, If[LessEqual[y, 1.9e-116], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e+94], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - a, t, a + x\right)\\
t_2 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.60000000000000019e209 or 4.70000000000000017e94 < y Initial program 84.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6483.5
Applied rewrites83.5%
if -4.60000000000000019e209 < y < -8.0000000000000002e-59 or 1.9000000000000001e-116 < y < 4.70000000000000017e94Initial program 95.2%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites97.6%
Taylor expanded in z around 0
Applied rewrites84.1%
Taylor expanded in b around 0
Applied rewrites70.6%
if -8.0000000000000002e-59 < y < 1.9000000000000001e-116Initial program 99.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6499.0
Applied rewrites99.0%
Taylor expanded in a around 0
Applied rewrites79.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -225.0)
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* b y))
(if (<= y 2.25e+80)
(fma (- t 2.0) b (- x (fma (- t 1.0) a (- z))))
(fma (- y 2.0) b (- x (fma (- y 1.0) z (- a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -225.0) {
tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
} else if (y <= 2.25e+80) {
tmp = fma((t - 2.0), b, (x - fma((t - 1.0), a, -z)));
} else {
tmp = fma((y - 2.0), b, (x - fma((y - 1.0), z, -a)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -225.0) tmp = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y)); elseif (y <= 2.25e+80) tmp = fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z)))); else tmp = fma(Float64(y - 2.0), b, Float64(x - fma(Float64(y - 1.0), z, Float64(-a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -225.0], N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+80], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - 2.0), $MachinePrecision] * b + N[(x - N[(N[(y - 1.0), $MachinePrecision] * z + (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -225:\\
\;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x - \mathsf{fma}\left(y - 1, z, -a\right)\right)\\
\end{array}
\end{array}
if y < -225Initial program 88.9%
Taylor expanded in y around inf
lower-*.f6483.2
Applied rewrites83.2%
if -225 < y < 2.25000000000000003e80Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6497.1
Applied rewrites97.1%
if 2.25000000000000003e80 < y Initial program 84.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6488.8
Applied rewrites88.8%
Final simplification92.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e+157) (not (<= z 1.9e+66))) (fma (- 1.0 t) a (fma (- z) (- y 1.0) x)) (fma (- b a) t (+ (fma (- y 2.0) b x) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e+157) || !(z <= 1.9e+66)) {
tmp = fma((1.0 - t), a, fma(-z, (y - 1.0), x));
} else {
tmp = fma((b - a), t, (fma((y - 2.0), b, x) + a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e+157) || !(z <= 1.9e+66)) tmp = fma(Float64(1.0 - t), a, fma(Float64(-z), Float64(y - 1.0), x)); else tmp = fma(Float64(b - a), t, Float64(fma(Float64(y - 2.0), b, x) + a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e+157], N[Not[LessEqual[z, 1.9e+66]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a + N[((-z) * N[(y - 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+157} \lor \neg \left(z \leq 1.9 \cdot 10^{+66}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(-z, y - 1, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\end{array}
\end{array}
if z < -7.99999999999999987e157 or 1.9000000000000001e66 < z Initial program 84.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites98.6%
Taylor expanded in b around 0
Applied rewrites86.1%
if -7.99999999999999987e157 < z < 1.9000000000000001e66Initial program 96.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites97.8%
Taylor expanded in z around 0
Applied rewrites89.5%
Final simplification88.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.4e+14) (not (<= b 1.46e-5))) (fma (- b a) t (fma (- y 2.0) b x)) (fma (- 1.0 t) a (fma (- z) (- y 1.0) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.4e+14) || !(b <= 1.46e-5)) {
tmp = fma((b - a), t, fma((y - 2.0), b, x));
} else {
tmp = fma((1.0 - t), a, fma(-z, (y - 1.0), x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.4e+14) || !(b <= 1.46e-5)) tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)); else tmp = fma(Float64(1.0 - t), a, fma(Float64(-z), Float64(y - 1.0), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.4e+14], N[Not[LessEqual[b, 1.46e-5]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + N[((-z) * N[(y - 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.4 \cdot 10^{+14} \lor \neg \left(b \leq 1.46 \cdot 10^{-5}\right):\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(-z, y - 1, x\right)\right)\\
\end{array}
\end{array}
if b < -9.4e14 or 1.46000000000000008e-5 < b Initial program 88.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites96.8%
Taylor expanded in z around 0
Applied rewrites85.5%
Taylor expanded in x around 0
Applied rewrites74.0%
Taylor expanded in a around 0
Applied rewrites83.3%
if -9.4e14 < b < 1.46000000000000008e-5Initial program 97.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites99.2%
Taylor expanded in b around 0
Applied rewrites89.3%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -8e+228)
(- x (fma z (- y 1.0) (- a)))
(if (<= z 3.25e+66)
(fma (- b a) t (fma (- y 2.0) b x))
(- (fma a (- t 1.0) (* z (- y 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8e+228) {
tmp = x - fma(z, (y - 1.0), -a);
} else if (z <= 3.25e+66) {
tmp = fma((b - a), t, fma((y - 2.0), b, x));
} else {
tmp = -fma(a, (t - 1.0), (z * (y - 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8e+228) tmp = Float64(x - fma(z, Float64(y - 1.0), Float64(-a))); elseif (z <= 3.25e+66) tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)); else tmp = Float64(-fma(a, Float64(t - 1.0), Float64(z * Float64(y - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8e+228], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e+66], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], (-N[(a * N[(t - 1.0), $MachinePrecision] + N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+228}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, -a\right)\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+66}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-\mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\
\end{array}
\end{array}
if z < -7.9999999999999994e228Initial program 71.4%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites32.2%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6476.9
Applied rewrites76.9%
Taylor expanded in t around 0
Applied rewrites77.4%
if -7.9999999999999994e228 < z < 3.2500000000000001e66Initial program 95.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites97.4%
Taylor expanded in z around 0
Applied rewrites88.2%
Taylor expanded in x around 0
Applied rewrites70.4%
Taylor expanded in a around 0
Applied rewrites80.2%
if 3.2500000000000001e66 < z Initial program 89.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites35.9%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6491.6
Applied rewrites91.6%
Taylor expanded in x around 0
Applied rewrites83.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e+228) (not (<= z 1.9e+100))) (- x (fma z (- y 1.0) (- a))) (fma (- b a) t (fma (- y 2.0) b x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e+228) || !(z <= 1.9e+100)) {
tmp = x - fma(z, (y - 1.0), -a);
} else {
tmp = fma((b - a), t, fma((y - 2.0), b, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e+228) || !(z <= 1.9e+100)) tmp = Float64(x - fma(z, Float64(y - 1.0), Float64(-a))); else tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e+228], N[Not[LessEqual[z, 1.9e+100]], $MachinePrecision]], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+228} \lor \neg \left(z \leq 1.9 \cdot 10^{+100}\right):\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, -a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\end{array}
\end{array}
if z < -7.9999999999999994e228 or 1.89999999999999982e100 < z Initial program 82.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites29.5%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6489.9
Applied rewrites89.9%
Taylor expanded in t around 0
Applied rewrites84.6%
if -7.9999999999999994e228 < z < 1.89999999999999982e100Initial program 96.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites97.5%
Taylor expanded in z around 0
Applied rewrites87.2%
Taylor expanded in x around 0
Applied rewrites70.2%
Taylor expanded in a around 0
Applied rewrites79.2%
Final simplification80.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -4.6e+61)
t_1
(if (<= y 1.62e-240)
(+ (fma -2.0 b (+ z x)) a)
(if (<= y 4.6e+94) (* (- b a) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -4.6e+61) {
tmp = t_1;
} else if (y <= 1.62e-240) {
tmp = fma(-2.0, b, (z + x)) + a;
} else if (y <= 4.6e+94) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -4.6e+61) tmp = t_1; elseif (y <= 1.62e-240) tmp = Float64(fma(-2.0, b, Float64(z + x)) + a); elseif (y <= 4.6e+94) tmp = Float64(Float64(b - a) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+61], t$95$1, If[LessEqual[y, 1.62e-240], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[y, 4.6e+94], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-240}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+94}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.5999999999999999e61 or 4.5999999999999999e94 < y Initial program 86.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.3
Applied rewrites75.3%
if -4.5999999999999999e61 < y < 1.61999999999999995e-240Initial program 98.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6495.1
Applied rewrites95.1%
Taylor expanded in t around 0
Applied rewrites60.6%
if 1.61999999999999995e-240 < y < 4.5999999999999999e94Initial program 95.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6455.8
Applied rewrites55.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -4.6e+61)
t_1
(if (<= y 6.8e-241)
(+ (+ a x) z)
(if (<= y 4.6e+94) (* (- b a) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -4.6e+61) {
tmp = t_1;
} else if (y <= 6.8e-241) {
tmp = (a + x) + z;
} else if (y <= 4.6e+94) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - z) * y
if (y <= (-4.6d+61)) then
tmp = t_1
else if (y <= 6.8d-241) then
tmp = (a + x) + z
else if (y <= 4.6d+94) then
tmp = (b - a) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -4.6e+61) {
tmp = t_1;
} else if (y <= 6.8e-241) {
tmp = (a + x) + z;
} else if (y <= 4.6e+94) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y tmp = 0 if y <= -4.6e+61: tmp = t_1 elif y <= 6.8e-241: tmp = (a + x) + z elif y <= 4.6e+94: tmp = (b - a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -4.6e+61) tmp = t_1; elseif (y <= 6.8e-241) tmp = Float64(Float64(a + x) + z); elseif (y <= 4.6e+94) tmp = Float64(Float64(b - a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; tmp = 0.0; if (y <= -4.6e+61) tmp = t_1; elseif (y <= 6.8e-241) tmp = (a + x) + z; elseif (y <= 4.6e+94) tmp = (b - a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.6e+61], t$95$1, If[LessEqual[y, 6.8e-241], N[(N[(a + x), $MachinePrecision] + z), $MachinePrecision], If[LessEqual[y, 4.6e+94], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-241}:\\
\;\;\;\;\left(a + x\right) + z\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+94}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.5999999999999999e61 or 4.5999999999999999e94 < y Initial program 86.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.3
Applied rewrites75.3%
if -4.5999999999999999e61 < y < 6.7999999999999998e-241Initial program 98.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6495.1
Applied rewrites95.1%
Taylor expanded in t around 0
Applied rewrites60.6%
Taylor expanded in b around 0
Applied rewrites52.3%
if 6.7999999999999998e-241 < y < 4.5999999999999999e94Initial program 95.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6455.8
Applied rewrites55.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.6e+209) (not (<= y 4.7e+94))) (* (- b z) y) (fma (- b a) t (+ a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.6e+209) || !(y <= 4.7e+94)) {
tmp = (b - z) * y;
} else {
tmp = fma((b - a), t, (a + x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.6e+209) || !(y <= 4.7e+94)) tmp = Float64(Float64(b - z) * y); else tmp = fma(Float64(b - a), t, Float64(a + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.6e+209], N[Not[LessEqual[y, 4.7e+94]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t + N[(a + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+209} \lor \neg \left(y \leq 4.7 \cdot 10^{+94}\right):\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, a + x\right)\\
\end{array}
\end{array}
if y < -4.60000000000000019e209 or 4.70000000000000017e94 < y Initial program 84.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6483.5
Applied rewrites83.5%
if -4.60000000000000019e209 < y < 4.70000000000000017e94Initial program 97.2%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites98.9%
Taylor expanded in z around 0
Applied rewrites80.0%
Taylor expanded in b around 0
Applied rewrites68.6%
Final simplification73.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7e+14) (not (<= t 3.2e+53))) (* (- b a) t) (+ (+ a x) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7e+14) || !(t <= 3.2e+53)) {
tmp = (b - a) * t;
} else {
tmp = (a + x) + 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) :: tmp
if ((t <= (-7d+14)) .or. (.not. (t <= 3.2d+53))) then
tmp = (b - a) * t
else
tmp = (a + x) + z
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 <= -7e+14) || !(t <= 3.2e+53)) {
tmp = (b - a) * t;
} else {
tmp = (a + x) + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7e+14) or not (t <= 3.2e+53): tmp = (b - a) * t else: tmp = (a + x) + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7e+14) || !(t <= 3.2e+53)) tmp = Float64(Float64(b - a) * t); else tmp = Float64(Float64(a + x) + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7e+14) || ~((t <= 3.2e+53))) tmp = (b - a) * t; else tmp = (a + x) + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7e+14], N[Not[LessEqual[t, 3.2e+53]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], N[(N[(a + x), $MachinePrecision] + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+14} \lor \neg \left(t \leq 3.2 \cdot 10^{+53}\right):\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(a + x\right) + z\\
\end{array}
\end{array}
if t < -7e14 or 3.2e53 < t Initial program 90.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.9
Applied rewrites67.9%
if -7e14 < t < 3.2e53Initial program 96.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6463.1
Applied rewrites63.1%
Taylor expanded in t around 0
Applied rewrites58.8%
Taylor expanded in b around 0
Applied rewrites50.9%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9e+127) (not (<= b 1.1e+141))) (* (- t 2.0) b) (+ (+ a x) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9e+127) || !(b <= 1.1e+141)) {
tmp = (t - 2.0) * b;
} else {
tmp = (a + x) + 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) :: tmp
if ((b <= (-9d+127)) .or. (.not. (b <= 1.1d+141))) then
tmp = (t - 2.0d0) * b
else
tmp = (a + x) + z
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 ((b <= -9e+127) || !(b <= 1.1e+141)) {
tmp = (t - 2.0) * b;
} else {
tmp = (a + x) + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9e+127) or not (b <= 1.1e+141): tmp = (t - 2.0) * b else: tmp = (a + x) + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9e+127) || !(b <= 1.1e+141)) tmp = Float64(Float64(t - 2.0) * b); else tmp = Float64(Float64(a + x) + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9e+127) || ~((b <= 1.1e+141))) tmp = (t - 2.0) * b; else tmp = (a + x) + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9e+127], N[Not[LessEqual[b, 1.1e+141]], $MachinePrecision]], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(N[(a + x), $MachinePrecision] + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+127} \lor \neg \left(b \leq 1.1 \cdot 10^{+141}\right):\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(a + x\right) + z\\
\end{array}
\end{array}
if b < -9.00000000000000068e127 or 1.1e141 < b Initial program 87.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6462.8
Applied rewrites62.8%
Taylor expanded in t around 0
Applied rewrites22.6%
Taylor expanded in b around inf
Applied rewrites57.9%
if -9.00000000000000068e127 < b < 1.1e141Initial program 96.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6473.8
Applied rewrites73.8%
Taylor expanded in t around 0
Applied rewrites45.4%
Taylor expanded in b around 0
Applied rewrites44.2%
Final simplification48.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.7e+55) (not (<= y 3.7))) (* b y) (+ z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.7e+55) || !(y <= 3.7)) {
tmp = b * y;
} else {
tmp = z + 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 ((y <= (-1.7d+55)) .or. (.not. (y <= 3.7d0))) then
tmp = b * y
else
tmp = z + 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 ((y <= -1.7e+55) || !(y <= 3.7)) {
tmp = b * y;
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.7e+55) or not (y <= 3.7): tmp = b * y else: tmp = z + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.7e+55) || !(y <= 3.7)) tmp = Float64(b * y); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.7e+55) || ~((y <= 3.7))) tmp = b * y; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.7e+55], N[Not[LessEqual[y, 3.7]], $MachinePrecision]], N[(b * y), $MachinePrecision], N[(z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+55} \lor \neg \left(y \leq 3.7\right):\\
\;\;\;\;b \cdot y\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if y < -1.6999999999999999e55 or 3.7000000000000002 < y Initial program 86.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate--l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites96.4%
Taylor expanded in b around -inf
Applied rewrites46.2%
Taylor expanded in y around inf
Applied rewrites40.1%
if -1.6999999999999999e55 < y < 3.7000000000000002Initial program 98.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6495.5
Applied rewrites95.5%
Taylor expanded in t around 0
Applied rewrites56.4%
Taylor expanded in b around 0
Applied rewrites49.5%
Taylor expanded in a around 0
Applied rewrites41.6%
Final simplification40.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -3.25e+46) (not (<= x 2.5e+14))) (+ z x) (+ a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -3.25e+46) || !(x <= 2.5e+14)) {
tmp = z + x;
} else {
tmp = a + 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) :: tmp
if ((x <= (-3.25d+46)) .or. (.not. (x <= 2.5d+14))) then
tmp = z + x
else
tmp = a + z
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 <= -3.25e+46) || !(x <= 2.5e+14)) {
tmp = z + x;
} else {
tmp = a + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -3.25e+46) or not (x <= 2.5e+14): tmp = z + x else: tmp = a + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -3.25e+46) || !(x <= 2.5e+14)) tmp = Float64(z + x); else tmp = Float64(a + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -3.25e+46) || ~((x <= 2.5e+14))) tmp = z + x; else tmp = a + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -3.25e+46], N[Not[LessEqual[x, 2.5e+14]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(a + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.25 \cdot 10^{+46} \lor \neg \left(x \leq 2.5 \cdot 10^{+14}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + z\\
\end{array}
\end{array}
if x < -3.25000000000000004e46 or 2.5e14 < x Initial program 93.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6478.3
Applied rewrites78.3%
Taylor expanded in t around 0
Applied rewrites46.9%
Taylor expanded in b around 0
Applied rewrites46.2%
Taylor expanded in a around 0
Applied rewrites43.1%
if -3.25000000000000004e46 < x < 2.5e14Initial program 92.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6464.0
Applied rewrites64.0%
Taylor expanded in t around 0
Applied rewrites31.5%
Taylor expanded in b around 0
Applied rewrites24.1%
Taylor expanded in x around 0
Applied rewrites24.1%
Final simplification32.6%
(FPCore (x y z t a b) :precision binary64 (+ a z))
double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a + z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
def code(x, y, z, t, a, b): return a + z
function code(x, y, z, t, a, b) return Float64(a + z) end
function tmp = code(x, y, z, t, a, b) tmp = a + z; end
code[x_, y_, z_, t_, a_, b_] := N[(a + z), $MachinePrecision]
\begin{array}{l}
\\
a + z
\end{array}
Initial program 93.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6470.4
Applied rewrites70.4%
Taylor expanded in t around 0
Applied rewrites38.4%
Taylor expanded in b around 0
Applied rewrites34.0%
Taylor expanded in x around 0
Applied rewrites19.0%
herbie shell --seed 2024359
(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)))