iocane / unbox

GPL licensed J interpreter
Other
37 stars 7 forks source link

E. fails on integer input containing _1 #4

Closed mlochbaum closed 8 years ago

mlochbaum commented 8 years ago

The following line returns all zeros even though the left argument is contained in the right:

_2 1  E.  1 2 _1 _2 1

This is the case whenever a _1 appears in the right argument to E. before the left argument does.

iocane commented 8 years ago

This appears to be a bug in special code to handle small range values. This works: _18 1 E. 1 2 _1 _18 1 I'm inclined to remove the special code for the time being unless someone provides a patch. I think it should be profiled as well to see how much benefit it provides.

iocane commented 8 years ago

There is a fix for this in the latest develop commit. I'm leaving the issue open for now pending further testing/validation.

iocane commented 8 years ago

Fixed in v0.1-rc1.