How would you find (n-1)! given n!? (Think for a moment before moving on.)
Dividing by n of course, (n-1)!=n!/n. This immediately extends the notion of factorials backwards to 0!=1!/1.
It's only a matter of checking to see which factorial-dependent formula (usually arising in context of combinatorics, or gamma function) fits - and it turns out (luckily) that everything fits.
Edit: Even if it tuned out some things don't fit, we would still be free to define 0! as 1 as a convention. But the fact that everything fits, makes it a useful definition - prevents you from checking a lot of edge cases, eliminating the need of many ``if (k==0) ...`` from codes.
If you have n! in binary, count the number of zeros at the end of its binary expansion and call this count k. The number k+1 approximates n relatively closely (the error n-k is the number of ones in n's binary expansion—see http://www.cut-the-knot.org/blue/LegendresTheorem.shtml).
Well, nobody has ever said that 1/0 will get you infinity, because it won't. Interpreted directly, it's an illegal operation, and there is no result because the computation is impossible. Sure enough, the gamma function doesn't exist at nonpositive integers.
But wait! If you interpret 1/0 in a limit sense... there is no result, because there's no constraint that the neighborhood of 0 is entirely positive or entirely negative (obviously, the neighborhood of 1 is entirely positive). You'd only get an answer of "infinity" if you were limiting a function like "1 / 0^2".
Sure enough, we see that the gamma function has no limit at the nonpositive integers, always approaching positive infinity from one side and negative infinity from the other side. So the factorial of a negative integer doesn't exist. What point are you trying to make?
> Sure enough, we see that the gamma function has no limit at
> the nonpositive integers, always approaching positive
> infinity from one side and negative infinity from the other side.
On the complex plane, there is more than one side to approach from. And the convention that was used when I learned complex analysis (stereographic projection), is that there is only one value of infinity, which can be approached from many directions. Under this model, the point at infinity is much better-behaved than the points at infinity in real analysis.
The Gamma function is characterized as having poles at the negative integers. That's a very straightforward description, and the behavior is well-understood and relatively easy to deal with. Certainly easier to deal with than the value of e^-x as x->0 (that singularity is essential, rather than a pole).
Yep, it sure does. The magnitude of Gamma(x) grows without bound as x approaches any negative real integer. The negative integers (and the point at infinity) are also the only points where Gamma(x) has a singularity.
Thanks - that's actually a pretty good idea. With the base structure already needed for the bubble charts - animations, drawing axes, etc., it is not gonna be too difficult to extend this to other chart types.
May be when I get some spare time - I will put it into this.
I wanted to mean evolution will improve us eventually, only if those people with aggressive impulses have severe disadvantage going forward in the society. But that premise is debatable, I agree.
This is inspired by the Password Hasher addon for Firefox. It will hash a password and generate unique strong password from the same input, varying by websites where it is called.
Reason I made it is 1) it has a custom salt, so a hacker cannot potentially bruteforce with this as a layer if you have set your 'unique master password', and 2) this is bookmarklet - no strong dependency on Firefox.
Thanks for making this. Although the best security would be a unique salt per account, that would make the portability of the app a lot tougher.
Either way, this is a great way to prevent brute force attacks from determining a user's password, as well as preventing a serious incident should a website store credentials in plain text, then get compromised.
Of course, in a perfect world, everyone should be using unique, random passwords for each account they have on the Internet... but this is a great way to protect people that are using relatively insecure passwords across the board.
I'd suggest allowing custom salts so that users can enter their bookmarklet on other browsers, enter their "custom salt," and be able to get additional randomness. If this were to catch on, we wouldn't want people adding the salt to cracking tools etc (although that would be a lot more work/processing power on their part).
Sorry this was long winded. Cool idea, nice implementation!
Thanks for the comment. Not sure if I followed the custom salt part - unless it is already implemented at the bottom of the page, where I call the salt as master password in the custom bookmarklet. Would love to know your thoughts in case you meant something else.
I fit that storyline background perfectly. With one major exception, I got a job into finance risk management from campus, because my major was in Statistics. (Though after 8 years of experienced, I learned that statistics is not really used in such jobs - anything more than regression is not understood well (even regression in some cases), and 'intuitive' non-statistical solutions are always sure to be better received and sold despite offering far subpar solutions - but I digress.)
I recently got a call from Google for my rank in Code Jam. I explained my position and expressed my desire to work on programming. The HR, a very nice person, made it all but definite that because of my background and experience, I should look for a risk analysis role and not coding. He is still willing to set up a programming interview if I insist... but I don't know what to do :(
http://nbviewer.ipython.org/gist/hirak99/e7902bd49454cbc23bc...