find root test: make cubicfn pure