IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 4:49:24 PM (12 months ago)
Author:
eugene
Message:

allow larger dynamic range for F64 matrix inversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMatrix.c

    r26892 r42827  
    459459// (based on version by William Kahan -- see Ohana/src/libohana/doc/kahan-gji.pdf)
    460460
    461 # define MAX_RANGE 1.0e7
     461# define MAX_RANGE_F64 1.0e16
     462# define MAX_RANGE_F32 1.0e8
    462463// MAX_RANGE is used to test for ill-conditioned input matrices.  For an ill-conditioned
    463464// matrix, one or more of the pivots trends towards zero, and growth goes to infinity.  Rather
     
    474475    PS_ASSERT_INT_EQUAL(a->numCols, a->numRows, false);
    475476    PS_ASSERT_VECTOR_SIZE(b, (long int)a->numCols, false);
     477
     478    psF32 MAX_RANGE = MAX_RANGE_F32;
    476479
    477480    // Check for non-finite entries in matrix
     
    499502              }
    500503          }
    501           break;
     504          MAX_RANGE = MAX_RANGE_F64;
     505          break;
    502506      }
    503507      default:
Note: See TracChangeset for help on using the changeset viewer.