Q:

Compile decreases the number of returned list elements

I have:
LogisticMap = 
  Compile[{μ}, ({μ, #} &) /@ 
    Union[Drop[NestList[μ # (1 - #) &, .2, 300], 100]]];

Then:
μ = 0.001;
Length[LogisticMap[μ]]
Length[({μ, #} &) /@ 
  Union[Drop[NestList[μ # (1 - #) &, .2, 300], 100]]]

produces:
9
201

So the only difference is in Compile. Why does one produce only 9 results while the other 201 (which is correct)?

A:

First off, the compiled function is using machine-precision arithmetic. If you add RuntimeOptions -> "Quality" to your compiled function, as per the documentation, this specifically catches any underflow with small numbers, and you get the appropriate warning about the underflow.
With regards to your comment:

Yes, but I would expect them to be just zero not to trim the list. That is a bit unexpected. 

Your code trims the list because you use Union[] on a list that contains lots of underflowed zeros - of course it will be shorter, look up the definition of Union[]. If you take it out of the compiled code then all is well - the lengths of the arrays are correct, even if the accuracy of the result isn't correct.

