Initializing help system before first use

Formulae

One new feature of the Extended MPS format is the formula. A formula is written in much the same way as it would be in any programming language or spreadsheet. It is made up of (for example) constants, functions, the names of variables, and mathematical operators. The formula always starts with an equals sign, and each item (or token) is separated from its neighbors by one or more spaces.

Tokens may be one of the following:

  • A constant;
  • The name of a variable;
  • An arithmetic operator "+", "-", "*", "/";
  • The exponentiation operator "**" or "^";
  • An opening or closing bracket "(" or ")";
  • A comma "," separating a list of function arguments;
  • The name of a supported internal function such as LOG, SIN, EXP;
  • The name of a user-supplied function;
  • A colon ":" preceding the return argument indicator of a multi-valued function;
  • The name of a return argument from a multi-valued function.

The following are valid formulae:

= SIN ( A / B )
SIN is a recognized internal function which takes one argument and returns one result (the sin of its argument).
= A ^ B
^ is the exponentiation symbol. Note that the formula may have valid syntax but it still may not be possible to evaluate it (for example if A = -1 and B = 0.5).
= MyFunc1 ( C1 , - C2 , C3 : 1 )
MyFunc1 must be a function which can take three arguments and which returns an array of results. This formula is asking for the first item in the array.
= MyFunc2 ( C1 , - C2 , C3 : RVP )
MyFunc1 must be a function which can take three arguments and which returns an array of results. This formula is asking for the item in the array which is named RVP.

The following are not valid formulae:

SIN ( A )
Missing the equals sign at the start
=SIN(A)
No spaces between adjacent tokens
= A * * B
"**" is exponentiation, "* *" (with an embedded space) is not a recognized operation.
= MyFunc1 ( C1 , - C2 , C3 , 1 )
If MyFunc1 is as shown in the previous set of examples, it returns an array of results. The last argument to the function must be delimited by a colon, not a comma, and is the name or number of the item to be returned as the value of the function.

There is no limit in principle to the length of a formula. However, there is a limit on the length of a record read by XSLPreadprob, which is 31000 characters. Parsing very long records can be slow, and consideration should be given to pre-parsing them and passing the parsed formula to Xpress NonLinear rather than asking it to parse the formula itself.

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.