{"id":15032720,"url":"https://github.com/ruby/mathn","last_synced_at":"2025-04-06T06:08:20.634Z","repository":{"id":20793063,"uuid":"87522699","full_name":"ruby/mathn","owner":"ruby","description":"Deprecated library that extends math operations.","archived":false,"fork":false,"pushed_at":"2024-10-31T05:59:19.000Z","size":174,"stargazers_count":12,"open_issues_count":1,"forks_count":15,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-30T05:04:38.012Z","etag":null,"topics":["mathn","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-07T08:21:45.000Z","updated_at":"2024-10-31T05:44:57.000Z","dependencies_parsed_at":"2023-02-12T07:55:14.420Z","dependency_job_id":"efef82fb-c16a-432f-9b71-f7b5f8f93f04","html_url":"https://github.com/ruby/mathn","commit_stats":{"total_commits":109,"total_committers":26,"mean_commits":"4.1923076923076925","dds":0.8348623853211009,"last_synced_commit":"4e3ad9b033ae27fe882b10935994a3847a635988"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fmathn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fmathn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fmathn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fmathn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/mathn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441051,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathn","ruby"],"created_at":"2024-09-24T20:19:14.688Z","updated_at":"2025-04-06T06:08:20.616Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Mathn\n\n[![Build Status](https://travis-ci.org/ruby/mathn.svg?branch=master)](https://travis-ci.org/ruby/mathn)\n\nmathn serves to make mathematical operations more precise in Ruby and to integrate other mathematical standard libraries.\n\nWithout mathn:\n\n```ruby\n3 / 2 =\u003e 1 # Integer\n```\n\nWith mathn:\n\n```ruby\n3 / 2 =\u003e 3/2 # Rational\n```\n\nmathn keeps value in exact terms.\n\nWithout mathn:\n\n```ruby\n20 / 9 * 3 * 14 / 7 * 3 / 2 # =\u003e 18\n```\n\nWith mathn:\n\n```ruby\n20 / 9 * 3 * 14 / 7 * 3 / 2 # =\u003e 20\n```\n\n## Global Behavioral changes\n\nWhile older version of 'mathn', just by required, caused changes to\nthe behavior (and even the types) of operations on classes like\nInteger newer `mathn` introduces the refinements `Math::N`, and you\nhave to enable it.\n\nBefore ruby 2.5, `mathn` was part of the ruby standard library. It was\nwas [deprecated in ruby 2.2.0](https://github.com/ruby/ruby/blob/v2_2_0/NEWS#stdlib-compatibility-issues-excluding-feature-bug-fixes),\nand [removed from ruby 2.5.0](https://github.com/ruby/ruby/blob/ruby_2_5/NEWS#stdlib-compatibility-issues-excluding-feature-bug-fixes).\nIn order to use the library with a current version of ruby,\nyou must install it as a gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mathn'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mathn\n\n## Usage\n\n```ruby\nrequire 'mathn'\nusing Math::N\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/mathn.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fmathn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fmathn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fmathn/lists"}