5050/* *********************************************************************/
5151/* wrightomega_ext is the extended routine for evaluating the wright */
5252/* omega function with the option of extracting the last update step, */
53- /* the penultimate residual and the condition number estimate . */
53+ /* and the penultimate residual . */
5454/* */
5555/* Calling: */
5656/* success = wrightomega_ext(z,w,e,r,cond); */
6262/* w -- double complex* */
6363/* Pointer to return value of Wrightomega(z). */
6464/* */
65- /* cond -- double complex* */
66- /* Pointer to the condition number estimate. If NULL the */
67- /* condition number is not calculated. */
68- /* */
6965/* Output: returns 0 on successful exit. */
7066/* *********************************************************************/
7167
@@ -122,8 +118,7 @@ namespace detail {
122118 }
123119 }
124120
125- XSF_HOST_DEVICE inline int
126- wrightomega_ext (std::complex <double > z, std::complex <double > *w, std::complex <double > *cond) {
121+ XSF_HOST_DEVICE inline int wrightomega_ext (std::complex <double > z, std::complex <double > *w) {
127122 double pi = M_PI , s = 1.0 ;
128123 double x, y, ympi, yppi, near;
129124 std::complex <double > e, r, pz, wp1, t, fac;
@@ -211,9 +206,6 @@ namespace detail {
211206 if (*w == 0.0 ) {
212207 set_error (" wrightomega" , SF_ERROR_UNDERFLOW , " underflow in exponential series" );
213208 /* Skip the iterative scheme because it computes log(*w) */
214- if (cond != NULL ) {
215- *cond = z / (1.0 + *w);
216- }
217209 return 0 ;
218210 }
219211 }
@@ -246,9 +238,6 @@ namespace detail {
246238 if (std::abs (z) > 1e50 )
247239 /* Series is accurate and the iterative scheme could overflow */
248240 {
249- if (cond != NULL ) {
250- *cond = z / (1.0 + *w);
251- }
252241 return 0 ;
253242 }
254243 }
@@ -269,9 +258,6 @@ namespace detail {
269258 if (std::abs (z) > 1e50 )
270259 /* Series is accurate and the iterative scheme could overflow */
271260 {
272- if (cond != NULL ) {
273- *cond = z / (1.0 + *w);
274- }
275261 return 0 ;
276262 }
277263 }
@@ -291,9 +277,6 @@ namespace detail {
291277 if (std::abs (z) > 1e50 )
292278 /* Series is accurate and the iterative scheme could overflow */
293279 {
294- if (cond != NULL ) {
295- *cond = z / (1.0 + *w);
296- }
297280 return 0 ;
298281 }
299282 }
@@ -349,26 +332,19 @@ namespace detail {
349332 /* **********************/
350333 *w = s * *w;
351334
352- /* **************************************************/
353- /* Provide condition number estimate if requested */
354- /* **************************************************/
355- if (cond != NULL ) {
356- *cond = z / (1.0 + *w);
357- }
358-
359335 return 0 ;
360336 }
361337} // namespace detail
362338
363339XSF_HOST_DEVICE inline std::complex <double > wrightomega (std::complex <double > z) {
364340 std::complex <double > w;
365- detail::wrightomega_ext (z, &w, NULL );
341+ detail::wrightomega_ext (z, &w);
366342 return w;
367343}
368344
369345XSF_HOST_DEVICE inline std::complex <float > wrightomega (std::complex <float > z) {
370346 std::complex <double > w;
371- detail::wrightomega_ext (static_cast <std::complex <double >>(z), &w, NULL );
347+ detail::wrightomega_ext (static_cast <std::complex <double >>(z), &w);
372348 return static_cast <std::complex <float >>(w);
373349}
374350
0 commit comments