-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Project Name
Number
Project Short Description
This project provides exact and fuzzy numeric computation with lazy evaluation in Scala.
Project Type
In accordance with the Typelevel Charter, I am proposing the project be a:
- Organization Project
- Affiliate Project
Project Management
All Typelevel projects follow the Typelevel Code of Conduct.
Organization projects do not need a CODE_OF_CONDUCT.md file, as the Typelevel GitHub Organization one will automatically apply.
Affiliate Project Instructions
Affiliate projects should copy the following template into a CODE_OF_CONDUCT.md file in their repo:
# Code of Conduct
Every member of our community has the right to have their identity respected. The Typelevel community is dedicated to providing a positive experience for everyone, regardless of age, gender identity and expression, sexual orientation, disability, neurodivergence, physical appearance, body size, ethnicity, nationality, race, or religion (or lack thereof), education, or socio-economic status.
Everyone is expected to follow the [Typelevel Code of Conduct] when discussing the project on the available communication channels.
## Moderation
If you have any questions, concerns, or moderation requests, please contact a member of the [Typelevel Code of Conduct Committee].
[Typelevel Code of Conduct]: https://typelevel.org/code-of-conduct
[Typelevel Code of Conduct Committee]: https://typelevel.org/code-of-conduct#contact
If you would like to be an additionally point of contact for Code of Conduct reports, you can include your contact information in the Moderation section like so:
## Moderation
If you have any questions, concerns, or moderation requests, please contact a member of the [Typelevel Code of Conduct Committee] or reach out to a project moderator:
- [Your Name Here](mailto:moderator@example.org)
In the event of a Code of Conduct report, affiliate projects should follow the instructions outlined in the Enforcement Procedures Affiliate project processes section.
- I acknowledge that this project must follow the Typelevel Code of Conduct
- As an affiliate project, the
CODE_OF_CONDUCT.mdfile can be found at here
Similarly, Typelevel projects must have an appropriate license, as specified in the Typelevel Charter.
Please make sure that the project's license is on the approved list.
- This project's license can be found at here
Additional Notes
While Spire is the industry standard for generic numeric abstractions in Scala, our project (Number) occupies a distinct niche by addressing several specialized engineering and scientific requirements that are outside Spire's primary scope.
First, a central pillar of the project is maintaining numerical exactness through lazy evaluation. The primary purpose of our lazy evaluation mechanism is to preserve absolute precision for as long as possible. Unlike libraries that rely on immediate floating-point approximation, Number stores most numeric quantities—including irrational constants like π, e, and φ (the golden ratio)—as exact symbolic values. Consequently, derived quantities, such as angular measures in multiples of π, remain perfectly exact throughout calculations until explicit materialization is required.
Second, we implement a first-class probabilistic fuzzy arithmetic system. For modeling real-world measurements and their associated errors, values are treated as probability distributions (e.g., Gaussian or Bounded), enabling automatic uncertainty propagation through complex calculations.
Third, we provide a symbolic expression engine with a rule-based simplification system, supporting transcendental functions and algebraic reductions typically found in Computer Algebra Systems (CAS).
Fourth, our library features a type-safe dimensional analysis module for SI units, utilizing type-level rational exponents to enforce physical laws at compile time.
Crucially, Number is designed to complement the Typelevel ecosystem. We provide Cats instances (such as Order, Eq, and Show) for our core algebraic types, and our internal design is built upon rigorous functional principles. This ensures that our specialized numeric types—whether they are exact, fuzzy, or dimensioned—can be seamlessly integrated into functional programming pipelines. In essence, while Spire provides the foundation for algebraic types, Number extends these concepts into the domains of symbolic exactness, uncertainty modeling, and physical reality.