{"id":15293297,"url":"https://github.com/symcalc/symcalc-ruby","last_synced_at":"2025-10-05T04:16:10.881Z","repository":{"id":250010185,"uuid":"833164788","full_name":"symcalc/symcalc-ruby","owner":"symcalc","description":"Symbolic mathematics and calculus in Ruby","archived":false,"fork":false,"pushed_at":"2024-11-15T13:04:19.000Z","size":56,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T13:04:35.673Z","etag":null,"topics":["calculus","differentiation","mathematics","maths","ruby","symcalc"],"latest_commit_sha":null,"homepage":"https://symcalc.site/ruby","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symcalc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-24T13:33:03.000Z","updated_at":"2025-04-11T03:05:02.000Z","dependencies_parsed_at":"2024-07-29T14:39:00.864Z","dependency_job_id":null,"html_url":"https://github.com/symcalc/symcalc-ruby","commit_stats":null,"previous_names":["symcalc/symcalc-ruby"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symcalc","download_url":"https://codeload.github.com/symcalc/symcalc-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717244,"owners_count":21150389,"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":["calculus","differentiation","mathematics","maths","ruby","symcalc"],"created_at":"2024-09-30T16:46:08.027Z","updated_at":"2025-10-05T04:16:05.842Z","avatar_url":"https://github.com/symcalc.png","language":"Ruby","readme":"# SymCalc Ruby\n\n![SymCalc Logo](/symcalc_logo.png)\n\n[Website](https://symcalc.site/ruby)\n/\n[License: Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n/\n[Changelog](https://symcalc.site/ruby/changelog)\n/\n[Ruby](https://github.com/symcalc/symcalc-ruby)\n, \n[C++](https://github.com/symcalc/symcalc-cpp)\n\nSymCalc (which stands for **Sym**bolic **Calc**ulus) is a library that introduces mathematics to code, where you can declare, evaluate, and differentiate any possible maths function with a single call.\n\nSymCalc allows to write readable and flexible code, adding a lot of functionality along the way, like this:\n```ruby\nfx = 5 * x ** 2 + sin(x)\n```\nInstead of hard-coded functions like this:\n```ruby\ndef fx(x)\n    5 * x ** 2 + Math.sin(x)\nend\n```\n\n## Contents\n- [Example](#example)\n- [Basic usage](#basic-usage)\n- [Install](#install-with-make)\n- [Learning SymCalc](#learning-symcalc)\n- [Authors](#authors)\n\n## Example\n\n```ruby\nrequire 'symcalc'\ninclude SymCalc\n\n# SymCalc variable\nx = var(\"x\")\n\n# SymCalc function\nfx = x ** 2 * 5 - 4 * sin(exp(x))\n\n# SymCalc derivative\ndfdx = fx.derivative()\n\n# SymCalc evaluate\nvalue = dfdx.eval x: 5\n\nputs value\n```\n\n## Basic usage\n\n1. Require SymCalc:\n```ruby\nrequire 'symcalc'\ninclude SymCalc\n```\n\n2. Define a variable:\n```ruby\nx = var(\"x\")\n```\n\n3. Define a function:\n```ruby\nfx = x ** 2\n```\n\n4. Evaluate:\n```ruby\nvalue = fx.eval(x: 4)\n# or\nvalue = fx(x: 4)\n```\n\n5. Differentiate:\n```ruby\ndfdx = fx.derivative\n```\n\n6. Multi-variable!:\n```ruby\nx = var(\"x\")\ny = var(\"y\")\n\nfxy = x ** 2 - 4 * abs(y)\n\ndfdx = fxy.derivative(variable: x)\ndfdy = fxy.derivative(variable: y)\n```\n\n7. Display:\n```ruby\nputs fx # Prints the function\n```\n\n8. Run:\n```bash\nruby main.rb\n```\n\n9. See more on the [website](https://symcalc.site/ruby)!\n\n## Install\n\nRun:\n\n```bash\ngem install symcalc\n```\n\n## Learning SymCalc\n\nYou can learn more about SymCalc on these resources:\n\n- [SymCalc's Website](https://symcalc.site/ruby)\n- [Intro](https://symcalc.site/ruby/intro)\n- [Examples](https://symcalc.site/ruby/examples)\n- [Docs](https://symcalc.site/ruby/docs)\n\n\n## Authors\n\nSymCalc is currently developed and maintaned by [Kyryl Shyshko](https://kyrylshyshko.me) ([@kyryloshy](https://github.com/kyryloshy))","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymcalc%2Fsymcalc-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymcalc%2Fsymcalc-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymcalc%2Fsymcalc-ruby/lists"}