# Plot won't show data expressed as large fractions

I'm trying to plot a probability function that has large fractions between 0 and 1, but Plot returns an empty graph.

The strange thing is that when I adjust the sampling using the output slider or adjust the line thickness, I can briefly see the graph before it goes away once I let go.

I'm currently on version 11.0.

Here's my code:

func[x_] := 365!/((365 - x)! 365^x)
Plot[func[x], {x, 0, 100}]


I've also tried defining func[x_] as N[...] (calculating the numerical value), but that makes no difference.

• I don't know how to fix this, but if all you care about is how the function looks like you can get around the problem by explicitly evaluating it for a list of values: ListLinePlot[Table[{x, func[x]}, {x, 100}]] – yohbs Apr 27 '17 at 2:50
• @yohbs That's okay for now, but I noticed this problem with several other functions involving really large or tiny numbers (can't recall them right now). I'm wondering if this is a bug or not. – jLee Apr 27 '17 at 3:33
• @jLee I get a plot using your code on MMA 11.1.0 . – Anjan Kumar Apr 27 '17 at 4:11
• @jLee I get a plot using \$Version "11.1.0 for Mac OS X x86 (64-bit) (March 16, 2017)" – evanb Apr 27 '17 at 6:03

For functions that might not work directly even on 64-bit machines, you might consider the old-fashioned way using logs:

func[x_] := Exp[LogGamma[365 + 1] - LogGamma[365 - x + 1] - x Log]
Plot[func[x], {x, 0, 100}] Use FactorialPower[] instead to sidestep any possible overflow issues:

Plot[FactorialPower[365, x] 365^-x, {x, 0, 100}] Comment

I am facing the same issue of seeing an empty plot.

"11.0.1 for Microsoft Windows (32-bit)"

Another alternative is to use DiscretePlot,

func[x_] := 365!/((365 - x)!* 365^x);

DiscretePlot[func[x], {x, 0, 100}, Filling -> None, Joined -> True] • Perhaps your issue is that you are on a 32-bit OS. On a Mac OS X x86 (64-bit) I have no problem. – Bob Hanlon Apr 27 '17 at 6:01
• @BobHanlon Maybe that is the case. – zhk Apr 27 '17 at 6:05
• @BobHanlon that may be the case since I ran it on my 64 bit Mac OS X machine and it worked, but not my 32 bit Windows machine – jLee May 2 '17 at 15:59