fp-associativity-analyzer
The fp_associativity_analyzer package is a tool designed to help developers and researchers analyze their text inputs regarding floating-point arithmetic or SIMD programming challenges and identify potential issues related to associativity. Utilizing advanced language models, it provides a structured analysis that extracts key points and insights, ensuring consistent formatting and reliable outputs. This aids in understanding scenarios where floating-point non-associativity could lead to unexpected results, especially in high-performance computing contexts.
Installation
pip install fp_associativity_analyzer
Usage
Here's an example of how to use the package in Python:
from fp_associativiity_analyzer import fp_associativity_analyzer
response = fp_associativity_analyzer(
user_input="Explain the potential associativity issues in SIMD loop optimizations.",
api_key="your_api_key_here" # Optional if you want to provide your own API key
)
print(response)
Parameters
- user_input (str): The text describing the floating-point or SIMD challenge to analyze.
- llm (Optional[BaseChatModel]): An instance of a language model. Defaults to the internal
ChatLLM7. - api_key (Optional[str]): Your API key for LLM7. If not provided, will be obtained from the environment variable
LLM7_API_KEY.
LLM Compatibility
This package uses ChatLLM7 from langchain_llm7 by default. You can safely pass your own language model instance for customization, such as:
- OpenAI GPT models
- Anthropic Claude
- Google PaLM
Examples
Using OpenAI:
from langchain_openai import ChatOpenAI
from fp_associativiity_analyzer import fp_associativity_analyzer
llm = ChatOpenAI()
response = fp_associativity_analyzer(
user_input="Describe non-associative floating-point operations.",
llm=llm
)
print(response)
Using Anthropic:
from langchain_anthropic import ChatAnthropic
from fp_associativiity_analyzer import fp_associativity_analyzer
llm = ChatAnthropic()
response = fp_associativity_analyzer(
user_input="How does floating-point non-associativity affect parallel computations?",
llm=llm
)
print(response)
Using Google PaLM:
from langchain_google_genai import ChatGoogleGenerativeAI
from fp_associativiity_analyzer import fp_associativity_analyzer
llm = ChatGoogleGenerativeAI()
response = fp_associativity_analyzer(
user_input="What are the implications of floating-point non-associativity?",
llm=llm
)
print(response)
Rate Limits
The default usage of LLM7 in this package is configured for the free tier, which provides sufficient rate limits for most use cases. For higher rate limits, you can obtain a free API key from LLM7 Token Service and supply it via the environment variable LLM7_API_KEY or directly in the function call.
Support & Issues
For issues, bug reports, or feature requests, please visit the GitHub repository:
https://github.com/chigwell/fp-associativity-analyzer
Author
Eugene Evstafev
Email: hi@euegne.plus
GitHub: @chigwell
Metadata
Release files for fp-associativity-analyzer 2025.12.21134137
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fp_associativity_analyzer-2025.12.21134137.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fp_associativity_analyzer-2025.12.21134137-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / fp_associativity_analyzer-2025.12.21134137.tar.gz
| Download URL | fp_associativity_analyzer-2025.12.21134137.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1999bd3c88e1cba8f3ed689cb8343b8ba179ff5468bb607f7deb77a6ea19c3e
|
|
BLAKE2b-256 checksum How to use checksums |
5700fe889e8dc10a8cd875d11261ce67b939fbe71b453c4d2c23dc0c43a3204e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / fp_associativity_analyzer-2025.12.21134137-py3-none-any.whl
| Download URL | fp_associativity_analyzer-2025.12.21134137-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c034d41718e2ae150a9c847644e84dbe7db29f7cd49811ca7c990c0e6bef014b
|
|
BLAKE2b-256 checksum How to use checksums |
557e45e001739ccb20efe7383884da1a3b7fa906843b925679ad49044f5add59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|