Anonymous user
P-Adic numbers, basic: Difference between revisions
m
no edit summary
(Conversion and addition of p-adic Numbers.) |
mNo edit summary |
||
Line 8:
Convert two rationals to p-adic numbers and add them up.
Rational reconstruction is needed to interpret the result.
p-Adic numbers were introduced around 1900 by Hensel. p-Adic expansions
Line 187 ⟶ 186:
'Horner's rule
function padic.dsum () as long
dim as long r, s = 0
▲dim i as integer
for i = k - 1 +
r = s: s *= p
if r andalso s \ r - p then
Line 238 ⟶ 237:
else
'negative powers
for i = v to -1
Line 337 ⟶ 333:
data 99,70
data
data
data
data
data
data
data 5,19, 2,12
Line 465 ⟶ 458:
0
+ =
0. 0
21/125
-
+ =
6 6 0 0
-2401
-
1
+ =
72/35
|