Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8603

Move math functions abs, ceil, floor, round, min, max from stdlib to puppet

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.0.0
    • Component/s: DOCS
    • Labels:
    • Release Notes:
      New Feature
    • Release Notes Summary:
      Hide
      The math functions abs, ceil, floor, round, min, and max are now available in puppet. The functions are compatible with the functions with the same name in stdlib with the added feature in min/max if calling them with a single array and being able to use a lambda with a custom compare.

      These stdlib math functions used inconsistent string to numeric conversions that were also unintentionally making the functions compare values in strange ways. The automatic conversions are now deprecated and will issue a warning.
      Show
      The math functions abs, ceil, floor, round, min, and max are now available in puppet. The functions are compatible with the functions with the same name in stdlib with the added feature in min/max if calling them with a single array and being able to use a lambda with a custom compare. These stdlib math functions used inconsistent string to numeric conversions that were also unintentionally making the functions compare values in strange ways. The automatic conversions are now deprecated and will issue a warning.
    • QA Risk Assessment:
      Needs Assessment

      Description

      The math functions abs, ceil, floor, round, min, max should be moved from stdlib to puppet and be modernized to the 4.x function API. They must be backwards compatible but can be extended in functionality where wanted (for example supporting array arguments if not already supported in current implementation).

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                henrik.lindberg Henrik Lindberg
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: