Some arithmetical bcmath programs

  1. Simple arithmetical calculations
  2. Calculating the nth power of a quadratic irrational
  3. Calculating the product of two quadratic irrationals
  4. Calculating the mth root of a rational number
  5. Simple modular arithmetical calculations
  6. Shanks baby-steps/giant-steps algorithm for finding the discrete log
  7. Prime-power factorization:
  8. base b expansion
    • Finding the base b expansion of a non-negative integer
    • Finding the ternary expansion of a positive integer
    • Finding the base b expansion of a positive rational
    • Calculating the rational with given base b digits
  9. Calculating the gcd of n positive integers
  10. Calculating the lcm of n positive integers
  11. Performing the lcm factor refinement algorithm of John Campbell.

Last modified 22nd June 2016
Return to main page