Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7


devel / comp.lang.python / Feature Request

SubjectAuthor
* Feature RequestKazuya Ito
+- Re: Feature RequestMichael F. Stemper
`- Re: Feature RequestDennis Lee Bieber

1
Feature Request

<2a319403-5783-4f87-be2a-c07c59b677a3n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17576&group=comp.lang.python#17576

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:ad4:5c6f:0:b0:440:cd9b:db9a with SMTP id i15-20020ad45c6f000000b00440cd9bdb9amr23451042qvh.86.1648025738167;
Wed, 23 Mar 2022 01:55:38 -0700 (PDT)
X-Received: by 2002:a37:a647:0:b0:67d:4cbf:16b0 with SMTP id
p68-20020a37a647000000b0067d4cbf16b0mr18145875qke.448.1648025738016; Wed, 23
Mar 2022 01:55:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Wed, 23 Mar 2022 01:55:37 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2400:2413:7561:1600:4408:6cf4:fae7:ae05;
posting-account=Zo9sxQoAAABBflP9PqP5vTNcLgKZA456
NNTP-Posting-Host: 2400:2413:7561:1600:4408:6cf4:fae7:ae05
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a319403-5783-4f87-be2a-c07c59b677a3n@googlegroups.com>
Subject: Feature Request
From: kazya.it...@gmail.com (Kazuya Ito)
Injection-Date: Wed, 23 Mar 2022 08:55:38 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Kazuya Ito - Wed, 23 Mar 2022 08:55 UTC

Add "trun()" function to Python to truncate decimal part.

Re: Feature Request

<t1f88e$ik3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17580&group=comp.lang.python#17580

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: michael....@gmail.com (Michael F. Stemper)
Newsgroups: comp.lang.python
Subject: Re: Feature Request
Date: Wed, 23 Mar 2022 08:44:45 -0500
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <t1f88e$ik3$1@dont-email.me>
References: <2a319403-5783-4f87-be2a-c07c59b677a3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 23 Mar 2022 13:44:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0c3c2c23fc56b94d558ce0aaedda00df";
logging-data="19075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JWLmHSFQiTmc4tg5Rce8lvw8SbLXZPG0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Thunderbird/68.10.0
Cancel-Lock: sha1:aqVvfrc+peNXNuk7lIkaJ9fxY4c=
In-Reply-To: <2a319403-5783-4f87-be2a-c07c59b677a3n@googlegroups.com>
Content-Language: en-US
 by: Michael F. Stemper - Wed, 23 Mar 2022 13:44 UTC

On 23/03/2022 03.55, Kazuya Ito wrote:
> Add "trun()" function to Python to truncate decimal part.

Which of these should its behavior copy?

>>> from math import pi
>>> int(pi)
3 >>> pi-int(pi)
0.14159265358979312
>>>

--
Michael F. Stemper
This post contains greater than 95% post-consumer bytes by weight.

Re: Feature Request

<5pfm3h5mmaebl0rp6gn66rtu2861ivq1oh@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17582&group=comp.lang.python#17582

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 23 Mar 2022 10:55:05 -0500
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.python
Subject: Re: Feature Request
Date: Wed, 23 Mar 2022 11:55:06 -0400
Organization: IISS Elusive Unicorn
Message-ID: <5pfm3h5mmaebl0rp6gn66rtu2861ivq1oh@4ax.com>
References: <2a319403-5783-4f87-be2a-c07c59b677a3n@googlegroups.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-lmoSS73lU84z5UCqMSlz17t2Saz8n+XCiKJ2+O9GqjxvWGHlhLRlYri0kosU29ir0oN8zVhTphKSEgP!OhPc9u+MbfDaZagjUVn5pINhh0tgUlKhW/NDh62Y0K4MnSL7FHzhQMfmaL94umAyZWRrNZyM
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2207
 by: Dennis Lee Bieber - Wed, 23 Mar 2022 15:55 UTC

On Wed, 23 Mar 2022 01:55:37 -0700 (PDT), Kazuya Ito
<kazya.ito.dream@gmail.com> declaimed the following:

>Add "trun()" function to Python to truncate decimal part.

You'll have to define what specific behavior you think is missing from
the currently available functions?

>>> plusover = 2.78
>>> plusunder = 3.14
>>> minusover = -2.78
>>> minusunder = -3.14
>>> import math
>>> for v in (plusover, plusunder, minusover, minusunder):
.... print("%s: int %s, round %s, math.trunc %s, math.floor %s,
math.ceil %s"
.... % (v, int(v), round(v), math.trunc(v), math.floor(v),
math.ceil(v)))
....
2.78: int 2, round 3, math.trunc 2, math.floor 2, math.ceil 3
3.14: int 3, round 3, math.trunc 3, math.floor 3, math.ceil 4
-2.78: int -2, round -3, math.trunc -2, math.floor -3, math.ceil -2
-3.14: int -3, round -3, math.trunc -3, math.floor -4, math.ceil -3
>>>

int() and .trunc() move toward 0, .floor() moves to less positive,
..ceil() moves to more positive.

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor