Do you have a cell phone or tablet that uses WiFi when you're at home and the cellular network (e.g. 3G, 4G) when you're away? How does your device know which network to connect to? How does it roam from one network to another or, even within one cellular network, from one cell tower to another? Your mobile device in fact uses an absolute value inequality to help it make the decision.
News You Can Use
Whenever the signal power received from the WiFi access point is higher than that received from the cell tower, your phone or tablet will connect to the WiFi interface. Otherwise, it will use the cellular network. The process of switching a wireless handheld device's connection interface from one access point to another is called handover or handoff.
There are times, however, when you might want to override a handover. Why? Because although WiFi coverage is much smaller in area compared to the cellular network, it's usually cheaper. By using a WiFi access point instead of a cellular tower to download data, you can save a significant amount of money.
See for yourself: http://www.youtube.com/watch?v=Djzkgp8LLfs
Suppose you allow your device to make the connection choice itself, just how does it decide? Distance from the tower or access point isn't the only factor that goes into its decision. The signal strength transmitted by each connection option is also part of the calculation.