They fail.

This library uses openssl bindings (available on all platforms and ships with 
recent Js)


https://github.com/Pascal-J/BN-openssl-bindings-for-J

I don't remember if I implemented all boolean functions but it's 
straightforward to define any missing ones using one as template.

The other approach is to represent large integers as polynomials (arrays of 32 
or 64 bit or 10^x base numbers), an approach which I've previously posted to 
forum.


________________________________
From: Roger Shepherd <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Wednesday, March 16, 2016 7:41 AM
Subject: Re: [Jprogramming] A clever way to find the maximum possible integer


What should I read to anticipate the effects if 33 b. and similar verbs on
extended integers?
Thanks for any pointers.


On Monday, March 14, 2016, Marshall Lochbaum <[email protected]> wrote:

> I just stumbled across the following snippet. Platform independent,
> constant time (for those with 2048-bit processors, naturally), and only
> nine characters!
>
>    33 b.~ _1
> 9223372036854775807
>
> The verb (33 b.), not often used in J, is the unsigned shift operator,
> like C's (<<). When the left operand x is positive, it has the same
> effect as multiplying y by (2^x). If x is negative and y is positive, it
> is the same as division by (2^-x) followed by rounding down. However, if
> x and y are both negative, then y is shifted as an unsigned integer: all
> of its bits are moved right by (|x), and (|x) zeros are added on the
> left.
>
> If y is _1, then its two's complement representation is all ones.
> Shifting right by one leaves a number represented by a zero and then all
> ones--the largest possible positive integer.
>
> If you want both the maximum and minimum integers:
> MIN_INT =: <:- MAX_INT =: 33 b.~ _1
>
> Marshall
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 
Sent from Gmail Mobile

----------------------------------------------------------------------
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