p_adic_order(N,p)

This function calculates the p-adic valuation (equivalent to p-adic order) of a rational number N
128 Downloads
Updated 9 May 2015

View License

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 .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Logical in Help Center and MATLAB Answers
Version Published Release Notes
1.1.0.0

Editing description

1.0.0.0