convert to/from unsigned integers

Is there an idiom or a best practice for converting to/from unsigned integers between q/k4 and C? I expected k.h to have something but it doesn’t.

thanks,

-jay

I believe the library you link against (c.o) will take care of this.Some interesting experiments (on 64bit)q)0W-12147483646q)0Wj-19223372036854775806jSo I’m guessing a simple cast may prove disastrous.The following is courtesy of Hari Om Jha on 32bit - Range of any type(int,float,real and so on)“i”$0Wh32767"i"$-0Wh-32767"j"$-0W-2147483647j"j"$0W2147483647j"d" $ 0Wh2089.09.17q)“d” $ -0Wh1910.04.16On Dec 23, 11:27?am, Jay Han <jay…> wrote:> Is there an idiom or a best practice for converting to/from unsigned> integers between q/k4 and C? I expected k.h to have something but it> doesn’t.>> thanks,> -jay</jay…>

I made some transformations with just 0N+

pip:{0N+{y+256*x}/0$1_'(&“.”=3Ds)_ s:“.”,x}

pip"0.0.0.0" -> minint
pip"255.255.255.255" -> maxint

Regards,