{"id":22143447,"url":"https://github.com/symcalc/symcalc-cpp","last_synced_at":"2025-07-26T00:32:58.054Z","repository":{"id":250008307,"uuid":"833163623","full_name":"symcalc/symcalc-cpp","owner":"symcalc","description":"Symbolic mathematics and calculus in C++.","archived":false,"fork":false,"pushed_at":"2024-08-05T14:37:13.000Z","size":574,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-06T13:45:23.870Z","etag":null,"topics":["calculus","cpp","differentiation","mathematics","maths","symcalc"],"latest_commit_sha":null,"homepage":"https://symcalc.site/cpp","language":"C++","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:30:22.000Z","updated_at":"2024-08-06T01:02:34.000Z","dependencies_parsed_at":"2024-07-29T13:38:56.965Z","dependency_job_id":null,"html_url":"https://github.com/symcalc/symcalc-cpp","commit_stats":null,"previous_names":["symcalc/symcalc-cpp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symcalc%2Fsymcalc-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symcalc","download_url":"https://codeload.github.com/symcalc/symcalc-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227635464,"owners_count":17796971,"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","cpp","differentiation","mathematics","maths","symcalc"],"created_at":"2024-12-01T22:11:05.358Z","updated_at":"2024-12-01T22:11:05.981Z","avatar_url":"https://github.com/symcalc.png","language":"C++","readme":"# SymCalc C++\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/cpp/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```cpp\nEquation fx = 5 * pow(x, 2) + sin(x);\n```\nInstead of hard-coded functions like this:\n```cpp\n#include \u003ccmath\u003e\ndouble fx(double x){\n\treturn 5 * pow(x, 2) + sin(x);\n}\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```cpp\n#include \u003csymcalc/symcalc.hpp\u003e\n\nusing namespace symcalc;\n\nint main(){\n    // SymCalc variable\n    Equation x (\"x\");\n\n    // SymCalc function\n    Equation fx = pow(x, 2) * 5 - 4 * sin(exp(x));\n\n    // SymCalc derivative\n    Equation dfdx = fx.derivative();\n\n    // SymCalc evaluate\n    double value = dfdx.eval({{x, 5}});\n\n    std::cout \u003c\u003c value \u003c\u003c std::endl;\n\n    return 0;\n}\n```\n\n## Basic usage\n\n1. Include the SymCalc header:\n```cpp\n#include \u003csymcalc/symcalc.hpp\u003e\nusing namespace symcalc;\n```\n\n2. Define a variable:\n```cpp\nEquation x(\"x\");\n```\n\n3. Define a function:\n```cpp\nEquation fx = pow(x, 2);\n```\n\n4. Evaluate:\n```cpp\ndouble value = fx.eval({{x, 4}});\n// or\nvalue = fx({{x, 4}});\n```\n\n5. Differentiate:\n```cpp\nEquation dfdx = fx.derivative();\n```\n\n6. Multi-variable!:\n```cpp\nEquation x(\"x\");\nEquation y(\"y\");\n\nEquation fxy = pow(x, 2) - 4 * abs(y);\n\nEquation dfdx = fxy.derivative(x);\nEquation dfdy = fxy.derivative(y);\n```\n\n7. Display:\n```cpp\nstd::cout \u003c\u003c fx \u003c\u003c std::endl; // Prints the function\n```\n\n8. Compile:\n```bash\ng++ main.cpp -o main -std=c++11 -lsymcalc\n```\n\n9. See more on the [website](https://symcalc.site/cpp)!\n\n## Install with make\n\n1. Download the source code with git or wget:\n```bash\ngit clone https://github.com/symcalc/symcalc-cpp; cd symcalc-cpp\n```\n\nor\n\n```bash\nwget https://symcalc.site/cpp/source_latest.zip; unzip source_latest.zip; cd symcalc_cpp_source\n```\n\n2. Build SymCalc with make\n```bash\nmake\n```\n\n3. Install SymCalc\n```bash\nmake install\n```\nOr to a specific location with\n```bash\nmake install PREFIX=/path/to/install\n```\n\n## Learning SymCalc\n\nYou can learn more about SymCalc on these resources:\n\n- [SymCalc's Website](https://symcalc.site/cpp)\n- [Intro](https://symcalc.site/cpp/intro)\n- [Examples](https://symcalc.site/cpp/examples)\n- [Docs](https://symcalc.site/cpp/docs)\n\n\n## Authors\n\nSymCalc is currently developed and maintaned by [Kyryl Shyshko](https://kyrylshyshko.me) ([@kyryloshy](https://github.com/kyryloshy))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymcalc%2Fsymcalc-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymcalc%2Fsymcalc-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymcalc%2Fsymcalc-cpp/lists"}