Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Peter Heitzer" Newsgroups: de.comp.lang.python Subject: Re: -1//2 Date: 10 Apr 2025 15:02:08 GMT Lines: 10 Message-ID: References: X-Trace: individual.net mCfy0bYovQdoQZiGSzWM+AJNO4qGHudj1/4UJOS31FbuiiSfABDPf2AYqM X-Orig-Path: not-for-mail Cancel-Lock: sha1:4nj6EEj9O8bKdhij/eV25d8qsKk= sha256:VkELkRgXlpRBE8inBc+iVFOekfL9x9PB/oqD8m2Zy84= User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-32-amd64 (x86_64)) Xref: csiph.com de.comp.lang.python:6287 Hermann Riemann wrote: >Das Ergebnis von -1//2 ist laut Python3 -1 >Wegen Vorzeichen shift? Der Operator // macht eine Floor Division und math.floor(-0.5) ergibt -1. Siehe dazu PEP238 https://peps.python.org/pep-0238/ -- Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de