{"id":22513307,"url":"https://github.com/malk97sc/trigonometric","last_synced_at":"2025-03-28T01:23:12.479Z","repository":{"id":264718739,"uuid":"894190557","full_name":"Malk97sc/Trigonometric","owner":"Malk97sc","description":"Trigonometric Expression Evaluator","archived":false,"fork":false,"pushed_at":"2025-03-07T03:20:36.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T04:25:24.880Z","etag":null,"topics":["c","compiler","ll1-grammar","ll1-parser","trigonometric-calculations"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malk97sc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-25T23:11:31.000Z","updated_at":"2025-03-07T03:20:40.000Z","dependencies_parsed_at":"2025-01-19T22:25:11.824Z","dependency_job_id":"99f18407-6b48-4140-93a1-0226080d5000","html_url":"https://github.com/Malk97sc/Trigonometric","commit_stats":null,"previous_names":["malk97sc/trigonometric"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malk97sc%2FTrigonometric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malk97sc%2FTrigonometric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malk97sc%2FTrigonometric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malk97sc%2FTrigonometric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malk97sc","download_url":"https://codeload.github.com/Malk97sc/Trigonometric/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245950634,"owners_count":20699101,"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":["c","compiler","ll1-grammar","ll1-parser","trigonometric-calculations"],"created_at":"2024-12-07T03:11:09.157Z","updated_at":"2025-03-28T01:23:12.472Z","avatar_url":"https://github.com/Malk97sc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Trigonometric Expression Evaluator\n\n**Trigonometric Expression Evaluator**, a lightweight and efficient program designed to parse and evaluate complex mathematical expressions. Built using the powerful principles of **LL(1) grammar** and **recursive descent parsing**, this evaluator is perfect for anyone delving into compiler design, numerical computations, or advanced mathematics.\n\n## Features\n\n- **Comprehensive Trigonometric Support**: Evaluate functions like `sin`, `cos`, and `tan` with degree input.\n- **Arithmetic Operations**: Perform operations such as `+`, `-`, `*`, `/`, and exponentiation `^`.\n- **Error Handling**: Detect invalid inputs, manage division by zero, and handle syntax errors gracefully.\n- **Educational Value**: A practical implementation of compiler theory concepts for real-world applications.\n\n## Getting Started\n\nFollow these simple steps to install, compile, and run the program.\n\n### 1. Prerequisites\n\n- A Linux-based operating system (tested on Linux Mint).\n- GCC (GNU Compiler Collection) installed on your system.\n\n\n### 2. Compiling\n\nUse the following command to compile the code:\n\n```bash\ngcc -o trig_evaluator trig_evaluator.c -lm\n```\n\n- The `-lm` flag links the math library, which is essential for operations like `sin`, `cos`, and `pow`.\n\n### 3. Running\n\nRun the program with the expression you want to evaluate as a command-line argument:\n\n```bash\n./trig_evaluator \"\u003cexpression\u003e\"\n```\n\n## Examples\n\nHere are some examples to help you get started:\n\n- **Simple Arithmetic**:\n\n  ```bash\n  ./trig_evaluator \"3 + 5 * 2\"\n  ```\n  Output:\n  ```\n  Result: 13.000000\n  ```\n\n- **Trigonometric Evaluation**:\n\n  ```bash\n  ./trig_evaluator \"sin(30) + cos(60) - tan(45)\"\n  ```\n  Output:\n  ```\n  Result: 0.500000\n  ```\n\n- **Nested Expressions**:\n\n  ```bash\n  ./trig_evaluator \"(2 + 3)^2 - 10 / 5\"\n  ```\n  Output:\n  ```\n  Result: 23.000000\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalk97sc%2Ftrigonometric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalk97sc%2Ftrigonometric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalk97sc%2Ftrigonometric/lists"}