rank error confirmed

   JVERSION
Engine: j903/j64/linux
Beta-w: commercial/2021-12-05T18:24:21
Library: 9.03.08
Platform: Linux 64
Installer: J903 install


Am 25.05.23 um 20:12 schrieb Martin Kreuzer:
Dear all -

Thought I had succeeded in deducing step by step the tacit verb for factorial,

    f=: 1:`(] * [: $: <:)@.*

when I encountered this:

    f=. 1:`(] * [: $: <:)@.*
    f 2 3 5 7
2 6 120 5040
    f 2 3 5 7 11
|rank error in f, executing monad $:
|       f 2 3 5 7 11

In contrast this seems to work alright:

    g=. 1:`(] * $: @ <:)@.*     NB. dictionary entry
    g 2 3 5 7
2 6 120 5040
    g 2 3 5 7 11
2 6 120 5040 39916800

    JVERSION
Engine: j9.4.2/j64avx2/windows
Build: commercial/2023-04-10T01:19:53/clang-15-0-7/SLEEF=1
Library: 9.4.21
Platform: Win 64
Installer: j9.4 install
InstallPath: d:/program files (non-sys)/j9.4
Contact: www.jsoftware.com

However, my verb

    f=: 1:`(] * [: $: <:)@.*
    f 2 3 5 7 11 13
2 6 120 5040 39916800 6227020800

works under v8.07 as expected ....

Could somebody shed some light on this ?

-M

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to