These are primitive abstractions for insurance that will be
improved upon over time.
Some notable TODOs:
\begin{enumerate}
\item Support scalar results; and
\item Rounding direction (currently only nearest).
\end{enumerate}
\todo{Template to abstract these {\tt rate-each} generation
templates.}
must provide at least one of @generates or @yields
a description (@desc@) is required for
`'
a description (@desc@) is required for
`'
false
false
\ref{_factor_} defines a calculation that results in a factor
which will later be used in a product.
There are special considerations for these types of values---%
generally, they should not have a value of~$0$ if some sort of calculation
condition or lookup is not met,
as that would have the effect of wiping out premium.\footnote{
Note that every generator index can be non-zero but still sum up
to a zero yield,
which would trigger this error.}
If zero is desired,
\tt{@allow-zero@} must be set to \tt{true} to explicitly permit it.
must provide at least one of @generates or @yields
a description (@desc@) is required for
`'
a description (@desc@) is required for
`'
false
a value of #0 for @default@ is not meaningful;
use @allow-zero@ instead.
false
factor
The \ref{_credit_} and \ref{_debit_} templates define factors that are
intended to introduce, respectively, credits and surcharges.
Each name defined using these templates must be prefixed with ``credit''
and ``debit'' respectively.
Credits must never exceed a value of~$1$,
as they would then be treated as if they were surcharges.
Similarly, debits must never have a value less than~$1$.
Both must have values greater than~$0$.
If a value can be either a credit or a debit,
it is sometimes called an ``adjustment''.
In reality it is just another factor,
so just use \ref{_factor_} in such a~case.