p_adic_order(N,p)

This function calculates the p-adic valuation (equivalent to p-adic order) of a rational number N

You are now following this Submission

function r=p_adic_order(N,p)

This function calculates the p-adic valuation (equivalent to p-adic order) of a rational number N.
p must to be a prime number and N a rational number, if N is not a rational number this function takes the rational fraction approximation of N.
Examples p_adic_order(0,p)=Inf, p_adic_order(1,p)=0, p_adic_order(25/7,5)=2, p_adic_order(-25/7,5)=2
p_adic_order(7/25,5)=-2

Cite As

Alejandro Giangreco (2026). p_adic_order(N,p) (https://www.mathworks.com/matlabcentral/fileexchange/50794-p_adic_order-n-p), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

Editing description

1.0.0.0