uCBQN/test/cases/fuzz/scan.bqn

24 lines
699 B
BQN
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# tests scan on a matrix checking for overflow in tail elements
81632 {e𝕊nw: m2e-2 ! (m+(¯1,w|n) w(n+w+1)m) +` •internal.Squeeze w (wm)(n0)m} 1+20065
%DEF rand R ((•args).GetRand@).Range VVariation •internal
# `bitarr
(
%USE rand
{𝕊:
n 1 + R 2R 13
! (` `) "Ab" V {𝕊: 1((R n))𝕩}2 "Ai8" V 0˜ n
}¨ 100000
)
# +`bitarr
(
%USE rand
RB2 {¬(R 2) "Ab" V 𝕩 R 1+R 2R 10} # random boolean array with random uniform probability
{𝕊:
a RB2 R 2R 13
! (+` +`) a
}¨ 100000
)