x | y x 33 b. y
Henry Rich On Fri, Jun 16, 2023, 3:47 PM Raul Miller <rauldmil...@gmail.com> wrote: > Consider what your suggestion would mean for > > datatype Y=:?1e6#1e7 > integer > datatype -: Y > floating > > If you want integer division, I think you should use <.@% or #: > > I hope this helps, > > -- > Raul > > On Fri, Jun 16, 2023 at 9:55 AM 'Veter Kamenev' via General > <gene...@jsoftware.com> wrote: > > > > Hi! > > > > In many cases -: verb uses when number is divisible by 2. > > > > 3!:0 +: 2 > > 4 (integer) > > > > Surprise for me > > > > 3!:0 -: 2 > > 8 (float) > > > > My wish is to do a low bit check and use a shift to get an integer in > the result. > > > > Perhaps it makes sense to do this for the usual division by 2 (number % > 2). > > > > In general, ideally, the result of any division should be an integer if > the numbers are divisible. > > But I understand what it means that in many cases you will have to do a > check, > > which will slow down the calculations. > > > > In this regard, I would like to have a separate verb for integer > division (%.. or %:: by example), > > and not a verb <.@% that is calculated via float. > > > > Best wishes, > > Veter Kamenev > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm