Skip to content

Commit 97fcc67

Browse files
committed
Add README with claude
1 parent 0102fed commit 97fcc67

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
pymath
2+
======
3+
4+
A bit-compatible Rust implementation of Python's math library.
5+
6+
## Overview
7+
8+
`pymath` is a line-by-line port of the CPython math library to Rust. This library aims to provide mathematical functions that produce identical results to Python's standard math library at the bit level.
9+
10+
## Implementation
11+
12+
Each function has been carefully translated from CPython's C implementation to Rust, preserving the same algorithms, constants, and corner case handling. The code maintains the same numerical properties, but in Rust!
13+
14+
## Usage
15+
16+
```rust
17+
use pymath::{gamma, lgamma};
18+
19+
fn main() {
20+
// Get the same results as Python's math.gamma and math.lgamma
21+
let gamma_result = gamma(4.5).unwrap();
22+
let lgamma_result = lgamma(4.5).unwrap();
23+
}
24+
```

0 commit comments

Comments
 (0)