Modular neural networks for function approximation