User Tools

Site Tools


Sidebar

GitHub

CoreLib

Sponsors

This website is sponsored by

Notes

This wiki uses icons from icons8.com licensed under CC BY-ND 3.0.

proposals:helper:pocmath
Author Patrick Lehmann
Last Update 13.09.2016
Related Proposals

Mathematical Functions

Regular structures like sorting networks need helper functions to calculate the bound for for…generate statements. This packages offers common mathematical functions like gcd, lcm or triangual number.

package math is
  -- figurate numbers
  function squareNumber(N : positive) return positive;
  function cubicNumber(N : positive) return positive;
  function triangularNumber(N : natural) return natural;
 
  -- coefficients
  -- binomial coefficient (N choose K)
  function binomialCoefficient(N : positive; K : positive) return positive;
 
  -- greatest common divisor (gcd)
  function greatestCommonDivisor(N1 : positive; N2 : positive) return positive;
  -- least common multiple (lcm)
  function leastCommonMultiple(N1 : positive; N2 : positive) return positive;
end package;

Source: PoC.math

General Comments

  • None at this time

Supporters

proposals/helper/pocmath.txt · Last modified: 13.09.2016 19:51 by paebbels