[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src



CVSROOT:	/cvs
Module name:	src
Changes by:	otto_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2004/12/01 01:29:38

Modified files:
	usr.bin/dc     : bcode.c 

Log message:
Fix stop condition for sqrt. Due to the fact that we're doing Newton
iteration with intgeres, the stop condition is reached if x_n == x_n+1, or
the difference is one, but only stop if that is hit a second time. Avoids
looping with difference 1,-1,1,-1... Problem spotted by Paul de Weerd.
Regress tested against 4.2BSD dc(1) and GNU dc(1).



Visit your host, monkey.org