p_adic_order(N,p)
Version 1.1.0.0 (946 Bytes) by
Alejandro Giangreco
This function calculates the p-adic valuation (equivalent to p-adic order) of a rational number N
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 LinuxCategories
Find more on Logical in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
