
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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 * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
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 * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -1e+34)
t_1
(if (<= z 56000000000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+
(+ (* (* 15.234687407 z) z) (fma (* z z) z (* 31.4690115749 z)))
11.9400905721)
z)
0.607771387771)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= 56000000000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / ((((((15.234687407 * z) * z) + fma((z * z), z, (31.4690115749 * z))) + 11.9400905721) * z) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= 56000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(15.234687407 * z) * z) + fma(Float64(z * z), z, Float64(31.4690115749 * z))) + 11.9400905721) * z) + 0.607771387771))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, 56000000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(15.234687407 * z), $MachinePrecision] * z), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] * z + N[(31.4690115749 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 56000000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(15.234687407 \cdot z\right) \cdot z + \mathsf{fma}\left(z \cdot z, z, 31.4690115749 \cdot z\right)\right) + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 5.6e10 < z Initial program 10.4%
Taylor expanded in z around inf
Applied rewrites96.0%
if -9.99999999999999946e33 < z < 5.6e10Initial program 99.1%
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-inN/A
unpow2N/A
distribute-rgt-inN/A
unpow2N/A
unpow3N/A
*-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
Applied rewrites99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -1e+34)
t_1
(if (<= z 56000000000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+
(* (+ (fma z z (* 15.234687407 z)) 31.4690115749) z)
11.9400905721)
z)
0.607771387771)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= 56000000000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((fma(z, z, (15.234687407 * z)) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= 56000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(fma(z, z, Float64(15.234687407 * z)) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, 56000000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(z * z + N[(15.234687407 * z), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 56000000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\mathsf{fma}\left(z, z, 15.234687407 \cdot z\right) + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 5.6e10 < z Initial program 10.4%
Taylor expanded in z around inf
Applied rewrites96.0%
if -9.99999999999999946e33 < z < 5.6e10Initial program 99.1%
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f6499.1
Applied rewrites99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -1e+34)
t_1
(if (<= z 56000000000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(+
0.607771387771
(* (* (fma (- z -15.234687407) z 31.4690115749) z) z))
(* 11.9400905721 z))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= 56000000000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / ((0.607771387771 + ((fma((z - -15.234687407), z, 31.4690115749) * z) * z)) + (11.9400905721 * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= 56000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(0.607771387771 + Float64(Float64(fma(Float64(z - -15.234687407), z, 31.4690115749) * z) * z)) + Float64(11.9400905721 * z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, 56000000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(0.607771387771 + N[(N[(N[(N[(z - -15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(11.9400905721 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 56000000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(0.607771387771 + \left(\mathsf{fma}\left(z - -15.234687407, z, 31.4690115749\right) \cdot z\right) \cdot z\right) + 11.9400905721 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 5.6e10 < z Initial program 10.4%
Taylor expanded in z around inf
Applied rewrites96.0%
if -9.99999999999999946e33 < z < 5.6e10Initial program 99.1%
Applied rewrites99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -1e+34)
t_1
(if (<= z 56000000000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(fma
(* (fma (- z -15.234687407) z 31.4690115749) z)
z
(* 11.9400905721 z))
0.607771387771)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= 56000000000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (fma((fma((z - -15.234687407), z, 31.4690115749) * z), z, (11.9400905721 * z)) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= 56000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(fma(Float64(fma(Float64(z - -15.234687407), z, 31.4690115749) * z), z, Float64(11.9400905721 * z)) + 0.607771387771))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, 56000000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(z - -15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] * z + N[(11.9400905721 * z), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 56000000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\mathsf{fma}\left(\mathsf{fma}\left(z - -15.234687407, z, 31.4690115749\right) \cdot z, z, 11.9400905721 \cdot z\right) + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 5.6e10 < z Initial program 10.4%
Taylor expanded in z around inf
Applied rewrites96.0%
if -9.99999999999999946e33 < z < 5.6e10Initial program 99.1%
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
metadata-evalN/A
lower--.f64N/A
lower-*.f6499.1
Applied rewrites99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -1e+34)
t_1
(if (<= z 56000000000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -1e+34) {
tmp = t_1;
} else if (z <= 56000000000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -1e+34) tmp = t_1; elseif (z <= 56000000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+34], t$95$1, If[LessEqual[z, 56000000000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 56000000000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.99999999999999946e33 or 5.6e10 < z Initial program 10.4%
Taylor expanded in z around inf
Applied rewrites96.0%
if -9.99999999999999946e33 < z < 5.6e10Initial program 99.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(-
(fma (/ y z) (- (/ t z) -11.1667541262) (fma 3.13060547623 y x))
(fma
(* (/ y (* z z)) -36.52704169880642)
15.234687407
(* (/ y z) (- (/ 98.5170599679272 z) -47.69379582500642))))))
(if (<= z -0.05)
t_1
(if (<= z 11.0)
(+
x
(/ (* y (fma (fma t z a) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y / z), ((t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(((y / (z * z)) * -36.52704169880642), 15.234687407, ((y / z) * ((98.5170599679272 / z) - -47.69379582500642)));
double tmp;
if (z <= -0.05) {
tmp = t_1;
} else if (z <= 11.0) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(y / z), Float64(Float64(t / z) - -11.1667541262), fma(3.13060547623, y, x)) - fma(Float64(Float64(y / Float64(z * z)) * -36.52704169880642), 15.234687407, Float64(Float64(y / z) * Float64(Float64(98.5170599679272 / z) - -47.69379582500642)))) tmp = 0.0 if (z <= -0.05) tmp = t_1; elseif (z <= 11.0) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y / z), $MachinePrecision] * N[(N[(t / z), $MachinePrecision] - -11.1667541262), $MachinePrecision] + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision] * -36.52704169880642), $MachinePrecision] * 15.234687407 + N[(N[(y / z), $MachinePrecision] * N[(N[(98.5170599679272 / z), $MachinePrecision] - -47.69379582500642), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.05], t$95$1, If[LessEqual[z, 11.0], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{z}, \frac{t}{z} - -11.1667541262, \mathsf{fma}\left(3.13060547623, y, x\right)\right) - \mathsf{fma}\left(\frac{y}{z \cdot z} \cdot -36.52704169880642, 15.234687407, \frac{y}{z} \cdot \left(\frac{98.5170599679272}{z} - -47.69379582500642\right)\right)\\
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 11:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.050000000000000003 or 11 < z Initial program 16.0%
Taylor expanded in z around inf
Applied rewrites93.4%
if -0.050000000000000003 < z < 11Initial program 99.7%
Taylor expanded in z around 0
Applied rewrites79.8%
Taylor expanded in z around 0
Applied rewrites79.6%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6498.5
Applied rewrites98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(*
(fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
(/
y
(fma
(fma (fma (- z -15.234687407) z 31.4690115749) z 11.9400905721)
z
0.607771387771))))
(t_2
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_2 -1e+215)
t_1
(if (<= t_2 2e+227)
(+
x
(/ (* y (fma (fma t z a) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
(if (<= t_2 INFINITY) t_1 (- x (* -3.13060547623 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) * (y / fma(fma(fma((z - -15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771));
double t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -1e+215) {
tmp = t_1;
} else if (t_2 <= 2e+227) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) * Float64(y / fma(fma(fma(Float64(z - -15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771))) t_2 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_2 <= -1e+215) tmp = t_1; elseif (t_2 <= 2e+227) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); elseif (t_2 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] * N[(y / N[(N[(N[(N[(z - -15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+215], t$95$1, If[LessEqual[t$95$2, 2e+227], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$1, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right) \cdot \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z - -15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}\\
t_2 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -9.99999999999999907e214 or 2.0000000000000002e227 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 81.3%
Taylor expanded in x around 0
Applied rewrites88.0%
if -9.99999999999999907e214 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 2.0000000000000002e227Initial program 99.7%
Taylor expanded in z around 0
Applied rewrites80.9%
Taylor expanded in z around 0
Applied rewrites78.7%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6490.6
Applied rewrites90.6%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 81.3%
Applied rewrites81.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6414.2
Applied rewrites14.2%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6414.2
Applied rewrites14.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.55e+47)
(fma 3.13060547623 y x)
(if (<= z 1.6e-7)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
0.607771387771))
(if (<= z 4.6e+55)
(fma
y
(*
z
(/
(fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a)
(fma
(fma (fma (- z -15.234687407) z 31.4690115749) z 11.9400905721)
z
0.607771387771)))
x)
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.55e+47) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 1.6e-7) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771);
} else if (z <= 4.6e+55) {
tmp = fma(y, (z * (fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a) / fma(fma(fma((z - -15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771))), x);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.55e+47) tmp = fma(3.13060547623, y, x); elseif (z <= 1.6e-7) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771)); elseif (z <= 4.6e+55) tmp = fma(y, Float64(z * Float64(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a) / fma(fma(fma(Float64(z - -15.234687407), z, 31.4690115749), z, 11.9400905721), z, 0.607771387771))), x); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.55e+47], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 1.6e-7], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+55], N[(y * N[(z * N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] / N[(N[(N[(N[(z - -15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(y, z \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z - -15.234687407, z, 31.4690115749\right), z, 11.9400905721\right), z, 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.55e47Initial program 5.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6494.3
Applied rewrites94.3%
if -1.55e47 < z < 1.6e-7Initial program 98.4%
Taylor expanded in z around 0
Applied rewrites94.6%
if 1.6e-7 < z < 4.59999999999999975e55Initial program 77.4%
Taylor expanded in b around 0
Applied rewrites84.5%
if 4.59999999999999975e55 < z Initial program 3.6%
Applied rewrites3.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6495.4
Applied rewrites95.4%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6495.4
Applied rewrites95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(/
(*
y
(+
(*
(+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a)
z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)))))
(if (<= t_1 (- INFINITY))
(*
(fma (fma (fma (fma 3.13060547623 z 11.1667541262) z t) z a) z b)
(/ y (* (* (* z z) z) z)))
(if (<= t_1 INFINITY)
(+
x
(/ (* y (fma (fma t z a) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) * (y / (((z * z) * z) * z));
} else if (t_1 <= ((double) INFINITY)) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(fma(fma(fma(3.13060547623, z, 11.1667541262), z, t), z, a), z, b) * Float64(y / Float64(Float64(Float64(z * z) * z) * z))); elseif (t_1 <= Inf) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(N[(3.13060547623 * z + 11.1667541262), $MachinePrecision] * z + t), $MachinePrecision] * z + a), $MachinePrecision] * z + b), $MachinePrecision] * N[(y / N[(N[(N[(z * z), $MachinePrecision] * z), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(3.13060547623, z, 11.1667541262\right), z, t\right), z, a\right), z, b\right) \cdot \frac{y}{\left(\left(z \cdot z\right) \cdot z\right) \cdot z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) < -inf.0Initial program 72.4%
Taylor expanded in x around 0
Applied rewrites84.6%
Taylor expanded in z around inf
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-+l+N/A
metadata-evalN/A
pow-plusN/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6484.1
Applied rewrites84.1%
if -inf.0 < (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) < +inf.0Initial program 96.5%
Taylor expanded in z around 0
Applied rewrites76.0%
Taylor expanded in z around 0
Applied rewrites74.0%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6488.3
Applied rewrites88.3%
if +inf.0 < (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64)))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.55e+47)
(fma 3.13060547623 y x)
(if (<= z 31000.0)
(+
x
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
0.607771387771))
(fma (/ y z) -36.52704169880642 (fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.55e+47) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 31000.0) {
tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771);
} else {
tmp = fma((y / z), -36.52704169880642, fma(3.13060547623, y, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.55e+47) tmp = fma(3.13060547623, y, x); elseif (z <= 31000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / 0.607771387771)); else tmp = fma(Float64(y / z), -36.52704169880642, fma(3.13060547623, y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.55e+47], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 31000.0], N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * -36.52704169880642 + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 31000:\\
\;\;\;\;x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(3.13060547623, y, x\right)\right)\\
\end{array}
\end{array}
if z < -1.55e47Initial program 5.3%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6494.3
Applied rewrites94.3%
if -1.55e47 < z < 31000Initial program 98.5%
Taylor expanded in z around 0
Applied rewrites94.2%
if 31000 < z Initial program 14.1%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites88.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.05)
(fma 3.13060547623 y x)
(if (<= z 31000.0)
(+
x
(/ (* y (fma (fma t z a) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
(fma (/ y z) -36.52704169880642 (fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.05) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 31000.0) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else {
tmp = fma((y / z), -36.52704169880642, fma(3.13060547623, y, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.05) tmp = fma(3.13060547623, y, x); elseif (z <= 31000.0) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); else tmp = fma(Float64(y / z), -36.52704169880642, fma(3.13060547623, y, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.05], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 31000.0], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * -36.52704169880642 + N[(3.13060547623 * y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 31000:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(3.13060547623, y, x\right)\right)\\
\end{array}
\end{array}
if z < -0.050000000000000003Initial program 17.1%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6486.5
Applied rewrites86.5%
if -0.050000000000000003 < z < 31000Initial program 99.7%
Taylor expanded in z around 0
Applied rewrites79.6%
Taylor expanded in z around 0
Applied rewrites79.4%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6498.3
Applied rewrites98.3%
if 31000 < z Initial program 14.1%
Taylor expanded in z around inf
associate--l+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -1e+91)
(* (fma (fma t z a) z b) (* 1.6453555072203998 y))
(if (<= t_1 -1e-187)
(fma
(* y (fma 1.6453555072203998 a (* -32.324150453290734 b)))
z
(fma (* b y) 1.6453555072203998 x))
(if (<= t_1 INFINITY)
(+
x
(/ (* y (fma (* t z) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
(- x (* -3.13060547623 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -1e+91) {
tmp = fma(fma(t, z, a), z, b) * (1.6453555072203998 * y);
} else if (t_1 <= -1e-187) {
tmp = fma((y * fma(1.6453555072203998, a, (-32.324150453290734 * b))), z, fma((b * y), 1.6453555072203998, x));
} else if (t_1 <= ((double) INFINITY)) {
tmp = x + ((y * fma((t * z), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -1e+91) tmp = Float64(fma(fma(t, z, a), z, b) * Float64(1.6453555072203998 * y)); elseif (t_1 <= -1e-187) tmp = fma(Float64(y * fma(1.6453555072203998, a, Float64(-32.324150453290734 * b))), z, fma(Float64(b * y), 1.6453555072203998, x)); elseif (t_1 <= Inf) tmp = Float64(x + Float64(Float64(y * fma(Float64(t * z), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+91], N[(N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision] * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-187], N[(N[(y * N[(1.6453555072203998 * a + N[(-32.324150453290734 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(N[(y * N[(N[(t * z), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right) \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(1.6453555072203998, a, -32.324150453290734 \cdot b\right), z, \mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(t \cdot z, z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -1.00000000000000008e91Initial program 87.5%
Taylor expanded in x around 0
Applied rewrites82.4%
Taylor expanded in z around 0
lower-*.f6472.8
Applied rewrites72.8%
Taylor expanded in z around 0
Applied rewrites72.4%
if -1.00000000000000008e91 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -1e-187Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites83.6%
if -1e-187 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 94.6%
Taylor expanded in z around 0
Applied rewrites76.7%
Taylor expanded in z around 0
Applied rewrites75.1%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6487.5
Applied rewrites87.5%
Taylor expanded in z around inf
lower-*.f6478.8
Applied rewrites78.8%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -4e+177)
(* (fma (fma t z a) z b) (* 1.6453555072203998 y))
(if (<= t_1 INFINITY)
(+ x (/ (* y (fma (* t z) z b)) (+ (* 11.9400905721 z) 0.607771387771)))
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -4e+177) {
tmp = fma(fma(t, z, a), z, b) * (1.6453555072203998 * y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = x + ((y * fma((t * z), z, b)) / ((11.9400905721 * z) + 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -4e+177) tmp = Float64(fma(fma(t, z, a), z, b) * Float64(1.6453555072203998 * y)); elseif (t_1 <= Inf) tmp = Float64(x + Float64(Float64(y * fma(Float64(t * z), z, b)) / Float64(Float64(11.9400905721 * z) + 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+177], N[(N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision] * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(N[(y * N[(N[(t * z), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(11.9400905721 * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+177}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right) \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(t \cdot z, z, b\right)}{11.9400905721 \cdot z + 0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -4e177Initial program 83.6%
Taylor expanded in x around 0
Applied rewrites85.8%
Taylor expanded in z around 0
lower-*.f6475.5
Applied rewrites75.5%
Taylor expanded in z around 0
Applied rewrites75.4%
if -4e177 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 96.2%
Taylor expanded in z around 0
Applied rewrites77.3%
Taylor expanded in z around 0
Applied rewrites75.3%
Taylor expanded in z around 0
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6487.9
Applied rewrites87.9%
Taylor expanded in z around inf
lower-*.f6478.9
Applied rewrites78.9%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -5e+89)
(* (fma (fma t z a) z b) (* 1.6453555072203998 y))
(if (<= t_1 INFINITY)
(+ x (/ (* y b) (fma 11.9400905721 z 0.607771387771)))
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -5e+89) {
tmp = fma(fma(t, z, a), z, b) * (1.6453555072203998 * y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = x + ((y * b) / fma(11.9400905721, z, 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -5e+89) tmp = Float64(fma(fma(t, z, a), z, b) * Float64(1.6453555072203998 * y)); elseif (t_1 <= Inf) tmp = Float64(x + Float64(Float64(y * b) / fma(11.9400905721, z, 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+89], N[(N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision] * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(N[(y * b), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+89}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right) \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;x + \frac{y \cdot b}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -4.99999999999999983e89Initial program 87.5%
Taylor expanded in x around 0
Applied rewrites82.1%
Taylor expanded in z around 0
lower-*.f6472.4
Applied rewrites72.4%
Taylor expanded in z around 0
Applied rewrites72.0%
if -4.99999999999999983e89 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 95.9%
Taylor expanded in z around 0
Applied rewrites77.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6475.6
Applied rewrites75.6%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -4e+177)
(* (fma a z b) (* 1.6453555072203998 y))
(if (<= t_1 INFINITY)
(+ x (/ (* y b) (fma 11.9400905721 z 0.607771387771)))
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -4e+177) {
tmp = fma(a, z, b) * (1.6453555072203998 * y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = x + ((y * b) / fma(11.9400905721, z, 0.607771387771));
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -4e+177) tmp = Float64(fma(a, z, b) * Float64(1.6453555072203998 * y)); elseif (t_1 <= Inf) tmp = Float64(x + Float64(Float64(y * b) / fma(11.9400905721, z, 0.607771387771))); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+177], N[(N[(a * z + b), $MachinePrecision] * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(x + N[(N[(y * b), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+177}:\\
\;\;\;\;\mathsf{fma}\left(a, z, b\right) \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;x + \frac{y \cdot b}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -4e177Initial program 83.6%
Taylor expanded in x around 0
Applied rewrites85.8%
Taylor expanded in z around 0
lower-*.f6475.5
Applied rewrites75.5%
Taylor expanded in z around 0
Applied rewrites66.2%
if -4e177 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 96.2%
Taylor expanded in z around 0
Applied rewrites77.3%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6475.3
Applied rewrites75.3%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_1 -1e+215)
(* (fma a z b) (* 1.6453555072203998 y))
(if (<= t_1 INFINITY)
(fma (* b y) 1.6453555072203998 x)
(- x (* -3.13060547623 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_1 <= -1e+215) {
tmp = fma(a, z, b) * (1.6453555072203998 * y);
} else if (t_1 <= ((double) INFINITY)) {
tmp = fma((b * y), 1.6453555072203998, x);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_1 <= -1e+215) tmp = Float64(fma(a, z, b) * Float64(1.6453555072203998 * y)); elseif (t_1 <= Inf) tmp = fma(Float64(b * y), 1.6453555072203998, x); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+215], N[(N[(a * z + b), $MachinePrecision] * N[(1.6453555072203998 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+215}:\\
\;\;\;\;\mathsf{fma}\left(a, z, b\right) \cdot \left(1.6453555072203998 \cdot y\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -9.99999999999999907e214Initial program 81.2%
Taylor expanded in x around 0
Applied rewrites86.6%
Taylor expanded in z around 0
lower-*.f6476.3
Applied rewrites76.3%
Taylor expanded in z around 0
Applied rewrites66.4%
if -9.99999999999999907e214 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 96.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6474.7
Applied rewrites74.7%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Applied rewrites0.0%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6497.0
Applied rewrites97.0%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6497.0
Applied rewrites97.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -480.0)
(fma 3.13060547623 y x)
(if (<= z 28000.0)
(fma (* b y) 1.6453555072203998 x)
(- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -480.0) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 28000.0) {
tmp = fma((b * y), 1.6453555072203998, x);
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -480.0) tmp = fma(3.13060547623, y, x); elseif (z <= 28000.0) tmp = fma(Float64(b * y), 1.6453555072203998, x); else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -480.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 28000.0], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -480:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 28000:\\
\;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -480Initial program 16.2%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6487.2
Applied rewrites87.2%
if -480 < z < 28000Initial program 99.7%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6479.1
Applied rewrites79.1%
if 28000 < z Initial program 14.1%
Applied rewrites14.1%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6488.6
Applied rewrites88.6%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6488.6
Applied rewrites88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* b y)))
(t_2
(/
(*
y
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771))))
(if (<= t_2 -8.5e+33)
t_1
(if (<= t_2 5e+122)
x
(if (<= t_2 INFINITY) t_1 (- x (* -3.13060547623 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (b * y);
double t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -8.5e+33) {
tmp = t_1;
} else if (t_2 <= 5e+122) {
tmp = x;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (b * y);
double t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771);
double tmp;
if (t_2 <= -8.5e+33) {
tmp = t_1;
} else if (t_2 <= 5e+122) {
tmp = x;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.6453555072203998 * (b * y) t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) tmp = 0 if t_2 <= -8.5e+33: tmp = t_1 elif t_2 <= 5e+122: tmp = x elif t_2 <= math.inf: tmp = t_1 else: tmp = x - (-3.13060547623 * y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(b * y)) t_2 = Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)) tmp = 0.0 if (t_2 <= -8.5e+33) tmp = t_1; elseif (t_2 <= 5e+122) tmp = x; elseif (t_2 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.6453555072203998 * (b * y); t_2 = (y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771); tmp = 0.0; if (t_2 <= -8.5e+33) tmp = t_1; elseif (t_2 <= 5e+122) tmp = x; elseif (t_2 <= Inf) tmp = t_1; else tmp = x - (-3.13060547623 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(b * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -8.5e+33], t$95$1, If[LessEqual[t$95$2, 5e+122], x, If[LessEqual[t$95$2, Infinity], t$95$1, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(b \cdot y\right)\\
t_2 := \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}\\
\mathbf{if}\;t\_2 \leq -8.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+122}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < -8.4999999999999998e33 or 4.99999999999999989e122 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 88.1%
Taylor expanded in x around 0
Applied rewrites81.7%
Taylor expanded in z around 0
Applied rewrites47.7%
if -8.4999999999999998e33 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < 4.99999999999999989e122Initial program 99.7%
Taylor expanded in x around inf
Applied rewrites66.2%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 88.1%
Applied rewrites88.1%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6419.8
Applied rewrites19.8%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6419.8
Applied rewrites19.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.85e-23) (fma 3.13060547623 y x) (if (<= z 1.8e-66) x (- x (* -3.13060547623 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.85e-23) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 1.8e-66) {
tmp = x;
} else {
tmp = x - (-3.13060547623 * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.85e-23) tmp = fma(3.13060547623, y, x); elseif (z <= 1.8e-66) tmp = x; else tmp = Float64(x - Float64(-3.13060547623 * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.85e-23], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 1.8e-66], x, N[(x - N[(-3.13060547623 * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - -3.13060547623 \cdot y\\
\end{array}
\end{array}
if z < -1.8500000000000001e-23Initial program 23.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6481.9
Applied rewrites81.9%
if -1.8500000000000001e-23 < z < 1.80000000000000006e-66Initial program 99.7%
Taylor expanded in x around inf
Applied rewrites43.3%
if 1.80000000000000006e-66 < z Initial program 29.1%
Applied rewrites29.1%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6478.1
Applied rewrites78.1%
lift-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-*.f6478.1
Applied rewrites78.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.85e-23) (fma 3.13060547623 y x) (if (<= z 1.8e-66) x (fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.85e-23) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 1.8e-66) {
tmp = x;
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.85e-23) tmp = fma(3.13060547623, y, x); elseif (z <= 1.8e-66) tmp = x; else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.85e-23], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 1.8e-66], x, N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -1.8500000000000001e-23 or 1.80000000000000006e-66 < z Initial program 26.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6479.9
Applied rewrites79.9%
if -1.8500000000000001e-23 < z < 1.80000000000000006e-66Initial program 99.7%
Taylor expanded in x around inf
Applied rewrites43.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.25e+130) (* 3.13060547623 y) (if (<= y 45.0) x (* 3.13060547623 y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.25e+130) {
tmp = 3.13060547623 * y;
} else if (y <= 45.0) {
tmp = x;
} else {
tmp = 3.13060547623 * 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) :: tmp
if (y <= (-4.25d+130)) then
tmp = 3.13060547623d0 * y
else if (y <= 45.0d0) then
tmp = x
else
tmp = 3.13060547623d0 * y
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 <= -4.25e+130) {
tmp = 3.13060547623 * y;
} else if (y <= 45.0) {
tmp = x;
} else {
tmp = 3.13060547623 * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.25e+130: tmp = 3.13060547623 * y elif y <= 45.0: tmp = x else: tmp = 3.13060547623 * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.25e+130) tmp = Float64(3.13060547623 * y); elseif (y <= 45.0) tmp = x; else tmp = Float64(3.13060547623 * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.25e+130) tmp = 3.13060547623 * y; elseif (y <= 45.0) tmp = x; else tmp = 3.13060547623 * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.25e+130], N[(3.13060547623 * y), $MachinePrecision], If[LessEqual[y, 45.0], x, N[(3.13060547623 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.25 \cdot 10^{+130}:\\
\;\;\;\;3.13060547623 \cdot y\\
\mathbf{elif}\;y \leq 45:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;3.13060547623 \cdot y\\
\end{array}
\end{array}
if y < -4.24999999999999982e130 or 45 < y Initial program 55.7%
Taylor expanded in x around 0
Applied rewrites50.0%
Taylor expanded in z around inf
Applied rewrites34.0%
if -4.24999999999999982e130 < y < 45Initial program 59.0%
Taylor expanded in x around inf
Applied rewrites60.4%
(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 57.7%
Taylor expanded in x around inf
Applied rewrites43.9%
herbie shell --seed 2025130
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))