Introduction:
The Lender Expression Engine supports a variety of numeric types and operators, enabling users to perform calculations and comparisons essential for complex loan workflows. This article provides an overview of the numeric operators available in the engine, along with examples to illustrate their usage.
Supported Numeric Types:
The Lender Expression Engine supports multiple numeric types, including:
int: Integer numbers
long: Large integer numbers
double: Double-precision floating-point numbers
float: Single-precision floating-point numbers
decimal: High-precision decimal numbers
Numeric Operators:
1. Addition (+)
Description: Adds two numbers together.
Example:
2 + 3 == 5
2. Subtraction (-)
Description: Subtracts the second number from the first number.
Example:
2 - 2 == 0
3. Multiplication (*)
Description: Multiplies two numbers together.
Example:
2 * 2 == 4
4. Division (/)
Description: Divides the first number by the second number.
Example:
2 / 2 == 1
5. Equals (==)
Description: Checks if two numbers are equal.
Example:
Program.AmortTerm == 1
6. Not Equals (!=)
Description: Checks if two numbers are not equal.
Example:
2 != 1
7. Greater Than (>)
Description: Checks if the first number is greater than the second number.
Example:
2 > 1
8. Less Than (<)
Description: Checks if the first number is less than the second number.
Example:
1 < 1.5
9. Greater Than or Equal (>=)
Description: Checks if the first number is greater than or equal to the second number.
Example:
2 >= 2
10. Less Than or Equal (<=)
Description: Checks if the first number is less than or equal to the second number.
Example:
2 <= 2
Examples of Numeric Operator Usage:
Example 1: Calculating Loan Terms
Copy codeProgram.AmortTerm + 5 == 30
This example checks if the loan amortization term plus 5 years equals 30 years.
Example 2: Comparing Loan Amounts
Copy codeLoan.Amount > 500000
This example checks if the loan amount is greater than $500,000.
Example 3: Checking for Minimum Income
scssCopy codeSUM(Application.Borrowers, _borrower.Person.Incomes, _income.MonthlyIncome) >= 5000
This example calculates the total monthly income of all borrowers and checks if it is at least $5,000.
Example 4: Ensuring Equity Percentage
mathematicaCopy code(Loan.PropertyValue - Loan.LoanAmount) / Loan.PropertyValue >= 0.2
This example checks if the equity percentage in the property is at least 20%.
Conclusion:
The Lender Expression Engine provides comprehensive support for numeric operations, allowing users to perform a wide range of calculations and comparisons. By utilizing these numeric operators, users can create dynamic and precise expressions to manage and evaluate loan data effectively.