You'll want to take a close look at what FC says in that second link then. Not sure if he goes into detail (skimmed the thread) but he knows what he's talking about when it comes to spawn code in MC.
Nice. I've been peeking at
what I think is the authoritative source and it's... well, let's just say the deobfuscation process didn't help it very much.
Looking at the early parts of net.minecraft.world.SpawnerAnimals.findChunksForSpawning(), though, the first thing that is obvious is that Minecraft won't consider spawning anything in chunks that are further than a 17x17 chunk radius of a player (so, a 272x256x272 cuboid centered on the middle of the chunk the player is in).
Beyond that, there's a hunk of code later that goes
Code:
if (par1WorldServer.getClosestPlayer((double)f, (double)f1, (double)f2, 24.0D) == null)
-- if a player is closer than a 24 block radius, it will not spawn the entity. Oddly, what I'm *not* seeing is any limiter on being too *far* from a player. The next hunk of code checks for distance from world spawn less than sqrt(576) == 24 blocks and, again, refuses the spawn there.
I thought maybe canCreatureTypeSpawnAtLocation would say something, but that's only concerned with the blocks around (for water creatures, is there liquid? Otherwise, does the block material have a solid top surface? If so, does it allow spawning, is it not bedrock, and are there two air-like blocks above the spawn block?). There are calls out to other interesting methods, though (including asking through the Forge event bus if anything can spawn at the given location), so maybe there's something in there. At the moment, though, I see no reason not to believe that mobs can spawn anywhere in the aforementioned cuboid with a 24-radius sphere cut out around the player.
This is, perhaps, getting slightly off-topic for "simple" answers, though.
Edit: Oh, and Minecraft wiki has the rest of the answer:
However, hostile mobs (and some others) that move farther than 128 blocks from any player will soon despawn (see
Despawning), so even with a larger chunk loading radius, the mob spawning area is more-or-less limited to spheres with a radius of 128 blocks, centered at each player.