Hacker News new | ask | show | jobs
by brianwillis 4002 days ago
This doesn't seem to work right for negative numbers. The article says the rule is "each number must be larger than the one before it", but if you try -2 -4 -6 it says that pattern doesn't match the rule.

Maybe I'm just being pedantic here, but last I checked -6 was larger than -4.

2 comments

"Larger" in this context means "greater than" in the usual ordering of the real numbers.
It works for floating point numbers -- 0.01 0.02 0.04 for example. So it's a geometric series that has to start with a positive number and doubles. (The submit button and the show the answer button were broken for me.)
That's unintentionally hilarious.
Yeah I was wrong in exactly the way the article expected :-)

But the submit button being broken did kind of suck.