Almost repaired ddaline algorithm