Talk:Getting the number of decimal places: Difference between revisions

→‎wording of the task: added a new talk section.
(→‎Strings: Change.)
(→‎wording of the task: added a new talk section.)
Line 19:
 
===Strings===
 
The "number of decimals" I took as being a function of how a number is represented. It is either stated implicitly or implied by its ''string'' representation. 1.0, 1.00, 1.000, and 1.0000 would all have the same floating point value in Python, but when read can suggest differing levels of precision used in calculating a value, (at least in Physics and Engineering when they pay attention to significant digits). --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:12, 16 August 2020 (UTC)
: Normally I would agree, but the reference implementation (Ring) does no string parsing whatsoever as far as I can tell. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 08:45, 16 August 2020 (UTC)
Line 29 ⟶ 30:
 
Hmm, still no input from the original author. The task description together with its initial implementation from the originating author are imprecise. This needs changing or abandoning. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:42, 23 August 2020 (UTC)
 
: I think it's too early to throw the baby out with the bath water.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:57, 23 August 2020 (UTC)
 
 
== wording of the task ==
 
I had a little uneasiness when reading   ''get the number of decimals''.       I presumed several things.       --- Yeah, yeah,   I know what presumption can do and what it can lead to --- a very steep and fast decent into chaos and self-fulfilling definitions.   But, I trudged on.
 
By   ''decimals'',   I presumed the task's author meant decimal ''digits'',   that would presume   (to me)   that the number is expressed in base ten,   or is to be converted to base ten,   depending on what programmers are assuming whatever flavor of expressing numbers that their (favorite) computer programming language(s) assumes/uses such animals.
 
By all the other programming examples, &nbsp; included the task's preamble, &nbsp; I also understood &nbsp; (and observed) &nbsp; that the &nbsp; ''number&nbsp;of&nbsp;decimals'' &nbsp; implied that it meant the &nbsp; ''number&nbsp;of&nbsp;decimals'' &nbsp; (decimal&nbsp;digits) &nbsp; &nbsp; <u>past the decimal point</u> &nbsp; &nbsp; &nbsp; (if there is a decimal point).
 
If there's no decimal point, &nbsp; then define/assume that the number of decimals &nbsp; (past the decimal point) &nbsp; is zero.
 
Another &nbsp; (perhaps more descriptive) &nbsp; use of the phrase &nbsp; '' decimal&nbsp;digits'' &nbsp; (past the decimal point) &nbsp; would be &nbsp; ''fractional&nbsp;digits''.
 
I further assumed that &nbsp; if &nbsp; a number was expressed in exponential format, &nbsp; the number should/would be converted to a number without exponentiation, &nbsp; and then &nbsp;that&nbsp; number would be then examined.
 
I took the word &nbsp; '''get''' &nbsp; to mean &nbsp; ''obtain'', &nbsp; ''find'', &nbsp; or &nbsp; ''determine'', &nbsp; and then, presumably, &nbsp; display/show the results. &nbsp; &nbsp; (With the usual caveat: &nbsp; ''here, on this page''.)
 
After all, if one &nbsp; ''gets'' &nbsp; (obtains) &nbsp; the number of decimals in a given number, &nbsp; then what? &nbsp; Display them? &nbsp; Everybody &nbsp; (so far) &nbsp; has seemed to just display the &nbsp; ''number'' &nbsp; of decimal (digits) found &nbsp; that are past the decimal point.
 
I understand that number of computer programming language's internal representations of decimal numbers with fractional digits don't have a concept of superfluous decimal zeros, &nbsp; unless the decimal number is, for instance, enclosed in quotes and/or by some other notation(s). &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:57, 23 August 2020 (UTC)