arturo-lang / arturo

Simple, expressive & portable programming language for efficient scripting
http://arturo-lang.io
MIT License
697 stars 33 forks source link

[Numbers\lcm] not working for Web builds #574

Open github-actions[bot] opened 2 years ago

github-actions[bot] commented 2 years ago

[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

stale[bot] commented 1 year ago

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.

stale[bot] commented 1 year ago

Closing issue as stale.

stale[bot] commented 6 months ago

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.

stale[bot] commented 2 months ago

Closing issue as stale.