Removed dependence on pow in linearw for speedup