Project

General

Profile

lmmin.cpp.c++11_isfinite_namespace_ref.patch

Veselin Kolev, 02/06/2018 02:44 AM

View differences:

src/external/lmfit/lmmin.cpp.vesso 2018-02-06 03:34:47.971085408 +0200
232 232
    if (C->verbosity)
233 233
        fprintf(msgfile, "  fnorm = %18.8g\n", fnorm);
234 234

  
235
    if (!isfinite(fnorm)) {
235
    if (!std::isfinite(fnorm)) {
236 236
        S->outcome = 12; /* nan */
237 237
        goto terminate;
238 238
    } else if (fnorm <= LM_DWARF) {
......
354 354
            } else {
355 355
                xnorm = lm_enorm(n, x);
356 356
            }
357
            if (!isfinite(xnorm)) {
357
            if (!std::isfinite(xnorm)) {
358 358
                S->outcome = 12; /* nan */
359 359
                goto terminate;
360 360
            }
......
381 381

  
382 382
            /* Predict scaled reduction. */
383 383
            pnorm = lm_enorm(n, wa3);
384
            if (!isfinite(pnorm)) {
384
            if (!std::isfinite(pnorm)) {
385 385
                S->outcome = 12; /* nan */
386 386
                goto terminate;
387 387
            }
......
392 392
                    wa3[i] -= fjac[j*m+i] * wa1[Pivot[j]];
393 393
            }
394 394
            temp1 = SQR(lm_enorm(n, wa3) / fnorm);
395
            if (!isfinite(temp1)) {
395
            if (!std::isfinite(temp1)) {
396 396
                S->outcome = 12; /* nan */
397 397
                goto terminate;
398 398
            }
......
411 411
            if (S->userbreak)
412 412
                goto terminate;
413 413
            fnorm1 = lm_enorm(m, wf);
414
            if (!isfinite(fnorm1)) {
414
            if (!std::isfinite(fnorm1)) {
415 415
                S->outcome = 12; /* nan */
416 416
                goto terminate;
417 417
            }
......
472 472
                for (i = 0; i < m; i++)
473 473
                    fvec[i] = wf[i];
474 474
                xnorm = lm_enorm(n, wa2);
475
                if (!isfinite(xnorm)) {
475
                if (!std::isfinite(xnorm)) {
476 476
                    S->outcome = 12; /* nan */
477 477
                    goto terminate;
478 478
                }