Skip to content

17883

  • 17883
  • 38a78c4
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • 17883
  • 38a78c4
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jhonabreul jhonabreul tagged this 30 Jun 18:06
* Add arithmetic operators to numeric MultiPeriodField classes

Implement +, -, *, / and % operators on the numeric MultiPeriodField
and MultiPeriodFieldLong base classes so fundamental fields can be
combined arithmetically. Operators act on each field's default-period
Value and return decimal, consistent with the existing implicit decimal
conversion. Includes unit tests covering field-to-field and
field-to-scalar arithmetic for both base classes.

* Add cross-type operators between double and long backed fields

Support arithmetic between the double-backed MultiPeriodField and the
long-backed MultiPeriodFieldLong by adding the mixed-type operator
overloads (both orderings) for +, -, *, / and %. Includes a unit test
covering double/long arithmetic in both directions.
Assets 2
Loading