Some examples of using the logistic function in smooth approximations for ifthen and max/min:
- ifthen(x1>x2, y, z) = z + (y-z)*0.5*(1+tanh(k*(x1-x2)))
- ifthen(x1<x2, y, z) = y + (z-y)*0.5*(1+tanh(k*(x1-x2)))
- max(x,y) = ifthen(x>y,x,y) = y + (x-y)*0.5*(1+tanh(k*(x-y)))
- min(x,y) = ifthen(x<y,x,y) = x + (y-x)*0.5*(1+tanh(k*(x-y)))
Some graphs with k=100:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBk8C8zt6mrIEah5cIlxJVLfJcwz-45SJOaRsmsxdF-FsmQOSBkk-YaKLjYMZYY-2befG1igspMgcbCLksr-8i7U5KnrByhLa_UFW48d2Ko2SllWRPvnSQMsd197ynW2Dm7XxyIVzZa8AS/s200/max.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioRrzyrfrz5nkpfzlJL7mztxH2a07FLZMr2BmRz797ASynruc35FZnB_E278yHC-ppuxhNAtSdEbpKwv2hg5jXibM_79mTixDL1oG4iFeJwY3BltwziLPwQ7SuidC2xib0rftxLi6OIj8e/s200/max2.png)
this is super powerful, could you give us more on that or any smooth approximations pdf or books to read ?
ReplyDeleteThank you very much.
Sorry: I don't know such reference.
ReplyDelete