{ "info": { "author": "Bengt Sennblad", "author_email": "bengt.sennblad@scilifelab.com", "bugtrack_url": null, "classifiers": [], "description": "================\nClass PyLogFloat\n================\n\nThe PyLogFloat class transforms any float (positive or negative) in\nlinear space into log_space and allows standard arithetic and logical\noperations in in linear space to be performed between two PyLogFloats.\n\nInternally a float ``f`` is stored as follows:\n\n- the (natural) log of ``|f|`` is stored as in a numpy.float64 variable, ``p``\n- the sign of ``f`` ('-', '+' or '0') are stored in a variable (-1, +1, 0) variable, ``sign``\n\nBy storing the ``sign`` separately, both positive and negative floats can\nbe stored in a pyLogFloat. Notice that a ``sign=0`` corresponds to the\ncase where ``f =0``.\n\nArithmetic operators\n--------------------\n\nThe following arithmetic operators are implemented::\n\n +=\n -=\n *=\n /=\n +\n -\n *\n /\n\nMultiplication and division in linear space simply becomes addition\nand subtraction in log space. To implement linear space addition, the\nstandard approach applying the ``log1p`` function is used. A\nconditional use of ``log1p`` or ``exp1m`` is used for log value\nsubtractions, following *M\u00e4chler, M. Accurately Computing log(1 \u2212 exp(\u2212\n|a|)) Assessed by the Rmpfr package Cran, The Comprehensive R Archive\nNetwork*.\n\nThe internal ``sign`` variable is taken into account when performing\narithmetic operations. For example, in a multiplication between PyLogFloats ``a``\nand ``b``, corresponding to a positive float and a negative float,\nrespectively, the resulting PyLogFloat has::\n\n result.p = a.p + b.p\n result.sign = a.sign * b.sign\n\nOther operators are treated correspondingly (addition and subtraction\nbecomes somewhat more involved).\n\n\nLogical operators\n-----------------\n\nThe following arithmetic operators are implemented::\n\n <=\n >=\n <\n >\n\nIn logical operations between PyLogfloats ``a`` and ``b``, the\ninternal sign variable is first compared (-1 < 0 < +1).\n\nIf the ``a.sign == b.sign``:\n\n- ``a.sign == 0 <=> equality``\n- ``a.sign > 0, return a.p [operator] b.p``\n- ``a.sing <0, return !(a.p [operator] b.p)``\n\nOther functions\n---------------\n\nPower operators (``lplf**p``, where plf is a pylogfloat and p is a\nfloat or int) are implemented::\n\n **= (equiv ipow(self, p))\n ** (equiv pow(self, p))\n\nLogarithms and exponents of PyLogFloat are implemented, both as\ninplace (e.g., ``ilog``) and standard that is returning the result of\nthe operation (e.g., ``log``)::\n\n ilog(self)\n log(self\n iexp(self)\n exp(self)\n\n**All functions and operators, except the power operator, are\nimplemented to only work with PyLogFloats. The power operator\nalways has a PyLogFloat base variable and a float or int power\nvariable.**\n\n\n===============================================\nPLEASE NOTE THAT THIS IS STILL WORK IN PROGRESS\n===============================================\n\nWhile a rudimentary test file is included, the class is still largely\nuntested. Further functions may or may not be implemeted, e.g., a\nfactorial function may be of interest. As could, in certain instances,\nautomatic conversion of arguments to PyLogFloats.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bsennblad@bitbucket.org/bsennblad/pylogfloat.git", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pylogfloat", "package_url": "https://pypi.org/project/pylogfloat/", "platform": "", "project_url": "https://pypi.org/project/pylogfloat/", "project_urls": { "Homepage": "https://bsennblad@bitbucket.org/bsennblad/pylogfloat.git" }, "release_url": "https://pypi.org/project/pylogfloat/0.1.4/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "A numeric type for Python storing floats in log space for increased precision, allowing positive and negative float computations (arithmetic and logical operations)", "version": "0.1.4" }, "last_serial": 5241693, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2e3d9a12066d1138c03f7158fbec7282", "sha256": "fd774ff44b82b9e905b89c44c0e3ea4e1faa0aff5cd8e0cec0dd92c037476248" }, "downloads": -1, "filename": "pylogfloat-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2e3d9a12066d1138c03f7158fbec7282", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3739, "upload_time": "2019-05-06T13:10:52", "url": "https://files.pythonhosted.org/packages/18/4e/45ba607b39d12afe913f5c170bf5604f4a32f958e17c437179eb820e24e8/pylogfloat-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e0be8dfcb22e2db81029cb4eb701605", "sha256": "88cca1acf6c7588307f4eb16d727f7b2f51ec8f0c9a0ad4842a86b00ea4c82f8" }, "downloads": -1, "filename": "pylogfloat-0.1.tar.gz", "has_sig": false, "md5_digest": "7e0be8dfcb22e2db81029cb4eb701605", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3325, "upload_time": "2019-05-06T12:56:50", "url": "https://files.pythonhosted.org/packages/e0/da/35c0582cad82d96a5b41640884fc4e9158058cf290a5f96d80467c2248dc/pylogfloat-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a9bc8b0d94e5851ed93eeae4e40acb1b", "sha256": "25808f0971cd9816e014e460b6a88f9df9a321e2dade3529d8d7077989cc1b37" }, "downloads": -1, "filename": "pylogfloat-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a9bc8b0d94e5851ed93eeae4e40acb1b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3759, "upload_time": "2019-05-06T13:25:04", "url": "https://files.pythonhosted.org/packages/3a/d3/f51c856f619740f209b2399decb65138f832ccaf3c3912dc0a54155a8841/pylogfloat-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5407cf9f2d542129b1d2070826f8e853", "sha256": "79d0430bfa4638dde280a7d336284694b9a7f501db6694b3b032ff4a3c071d68" }, "downloads": -1, "filename": "pylogfloat-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5407cf9f2d542129b1d2070826f8e853", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3340, "upload_time": "2019-05-06T13:25:05", "url": "https://files.pythonhosted.org/packages/92/31/71dd20b705dd1140d8066f0e7a6257756917aacc7380939e4a54d0dda7ca/pylogfloat-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "557866e5c16b17f8dc6144d20b4665d0", "sha256": "18feec8e0d20f8575e30a4dfb56ef5027c95ce97d44392c3273f276cc5015f83" }, "downloads": -1, "filename": "pylogfloat-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "557866e5c16b17f8dc6144d20b4665d0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4853, "upload_time": "2019-05-06T15:02:41", "url": "https://files.pythonhosted.org/packages/d8/c3/e9342a3465075f2be1bb5e5bd610d6f76a87dc086f3bbe2b5739eefcdad9/pylogfloat-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd07e8a40f8f90b6f8e45c2eb8a6ef45", "sha256": "b71debc30c945eb3ce7f1ca9823169b082d76239d2b60602a0d3046d4ce591cc" }, "downloads": -1, "filename": "pylogfloat-0.1.2.tar.gz", "has_sig": false, "md5_digest": "dd07e8a40f8f90b6f8e45c2eb8a6ef45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4558, "upload_time": "2019-05-06T15:02:43", "url": "https://files.pythonhosted.org/packages/a4/eb/a4b2adae9b697d6d132303d2ec719016ca1b8c7edd239bea236e8f4744a7/pylogfloat-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7cef8564222a33cb8f2f6096a6f57a90", "sha256": "636a092ab6d4dfb3f76757b3666b43b658b514ae27baa1e1fcb157331087768a" }, "downloads": -1, "filename": "pylogfloat-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7cef8564222a33cb8f2f6096a6f57a90", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5233, "upload_time": "2019-05-07T07:49:16", "url": "https://files.pythonhosted.org/packages/18/af/0d2499ecd26f11ce84e233cebd64dcd08904fcb595d53afa3eeaabc703a7/pylogfloat-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e5caf1a8ec0d690d20ae78e66f3ce89", "sha256": "caa2f8be20ccd088c763c46c5c48b9fee218e993dd6ea3447e26371ef2d29adf" }, "downloads": -1, "filename": "pylogfloat-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8e5caf1a8ec0d690d20ae78e66f3ce89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4942, "upload_time": "2019-05-07T07:49:18", "url": "https://files.pythonhosted.org/packages/10/ac/6524a05c194009854686f4f901919a6e6cc845ddc3b437033b100917b07d/pylogfloat-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "5121400c0162c2d671134a3f36f0aad8", "sha256": "d519a30c04dd81c652fcf8937bf8be205a62d79289122533698ada216d1711f4" }, "downloads": -1, "filename": "pylogfloat-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5121400c0162c2d671134a3f36f0aad8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5276, "upload_time": "2019-05-08T07:08:35", "url": "https://files.pythonhosted.org/packages/32/01/f2a9bd97b51cf601dd34418bf759c14bfb32a9bb5fbf386c743096907cb6/pylogfloat-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "862742543e1ab1e6ab5c6f75b0262157", "sha256": "8785b280fd93d9e4f3c831a005349cb6354384db187b8c3991015ae6e5f95c7e" }, "downloads": -1, "filename": "pylogfloat-0.1.4.tar.gz", "has_sig": false, "md5_digest": "862742543e1ab1e6ab5c6f75b0262157", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5007, "upload_time": "2019-05-08T07:08:36", "url": "https://files.pythonhosted.org/packages/b5/d0/e5443f7193e63d0d71d53d0726d63d252cca3dadf40c8eb2da63651ba7fc/pylogfloat-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5121400c0162c2d671134a3f36f0aad8", "sha256": "d519a30c04dd81c652fcf8937bf8be205a62d79289122533698ada216d1711f4" }, "downloads": -1, "filename": "pylogfloat-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5121400c0162c2d671134a3f36f0aad8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5276, "upload_time": "2019-05-08T07:08:35", "url": "https://files.pythonhosted.org/packages/32/01/f2a9bd97b51cf601dd34418bf759c14bfb32a9bb5fbf386c743096907cb6/pylogfloat-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "862742543e1ab1e6ab5c6f75b0262157", "sha256": "8785b280fd93d9e4f3c831a005349cb6354384db187b8c3991015ae6e5f95c7e" }, "downloads": -1, "filename": "pylogfloat-0.1.4.tar.gz", "has_sig": false, "md5_digest": "862742543e1ab1e6ab5c6f75b0262157", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5007, "upload_time": "2019-05-08T07:08:36", "url": "https://files.pythonhosted.org/packages/b5/d0/e5443f7193e63d0d71d53d0726d63d252cca3dadf40c8eb2da63651ba7fc/pylogfloat-0.1.4.tar.gz" } ] }