
(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 17 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
(+
3.13060547623
(*
-1.0
(/
(+
36.52704169880642
(*
-1.0
(/
(+
457.9610022158428
(+
t
(*
-1.0
(/
(-
(* -1.0 a)
(+
1112.0901850848957
(* -15.234687407 (+ 457.9610022158428 t))))
z))))
z)))
z)))
x)))
(if (<= z -9.8e+14)
t_1
(if (<= z 4400000000.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, (3.13060547623 + (-1.0 * ((36.52704169880642 + (-1.0 * ((457.9610022158428 + (t + (-1.0 * (((-1.0 * a) - (1112.0901850848957 + (-15.234687407 * (457.9610022158428 + t)))) / z)))) / z))) / z))), x);
double tmp;
if (z <= -9.8e+14) {
tmp = t_1;
} else if (z <= 4400000000.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 = fma(y, Float64(3.13060547623 + Float64(-1.0 * Float64(Float64(36.52704169880642 + Float64(-1.0 * Float64(Float64(457.9610022158428 + Float64(t + Float64(-1.0 * Float64(Float64(Float64(-1.0 * a) - Float64(1112.0901850848957 + Float64(-15.234687407 * Float64(457.9610022158428 + t)))) / z)))) / z))) / z))), x) tmp = 0.0 if (z <= -9.8e+14) tmp = t_1; elseif (z <= 4400000000.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[(y * N[(3.13060547623 + N[(-1.0 * N[(N[(36.52704169880642 + N[(-1.0 * N[(N[(457.9610022158428 + N[(t + N[(-1.0 * N[(N[(N[(-1.0 * a), $MachinePrecision] - N[(1112.0901850848957 + N[(-15.234687407 * N[(457.9610022158428 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -9.8e+14], t$95$1, If[LessEqual[z, 4400000000.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(y, 3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + \left(t + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{z}\right)}{z}}{z}, x\right)\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4400000000:\\
\;\;\;\;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.8e14 or 4.4e9 < z Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around -inf
Applied rewrites56.1%
if -9.8e14 < z < 4.4e9Initial program 58.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(fma
y
(+
3.13060547623
(*
-1.0
(/
(+
36.52704169880642
(*
-1.0
(/
(+
457.9610022158428
(+
t
(*
-1.0
(/
(-
(* -1.0 a)
(+
1112.0901850848957
(* -15.234687407 (+ 457.9610022158428 t))))
z))))
z)))
z)))
x)))
(if (<= z -880.0)
t_1
(if (<= z 4400000000.0)
(+
x
(/
(* y (fma (fma t z a) z b))
(fma
(fma (fma (+ 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, (3.13060547623 + (-1.0 * ((36.52704169880642 + (-1.0 * ((457.9610022158428 + (t + (-1.0 * (((-1.0 * a) - (1112.0901850848957 + (-15.234687407 * (457.9610022158428 + t)))) / z)))) / z))) / z))), x);
double tmp;
if (z <= -880.0) {
tmp = t_1;
} else if (z <= 4400000000.0) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / fma(fma(fma((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 = fma(y, Float64(3.13060547623 + Float64(-1.0 * Float64(Float64(36.52704169880642 + Float64(-1.0 * Float64(Float64(457.9610022158428 + Float64(t + Float64(-1.0 * Float64(Float64(Float64(-1.0 * a) - Float64(1112.0901850848957 + Float64(-15.234687407 * Float64(457.9610022158428 + t)))) / z)))) / z))) / z))), x) tmp = 0.0 if (z <= -880.0) tmp = t_1; elseif (z <= 4400000000.0) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / fma(fma(fma(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[(y * N[(3.13060547623 + N[(-1.0 * N[(N[(36.52704169880642 + N[(-1.0 * N[(N[(457.9610022158428 + N[(t + N[(-1.0 * N[(N[(N[(-1.0 * a), $MachinePrecision] - N[(1112.0901850848957 + N[(-15.234687407 * N[(457.9610022158428 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -880.0], t$95$1, If[LessEqual[z, 4400000000.0], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, 3.13060547623 + -1 \cdot \frac{36.52704169880642 + -1 \cdot \frac{457.9610022158428 + \left(t + -1 \cdot \frac{-1 \cdot a - \left(1112.0901850848957 + -15.234687407 \cdot \left(457.9610022158428 + t\right)\right)}{z}\right)}{z}}{z}, x\right)\\
\mathbf{if}\;z \leq -880:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4400000000:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\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)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -880 or 4.4e9 < z Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around -inf
Applied rewrites56.1%
if -880 < z < 4.4e9Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6461.4
Applied rewrites61.4%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lift-+.f6461.4
Applied rewrites61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(fma
y
(-
(+ 3.13060547623 (/ (+ 457.9610022158428 t) (* z z)))
(* 36.52704169880642 (/ 1.0 z)))
x)))
(if (<= z -880.0)
t_1
(if (<= z 9e+41)
(+
x
(/
(* y (fma (fma t z a) z b))
(fma
(fma (fma (+ 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, ((3.13060547623 + ((457.9610022158428 + t) / (z * z))) - (36.52704169880642 * (1.0 / z))), x);
double tmp;
if (z <= -880.0) {
tmp = t_1;
} else if (z <= 9e+41) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / fma(fma(fma((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 = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 + t) / Float64(z * z))) - Float64(36.52704169880642 * Float64(1.0 / z))), x) tmp = 0.0 if (z <= -880.0) tmp = t_1; elseif (z <= 9e+41) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / fma(fma(fma(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[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 + t), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -880.0], t$95$1, If[LessEqual[z, 9e+41], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z + 31.4690115749), $MachinePrecision] * z + 11.9400905721), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \left(3.13060547623 + \frac{457.9610022158428 + t}{z \cdot z}\right) - 36.52704169880642 \cdot \frac{1}{z}, x\right)\\
\mathbf{if}\;z \leq -880:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\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)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -880 or 9.0000000000000002e41 < z Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around inf
lower--.f64N/A
lower-+.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lower-/.f6455.5
Applied rewrites55.5%
if -880 < z < 9.0000000000000002e41Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6461.4
Applied rewrites61.4%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-fma.f64N/A
lift-+.f6461.4
Applied rewrites61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(fma
y
(-
(+ 3.13060547623 (/ (+ 457.9610022158428 t) (* z z)))
(* 36.52704169880642 (/ 1.0 z)))
x)))
(if (<= z -180.0)
t_1
(if (<= z 1.05e+40)
(+
x
(/
(* y (fma (fma t z a) z b))
(- 0.607771387771 (* -11.9400905721 z))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(y, ((3.13060547623 + ((457.9610022158428 + t) / (z * z))) - (36.52704169880642 * (1.0 / z))), x);
double tmp;
if (z <= -180.0) {
tmp = t_1;
} else if (z <= 1.05e+40) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / (0.607771387771 - (-11.9400905721 * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(y, Float64(Float64(3.13060547623 + Float64(Float64(457.9610022158428 + t) / Float64(z * z))) - Float64(36.52704169880642 * Float64(1.0 / z))), x) tmp = 0.0 if (z <= -180.0) tmp = t_1; elseif (z <= 1.05e+40) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(0.607771387771 - Float64(-11.9400905721 * z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[(3.13060547623 + N[(N[(457.9610022158428 + t), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -180.0], t$95$1, If[LessEqual[z, 1.05e+40], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 - N[(-11.9400905721 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \left(3.13060547623 + \frac{457.9610022158428 + t}{z \cdot z}\right) - 36.52704169880642 \cdot \frac{1}{z}, x\right)\\
\mathbf{if}\;z \leq -180:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{0.607771387771 - -11.9400905721 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -180 or 1.05000000000000005e40 < z Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around inf
lower--.f64N/A
lower-+.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lower-/.f6455.5
Applied rewrites55.5%
if -180 < z < 1.05000000000000005e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6461.4
Applied rewrites61.4%
Taylor expanded in z around 0
fp-cancel-sign-sub-invN/A
lower--.f64N/A
metadata-evalN/A
lower-*.f6458.2
Applied rewrites58.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -180.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.05e+40)
(+
x
(/ (* y (fma (fma t z a) z b)) (- 0.607771387771 (* -11.9400905721 z))))
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -180.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.05e+40) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / (0.607771387771 - (-11.9400905721 * z)));
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -180.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.05e+40) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / Float64(0.607771387771 - Float64(-11.9400905721 * z)))); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -180.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+40], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 - N[(-11.9400905721 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -180:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{0.607771387771 - -11.9400905721 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -180Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -180 < z < 1.05000000000000005e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6461.4
Applied rewrites61.4%
Taylor expanded in z around 0
fp-cancel-sign-sub-invN/A
lower--.f64N/A
metadata-evalN/A
lower-*.f6458.2
Applied rewrites58.2%
if 1.05000000000000005e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -880.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.05e+40)
(+ x (/ (* y (fma (fma t z a) z b)) 0.607771387771))
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -880.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.05e+40) {
tmp = x + ((y * fma(fma(t, z, a), z, b)) / 0.607771387771);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -880.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.05e+40) tmp = Float64(x + Float64(Float64(y * fma(fma(t, z, a), z, b)) / 0.607771387771)); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -880.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+40], N[(x + N[(N[(y * N[(N[(t * z + a), $MachinePrecision] * z + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -880:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, z, a\right), z, b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -880Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -880 < z < 1.05000000000000005e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6461.4
Applied rewrites61.4%
Taylor expanded in z around 0
Applied rewrites57.4%
if 1.05000000000000005e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(+
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)))
INFINITY)
(fma y (/ (fma a z b) (fma (* (* z z) z) z 0.607771387771)) x)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((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) INFINITY)) {
tmp = fma(y, (fma(a, z, b) / fma(((z * z) * z), z, 0.607771387771)), x);
} else {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (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))) <= Inf) tmp = fma(y, Float64(fma(a, z, b) / fma(Float64(Float64(z * z) * z), z, 0.607771387771)), x); else tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(y * N[(N[(a * z + b), $MachinePrecision] / N[(N[(N[(z * z), $MachinePrecision] * z), $MachinePrecision] * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;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} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(a, z, b\right)}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot z, z, 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \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 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.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)))) Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -600.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.1e+40)
(+ x (/ (* y (fma a z b)) (fma 11.9400905721 z 0.607771387771)))
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -600.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.1e+40) {
tmp = x + ((y * fma(a, z, b)) / fma(11.9400905721, z, 0.607771387771));
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -600.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.1e+40) tmp = Float64(x + Float64(Float64(y * fma(a, z, b)) / fma(11.9400905721, z, 0.607771387771))); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -600.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+40], N[(x + N[(N[(y * N[(a * z + b), $MachinePrecision]), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -600:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(a, z, b\right)}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -600Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -600 < z < 1.0999999999999999e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6463.0
Applied rewrites63.0%
if 1.0999999999999999e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -600.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.1e+40)
(fma y (/ (fma a z b) (fma 11.9400905721 z 0.607771387771)) x)
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -600.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.1e+40) {
tmp = fma(y, (fma(a, z, b) / fma(11.9400905721, z, 0.607771387771)), x);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -600.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.1e+40) tmp = fma(y, Float64(fma(a, z, b) / fma(11.9400905721, z, 0.607771387771)), x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -600.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+40], N[(y * N[(N[(a * z + b), $MachinePrecision] / N[(11.9400905721 * z + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -600:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(a, z, b\right)}{\mathsf{fma}\left(11.9400905721, z, 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -600Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -600 < z < 1.0999999999999999e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around 0
Applied rewrites63.5%
if 1.0999999999999999e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -880.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.1e+40)
(+ x (/ (* y (fma a z b)) 0.607771387771))
(fma 3.13060547623 y x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -880.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.1e+40) {
tmp = x + ((y * fma(a, z, b)) / 0.607771387771);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -880.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.1e+40) tmp = Float64(x + Float64(Float64(y * fma(a, z, b)) / 0.607771387771)); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -880.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+40], N[(x + N[(N[(y * N[(a * z + b), $MachinePrecision]), $MachinePrecision] / 0.607771387771), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -880:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y \cdot \mathsf{fma}\left(a, z, b\right)}{0.607771387771}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -880Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -880 < z < 1.0999999999999999e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around 0
Applied rewrites59.8%
if 1.0999999999999999e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -850.0)
(+ x (* (- 3.13060547623 (/ 36.52704169880642 z)) y))
(if (<= z 1.05e-166)
(fma y (* 1.6453555072203998 b) x)
(if (<= z 1.1e+40)
(+ x (* 1.6453555072203998 (* a (* y z))))
(fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -850.0) {
tmp = x + ((3.13060547623 - (36.52704169880642 / z)) * y);
} else if (z <= 1.05e-166) {
tmp = fma(y, (1.6453555072203998 * b), x);
} else if (z <= 1.1e+40) {
tmp = x + (1.6453555072203998 * (a * (y * z)));
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -850.0) tmp = Float64(x + Float64(Float64(3.13060547623 - Float64(36.52704169880642 / z)) * y)); elseif (z <= 1.05e-166) tmp = fma(y, Float64(1.6453555072203998 * b), x); elseif (z <= 1.1e+40) tmp = Float64(x + Float64(1.6453555072203998 * Float64(a * Float64(y * z)))); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -850.0], N[(x + N[(N[(3.13060547623 - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-166], N[(y * N[(1.6453555072203998 * b), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.1e+40], N[(x + N[(1.6453555072203998 * N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -850:\\
\;\;\;\;x + \left(3.13060547623 - \frac{36.52704169880642}{z}\right) \cdot y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-166}:\\
\;\;\;\;\mathsf{fma}\left(y, 1.6453555072203998 \cdot b, x\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -850Initial program 58.6%
Taylor expanded in z around -inf
+-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
metadata-eval58.3
Applied rewrites58.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6458.4
Applied rewrites58.4%
if -850 < z < 1.05e-166Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around 0
lower-*.f6460.2
Applied rewrites60.2%
if 1.05e-166 < z < 1.0999999999999999e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites52.2%
Taylor expanded in b around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.6
Applied rewrites42.6%
if 1.0999999999999999e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -850.0)
(fma 3.13060547623 y x)
(if (<= z 1.05e-166)
(fma y (* 1.6453555072203998 b) x)
(if (<= z 1.1e+40)
(+ x (* 1.6453555072203998 (* a (* y z))))
(fma 3.13060547623 y x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -850.0) {
tmp = fma(3.13060547623, y, x);
} else if (z <= 1.05e-166) {
tmp = fma(y, (1.6453555072203998 * b), x);
} else if (z <= 1.1e+40) {
tmp = x + (1.6453555072203998 * (a * (y * z)));
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -850.0) tmp = fma(3.13060547623, y, x); elseif (z <= 1.05e-166) tmp = fma(y, Float64(1.6453555072203998 * b), x); elseif (z <= 1.1e+40) tmp = Float64(x + Float64(1.6453555072203998 * Float64(a * Float64(y * z)))); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -850.0], N[(3.13060547623 * y + x), $MachinePrecision], If[LessEqual[z, 1.05e-166], N[(y * N[(1.6453555072203998 * b), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.1e+40], N[(x + N[(1.6453555072203998 * N[(a * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -850:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-166}:\\
\;\;\;\;\mathsf{fma}\left(y, 1.6453555072203998 \cdot b, x\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(a \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\end{array}
\end{array}
if z < -850 or 1.0999999999999999e40 < z Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
if -850 < z < 1.05e-166Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around 0
lower-*.f6460.2
Applied rewrites60.2%
if 1.05e-166 < z < 1.0999999999999999e40Initial program 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites52.2%
Taylor expanded in b around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.6
Applied rewrites42.6%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(+
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)))
INFINITY)
(fma y (* 1.6453555072203998 b) x)
(fma 3.13060547623 y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((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) INFINITY)) {
tmp = fma(y, (1.6453555072203998 * b), x);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (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))) <= Inf) tmp = fma(y, Float64(1.6453555072203998 * b), x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(y * N[(1.6453555072203998 * b), $MachinePrecision] + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;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} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y, 1.6453555072203998 \cdot b, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\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 58.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6465.4
Applied rewrites65.4%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites66.1%
Taylor expanded in z around 0
lower-*.f6460.2
Applied rewrites60.2%
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 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(+
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)))
INFINITY)
(fma (* b y) 1.6453555072203998 x)
(fma 3.13060547623 y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((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) INFINITY)) {
tmp = fma((b * y), 1.6453555072203998, x);
} else {
tmp = fma(3.13060547623, y, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (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))) <= Inf) tmp = fma(Float64(b * y), 1.6453555072203998, x); else tmp = fma(3.13060547623, y, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(N[(b * y), $MachinePrecision] * 1.6453555072203998 + x), $MachinePrecision], N[(3.13060547623 * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;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} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(b \cdot y, 1.6453555072203998, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(3.13060547623, y, x\right)\\
\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 58.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
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 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b) :precision binary64 (fma 3.13060547623 y x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(3.13060547623, y, x);
}
function code(x, y, z, t, a, b) return fma(3.13060547623, y, x) end
code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(3.13060547623, y, x\right)
\end{array}
Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.75e-73) (* 1.0 x) (if (<= x 2.2e-225) (* 3.13060547623 y) (* 1.0 x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.75e-73) {
tmp = 1.0 * x;
} else if (x <= 2.2e-225) {
tmp = 3.13060547623 * y;
} else {
tmp = 1.0 * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2.75d-73)) then
tmp = 1.0d0 * x
else if (x <= 2.2d-225) then
tmp = 3.13060547623d0 * y
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.75e-73) {
tmp = 1.0 * x;
} else if (x <= 2.2e-225) {
tmp = 3.13060547623 * y;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.75e-73: tmp = 1.0 * x elif x <= 2.2e-225: tmp = 3.13060547623 * y else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.75e-73) tmp = Float64(1.0 * x); elseif (x <= 2.2e-225) tmp = Float64(3.13060547623 * y); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.75e-73) tmp = 1.0 * x; elseif (x <= 2.2e-225) tmp = 3.13060547623 * y; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.75e-73], N[(1.0 * x), $MachinePrecision], If[LessEqual[x, 2.2e-225], N[(3.13060547623 * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{-73}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-225}:\\
\;\;\;\;3.13060547623 \cdot y\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if x < -2.75000000000000003e-73 or 2.2e-225 < x Initial program 58.6%
Taylor expanded in x around inf
Applied rewrites51.4%
Taylor expanded in x around inf
Applied rewrites44.9%
if -2.75000000000000003e-73 < x < 2.2e-225Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
Taylor expanded in x around 0
lower-*.f6422.4
Applied rewrites22.4%
(FPCore (x y z t a b) :precision binary64 (* 3.13060547623 y))
double code(double x, double y, double z, double t, double a, double b) {
return 3.13060547623 * y;
}
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 = 3.13060547623d0 * y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return 3.13060547623 * y;
}
def code(x, y, z, t, a, b): return 3.13060547623 * y
function code(x, y, z, t, a, b) return Float64(3.13060547623 * y) end
function tmp = code(x, y, z, t, a, b) tmp = 3.13060547623 * y; end
code[x_, y_, z_, t_, a_, b_] := N[(3.13060547623 * y), $MachinePrecision]
\begin{array}{l}
\\
3.13060547623 \cdot y
\end{array}
Initial program 58.6%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6462.5
Applied rewrites62.5%
Taylor expanded in x around 0
lower-*.f6422.4
Applied rewrites22.4%
herbie shell --seed 2025131
(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))))