Talk:Convert decimal number to rational: Difference between revisions

 
(2 intermediate revisions by one other user not shown)
Line 64:
::::::: That was sort of my point -- that floating point numbers (regardless of the base used) are necessarily approximations in a wide variety of contexts. When dealing with measurements of distance, for example, this is assumed (since the measurements themselves are going to be approximations). That said, the task description just says "decimal number" and not "floating point". Still... the same holds there: finite length decimal numbers can only approximate fractions whose denominators are not representable exactly as powers of 2 and 5. --[[User:Rdm|Rdm]] 22:08, 13 August 2012 (UTC)
 
== What do you mean by ''Decimaldecimal number''? ==
 
This task confuses me. I was told at school that a decimal number is a rational number which, once written in decimal notation, has a finite number of decimals.
Line 72:
<math>1.1007 = {11007\over 1000}</math>
 
If you consider repeating decimals, then you're talking about rationals, and the task then consists in finding the numerator and the denominator of a rational, given its integer part and its (possibly infinite, but repetitive) list of decimals. This should be clarified imho.--[[User:Grondilu|Grondilu]] 00:21, 19 November 2012 (UTC)
 
== Task needs clarification / splitting up ==
 
Years after the above discussions, the task is still not clear. The solutions I checked have interpreted it in one of the three following ways:
 
# Take an '''exact''' rational number with a '''terminating decimal''' representation, and convert this representation to a fraction.
#: <small>This is what we've probably all had to do in math class in middle school. Multiply numerator and denominator by the appropriate power of ten to get an integer fraction, then reduce to lowest terms.</small>
# Take an '''exact''' rational number with a '''[[wp:Repeating_decimal|repeating decimal]]''' representation, and convert this representation to a fraction.
#: <small>Also middle-school level stuff, but slightly more interesting.</small>
# Take an '''inexact (floating-point) approximation''' of a rational number, and try to find the fraction that best matches it under certain parameters (e.g. limited digit size of the numerator/denominator).
#: <small>This one is more involved.</small>
 
This means that many of the solutions are currently not comparable with each other. I flagged the task with [[Template:Clarify task]] for now, but how should it be resolved? One idea would be to make this task about (1), with (2) as extra credit, and split off (3) as a separate task called "Approximate floating-point numbers as fractions" or similar. Thoughts?<br>
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 15:55, 21 August 2016 (UTC)
Anonymous user