Today Regorus defaults to big floats to pass the OPA test suite. However, this is not ideal for the following reasons
Performance. Big floats are more expensive than u64, i64 or f64.
OPA's big number support isn't well defined. See issue, issue etc.
serde_yaml does not support arbitrary precision
Policies that use big floats may be fewer than ones that don't.
Using arbitrary-precision feature in the serde-json crate has repercussions on other uses of json in an application. See #199
For these reasons, it is better to
[ ] Default to regular precision
[ ] Implement an optimal Number representation that can handle u64, i64 and f64 and arithmetic between them
[ ] Provide a way for users to opt into big float support.
Lack of support for big float by default will cause an incompatibility with OPA. But it is justified since big float support itself isn't that will defined in OPA, and users can always opt in explicitly if needed.
Today Regorus defaults to big floats to pass the OPA test suite. However, this is not ideal for the following reasons
arbitrary-precision
feature in theserde-json
crate has repercussions on other uses of json in an application. See #199For these reasons, it is better to
Lack of support for big float by default will cause an incompatibility with OPA. But it is justified since big float support itself isn't that will defined in OPA, and users can always opt in explicitly if needed.