[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 9027502e99cba700cadb675b3b2db03c311d1c4d by Terry Jan Reedy in 
branch '2.7':
[2.7] bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)
https://github.com/python/cpython/commit/9027502e99cba700cadb675b3b2db03c311d1c4d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +8183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread miss-islington


miss-islington  added the comment:


New changeset ed8dd598ae7e0d944974af0fd73c2fbb6105fd5c by Miss Islington (bot) 
in branch '3.6':
bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)
https://github.com/python/cpython/commit/ed8dd598ae7e0d944974af0fd73c2fbb6105fd5c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread miss-islington


miss-islington  added the comment:


New changeset e39fb207f26f8007e95fcf120f5ff1cb7372791a by Miss Islington (bot) 
in branch '3.7':
bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673)
https://github.com/python/cpython/commit/e39fb207f26f8007e95fcf120f5ff1cb7372791a


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8182

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8181

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 28c7f8c8ce34a0cb848822a252a9d0a761fb42d5 by Terry Jan Reedy in 
branch 'master':
bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (#8673)
https://github.com/python/cpython/commit/28c7f8c8ce34a0cb848822a252a9d0a761fb42d5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +8165
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-04 Thread Michael Fischer


Michael Fischer  added the comment:

Terry: I absolutely agree with you. Changing 'Fixed point' to 'Fixed point 
notation' is the optimal solution here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The closest anchor is 
https://docs.python.org/3.8/library/string.html#format-specification-mini-language.

The table title is "The available presentation types for floating point and 
decimal values are:".

This is slightly confusing to me.  Does this mean instances of 'float' and 
'decimal' classes?  or 'floating point numbers (floats and decimals)  and 
integral numbers, sometimes called decimals since usually written with decimal 
digits'?

Within the table, 'number' refers to whatever the title refers to. So I think 
adding '(floating point)' would be confusing and wrong, as it excludes 
'decimals' whatever they are.  On the other hand, changing 'Fixed point' to 
'Fixed point notation', in parallel with 'Exponential notation', is correct and 
should be helpful.

--
nosy: +terry.reedy
stage:  -> needs patch
versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-08-01 Thread Michael Fischer


Michael Fischer  added the comment:

Thank you for your quick reply. I understand why you chose this description 
better now. However in C %f behaves exactly the same as in Python (for 
floating-point numbers) and you will mostly find the description for it along 
the lines of:

'%f' Print a floating-point number in normal (fixed-point) notation. [The GNU C 
Library Reference Manual - 
https://www.gnu.org/software/libc/manual/pdf/libc.pdf]

For the sake of simplicity I suggest the following wording:

Fixed point notation. Displays the (floating-point) number as a fixed-point 
number. The default precision is 6.

In my opinion this emphasizes the intent (fixed precision representation) and 
hints at the independence of input type, by putting the floating-point in 
brackets.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-07-30 Thread Mark Dickinson


Mark Dickinson  added the comment:

FTR, here "fixed point" refers to the output representation (a decimal string) 
rather than the input (a floating-point binary value). The output of %f gives a 
*fixed* number of places after the decimal point (6 by default).

Contrast with %e, which gives a floating-point output representation.

But yes, there are probably less confusing ways to word this. Did you have a 
particular alternative wording in mind?

Here's the behaviour of %f for different scale values: note that the output 
always has the same number of digits after the point, but the number of 
significant digits varies.

>>> "%f" % math.pi
'3.141593'
>>> "%f" % (100.0 * math.pi)
'314.159265'
>>> "%f" % (0.01 * math.pi)
'0.031416'

And here's %e. Now it's the other way around: the number of significant digits 
stays the same, but the exponent changes to reflect the magnitude.

>>> "%e" % math.pi
'3.141593e+00'
>>> "%e" % (100 * math.pi)
'3.141593e+02'
>>> "%e" % (0.01 * math.pi)
'3.141593e-02'

--
nosy: +mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34273] %f is confusingly associated with fixed point format

2018-07-29 Thread Michael Fischer


New submission from Michael Fischer :

In section "7.1.3.1. Format Specification Mini-Language" of the documentation 
(https://docs.python.org/2/library/string.html) both %f and %F are labelled 
"Fixed point". This is confusing for someone who a) transitions over from C or 
variants or b) knows the difference between fixed and floating point numbers. 

I suggest either changing the "Fixed" to "Floating" or explaining what is meant 
by "Fixed Point" (because I'm sure there's a reason why someone has named it 
like that in the first place).

--
assignee: docs@python
components: Documentation
messages: 322644
nosy: MikeFoxtrot, docs@python
priority: normal
severity: normal
status: open
title: %f is confusingly associated with fixed point format
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com