# Find edges of a piecewise curve

I have a continuous function f[x], and I want to calculate the coordinates of the discontinuities in Round[f[x]]. My code needs to do this computation many thousands of times, so very efficient code is appreciated!

• Can you explain further? Round[x] has discontinuities at each integer value of x. So Round[f[x]] would have discontinuities every time f[x] is an integer. If this what you are looking for? And what does this have to do with edges of a piecewise curve? Jul 6, 2020 at 23:16
• Indeed, this is what I am looking for! Sorry if my question is not clear: I want to find where Round[f[x]] changes. Perhaps piecewise is not the correct terminology.
– Guy
Jul 6, 2020 at 23:17
• Maybe you could tell us what kind of function f[x] is? Or provide a simple example? Jul 6, 2020 at 23:20
• f[x] is a continuous function on some finite interval, say x in [0,1]. That is all that's known. For a simple example, consider a/(1 + b x) Sin[c x] for a,b,c >1
– Guy
Jul 6, 2020 at 23:21
• I'm not sure what kind of answer you can expect. Consider (3/2) Sin[1/x] on [0,1]. This has an infinite number of such points. Jul 6, 2020 at 23:25