|
From: David C. <dav...@gm...> - 2018-04-25 17:25:02
|
I see it in jython2.7.1 as well.
D
On Wed, Apr 25, 2018 at 12:05 AM, Niemann, Hartmut <
har...@si...> wrote:
> Hello!
>
>
>
> Is this a known bug in Jython 2.7.0?
>
>
>
>
>
> x = int(-(1<<31))
>
> print ('%d' % x)
>
>
>
> results in
>
>
>
> --2147483648
>
>
>
> With two ‘-‘ signs.
>
>
>
> For -(1<<31)+1 everything is fine,
>
> for -(1<<31)-1 the resulting x has type long and everything is fine as
> well.
>
> convert x to long and the result is correct as well.
>
>
>
>
>
> Mit freundlichen Grüßen
> Dr. Hartmut Niemann
>
> Siemens AG
> Mobility Division
> Rolling Stock
> Standardization, Remote Control, Display
> MO RS LM EN CCI SRD
> Werner-von-Siemens-Str. 67
> 91052 Erlangen, Deutschland
> Mobil: +49 173 5342327
> mailto:har...@si... <har...@si...>
> www.siemens.com/ingenuityforlife <https://siemens.com/ingenuityforlife>
> [image: www.siemens.com/ingenuityforlife]
> Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim Hagemann
> Snabe; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Lisa Davis, Klaus
> Helmrich, Janina Kugel, Cedrik Neike, Michael Sen, Ralf P. Thomas; Sitz der
> Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin
> Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jython-dev mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-dev
>
>
|