Synopsis

PDX_MSGT mth_SolveTwoLinearEqs(double a[2][2], double rhs[2], double tol, double sol[2])

Purpose

Solve two linear equations in two unknowns.

Description

This routine solves a system of two linear equations in two unknowns.

Input

a

The 2x2 coefficient array.

rhs

The right hand side of the system (contents not overwritten unless (rhs) = (sol)).

tol

The zero tolerance check (for singular system).

Output

sol

The solution. May occupy the same memory as rhs.

Return

      MTH_NOERR
      MTH_SINGULAREQS
      .fi