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

Create an array of fractions - support + example #9

Closed
RobTillaart opened this issue Apr 22, 2024 · 1 comment · Fixed by #11
Closed

Create an array of fractions - support + example #9

RobTillaart opened this issue Apr 22, 2024 · 1 comment · Fixed by #11
Assignees
Labels
enhancement New feature or request

Comments

@RobTillaart
Copy link
Owner

RobTillaart commented Apr 22, 2024

  • need a default value for the constructor e.g (0, 1)
  • investigate sizeof(fraction) to understand memory usage
@RobTillaart RobTillaart self-assigned this Apr 22, 2024
@RobTillaart RobTillaart added the enhancement New feature or request label Apr 22, 2024
@RobTillaart
Copy link
Owner Author

Is solved in current develop branch, (next release 0.2.0) .

RobTillaart added a commit that referenced this issue Apr 24, 2024
- removed **Printable** interface, braking change
- improve quality of **fractionize()** search
  - split of integer part before search improves precision.
- add support for arrays
  - default value for constructor (0, 1)
  - add **fraction_array.ino** + **fraction_sizeof.ino**
- add **toString()**
- add **isInteger()**
- update examples
  - add **fraction_extensive.ino** test range and accuracy sketch
  - add **fraction_sqrts.ino** test sketch
  - add **fraction_fast.ino**, fast determination of fraction with 9900 as denominator.
    - this is very fast, with an accuracy ~1e-4
  - add **fraction_full_scan.ino** for a full scan search.
  - optimized **FractionMediant.ino** determine fraction with mediant.
  - add **fraction_setDenominator.ino** demo
  - add **FactionPowers2.ino**, fast determination of fraction with powers of 2.- add examples including tests.
- update readme.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant