hi!

no, the result is:
op@pandora-d ~> /usr/ports/math/primegen/work/primegen-0.97/primes
4295360520 4295360522 && echo $?

0

op@pandora-d ~> uname -m -r -p  &&
/usr/ports/math/primegen/work/primegen-0.97/primes 4295360520
4295360522 | xargs -n 1 factor
7.4-STABLE amd64 amd64

On 6/14/11, Robert Lorentz <robert.lore...@gmail.com> wrote:
> Oliver,
>
>> op@pandora-d ~> uname -m -r -p && primes 4295360520 4295360522 | xargs
>> -n 1 factor
>> 7.4-STABLE amd64 amd64
>> 4295360521: 65539 65539
>>
>>> On FreeBSD 9.0-CURRENT I debugged the source in =
>>> /usr/ports/math/primegen/work/primegen-0.97 a bit and realized that if I
>>> =
>>> ran the compiled version in =
>>> /usr/ports/math/primegen/work/primegen-0.97/primes I got the correct =
>>> expected results.  However, if I run the installed version in =
>>> /usr/games/primes, I get the incorrect results.  The binaries in those =
>>> two places aren't the same (verified using md5). =20
>>>
>>> This appears to be an issue with the port building, probably building in
>>> =
>>> 32 bit.  If the inputs to primes are interpreted as 32bit then a "low" =
>>> of (2^32 + 1) is interpreted as 1, therefore being less than 1000000000,
>>> =
>>> therefore the code would continue to generate primes, and if this is the
>>> =
>>> case then I wouldn't be surprised that the prime generation code also =
>>> would misbehave.
>>>
>
> If you run the built binary in the /usr/ports/math/primegen/work/../ path do
> you get the same results?
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to