If you want to special-case a few such functions, there is no point in using dot calls at all for those functions; in such cases you could just call abs(f)
, like you currently do. The main point of using dot call syntax with ApproxFun, from my perspective, is to exploit fusion (so that you don’t have to create multiple temporary Chebyshev approximations when you compose several functions), but that will only ever work to the extent that you can auto-analyze user-supplied functions.
(I seem to recall that ChebFun automatically detects breakpoints for user-defined functions with discontinuities, by subdividing the interval if the coefficients aren’t converging at the expected exponential rate?)