library/src/utility/BP-NumberUtilities.cc
//
// This routine calculates a basic risk using the following formula.  Do not provide negative values
// to this function.
//
//	Formula:
//			(trust_required * ( exposure_required * illegality_required) * trust_established)
//
// return value:
//			0.00 - 1.00 based on inputs.
//
//  error: -1
//
This routine calculates a basic risk using the following formula.  Do not provide negative values
to this function.





-1
This routine calculates a basic risk using the following formula . Do not provide negative values to this function . - 1
float BP_CalculateBasicRiskOfAction(float trust_required, float exposure_required, float illegality_required, float trust_established)
{
		if
		(
			((trust_required      > 1) || (trust_required      < 0)) ||
			((exposure_required   > 1) || (exposure_required   < 0)) ||
			((illegality_required > 1) || (illegality_required < 0)) ||
			((trust_established   > 1) || (trust_established   < 0))
		)
		{
			return -1;
		}
        float risk = (float) (trust_required * ( exposure_required * illegality_required) * trust_established);
        return risk;
}
float BP_CalculateBasicRiskOfAction ( float trust_required , float exposure_required , float illegality_required , float trust_established ) { if ( ( ( trust_required > 1 ) || ( trust_required < 0 ) ) || ( ( exposure_required > 1 ) || ( exposure_required < 0 ) ) || ( ( illegality_required > 1 ) || ( illegality_required < 0 ) ) || ( ( trust_established > 1 ) || ( trust_established < 0 ) ) ) { return -1 ; } float risk = ( float ) ( trust_required * ( exposure_required * illegality_required ) * trust_established ) ; return risk ; }
This routine calculates a basic risk using the following formula.
This routine calculates a basic risk using the following formula .
// ensure that parameters are correct (between 0.00 and 1.00 // calculate exposure risk // return the calculated risk