Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine the spectral decomposition of an integer in a modular number system
ResourceFunction["IntegerSpectralDecomposition"][c,h] gives coefficients of the integer c in the spectral basis of ℤh. |
The spectral decomposition of 7 in ℤ12:
In[1]:= |
Out[1]= |
The spectral decomposition of -7 in ℤ15:
In[2]:= |
Out[2]= |
Reconstruct an integer modulo another integer from its spectral decomposition using ChineseRemainder:
In[3]:= |
Out[3]= |
Reconstruct an integer modulo another integer from its spectral decomposition and spectral basis, the latter of which is computed by the resource function IntegerSpectralBasis:
In[4]:= |
Out[4]= |
This work is licensed under a Creative Commons Attribution 4.0 International License