-
Add arithmetic operators to numeric MultiPeriodField classes (#9571)
发布于
2026-06-30 18:06:38 +00:00 | 54 次提交 在此版本后已推送到 master- 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.下载附件