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

Errors in conversion #10

Closed
RobTillaart opened this issue Apr 22, 2024 · 0 comments · Fixed by #11
Closed

Errors in conversion #10

RobTillaart opened this issue Apr 22, 2024 · 0 comments · Fixed by #11
Assignees
Labels
bug Something isn't working

Comments

@RobTillaart
Copy link
Owner

RobTillaart commented Apr 22, 2024

Fraction(sqrt(443)) gives wrong result.

443 (169/8) 21.1250000 ==> 446,265625

so fractionize() or simplify() or both needs to be rewritten.

@RobTillaart RobTillaart added the bug Something isn't working label Apr 22, 2024
@RobTillaart RobTillaart self-assigned this Apr 22, 2024
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
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant