Skip to main content

simple-rounder

A simple Python library for rounding numbers up, down, or mathematically.

import simple_rounder as rounder

print(rounder.up(10.52))  # 11.0
print(rounder.down(10.52))  # 10.0
print(rounder.mathematical(10.52))  # 11.0

You can specify the number of decimal places

rounder.mathematical(10.25, 1)  # 10.3

rounder.mathematical(567.1, -1)  # 570

You can use named arguments

rounder.up(number=500, number_of_decimal_places=-2)  # 500

rounder.up(number=501, number_of_decimal_places=-2)  # 600

Recommended import variations

import simple_rounder as rounder

from simple_rounder import rounder

from simple_rounder import up, down, mathematical

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_rounder-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_rounder-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file simple_rounder-0.1.0.tar.gz.

File metadata

  • Download URL: simple_rounder-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.4

File hashes

Hashes for simple_rounder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4ba2b400caf66680dff2c406d5053bd272c56c976911686f4ceabc13f8aebd9d
MD5 7f8081c0362c2622ad9ee1cb37c8743e
BLAKE2b-256 30ada19c3338e13e000d70ab1c3e61aa2617a6e83029bc512e9c967a7a7916ce

See more details on using hashes here.

File details

Details for the file simple_rounder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: simple_rounder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.4

File hashes

Hashes for simple_rounder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84f1a760fd994b8a601d3d9fd00283caeb6adbd186284a80c3ec9d9fc25a21a2
MD5 e05147a8f1029e3c6f6d88edb0cd3057
BLAKE2b-256 a8fd353dc863dd4b0e37ac57227a4fa468985113f98005bec2afd410fcb5640f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page