Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Enable no-std Support and Float Type Flexibility #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

p3zhy
Copy link

@p3zhy p3zhy commented Mar 21, 2024

This pull request enhances the satellite Rust crate by enabling it to be used without the standard library (#![no_std]) and providing flexibility in the choice of floating-point types. The changes in this pull request address limitations in float types in a no-std environment by integrating the micromath crate and implementing a mechanism to define float types based on whether the standard library feature is enabled or disabled.

Key Changes:

  • Enabled satellite crate to be used without the standard library by disabling the default std feature.
  • Integrated the micromath crate to address limitations in float types in a no-std environment.
  • Implemented a float type definition that switches between f32 and f64 based on the presence of the standard library feature.
  • Introduced a configurable epsilon value for floating-point comparisons, providing higher accuracy in unit tests when the standard library feature is active.

Testing:

  • Unit tests have been updated to accommodate the configurable epsilon value, ensuring consistency and accuracy across different environments.
  • For environments with the standard library feature enabled, unit tests are executed with higher accuracy using the defined epsilon value (SIMILAR_EPSILON).

Additional Notes:

  • This enhancement improves the versatility of the satellite crate, making it more accessible for use in a broader range of applications, particularly those targeting resource-constrained environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant