Xref: utzoo comp.sys.handhelds:8519 sci.math.symbolic:2544 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!swrinde!mips!apple!portal!cup.portal.com!jpser From: jpser@cup.portal.com (John Paul Serafin) Newsgroups: comp.sys.handhelds,sci.math.symbolic Subject: HP48/Kalb/Bos dusts 80486/Mathematica Message-ID: <43391@cup.portal.com> Date: 17 Jun 91 02:33:18 GMT Organization: The Portal System (TM) Lines: 56 I have stumbled across several integers which are factored by the ultimate prime factor routines for the HP48 by Klaus Kalb and Jurjen Bos much faster than Mathematica 1.2 running on a 25MHz 486. There were also some integers which took 9 to 15 seconds on both machines. Because i/o is so slow on the HP48, Mathematica is much faster on easy to factor integers, but the 48 is so fast, it really doesn't matter. There are many things which Mathematica can do and the HP48 can not, and in general Mathematica is much faster. Nonetheless, I think these results say some things about both the HP48 and Mathematica. (The "no math coprocessor required" version of Mathematica was used, but I doubt that floating point numbers are involved). I found these integers several weeks ago, but it looks like I won't have time to do a good job of studying or documenting any time soon. So, here are some of my results. ---------------------------------------------------------------------------- Number HP48 time Mathematica time (MSDOS 80486) 4,611,686,018,427,387,903 = 2^62 - 1 508 sec After more than 8 hours and less than 20 hours, Mathematica ran out of memory. (5M extended, 8M RAM swap disk. This case was rerun with 12M extended memory and 60M free space on a fixed disk as swap space. After nearly two days, the problem was still running. The run was aborted and MaxMemory Used returned 43,761,628. The HP48 had less than 6000 bytes free at the start of the run. 128,573,131,101,428,317 = 573,259,391 * 241 sec After more than 8 hours, etc. 224,284,387 This was before trying hard = 30,000,000th prime * swap and 12M main memory. 12,345,678th prime 50,303,624,411,148,161 151 sec " = 224,284,387 * 224,285,003 5,260,991,541,853,343 45 sec I killed this one, too. Not = 224,284,387 * sure when, but much longer 23,456,789 than 45 seconds. The last is smallest number I have found so far that sends Mathematica out to lunch. The largest number the HP48 can factor with the Kalb/Bos routine is 2^64 -1. Mathematica documentation states that Mathematica will factor a number with fewer than 25 digits almost immediately (page 84 of the second edition, page 554 says integers less than 20 digits should give no problem. I would be interested in knowing how Mathematica does with the above numbers on other computers, perhaps with more memory, what the smallest "pathological" integer for Mathematica is, and whether there are any integers that take Mathematica more than 5 minutes and less than an hour. John Serafin jpser@cup.portal.com