Warnock algorithm