if(typeof(UtilityMill) == 'undefined') UtilityMill = {}; UtilityMill.result = "\n\"\"\"\nCopyright 2007 - Utility Mill and\/or Authors of this program.\n\nThis file is part of the Utility Mill Utility Miller_Rabin_Primality_Test (http:\/\/www.utilitymill.com\/utility\/Miller_Rabin_Primality_Test).\n\nMiller_Rabin_Primality_Test's user-editable source code is free software; you can redistribute\nit and\/or modify it under the terms of the GNU General Public License as\npublished by the Free Software Foundation; either version 3 of the License, or\n(at your option) any later version.\n\nMiller_Rabin_Primality_Test is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http:\/\/www.gnu.org\/licenses\/>.\n\nNote: Any license specified in code section below and approved by Utility Mill\nsupercedes above GPL license.\n\"\"\"\n\n#import line added for compatibility with code execution change.\n#You can remove all but what is needed.\nimport calendar,datetime,difflib,math,random,re,string,time,urllib\n\ndef millerTest(a, i, n):\n    if i == 0:\n        return 1\n    x = millerTest(a, i \/ 2, n)\n    if x == 0:\n        return 0\n    y = (x * x) % n\n    if ((y == 1) and (x != 1) and (x != (n - 1))):\n        return 0\n    if (i % 2) != 0:\n        y = (a * y) % n\n    return y\nif int(VAL1)<4:\n    print 'Minimum allowed value to test is 4'\nelse:\n    if millerTest(random.randint(2, int(VAL1) - 2), int(VAL1) - 1, int(VAL1))==1:\n        print VAL1,'is prime.'\n    else:\n        print VAL1,'is not prime.'\n        "
