tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
openbsd-src
/
games
/
factor
/
at
jcs
3 files
Makefile
Instead of using the floating point square root, use an integer version of the Newton method from ping.c. Fixes a rounding issue that caused failure to factor numbers close to 2^64, e.g. 18446744030759878681. While there, fix an off by one error that caused 4295360521 to be reported as a prime. Issues reported by Paul Stoeber and Michael Bozon.
9 years ago
factor.6
Michal Mazurek pointed out on tech@ that the factor.6 manual needs a bit of clarification. Thus, express the description both more concisely and more precisely. Drop details about spaces in the output formatting. While there, update the corresponding comment in the source code.
10 years ago
factor.c
In 32 bits sqrt(val) + 1 can overflow, so some big primes still aren't recognized as such, for example 18446744073709551577 given in the commit message of factor.c r1.7 from NetBSD. Move the return type of usqrt() from u_int32_t to u_int64_t.
9 years ago