pyfloat


Namepyfloat JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryPython Library for doing math operations with floats without lossing precission
upload_time2023-04-27 19:45:16
maintainer
docs_urlNone
author
requires_python
license
keywords decimal float double truncate floor math
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## PyFloat Lib

Python Library for doing math operations with floats without lossing precission

## How to use

```
>> from pyfloat import PyFloat

>> PyFloat(2.1234e-12)
'0.0000000000021234'
>> PyFloat(-2.1234e+12)
'-2123400000000'
>> PyFloat(0.1452)
'0.1452'
>> PyFloat(PyFloat(152.455))
'152.455'
>> a = PyFloat("123451.1234551230000000004444445551122000000011")
>> b = PyFloat(-8123994.000002234100000001323400000001232112221)
>> a + b
'-8000542.8765471111000000008789554448890321122199'
>> a - b
'8247445.1234573571000000017678445551134321122221'
>> a * b
'-1002916186242.9543234169148643344158458369442274183843912848765430855693663896461975553234431'
>> a == b
'False'
>> a != b
'True'
>> a > b
'True'
>>> PyFloat(0.00239419391).round(10)
'0.0023941939'
>>> PyFloat(0.00239419391).round(7)
'0.0023942'
>>> PyFloat(-0.00239419391).round(7)
'-0.0023942'
>>> PyFloat(0.00239419391).round(4)
'0.0024'
>>> PyFloat(-1234.5678).abs()
'1234.5678'
>>> PyFloat(0.0000089778).truncate(8)
'0.00000897'
>>> PyFloat(-0.0000089778).truncate(8)
-0.00000897
```

## Test

```
python pytfloat_test.py
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyfloat",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "decimal,float,double,truncate,floor,math",
    "author": "",
    "author_email": "Jesus Manresa Parres <dev-jesusmanresaparres@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/11/9c/acdd61838c7a366c47bb74c57f5607f93616bfa314e486e3190f5643fdd6/pyfloat-0.0.3.tar.gz",
    "platform": null,
    "description": "## PyFloat Lib\n\nPython Library for doing math operations with floats without lossing precission\n\n## How to use\n\n```\n>> from pyfloat import PyFloat\n\n>> PyFloat(2.1234e-12)\n'0.0000000000021234'\n>> PyFloat(-2.1234e+12)\n'-2123400000000'\n>> PyFloat(0.1452)\n'0.1452'\n>> PyFloat(PyFloat(152.455))\n'152.455'\n>> a = PyFloat(\"123451.1234551230000000004444445551122000000011\")\n>> b = PyFloat(-8123994.000002234100000001323400000001232112221)\n>> a + b\n'-8000542.8765471111000000008789554448890321122199'\n>> a - b\n'8247445.1234573571000000017678445551134321122221'\n>> a * b\n'-1002916186242.9543234169148643344158458369442274183843912848765430855693663896461975553234431'\n>> a == b\n'False'\n>> a != b\n'True'\n>> a > b\n'True'\n>>> PyFloat(0.00239419391).round(10)\n'0.0023941939'\n>>> PyFloat(0.00239419391).round(7)\n'0.0023942'\n>>> PyFloat(-0.00239419391).round(7)\n'-0.0023942'\n>>> PyFloat(0.00239419391).round(4)\n'0.0024'\n>>> PyFloat(-1234.5678).abs()\n'1234.5678'\n>>> PyFloat(0.0000089778).truncate(8)\n'0.00000897'\n>>> PyFloat(-0.0000089778).truncate(8)\n-0.00000897\n```\n\n## Test\n\n```\npython pytfloat_test.py\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python Library for doing math operations with floats without lossing precission",
    "version": "0.0.3",
    "split_keywords": [
        "decimal",
        "float",
        "double",
        "truncate",
        "floor",
        "math"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "91e2878df59e7c58d2066adadd4149e75a3e9e1e19f752d0ba61a3e08941742d",
                "md5": "04272259c0607fc64b07fdcf10e0eba6",
                "sha256": "6e9d93774739225903ef6ca93101e97387715c60e62b78d966ee60adf909dd1f"
            },
            "downloads": -1,
            "filename": "pyfloat-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04272259c0607fc64b07fdcf10e0eba6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16740,
            "upload_time": "2023-04-27T19:45:13",
            "upload_time_iso_8601": "2023-04-27T19:45:13.803968Z",
            "url": "https://files.pythonhosted.org/packages/91/e2/878df59e7c58d2066adadd4149e75a3e9e1e19f752d0ba61a3e08941742d/pyfloat-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "119cacdd61838c7a366c47bb74c57f5607f93616bfa314e486e3190f5643fdd6",
                "md5": "32920d1f7e2f1ea4cda69cf52a5943b1",
                "sha256": "7c90d9e4a79057fbe62344134b458fe79ecf3b27dcdd325455c4aa206f7bdf34"
            },
            "downloads": -1,
            "filename": "pyfloat-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "32920d1f7e2f1ea4cda69cf52a5943b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17392,
            "upload_time": "2023-04-27T19:45:16",
            "upload_time_iso_8601": "2023-04-27T19:45:16.454755Z",
            "url": "https://files.pythonhosted.org/packages/11/9c/acdd61838c7a366c47bb74c57f5607f93616bfa314e486e3190f5643fdd6/pyfloat-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-27 19:45:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pyfloat"
}
        
Elapsed time: 2.15709s