arturo
arturo copied to clipboard
[Numbers\lcm] not working for Web builds
[Numbers\lcm] not working for Web builds
https://github.com/arturo-lang/arturo/blob/ef8b7df92523462ccf7ff5a895a06819551fd467/src/library/Numbers.nim#L766
builtin "lcm",
alias = unaliased,
rule = PrefixPrecedence,
description = "calculate least common multiplier for given collection of integers",
args = {
"numbers" : {Block}
},
attrs = NoAttrs,
returns = {Integer},
# TODO(Numbers\lcm) add documentation example
# labels: library, documentation, easy
example = """
""":
##########################################################
let blk = cleanBlock(x.a)
var current = blk[0]
var i = 1
# TODO(Numbers\lcm) not working for Web builds
# labels: web,enhancement
while i<blk.len:
if current.iKind==NormalInteger:
if blk[i].iKind==BigInteger:
when not defined(NOGMP):
current = newInteger(lcm(current.i, blk[i].bi))
else:
current = newInteger(lcm(current.i, blk[i].i))
else:
when not defined(NOGMP):
if blk[i].iKind==BigInteger:
current = newInteger(lcm(current.bi, blk[i].bi))
else:
current = newInteger(lcm(current.bi, blk[i].i))
inc(i)
push(current)
builtin "ln",
alias = unaliased,
rule = PrefixPrecedence,
ndex 823aeb4b4..53a274896 100644
++ b/version/build
7075751c8b33c4590cca4cbd8a52ad87c2986d9e
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing issue as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.