figurate_numbers 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ # module PAdicUtils
2
+ # def self.potence(exponent)
3
+ # # Este método modificará el arreglo de números aplicando la potencia
4
+ # map { |num| num**exponent }
5
+ # end
6
+ # def self.p_adic_valuation(base_ten_number, base_p_number)
7
+ # m = 0
8
+ # return m if base_ten_number < 1
9
+ # while base_ten_number % (base_p_number ** m) == 0
10
+ # m += 1
11
+ # end
12
+ # m - 1
13
+ # end
14
+
15
+ # def self.to_p_adic_valuation(arr, p)
16
+ # arr.lazy.collect { |fignum| p_adic_valuation(fignum, p) }
17
+ # end
18
+ # end
19
+
20
+
21
+ # puts PAdicUtils.p_adic_valuation(96, 2)
22
+ # # export const pAdicValuation = (baseTenNumber: number, baseNumber: number): number => {
23
+ # # let index = 0;
24
+ # # if (baseTenNumber < 1) return index;
25
+ # # while (baseTenNumber % (baseNumber ** index) === 0) index++;
26
+ # # return index - 1;
27
+ # # }