# finding discontinuities of a black-box function

Suppose one has a black-box function which can be evaluated anywhere (cheaply) on a specified interval $[a,b]$ and has no noise (except floating point granularity, say). What would be the best way to find the discontinuities of this function? (I don't know how many, there may be none.) I can think of some straightforward methods (uniform sampling, refine where there are large differences between samples, ...), but perhaps there is a better way?

-
I think perhaps this question should be migrated to Computational Science? –  Shuhao Cao Apr 30 '12 at 22:32
I don't think you can find discontinuities without knowing something more about the function. No matter what you know about it at points $a$ and $b$, it could be continuous on $[a, b]$ or it could have any number of discontinuities anywhere on $(a, b)$, and the values at $a$ and $b$ tell you nothing in general. –  MJD May 1 '12 at 5:15