{ "info": { "author": "Noah", "author_email": "noahmouse2011@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Thank you for installing simple_math.\r\nYou can contact me for problems, bugs, and suggetions of simple_math at\r\nnoahmouse2011@gmail.com\r\n\r\n\r\n\r\nWhat's new in simple_math 1.1.0\r\n\r\n\r\nalmost ALL functions had a performance boost\r\n\r\nremoved useless changing whole number to int's in certain functions\r\n\r\nexno has added optional argument \"powers\"\r\nnow works correctly with floating-point-numbers\r\n\r\nmode only uses one argument\r\n\r\npvint and pvfloat have both been replaced by plval\r\nold definitions are now wrappers but will be removed\r\nin future update\r\n\r\nfactors now includes n for factors(n)\r\n\r\nprifac can now compute for numbers with number\r\nof prime factors > 1000\r\n\r\nmedian works for unsorted lists\r\n\r\nprobably many more bug fixes that are unknown to\r\nme at the time\r\n\r\n\r\n\r\nInfo about newest functions\r\n\r\nexno(num:int, powers:bool = False) --> str\r\n\tReturn the Expanded Notation of \"num\" as a string\r\n\r\n>>> simple_math.exno(325)\r\n'( 3 * 100 ) + ( 2 * 10 ) + ( 5 * 1 )'\r\n>>> simple_math.exno(30201)\r\n'( 3 * 10000 ) + ( 2 * 100 ) + ( 1 * 1 )'\r\n>>> simple_math.exno(30201.023)\r\n'( 3 * 10000 ) + ( 2 * 100 ) + ( 1 * 1 ) + ( 2 * 0.01 ) + ( 3 * 0.001 )'\r\n>>> simple_math.exno(30201.023,powers=True)\r\n'( 3 * 10**4 ) + ( 2 * 10**2 ) + ( 1 * 10**0 ) + ( 2 * 10**-2 ) + ( 3 * 10**-3 )'\r\n>>> simple_math.exno(1,powers=True)\r\n'( 1 * 10**0 )'\r\n>>> \r\n\r\n\r\n\r\nfactors(num:int) --> list\r\n\tReturn all factors of an int as a list\r\n\tRaises ValueError for negitive or\r\n\tfloating point numbers\r\n\r\n>>> simple_math.factors(10)\r\n[1, 2, 5, 10]\r\n>>> simple_math.factors(100)\r\n[1, 2, 4, 5, 10, 20, 25, 50, 100]\r\n>>> simple_math.factors(83) # prime number\r\n[1, 83]\r\n>>> \r\n\r\n\r\n\r\ngcf(num1:int,num2:int) --> int\r\n\tReturn the Greatest Common Factor of two numbers\r\n\tAlready implemented in module \"fractions\" (and \"math\" in python 3.5)\r\n\tmay remove in future\r\n\r\n>>> simple_math.gcf(4,6)\r\n2\r\n>>> simple_math.gcf(1,1000)\r\n1\r\n>>> simple_math.gcf(20,10)\r\n10\r\n>>> \r\n\r\n\r\n\r\ngcfl(l:list) --> int\r\n\tReturn the Greatest Common Factor of a list of numbers\r\n\r\n>>> simple_math.gcfl([4,6,8,10])\r\n2\r\n>>> simple_math.gcfl([15,12,9,6])\r\n3\r\n>>> simple_math.gcfl([number for number in range(100)]) #l=[0,1,2,3,4,5 ... 99]\r\n1\r\n>>> \r\n\r\n\r\n\r\nlcd(num1:int,num2:int) --> int\r\n\tReturn the Least Common Denominator of two numbers\r\n\r\n>>> simple_math.lcd(2,3)\r\n6\r\n>>> simple_math.lcd(14,7)\r\n14\r\n>>> simple_math.lcd(1000,1001)\r\n1001000\r\n>>> \r\n\r\n\r\n\r\nlcdl(l:list) --> int\r\n\tReturn the Least Common Denominator of a list of numbers\r\n\r\n>>> simple_math.lcdl([1,2,3])\r\n6\r\n>>> simple_math.lcdl([12,6,18])\r\n36\r\n>>> simple_math.lcdl([0,1,2,3,4,5])\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"simple_math.py\", line 128, in lcdl\r\n raise ValueError('invalid number \"0\"')\r\nValueError: invalid number \"0\"\r\n>>> \r\n\r\n\r\n\r\nmean(l:list) --> float\r\n\tReturn the Mean (Average) of a list of numbers\r\n\r\n>>> simple_math.mean([1,2,3])\r\n2.0\r\n>>> simple_math.mean([3])\r\n3.0\r\n>>> simple_math.mean([9,4,10])\r\n7.666666666666667\r\n>>> simple_math.mean([1,2,3,4])\r\n2.5\r\n>>> \r\n\r\n\r\n\r\nmedian(l:list) --> float\r\n\tReturn the Median of a list of numbers\r\n\r\n>>> simple_math.median([1,2,3])\r\n2.0\r\n>>> simple_math.median([6,2,0,4,8])\r\n4.0\r\n>>> simple_math.median([6,2,0,4,8,5])\r\n4.5\r\n>>> simple_math.median([6,2,0,4,8,8])\r\n5.0\r\n>>> \r\n\r\n\r\n\r\nmode(l:list) --> list\r\n Return the Mode(s) in a list\r\n\r\n>>> simple_math.mode([])\r\n[]\r\n>>> simple_math.mode([3])\r\n[3]\r\n>>> simple_math.mode([1,2,3,4,5,6])\r\n[1, 2, 3, 4, 5, 6]\r\n>>> simple_math.mode([1,2,3,4,5,6,6])\r\n[6]\r\n>>> simple_math.mode([1,2,3,4,5,6,6,1])\r\n[1, 6]\r\n>>> \r\n\r\n\r\n\r\npvint(num:int, place_value:int = 1) --> int\r\n This is an old function and is replacable by plval\r\n Will be removed in future versions\r\n\r\n\r\n\r\npvfloat(num:float, place_value:float = 1.0)\r\n\tThis is an old function and is replacable by plval\r\n\tWill be removed in future versions\r\n\r\n\r\n\r\nplval(num:float, place_value:int = 0)\r\n\tReturn the Place Value of a number\r\n\tPlace_value refers to n where the specified digit is in the 10^n slot\r\n\tRaises ValueError if place value provided is invalid\r\n\r\n>>> simple_math.plval(123)\r\n3\r\n>>> simple_math.plval(1024,3)\r\n1\r\n>>> simple_math.plval(1024.1024,-3)\r\n2\r\n>>> \r\n\r\n\r\n\r\nprifac(num:int) --> list\r\n\tReturn the Prime Factorization of num in a list\r\n\r\n>>> simple_math.prifac(8)\r\n[2, 2, 2]\r\n>>> simple_math.prifac(6)\r\n[2, 3]\r\n>>> simple_math.prifac(2*3*5*7)\r\n[2, 3, 5, 7]\r\n>>> simple_math.prifac(0) # 0 < 2\r\n[]\r\n>>> \r\n\r\n\r\n\r\nprime(num:int) --> bool\r\n\tReturn True if num is a prime number and False if not\r\n\r\n>>> simple_math.prime(3)\r\nTrue\r\n>>> simple_math.prime(4)\r\nFalse\r\n>>> simple_math.prime(13)\r\nTrue\r\n>>> simple_math.prime(1)\r\nFalse\r\n>>> simple_math.prime(-1)\r\nFalse\r\n>>> \r\n\r\n\r\n\r\nprimes_to(num:float) --> list\r\n\tReturn a list of all the primes up to a number\r\n\r\n>>> simple_math.primes_to(10)\r\n[2, 3, 5, 7]\r\n>>> simple_math.primes_to(0)\r\n[]\r\n>>> simple_math.primes_to(17)\r\n[2, 3, 5, 7, 11, 13, 17]\r\n>>> \r\n\r\n\r\n\r\npsr(num:int):\r\n\tReturn true if num has a Perfect Square Root and false otherwise\r\n\r\n>>> simple_math.psr(4)\r\nTrue\r\n>>> simple_math.psr(5)\r\nFalse\r\n>>> simple_math.psr(0)\r\nTrue\r\n>>> simple_math.psr(123**2)\r\nTrue\r\n>>> \r\n\r\n\r\n\r\nrefine(string:str, variables:list = []) --> str\r\n\tReturn a parsed math term mostly readable by python\r\n\teg. .25 -> 0.25 , 2x(54/3) -> 2*x*(54/3) ,\r\n\t | 1-x^3 \\|/{10-4} -> (abs (1-x**3) )/(10-4) etc.\r\n\tsecond parameter is a list of single character\r\n\treserved as unknown values\r\n\tNot fully reliable\r\n\tWill be changed in future versions\r\n\r\n>>> simple_math.refine('.25')\r\n'0.25'\r\n>>> simple_math.refine('2x(54/3)',['x'])\r\n'2*x*(54/3)'\r\n>>> simple_math.refine('| 1-x^3 \\| /{10-[4]}',['x'])\r\n'(abs (1-x**3) )/(10-(4))'\r\n>>> simple_math.refine('y=x^2',['x','y']) # bug!\r\n'y*=*x**2'\r\n>>>", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/simple_math/1.1.0", "keywords": "math python functions useful interesting", "license": "simple_math: some simple math functions\r\nCopyright (C) 2015 Noah May\r\n\r\nThis program is free software; you can redistribute it and/or\r\nmodify it under the terms of the GNU General Public License\r\nas published by the Free Software Foundation; either version 2\r\nof the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\nGNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License\r\nalong with this program; if not, write to the Free Software\r\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.", "maintainer": "", "maintainer_email": "", "name": "simple_math", "package_url": "https://pypi.org/project/simple_math/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/simple_math/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://pypi.python.org/pypi/simple_math/1.1.0" }, "release_url": "https://pypi.org/project/simple_math/1.1.0/", "requires_dist": null, "requires_python": null, "summary": "some usefull math functions", "version": "1.1.0" }, "last_serial": 1815658, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7e3bd7c2717c7715b06917f4093a6cbb", "sha256": "1bb79625aca5db087481b11a3f9cd56033d2ea867f0450e4e16e70ba92f04230" }, "downloads": -1, "filename": "simple_math-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7e3bd7c2717c7715b06917f4093a6cbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1850, "upload_time": "2014-09-30T18:39:01", "url": "https://files.pythonhosted.org/packages/02/b8/db3bbf38b9382cea341c2713dcfa2ee561bc41b517abae8ee465be295eba/simple_math-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5c87103073ec8d89e6b6c789e53f94d4", "sha256": "c8fd3dbee88e776aa6b02137e055263c84961457a99a35379008e76ebaddda49" }, "downloads": -1, "filename": "simple_math-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5c87103073ec8d89e6b6c789e53f94d4", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 5936, "upload_time": "2015-07-27T04:03:58", "url": "https://files.pythonhosted.org/packages/1b/97/9c89ffbfe3b9b2f6c6111d995cefe4bbab1ef130b67307690166e9e51366/simple_math-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e929771986f8b977858a08761c780012", "sha256": "108dc26d1425cff52ff6af1d54336dbe855be64e6febe0e8bf788def4b86079f" }, "downloads": -1, "filename": "simple_math-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e929771986f8b977858a08761c780012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15904, "upload_time": "2015-07-27T04:03:54", "url": "https://files.pythonhosted.org/packages/8f/28/0c002e9e57a586fc6b141f5ceb4912c2a6030ac02f3bec5165a189b8640d/simple_math-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c87103073ec8d89e6b6c789e53f94d4", "sha256": "c8fd3dbee88e776aa6b02137e055263c84961457a99a35379008e76ebaddda49" }, "downloads": -1, "filename": "simple_math-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5c87103073ec8d89e6b6c789e53f94d4", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 5936, "upload_time": "2015-07-27T04:03:58", "url": "https://files.pythonhosted.org/packages/1b/97/9c89ffbfe3b9b2f6c6111d995cefe4bbab1ef130b67307690166e9e51366/simple_math-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e929771986f8b977858a08761c780012", "sha256": "108dc26d1425cff52ff6af1d54336dbe855be64e6febe0e8bf788def4b86079f" }, "downloads": -1, "filename": "simple_math-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e929771986f8b977858a08761c780012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15904, "upload_time": "2015-07-27T04:03:54", "url": "https://files.pythonhosted.org/packages/8f/28/0c002e9e57a586fc6b141f5ceb4912c2a6030ac02f3bec5165a189b8640d/simple_math-1.1.0.tar.gz" } ] }