[issue39310] Add math.ulp(x): unit in the last place

2020-01-15 Thread Tim Peters
Tim Peters added the comment: `ulp()` is the right name: universally understood by those who know how to use it, and easy to find exhaustive web explanations for those who don't. In a different context, spelling out some variant of Hypertext_Transfer_Protocol would be as wrong-headed to

[issue39310] Add math.ulp(x): unit in the last place

2020-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: [Brett] > Can I just say that "ulp" is totally non-obvious what that even means unless > you have a specific math background? It's a good point. I guess we have a choice between using the domain-specific standard-ish name (which should be immediately

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: I hear what you are saying, but "ulp" is the standard term of art. Sure it is non-obvious until you learn it, just like other technical terms like "mro", "abc" or "ast". Mathematics and numeric programming are rife with short names that are non-obvious

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread STINNER Victor
STINNER Victor added the comment: > Can I just say that "ulp" is totally non-obvious what that even means unless > you have a specific math background? The math.ulp() documentation explicitly says: https://docs.python.org/dev/library/math.html#math.ulp ULP stands for “Unit in the Last

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread Brett Cannon
Brett Cannon added the comment: And sorry if that last response from me came off as grumpy; it wasn't meant to. I just had no clue what you were adding based on the name. -- ___ Python tracker

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread Brett Cannon
Brett Cannon added the comment: Can I just say that "ulp" is totally non-obvious what that even means unless you have a specific math background? -- nosy: +brett.cannon ___ Python tracker

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread miss-islington
miss-islington added the comment: New changeset dfe159ca552870f801e34cc57e9bb7d6836ce7df by Miss Islington (bot) in branch '3.7': bpo-39310: Update sys.float_info documentation (GH-17982) https://github.com/python/cpython/commit/dfe159ca552870f801e34cc57e9bb7d6836ce7df -- nosy:

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +17397 pull_request: https://github.com/python/cpython/pull/17994 ___ Python tracker ___

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9362f8526e42157baf27df982b16f23f212c3c3a by Victor Stinner in branch '3.8': bpo-39310: Update sys.float_info documentation (GH-17982) https://github.com/python/cpython/commit/9362f8526e42157baf27df982b16f23f212c3c3a --

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17387 pull_request: https://github.com/python/cpython/pull/17982 ___ Python tracker ___

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39310] Add math.ulp(x): unit in the last place

2020-01-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0b2ab21956fbab8eab6d064060d4544499730316 by Victor Stinner in branch 'master': bpo-39310: Add math.ulp(x) (GH-17965) https://github.com/python/cpython/commit/0b2ab21956fbab8eab6d064060d4544499730316 --

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread Mark Dickinson
Mark Dickinson added the comment: [Steven] > Any chance you could look at fma too? #29282 fma is hard, for reasons explained in the issue you linked to. If you have suggestions for resolving the difficulties, please do add them to that issue. --

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thank you Victor! Any chance you could look at fma too? #29282 (The reward for a job well done is to be given more jobs :-) -- nosy: +steven.daprano ___ Python tracker

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread Tim Peters
Tim Peters added the comment: +1 -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread STINNER Victor
STINNER Victor added the comment: See also math.isclose() and its PEP 485 which mentions ULP (Unit in the Last Place)... in the "Inappropriate uses" section :-) * https://docs.python.org/dev/library/math.html#math.isclose * https://www.python.org/dev/peps/pep-0485/#inappropriate-uses

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger, stutzbach ___ Python tracker ___ ___ Python-bugs-list

[issue39310] Add math.ulp(x)

2020-01-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17374 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17965 ___ Python tracker ___

[issue39310] Add math.ulp(x): unit in the last place

2020-01-12 Thread STINNER Victor
Change by STINNER Victor : -- title: Add math.ulp(x) -> Add math.ulp(x): unit in the last place ___ Python tracker ___ ___

[issue39310] Add math.ulp(x)

2020-01-12 Thread STINNER Victor
New submission from STINNER Victor : In bpo-39288, I added math.nextafter(x, y) function. I propose to now add math.ulp() companion function. Examples from tests of my PR: self.assertEqual(math.ulp(1.0), sys.float_info.epsilon) self.assertEqual(math.ulp(2.0 ** 52), 1.0)