I do apologise to all involved:
There was an inexcusable bug in the display of the test data
at the end of my script.
Verb rt in my script has been fixed, and consequently
the display of time/space data does show a completely
different picture now.
My versions using ^: are actually significantly less effective.
Sorry,
JoHo
]JVERSION
Engine: j807/j32/windows
Release-e: commercial/2019-11-04T10:14:12
Library: 8.07.26
Qt IDE: 1.7.9s/5.9.6
Platform: Win 32
NB. steps from a to b, using ^:
step=: fst=: 0&{
endv=: snd=: 1&{
srtv=: trd=: 2&{
tail=: {:
pstepHugo=: (2&}.) @:((] , (0&$`({. + {:))@.((endv - step) >: {:))^:_) @: ([
, |.@:])
3 pstepHugo 5 19
5 8 11 14 17
monadisch=: [ , |.@:]
friggin =: [: <. step %~ endv - srtv
pstepSusi=: (2&}.) @:((] , (step + tail))^:friggin) @: monadisch
3 pstepSusi 5 19
5 8 11 14 17
3 pstepSusi 5 20
5 8 11 14 17 20
FROMTO=: 5 19
STEP=:3
]hres=: ({.FROMTO) + STEP * i. >: <. STEP %~ -/|.FROMTO
5 8 11 14 17
assert 5 8 11 14 17-: hres
NB. - evaluation -
ts=: 6!:2, 7!:2@] NB. Phrases 14A
ft=: 12j6 12&":
rt=:{. ([ , (<.&.(1000&*))@:(100&*)@:(] %"1 [)) }.
STEP=: 3
FROMTO=: 17 17e3
o=: '({.FROMTO) + STEP * i. >: <. STEP %~ -/|.FROMTO'
a=: 'STEP pstepHugo FROMTO '
b=: 'STEP pstepSusi FROMTO '
NB. - - -
NB. Hauke Rehr JFORUM
NB. say we have y = 4 and want to get 0 0.25 0.5 0.75 1
cut01 =: (% * i.@>:) M.
NB. say we have x = 14 and y = 3 and want to get 0 3 6 9 12
steps =: ([ - |~) ([ * cut01@%) ]
NB. say we have x = 5 19 and y = 3 want to get 5 8 11 14 17
stepThroughHR =: {.@[ + <:@+:@</@[ * |@-/@[ steps ]
assert 5 8 11 14 17-: 5 19 stepThroughHR 3
hr=: 'FROMTO stepThroughHR STEP NB. H.R. '
NB. - - -
NB. Raul Miller JFORUM
stepThroughRM=: dyad define
'start diff'=. -/\ y
start-(*diff)*x*i.<.1+x%~|diff
)
assert 5 8 11 14 17-: 5 19 stepThroughRM~ 3
rm=:' STEP stepThroughRM FROMTO NB. R.M.'
NB. - - -
NB. Jose Mario Quintana JFORUM
to=: [ + 1 i.@+ <.@-~
inc=: (%&) ((<,'&.')`) (`:6) NB. replacing <'&.' to make it "future
proof"
0 to 10
0 1 2 3 4 5 6 7 8 9 10
5 to (3 inc) 19
5 8 11 14 17
assert 5 8 11 14 17-: 5 to (3 inc) 19
jmq=: '({.FROMTO) to (STEP inc) ({:FROMTO) NB. JMQ'
NB. - - -
NB. Rudolf Sykora JFORUM
interval=:{.+(i. @ >: @ ({:-{.))
assert 5 8 11 14 17-: _3 {.\ interval 5 19
rs=: '(-STEP) {.\ interval FROMTO NB. R.S. '
NB. Intel Pentium(M) 2.31GHz (Single Core)
( <"0@: (] ,"1 rt) @: >@:(50&ts each) ,"1 0 ] ) o;rm;jmq;hr;rs;a;b
+----------+------+----------+-------+-------------------------------------------------+
|5.58898e_5|34496 |5.58898e_5|34496 |({.FROMTO) + STEP * i. >: <. STEP %~
-/|.FROMTO|
+----------+------+----------+-------+-------------------------------------------------+
|9.6286e_5 |34240 |172.278 |99.257 | STEP stepThroughRM FROMTO NB. R.M.
|
+----------+------+----------+-------+-------------------------------------------------+
|4.46593e_5|101504|79.906 |294.248|({.FROMTO) to (STEP inc) ({:FROMTO) NB.
JMQ |
+----------+------+----------+-------+-------------------------------------------------+
|4.51286e_5|132352|80.745 |383.673|FROMTO stepThroughHR STEP NB. H.R.
|
+----------+------+----------+-------+-------------------------------------------------+
|0.00117825|165248|2108.17 |479.035|(-STEP) {.\ interval FROMTO NB. R.S.
|
+----------+------+----------+-------+-------------------------------------------------+
|0.0852644 |558848|152558 |1620.04|STEP pstepHugo FROMTO
|
+----------+------+----------+-------+-------------------------------------------------+
|0.0317903 |66624 |56880.3 |193.135|STEP pstepSusi FROMTO
|
+----------+------+----------+-------+-------------------------------------------------+
NB.
==============================================================================
On 30.03.2020 00:40, Joachim Hoffmann wrote:
...a bugfix is in the works
there is a horrible bug in the display of the testing table
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm