That seems likely:

   81985529216486896 ,: 16b123456789abcdef
81985529216486896
81985529216486896
   datatype 81985529216486896 ,: 16b123456789abcdef
integer

So, yes, these are integers

16#.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
81985529216486895

And, yes, the result should have been different

   ' '-.~":2#.inv 16b123456789abcdef
100100011010001010110011110001001101010111100110111110000
   #'10010001101000101011001111000100110101011110011011111'
53

And, yes, if we look at the binary representation, it has the
precision of a floating point number.

Thanks,

-- 
Raul


On Wed, Apr 25, 2018 at 2:57 PM, Cliff Reiter <[email protected]> wrote:
> I am guessing there is a bug in b formatting. Note, even base 10:
>
>    10b123456789010234567
> 123456789010234560
>
>    10b123456789010234562
> 123456789010234560
>
> Almost seems like it went "float" internally or some such.
>
>
> On 4/25/2018 11:12 AM, Thomas Hickey wrote:
>>
>> Maybe a better question is why are all of these true?
>>
>> 81985529216486896 = 16b123456789abcdf0
>>
>> 1
>>
>> 81985529216486896 = 16b123456789abcdef
>>
>> 1
>>
>> 81985529216486880 = 16b123456789abcde8
>>
>> 1
>>
>> I'm running j806/j64/windows.
>>
>> --Th
>>
>> On Wed, Apr 25, 2018 at 10:40 AM, Raul Miller <[email protected]>
>> wrote:
>>
>>> P.S.
>>>
>>>     240 205 171 137 103 69 35 1 p. 256x
>>> 81985529216486896
>>>
>>> --
>>> Raul
>>>
>>>
>>> On Wed, Apr 25, 2018 at 10:39 AM, Raul Miller <[email protected]>
>>> wrote:
>>>>
>>>>     _3 ic 240 205 171 137 103 69 35 1 { a.
>>>> 81985529216486896
>>>>
>>>> The byte order the machine is using here is little endian
>>>>
>>>> https://en.wikipedia.org/wiki/Endianness#Little-endian
>>>>
>>>> That means the least significant byte here was 239 (your example) or
>>>> 240 (my example).
>>>>
>>>> But your number was even and 239 is odd...
>>>>
>>>> --
>>>> Raul
>>>>
>>>> On Wed, Apr 25, 2018 at 10:29 AM, Thomas Hickey
>>>> <[email protected]>
>>>
>>> wrote:
>>>>>
>>>>> I have a 64 bit number:
>>>>> 16b123456789abcdef = 81985529216486896
>>>>>
>>>>> encoded in 8 bytes in a file:
>>>>> 239 205 171 137 103 69 35 1
>>>>>
>>>>> but
>>>>>
>>>>> _3 ic 239 205 171 137 103 69 35 1 { a. returns 81985529216486895 (1
>>>>> less
>>>>> than I expected)
>>>>>
>>>>> 16 #.inv 81985529216486895 returns 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
>>>>>
>>>>> 16 #.inv 81985529216486896 returns 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
>>>>> 0
>>>>>
>>>>> I suppose this has something to do with signed 64 bit integers, but I
>>>
>>> don't
>>>>>
>>>>> understand it. I'm running on a Intel machine (Surface laptop).
>>>>>
>>>>> --Th
>>>>> ----------------------------------------------------------------------
>>>>> 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
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to