Meakawa algorithm