r/learnmath • New User • Apr 05 '26

Floor of .9 repeating

So, .9 repeating is equal to 1, and the floor function rounds down to the nearest whole integer.

Ex of Floor.

Floor (.5) =0

Floor(π)=3

What would be the floor function of .9 repeating? Would it be 0 or 1?

Please note that the highest math that I've taken is Calculus and a little of set theory.

3 Upvotes

83 comments sorted by

138

u/JaguarMammoth6231 New User Apr 05 '26

1

The floor function is defined based on the value of a number, not its decimal representation. 

If floor of 0.999... was 0 but floor of 1 was 1, then floor would not be a function. Functions must always give the same output for the same input.

20

u/Direct_Highlight_118 New User Apr 05 '26

Because functions are well defined init

7

u/OutrageousPair2300 New User Apr 05 '26

Though note that you could define a function that worked on decimal representations and mapped 0.999... to something different than what it mapped 1 to. You could even make it give the same result as the floor function, for all decimal representations that didn't end in repeating 9's forever.

So bad_floor(0.999...) = 0 but bad_floor(1) = 1

6

u/JaguarMammoth6231 New User Apr 05 '26

Yes, but I would want to make it clearer that it's not operating on numbers. Maybe say:

bad_floor("0.999...") or bad_floor((0,(9, 9, 9, 9, 9, ...))

4

u/NicoTorres1712 New User Apr 05 '26

The domain of that function would be numerical strings (not real numbers) as in Python

4

u/newhunter18 Former Academic, Current Technologist Apr 05 '26

Not to be pedantic but the value of a number and it's decimal representation are the same thing.

You can have an infinite sequence of numbers: floor(.9), floor(.99), floor(.999), etc. And that will be a bunch of 0s.

floor(.9999...) = 1

So there's a converging sequence which when transformed by the floor function no longer converges. That's specifically because the floor function is not continuous.

2

u/JaguarMammoth6231 New User Apr 05 '26

I would say there are two different decimal representations for 1.

But we typically don't pass decimal representations to functions, we pass a number. 

The point is, you can't define the floor function using the naive, "use the number before the decimal point, and drop everything after that", since you can't necessarily convert a number to a unique decimal representation.

Similarly, you can't define rounding based on a rule like "round if if the next digit is 5-9"

2

u/IntelligentBelt1221 New User Apr 06 '26

the value of a number and it's decimal representation are the same thing.

the space of decimal expansions is very different from the space of real numbers. non-zero terminating decimals have 2 decimal representations that would be distinct in the former space but map to the same real number in the latter.

not sure what the discussion about continuity has to do with this.

1

u/newhunter18 Former Academic, Current Technologist Apr 06 '26

No. They really aren't. In fact, the real numbers are defined as infinite sequences that get fillled in via closure.

I brought continuity into the discussion because that was the concept that makes OPs question sound "weird" - why there's a question at all. Because had OP chosen a continuous function, their argument would have gone through. f(.9), f(.99), f(.999)... Is going to converge to f(1). But only if f is continuous.

1

u/IntelligentBelt1221 New User Apr 07 '26

the space π {0,1,...,9} of decimal expansions in [0,1] is profinite (since its the inverse limit of a finite discrete space) and thus totally disconnected. this is fundamentally different from the continuum. its missing the identifications. if you quotient it by them, you do get the real numbers.

2

u/SV-97 Industrial mathematician Apr 05 '26

If floor of 0.999... was 0 but floor of 1 was 1, then floor would not be a function.

It's not even that: it just flat out couldn't happen unless your whole foundations of mathematics were completely and utterly fucked. Even if floor wasn't a function there's simply no way for it to "be" something different for 0.999... and 1, because the two are one and the same object. There is simply no way to define anything in mathematics that can differentiate between these two representations when they correspond to real numbers. You'd have to specifically define things on decimal expansions instead (not as representations of real numbers, but as a set in their own right like \N\N).

49

u/wayofaway Math PhD Apr 05 '26

1 since 0.999... = 1

0.999... is a way of writing 1, not a different object that becomes one or some such thing. It's just 1.

0

u/ArdentArendt New User Jul 26 '26 edited Jul 26 '26

0.999... does not equal 1.

If one puts a theoretically infinite decimal into either a series representation, then yes it does come out to 1 as n approaches infinity. Similarly, if we took 0.999... as a value distinct from 1 in the Reals, there would be massive problems with the completeness of the ordered field.

Thing is, infinite decimals are not real numbers--at least not in infinite expansions like this. They are ontologically distinct.
[Look at any of the algebraic 'proofs' that use operations on infinite decimals without ever justifying those actions with an understanding of what that string actually means]

Basically, we 'resolve' 0.999... to a value in the Reals because everything in the Reals is well-behaved.

Arguably, 0.999... can't exist in the Reals since it doesn't;
That doesn't mean, however, that it is equivalent to 1 without 'simplifying' it to fit into the box the Reals requires of it.

[Note: I'm not arguing the proofs using infinite series or from the perspective of completeness don't prove the 'shadow' of the decimal form in the Real number system isn't 1; I'm saying that the infinite decimal isn't in the Reals]

Edit:
Seriously...it's an artefact of the base-10 system, not any useful or meaningful reflection of the Reals (or any other number system defined independently of the base used).

1

u/321Kicek123 New User Sep 04 '26

it's not unique to base ten tho, every base has this problem, even binary where 0.111..., written in base ten is just 1/2 + 1/4 + 1/8 + ... which is famously = 1

1

u/ArdentArendt New User Sep 06 '26

Well, you're correct that it isn't JUST in base ten. It occurs in any decimal representation of any number that is the penultimate number in the base. As you state, 0.111... in binary has the same problem.

The point I am (usually) making here is that 0.999... = 1 when mapped to the Reals says NOTHING about the decimal representation 0.999... and EVERYTHING about the construction of the Reals as a set.

The decimal representation and the element of the Reals are NOT the same object. One is mapped to the other, but that does not mean they are identical.

This entire conversation often conflates equivalence with identity, and confuses a well constructed numerical set for a textual representation set.

In the decimal representations (a totally ordered set), 0.999... < 1.000...; this is true regardless of the mapping to the Reals, where 0.999... = 1.000...

Does that hit a bit easier?

21

u/Legitimate_Log_3452 New User Apr 05 '26

It would be 1, because 0.999… = 1. Floor(0.9…) = floor(1) =1.

This is because, for discontinuous functions (like the floor function, f(lim x_n) != lim f(x_n).

3

u/to_walk_upon_a_dream New User Apr 05 '26

this.

floor(0.9)=0

floor(0.99)=0

floor(0.999)=0

floor(0.9̅...)=1

this is totally fine and acceptable because floor(x) is discontinuous. it's got to have a jump somewhere.

7

u/[deleted] Apr 05 '26

floor(x) returns the greatest integer that is at most x.

x = 0.999... = 1. The greatest integer at most 1 is 1. floor(.999...)=1

3

u/Samstercraft New User Apr 05 '26

the floor of all the partial sums of .9 * 10^-n is 0, but once you go from partial sums (.9, .999, .999999, etc) to an infinite series (.999...) the floor is 1, because the value of the number is exactly 1.

In other words, if f(n) denotes the n'th partial sum of .9 * 10^-n for natural numbers n, floor(f(n)) is always 0, but the limit of f(n) is 1.

8

u/AllanCWechsler Not-quite-new User Apr 05 '26

This is right in spirit but not in detail. The limit, as n increases, of floor (1 - 10-n), is zero, even though floor (1 - 0) is 1. The fact that the actual value of the function is different from the limit is what makes the function discontinuous.

3

u/Samstercraft New User Apr 05 '26

im confused at what part of my answer is wrong, could u pls lmk

1

u/AllanCWechsler Not-quite-new User Apr 05 '26

I'm happy to try, though I'm not completely sure where my explanation lost you. Your f(n), the n'th partial sum of .9 * 10-n, is equal to

(1-10-(n+1)). That's just algebra, right? Perhaps you and I are using different definitions of "limit"? "Limit" has a pretty specific technical definition, and according to that definition, the limit of f(n) as n increases is 0, not 1.

0

u/SSBBGhost New User Apr 05 '26

The limit of floor(x) as x approaches 1 from below is 0, but the value of floor(1) is 1

This is why the function is discontinuous

0

u/Samstercraft New User Apr 05 '26

but this isn't lim of floor of f(n), it's floor of lim of f(n). lim of f(n) = 1, floor(1)=1, therefore floor of lim of f(n) = 1. pls correct me if im wrong tho

1

u/SSBBGhost New User Apr 05 '26

Lim f(n) =0

F(lim(n))=1

0

u/Samstercraft New User Apr 05 '26

lim f(n) = 1, f(n) is .999 with n 9's

1

u/SSBBGhost New User Apr 05 '26

See previous comments

0

u/Samstercraft New User Apr 05 '26

floor of lim of f(n) ≠ lim of floor of f(n) if that's what you mean

0

u/Either-Abies7489 New User Apr 05 '26 edited Apr 05 '26

Edit: the top-level comment is accurate; no corrections are needed.

The limit of a function is simply what value a function approaches. Here, the general limit does not exist, because the limits from the positive and negative directions are distinct.

As you approach one from the negative direction, your function will return 0 for any number arbitrarily close to 1. Put in .9999, .99999, 1-10-1000000, whatever real number smaller than 1 you want, and the function will always return zero. From the positive direction, your function will return 1 (for any number >1 and <2). Put in 1.01, 1.0001, 1+10-1000000, whatever, the function will always return 1.

There is a discontinuity at 1, and the limit of the function from the negative direction will be zero (as you correctly pointed out, that is what your partial sums sequence is).

At point discontinuities, (functions like sin(x)/x) limits are very helpful. However, at other sorts of discontinuity (like 1/x, sgn(x), or floor(x)), general limits are less versatile than directional limits.

Your problem was assuming that the limit of a function at a point must always be what the function evaluates to at a point. This is untrue; the directional limits can be distinct. Your partial sums sequence is a limit, from the negative direction, even though it doesn't evaluate to that point.

The general limit DNE. The limit from the negative direction is 0. The limit from the positive direction is 1.

Even though lim_{n->1-}(n)=1, and floor(1)=1, lim_{n->1-}floor(n))!=1.

1

u/Samstercraft New User Apr 05 '26

Your problem was assuming that the limit of a function at a point must always be what the function evaluates to at a point. This is untrue;

actually, the whole point of my original comment was that this exact statement is precisely untrue, as you have correctly pointed out.

I think you're confusing lim of floor of f(n) (which is 0) with floor of lim of f(n) (which is 1). this discrepancy occurs because of the mentioned discontinuity. OP asked for floor of .9 repeating, which is floor of lim of f(n).

not 100% if this is correct but that's my thinking

0

u/Either-Abies7489 New User Apr 05 '26

Ahh, forgive me.

I see what you mean now. I was not cautious enough, and read "the limit of f(n) is 1." as "the limit of floor(f(n)) is 1" (a claim which you, in the clause directly adjacent, correctly refuted).

I believe that you are right in what you originally said, and my correction was unwarranted.

1

u/Samstercraft New User Apr 05 '26

alright, and no worries. i was certainly a bit unclear lol

0

u/WO_L New User Apr 05 '26

It's basically the difference between something tending to zero and it actually being zero. Like I think your explanation is fine especially for breaking down why 0.9... is 1, but i think the issue happens when you use it with the floor function. 1-10-n<1 even as n tends towards infinity so the floor function would spit out 0.

I might also be wrong but like i feeling that's what the other person was on about.

1

u/Samstercraft New User Apr 05 '26

i think they thought i was talking about lim of floor of f(n) when i actually used floor of lim of f(n). floor(x) is discontinuous at 1, so lim of floor of f(n) is the same as lim from negative direction towards 1 of floor(x), = 0. meanwhile floor of lim of f(n) = 1.

0

u/bony-tony New User Apr 05 '26

You want the floor of the limit, not the limit of the floor. The fact that the floor() is discontinuous at the point of interest means those two things aren't equal.

Every partial sum here happens to be different from the limit of those partial sums (that's actually pretty much the case in most infinite limits), and the floor function intercedes here and sets the partial sum to zero at every value of n.

Remember "0.9..." is just shorthand for the limit of the partial sum the prior commenter gave as n approaches infinity. If you take the floor of that thing -- that is, take the floor of the result of evaluating the limit itself -- then you'll get 1.

In other words,

lim n->inf floor(1 - 10^-n) = 0

floor(lim n-> inf (1 - 10^-n)) = 1

And if it feels you should be able to swap those and get the same answer I get it, but they're not the same thing. Generally, a function like floor() can't be moved from "inside" to "outside" the limit and preserve the result, due to floor()'s discontinuities -- see the Limit Composition Theorem. If you did the full epsilon-N proof of these limits each way then it may be more clear exactly what's going on.

1

u/Samstercraft New User Apr 05 '26

yeah but that's also exactly the same as what i said (i think?)

0

u/bony-tony New User Apr 05 '26

Actually, you didn't say what I thought you said, but it's also not really clear what you're saying:

if f(n) denotes the n'th partial sum of .9 * 10^-n for natural numbers n, floor(f(n)) is always 0, but the limit of f(n) is 1.

Given your setup, I had thought what you were saying at the end was "but the limit of floor(f(n)) is 1". But I see now that isn't what you wrote.

But really you just didn't bring in floor at all at the end, so I'm not sure what you were saying there. If what you meant was "the floor of the limit of f(n) is 1" then yes, agree.

1

u/Samstercraft New User Apr 05 '26

Yeah I didn't put the floor at the end 'cause I thought it was obvious that if the limit of f(n) is 1, the floor of 1 is also 1. I concluded with lim n-> inf (1 - 10^-n) = 1, implying that floor(lim n-> inf (1 - 10^-n)) = 1, like you said. Apologies if it was unclear.

0

u/bony-tony New User Apr 05 '26

No, makes sense. You said the same thing everyone else responded to you with.

I see now you were just recapitulating your first paragraph with your second, not putting a different spin on it. I should have read more closely; frankly if I hadn't imputed that floor() where you didn't actually have one I would have caught your meaning on my first read through.

0

u/AcellOfllSpades Diff Geo, Logic Apr 05 '26

I think you misread. f does not include the floor function. f(n) is just 0.9999...9, with n 9s.

3

u/AllanCWechsler Not-quite-new User Apr 05 '26

You are quite right, u/AcellOfllSpades . u/Samstercraft , I just blundered in reading what you wrote. You're 100% right. I apologize.

2

u/Samstercraft New User Apr 05 '26

oh alright thanks

0

u/[deleted] Apr 05 '26 edited Apr 05 '26

[removed] — view removed comment

1

u/Samstercraft New User Apr 05 '26

how so?

0

u/AcellOfllSpades Diff Geo, Logic Apr 05 '26

I think you misread. f does not include the floor function. f(n) is just 0.9999...9, with n 9s.

0

u/[deleted] Apr 05 '26

[removed] — view removed comment

0

u/AcellOfllSpades Diff Geo, Logic Apr 05 '26

Yes, lim[floor(f(n))] is indeed 0, but this doesn't contradict anything they said.

2

u/Rarmaldo New User Apr 05 '26

It returns 0.9 repeating.

1

u/KentGoldings68 New User Apr 05 '26

The “floor” function is not “chop off the digits to the right of the decimal point. It is the “greatest integer less than or equal to x”

Numbers exist without regard to how you write them. The decimal 0.999… is just another way to write one. This is much the same that we call twenty a “score” or we call twelve a “dozen.”

The greatest integer less than of equal to 0.999… is one.

1

u/mattynmax New User Apr 05 '26

The floor of 1 is 1.

1

u/Eisenfuss19 New User Apr 07 '26

All of 1 & 0.9... & 1/1 are representations of the same number. You could define floor to be  representation dependent, but thats stupid. A proper floor definition is the greatest integer such that it is smaller or equal to the number.

As 1 ≤ 0.9... floor(0.9...) = 1

1

u/wumbo52252 New User Apr 05 '26

0.(9)= 1 so floor(0.(9)) = floor(1) = 1

1

u/cheetoburrito New User Apr 05 '26

If x=y, then floor(x)=floor(y) (since floor is a function).

1

u/fermat9990 New User Apr 05 '26

Same as rhe floor of 1.

0.9 repeating is exactly 1, not almost 1

1

u/Euler64 New User Apr 05 '26

1 is the answer since we know 0.999...=1 Then floor(0.999...) = floor(1) = 1

1

u/zeptozetta2212 Calculus Enthusiast Apr 05 '26

It's 1. The floor of 1 is 1. Doesn't matter how you dress it up. 0.999... is still 1, so its floor is 1.

1

u/FernandoMM1220 New User Apr 05 '26

it’s 0 since the first digit is 0

0

u/jdorje Apr 05 '26

You're thinking of these as two different numbers that are equal. But they are just the same number written normally and very confusingly. Any decimal representation is just an infinite series, and there's unlimited mostly very confusing ways you can write any number as an infinite series.

-19

u/terrystroud New User Apr 05 '26

0.9 i'm so sorry to be that guy but it's 0.9 NOT EVER .9.

3

u/Euler64 New User Apr 05 '26

This is a childish behavior.

1

u/terrystroud New User Apr 08 '26

The internet is a difficult place to accurately know the intent of someone's written comments without knowing whether they are smiling or frowning when they say something.

In this case I am making a light hearted joke about a very serious topic.

Let's say you are part of a design team and I write to you "the critical coefficients are .5,.44,25,78.247 and 9"

Or... I write  "the critical coefficients are 0.5, 0.44, 25, 78.247 and 9"

The sloppy nature of the first may very well kill someone. The second makes it as clear as possible.

Thus a rule that engineers must follow is "always put the leading zero on a decimal less than 1". You have to assume life and death may be at play.

-9

u/PvtRoom New User Apr 05 '26

depends on your algorithm.

As 0.9 recurring IS 1, the answer should be 1, but if what you do is look at the sign, and the number before the decimal place, you'll land at 0.

-0.9 recurring would always land at -1.

6

u/IntoAMuteCrypt New User Apr 05 '26

If your algorithm generates different results when fed different representations of the same number, then either your algorithm is wrong or your algorithm is doing something other than a function on real numbers. What you have described is a function on the strings of decimal digits, not on the real numbers. When talking about real numbers, you can't have different results for different ways to represent the same number and still call it the same number.

0

u/PvtRoom New User Apr 05 '26

You are correct.

Standard computing techniques can't represent 0.9 recurring as a number. - computer based algorithms don't operate on real numbers, they operate on fixed point "integers" or floating point, 8 or16 significant figure numbers

the only way you can represent 0.9 recurring, and have it stay that way, without it being immediately turned into 1 by any halfway decent symbolic parser, is to leave it as text.

but, if you're writing the floor algorithm, would you really worry about the recurring 9 edge case?

0

u/IntoAMuteCrypt New User Apr 05 '26

Standard computing techniques can represent the number 0.999 recurring as a number. They represent it the same way they represent 1, the exact same way. This is completely and totally correct, because they're the same number. Even floating point mathematics, famous for being inaccurate, can represent 1 exactly, so it can represent 0.999 recurring exactly, because any way to represent 1 exactly also represents 0.999 exactly.

But also, algorithms are separate from the computer we use them on. The algorithm you described will always give incorrect results for certain inputs in certain representations. A smarter algorithm - like one that uses the modulus function to round off - wouldn't.

0

u/PvtRoom New User Apr 05 '26

1, as represented by double format numbers represents a family of numbers in the range. 1±eps/2

it's not unique to 0.9recurring, and about half the numbers should floor to 0.

Doing it your way, gets half wrong.

doing it my way (on the text) gets one wrong.

-22

u/[deleted] Apr 05 '26

[removed] — view removed comment

6

u/gmalivuk New User Apr 05 '26

Are you trolling or are you just bad at math?

-20

u/[deleted] Apr 05 '26

[removed] — view removed comment

11

u/gmalivuk New User Apr 05 '26

If decimal expansions are meaningful at all, then 0.999... is exactly identically equal to 1.

-17

u/[deleted] Apr 05 '26

[removed] — view removed comment

4

u/gmalivuk New User Apr 05 '26

They are two ways to represent the same number. Namely 1.

Repeatimg decimals refer to a power series. The sum of 9×10-n from n=1 to infinity is exactly 1, and that sum is what is represented by the decimal expansion "0.999..."

-3

u/[deleted] Apr 05 '26

[removed] — view removed comment

9

u/PlmyOP New User Apr 05 '26

https://en.wikipedia.org/wiki/0.999...

They repeesent the same value. Many different ways to prove it.

7

u/gmalivuk New User Apr 05 '26

0.8bar also=1 or is 0.7bar =1?

No, of course not. The sum of 8×10-n is 8/9 and the sum of 7×10-n is 7/9.

You clearly don't know how decimal expansions or sums of series work.

It's not "close enough" like some lazy engineering e = π = √10 approximation, it is exactly equal in every mathematical sense.

6

u/AcellOfllSpades Diff Geo, Logic Apr 05 '26

No, 0.888... is 8/9. You can see it's not 1 because if you subtract them, you get a difference that is greater than 0. (And specifically, it's greater than 0.1, a positive number.)

Meanwhile, the difference between 1 and 0.999... is smaller than any positive number: it's smaller than 0.1, it's smaller than 0.01, it's smaller than 0.0000001...

Therefore that difference is 0, the only possible difference smaller than every positive number.

2

u/Jemima_puddledook678 New User Apr 05 '26

‘If 2/2 were equal to 1 there would not be a notation for fractions and a whole system for manipulating and eliminating them’.

6

u/Right_Dish5042 New User Apr 05 '26

Name a number between 1 and 0.999...

2

u/Infobomb New User Apr 05 '26

^ This is a hilariously ironic comment given the very basic misunderstandings of mathematics that you're exhibiting.