mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
Provide a first class Decimal class to allow arbitrary precision decimal types that support monetary mathematics. #317
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HT154 on GitHub (Jul 10, 2025).
Discussed in https://github.com/apple/pkl/discussions/1119
Originally posted by DamianReeves July 10, 2025
Floats are not ideal for monetary calculations as they are not precise. It would be beneficial if Pkl included a decimal type to help with not only specifying decimal types, (which is fairly easy to do), but also providing decimal mathematics (which is a bit more difficult to get right on the user side).
@odenix commented on GitHub (Aug 14, 2025):
An important aspect of monetary calculations are rounding modes and how/where they are specified.