{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":583032,"defaultBranch":"master","name":"continued_fractions","ownerLogin":"jolohaga","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-03-28T06:05:34.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/53976?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1703282433.0","currentOid":""},"activityList":{"items":[{"before":"5e9e25a87937aeb86008aac97a19bb520f011227","after":"32ce62a8e34f8d1d6067f8a2fea3cefbecb6a6e0","ref":"refs/heads/master","pushedAt":"2023-12-23T01:17:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Update README.md\n\nAdd RubyGem badge.","shortMessageHtmlLink":"Update README.md"}},{"before":"1533bf0a58c38a8c35482e5404c270dbc9b3d271","after":"5e9e25a87937aeb86008aac97a19bb520f011227","ref":"refs/heads/master","pushedAt":"2023-12-22T22:04:48.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Add .from_quotients\n\nNovel methods of obtaining real numbers are available, given the ability to\nconstruct them from a list of quotients.\n\nThis commit adds the ContinuedFraction.from_quotients class method, accepting a\nlist of quotients to construct the number.","shortMessageHtmlLink":"Add .from_quotients"}},{"before":"8ef4b583341902cfe8b614b4514ec64cf94ba165","after":null,"ref":"refs/heads/gh-pages","pushedAt":"2023-12-22T22:00:33.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"}},{"before":"1b34e4835f893e1d8246be98be4b3f71dfe7a58a","after":"1533bf0a58c38a8c35482e5404c270dbc9b3d271","ref":"refs/heads/master","pushedAt":"2023-12-22T21:55:29.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Add .from_quotients\n\nNovel methods of obtaining real numbers are available, given the ability to\nconstruct them from a list of quotients.\n\nThis commit adds the ContinuedFraction.from_quotients class method, accepting a\nlist of quotients to construct the number.","shortMessageHtmlLink":"Add .from_quotients"}},{"before":"e3a714055350956200a99b4d382af39e2b8a8294","after":"1b34e4835f893e1d8246be98be4b3f71dfe7a58a","ref":"refs/heads/master","pushedAt":"2023-12-22T21:42:22.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Add .from_quotients\n\nNovel methods of obtaining real numbers are available, given the ability to\nconstruct them from a list of quotients.\n\nThis commit adds the ContinuedFraction.from_quotients class method, accepting a\nlist of quotients to construct the number.","shortMessageHtmlLink":"Add .from_quotients"}},{"before":"3e801a151ad791f21e8859799fb09329c0765f18","after":"e3a714055350956200a99b4d382af39e2b8a8294","ref":"refs/heads/master","pushedAt":"2023-12-07T20:03:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Removed deprecated Yard tags\n\nThe @attr_reader tag is deprecated, according to this docs..\nhttps://rubydoc.info/gems/yard/file/docs/Tags.md#attr_reader\n\nThis commit removes the tag.","shortMessageHtmlLink":"Removed deprecated Yard tags"}},{"before":"63d8c0f8f4863d0ec6b08cdb253465bb8a1279c5","after":"3e801a151ad791f21e8859799fb09329c0765f18","ref":"refs/heads/master","pushedAt":"2023-12-07T03:09:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Add missing info in gemspec file\n\nThe developer dependency, Yard, was missing from the gemspec file.\n\nThis change adds yard as a developer dependency. It also removes some outdated\nlines from the file.","shortMessageHtmlLink":"Add missing info in gemspec file"}},{"before":"48c695d8436d384e759a3da595515a6b723b499d","after":"63d8c0f8f4863d0ec6b08cdb253465bb8a1279c5","ref":"refs/heads/master","pushedAt":"2023-12-07T02:18:40.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Streamline code and fix a computation bug\n\nWe can make the API more concise and the supporting logic in CF simpler, if\nwe store Rationals in the convergents array, instead of Array tuples.\n\nThe method #convergents_as_rationals, can be eliminated if we store Rationals\nin the convergents array, in place of Array tuples. A call to #convergents\nreturns an array of Rationals. This is more concise and simpler logic to\nsupport.\n\nThis commit replaces array tuples for Rationals in the convergents array.\n\nIt also addresses a bug where convergents for finite decimal numbers and\nfractions would be calculated erroneously beyond the required range. For\nexample, the convergents array for (7/6r).to_f would be:\n\n[[1, 1], [6, 5], [7, 6], [2627099782632793, 2251799813685251], [7881299347898386, 6755399441055759]]\n\nThis fix is:\n 1) to do all calculations using Rational type\n 2) to break the loop when an epsilon of zero between the number and the\n current convergent is encountered\n\nLastly, the documentation is now being generated by Yard. Headers were updated\nto support this. Github pages and RubyGems links will be updated to point to\nthe new documentation.","shortMessageHtmlLink":"Streamline code and fix a computation bug"}},{"before":"48d9439eabcd05a9081b1f6eba77041464de301b","after":null,"ref":"refs/heads/update-gemspec-file","pushedAt":"2023-09-30T20:44:42.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"}},{"before":"3b54342c2159ed2a229fcef40432d894277e7635","after":"48c695d8436d384e759a3da595515a6b723b499d","ref":"refs/heads/master","pushedAt":"2023-09-30T20:44:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Update gemspec file (#8)\n\nThere was some cruft code in the gemspec file.\r\n\r\nThis change removes some unecessary lines in the gemspec file. It also updates\r\nthe author's email, the copyright date, and removes the leading :: in\r\nComparable.","shortMessageHtmlLink":"Update gemspec file (#8)"}},{"before":null,"after":"48d9439eabcd05a9081b1f6eba77041464de301b","ref":"refs/heads/update-gemspec-file","pushedAt":"2023-09-30T20:38:51.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Update gemspec file\n\nThere was some cruft code in the gemspec file.\n\nThis change removes some unecessary lines in the gemspec file. It also updates\nthe author's email, the copyright date, and removes the leading :: in\nComparable.","shortMessageHtmlLink":"Update gemspec file"}},{"before":"c559a3495e3a8cdfe78a2ff64db6e48fd960480c","after":null,"ref":"refs/heads/fix-simple-rational-bug","pushedAt":"2023-09-30T17:49:25.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"}},{"before":"aa4c2e14196867f11b799e5b433789a691057a4e","after":"3b54342c2159ed2a229fcef40432d894277e7635","ref":"refs/heads/master","pushedAt":"2023-09-30T17:49:20.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Fix floating point representation error bug (#7)\n\nThe quotients were not being calculated accurately for certain rational\r\nnumbers. For example,\r\n\r\nContinuedFraction.new(7/4r)\r\n\r\nproduced the quotients..\r\n\r\n[1, 1, 3, 1125899906842624]\r\n\r\nand convergents..\r\n\r\n[[1, 1], [2, 1], [7, 4], [7881299347898370, 4503599627370497]]\r\n\r\nThe issue is caused by floating point representation errors, which seem to\r\nimpact most languages, not just Ruby. A simpler example is..\r\n\r\n1.4 + 1.2\r\n=> 2.5999999999999996\r\n\r\nThese representation issues impact the continued fraction quotients.\r\n\r\nThis change addresses the bug, by adding a second break condition in the\r\nquotients algorithm. The condition looks to see if the currently generated\r\nconvergent is equal to the number being converted.\r\n\r\nIn order to break when this condition is met, the code in calculate_quotients\r\nand calculate_convergents was merged into one method. The merge allows to\r\ninline the break conditions as the quotients are being calculated and avoid\r\nextra clean-up code.\r\n\r\nSome info can be found here..\r\nhttps://corainchicago.github.io/blog/why-does-ruby-add-numbers-wrong/","shortMessageHtmlLink":"Fix floating point representation error bug (#7)"}},{"before":"c8e0aebdded2334a8f8446e193ce436b1aa0ffe6","after":"c559a3495e3a8cdfe78a2ff64db6e48fd960480c","ref":"refs/heads/fix-simple-rational-bug","pushedAt":"2023-09-28T05:03:51.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Fix floating point representation error bug\n\nThe quotients were not being calculated accurately for certain rational\nnumbers. For example,\n\nContinuedFraction.new(7/4r)\n\nproduced the quotients..\n\n[1, 1, 3, 1125899906842624]\n\nand convergents..\n\n[[1, 1], [2, 1], [7, 4], [7881299347898370, 4503599627370497]]\n\nThe issue is caused by floating point representation errors, which seem to\nimpact most languages, not just Ruby. A simpler example is..\n\n1.4 + 1.2\n=> 2.5999999999999996\n\nThese representation issues impact the continued fraction quotients.\n\nThis change addresses the bug, by adding a second break condition in the\nquotients algorithm. The condition looks to see if the currently generated\nconvergent is equal to the number being converted.\n\nIn order to break when this condition is met, the code in calculate_quotients\nand calculate_convergents was merged into one method. The merge allows to\ninline the break conditions as the quotients are being calculated and avoid\nextra clean-up code.\n\nSome info can be found here..\nhttps://corainchicago.github.io/blog/why-does-ruby-add-numbers-wrong/","shortMessageHtmlLink":"Fix floating point representation error bug"}},{"before":"f44764bf0d6c664f3a11c9eba95ea45e3c2fd03d","after":"c8e0aebdded2334a8f8446e193ce436b1aa0ffe6","ref":"refs/heads/fix-simple-rational-bug","pushedAt":"2023-09-28T04:54:11.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Fix floating point representation error bug\n\nThe quotients were not being calculated accurately for certain rational\nnumbers. For example,\n\nContinuedFraction.new(7/4r)\n\nproduced the quotients..\n\n[1, 1, 3, 1125899906842624]\n\nand convergents..\n\n[[1, 1], [2, 1], [7, 4], [7881299347898370, 4503599627370497]]\n\nThe issue is caused by floating point representation errors, which seem to\nimpact most languages, not just Ruby. A simpler example is..\n\n1.4 + 1.2\n=> 2.5999999999999996\n\nThese representation issues impact the continued fraction quotients.\n\nThis change addresses the bug, by adding a second break condition in the\nquotients algorithm. The condition looks to see if the currently generated\nconvergent is equal to the number being converted.\n\nIn order to break when this condition is met, the code in calculate_quotients\nand calculate_convergents was merged into one method. The merge allows to\ninline the break conditions as the quotients are being calculated and avoid\nextra clean-up code.\n\nSome info can be found here..\nhttps://corainchicago.github.io/blog/why-does-ruby-add-numbers-wrong/","shortMessageHtmlLink":"Fix floating point representation error bug"}},{"before":"7743ebaef9c87c1a07ab367ef2e0e1f3472897c8","after":"f44764bf0d6c664f3a11c9eba95ea45e3c2fd03d","ref":"refs/heads/fix-simple-rational-bug","pushedAt":"2023-09-28T04:27:38.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Fix floating point representation error bug\n\nThe quotients were not being calculated accurately for certain rational\nnumbers. For example,\n\nContinuedFraction.new(7/4r)\n\nproduced the quotients..\n\n[1, 1, 3, 1125899906842624]\n\nand convergents..\n\n[[1, 1], [2, 1], [7, 4], [7881299347898370, 4503599627370497]]\n\nThe issue is caused by floating point representation errors, which seem to\nimpact most languages, not just Ruby. A simpler example is..\n\n1.4 + 1.2\n=> 2.5999999999999996\n\nThese representation issues impact the continued fraction quotients.\n\nThis change addresses the bug, by adding a second break condition in the\nquotients algorithm. The condition looks to see if the currently generated\nconvergent is equal to the number being converted.\n\nIn order to break when this condition is met, the code in calculate_quotients\nand calculate_convergents was merged into one method. The merge allows to\ninline the break conditions as the quotients are being calculated and avoid\nextra clean-up code.\n\nSome info can be found here..\nhttps://corainchicago.github.io/blog/why-does-ruby-add-numbers-wrong/","shortMessageHtmlLink":"Fix floating point representation error bug"}},{"before":null,"after":"7743ebaef9c87c1a07ab367ef2e0e1f3472897c8","ref":"refs/heads/fix-simple-rational-bug","pushedAt":"2023-09-28T04:17:52.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jolohaga","name":"Jose Hales-Garcia","path":"/jolohaga","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/53976?s=80&v=4"},"commit":{"message":"Fix floating point representation error bug\n\nThe quotients were not being calculated accurately for certain rational\nnumbers. For example,\n\nContinuedFraction.new(7/4r)\n\nproduced the quotients..\n[1, 1, 3, 1125899906842624]\n\nand convergents..\n[[1, 1], [2, 1], [33, 17], [35, 18], [9851624184872993, 5066549580791825]]\n\nThe issue is caused by floating point representation errors, which seem to\nimpact most languages, not just Ruby. A simpler example is..\n\n1.4 + 1.2\n=> 2.5999999999999996\n\nThese representation issues impact the continued fraction quotients.\n\nThis change addresses the bug, by adding a second break condition in the\nquotients algorithm. The condition looks to see if the currently generated\nconvergent is equal to the number being converted.\n\nIn order to break when this condition is met, the code in calculate_quotients\nand calculate_convergents was merged into one method. The merge allows to\ninline the break conditions as the quotients are being calculated and avoid\nextra clean-up code.\n\nSome info can be found here..\nhttps://corainchicago.github.io/blog/why-does-ruby-add-numbers-wrong/","shortMessageHtmlLink":"Fix floating point representation error bug"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAD0LGyWgA","startCursor":null,"endCursor":null}},"title":"Activity ยท jolohaga/continued_fractions"}