# Should \`min.(1,f)\` be broadcasting as \`broadcast(x-\>min(1,x),f)\`?

**URL:** https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554
**Category:** Internals & Design
**Tags:** question
**Created:** [August 25, 2017, 8:53am UTC](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554 "2017-08-25T08:53:41Z")
**Posts on this page:** 2
**Page:** 2

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [August 25, 2017, 9:43pm UTC](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554/21 "2017-08-25T21:43:48Z")

</div>

> [@dlfivefifty](#):
>
> it doesn’t work for functions that require break points

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?)

---

<div class="post-metadata">

### Author: ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)
#### Post date: [August 26, 2017, 6:55am UTC](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554/22 "2017-08-26T06:55:30Z")

</div>

Yes i think that’s the way to go, the argument is more academic then practical, in that the fusing behaviour is hard to predict from the docs.

Chebfun has turned off the auto-edge detection, but its still there if you specify a parameter. I think this was due to reliability issues. The basic idea was to use bisection to find the jump down to the bit.

I’m try to think of a way to find singularities automatically using auto-differentiation-like techniques, possibly combined with interval arithmetic, and bisection.

[Previous page](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554.md?page=1)
