Metadata-Version: 2.4
Name: golden-float
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Dist: numpy>=1.21
Requires-Dist: pytest ; extra == 'test'
Provides-Extra: test
Summary: Phi-structured floating-point formats for ML and scientific computing
Keywords: golden-float,phi,floating-point,ml,numpy
Author-email: Trinity S3AI <t27@trinity.ai>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/trinity-s3ai/t27#readme
Project-URL: Homepage, https://github.com/trinity-s3ai/t27
Project-URL: Repository, https://github.com/trinity-s3ai/t27

# GoldenFloat Python Bindings

Phi-structured floating-point formats for machine learning and scientific computing.

## Installation

```bash
pip install golden-float
```

## Quick Start

```python
import numpy as np
from golden_float import gf16, gf32

# Create GoldenFloat values
phi = gf16(1.618)
pi = gf32(3.14159)

# Convert to float
print(phi.to_float())  # 1.618

# Arithmetic
result = phi + phi

# NumPy array support (with dtype registration)
arr = np.array([1.0, 1.618, 2.718], dtype=gf16)
```

## Format Reference

| Format | Bits | Use Case | Memory vs f32 |
|--------|------|----------|---------------|
| GF4    | 4    | Ultra-compact quantization | 12.5% |
| GF8    | 8    | Minimal precision | 25% |
| GF12   | 12   | Embedded ML | 37.5% |
| GF16   | 16   | Primary format (replaces bfloat16) | 50% |
| GF20   | 20   | Balanced | 62.5% |
| GF24   | 24   | High precision | 75% |
| GF32   | 32   | Full precision (same size as f32) | 100% |

## License

MIT

