Bug 43831

Summary: /usr/games/factor calculates wrong when factors > 2^32
Product: Base System Reporter: Chris J. Mutter <cjm>
Component: binAssignee: Tony Finch <fanf>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.6.1-RELEASE   
Hardware: Any   
OS: Any   

Description Chris J. Mutter 2002-10-08 17:30:01 UTC
when using ``factor'' on the alpha platform it gives a wrong result
when someone tries to factor numbers > 4294967295 that contain of 
factors that are >= 65539.

$ factor $(echo "65539*65539" | bc -q)
4295360521: 4295360521
            ^^^^^^^^^^ wrong.

Fix: 

i think its not easy to fix without modifying /usr/src/games/primes/pr_tbl.c
How-To-Repeat: 
$ factor 4295360521
Comment 1 John Baldwin freebsd_committer freebsd_triage 2002-10-08 18:03:26 UTC
Responsible Changed
From-To: freebsd-alpha->freebsd-bugs

This is not an Alpha-specific bug but happens on all LP64 platforms such 
as sparc64 and ia64 in current as well as alpha.
Comment 2 Tony Finch freebsd_committer freebsd_triage 2002-10-09 18:47:22 UTC
Responsible Changed
From-To: freebsd-bugs->fanf

I'm dealing with this.
Comment 3 Tony Finch freebsd_committer freebsd_triage 2002-10-09 21:03:50 UTC
State Changed
From-To: open->patched

I've committed the bignum Pollard Rho factor(6) from NetBSD to -CURRENT
Comment 4 Tony Finch freebsd_committer freebsd_triage 2002-10-23 16:00:08 UTC
State Changed
From-To: patched->closed

All the new hotness has been MFCed.