Arbitrary-precision integers (included): Difference between revisions

Content added Content deleted
Line 1,233: Line 1,233:


=={{header|langur}}==
=={{header|langur}}==
<syntaxhighlight lang="langur">val .x = 5 ^ 4 ^ 3 ^ 2
<syntaxhighlight lang="langur">val .xs = toString 5 ^ 4 ^ 3 ^ 2


val .xs = toString .x
val .len = len .xs
writeln len(.xs), " digits"
writeln .len, " digits"


if len(.xs) > 39 and s2s(.xs, 1..20) == "62060698786608744707" and
if .len > 39 and s2s(.xs, 1..20) == "62060698786608744707" and
s2s(.xs, len(.xs)-19 to len(.xs)) == "92256259918212890625" {
s2s(.xs, .len-19 to .len) == "92256259918212890625" {
writeln "SUCCESS"
writeln "SUCCESS"
}
}