A helper to compare two numbers generously
Project description
A helper to compare two numbers generously.
from almost import almost def test_repeating_decimal(): assert almost(1 / 3.) == 0.333 assert almost(1 / 6.) == 0.167 assert almost(3227 / 555., precision=6) == 5.814414 def test_irrational_number(): import math assert almost(math.pi) == 3.142 assert almost(math.sqrt(2)) == 1.414
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
almost-0.1.0.tar.gz
(2.4 kB
view details)
File details
Details for the file almost-0.1.0.tar.gz
.
File metadata
- Download URL: almost-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 431a4a74922ec43adc94396485748c9e4170a56b6da5ae238966b9f5fca1ba0a |
|
MD5 | b7a08b4589d324e7760f9e9abe09a9d8 |
|
BLAKE2b-256 | d579938e3d6bb0cd8b3ef672b7ebb54051a8da3dc5ffcce453c150dd79b7f5ba |