Re: [go-nuts] difference response from play.golang (bit operations)

62 views
Skip to first unread message
Message has been deleted

Ian Lance Taylor

unread,
Jan 3, 2020, 1:05:48 PM1/3/20
to X-Thief, golang-nuts
On Fri, Jan 3, 2020 at 9:50 AM X-Thief <tel...@gmail.com> wrote:
>
> Hey. Im realy newbish at bit operations
>
> Could you help me get the same result as in https://play.golang.org/p/FWocHVrF0Wt
> On my PC and my server i got positive number from the script. But i need negative result if it is so
>
> Any suggestions?)

Your PC and server are probably 64-bit systems but the playground is a
32-bit system. To get consistent results use explicit conversions to
int64.

Ian

X-Thief

unread,
Jan 3, 2020, 1:24:32 PM1/3/20
to golang-nuts
thx but have you tried it? it just gives positive on playground. 

пятница, 3 января 2020 г., 22:05:48 UTC+4 пользователь Ian Lance Taylor написал:

andrey mirtchovski

unread,
Jan 3, 2020, 1:27:46 PM1/3/20
to X-Thief, golang-nuts
https://play.golang.org/p/cpKEQZJKDsh
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3361a17f-b8e4-447a-89c1-943154834233%40googlegroups.com.

andrey mirtchovski

unread,
Jan 3, 2020, 1:28:59 PM1/3/20
to X-Thief, golang-nuts
sorry, i meant to put this in too;

https://play.golang.org/p/vn5iMAWbDiv
Reply all
Reply to author
Forward
Message has been deleted
0 new messages