[PR #704] Create cosx_series.c #1193

Open
opened 2026-01-29 15:18:17 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/TheAlgorithms/C/pull/704

State: closed
Merged: No


Given code is used to find the value Cos x upto the desired limit, using the Taylor's series expansion
Input: X, and number of terms that need to be calculated
Output: value of Cos x upto the given limit
Test Example:
Enter X (deg): 60
Enter the limit upto which you want to expand the series: 3
Cos(60.0) = 0.501823

Description of Change

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

**Original Pull Request:** https://github.com/TheAlgorithms/C/pull/704 **State:** closed **Merged:** No --- Given code is used to find the value Cos x upto the desired limit, using the Taylor's series expansion Input: X, and number of terms that need to be calculated Output: value of Cos x upto the given limit Test Example: Enter X (deg): 60 Enter the limit upto which you want to expand the series: 3 Cos(60.0) = 0.501823 #### Description of Change <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md --> #### References <!-- Add any reference to previous pull-request or issue --> #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Added description of change - [x] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [x] Added tests and example, test must pass - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: <!-- Please add a one-line description for developers or pull request viewers --> <a href="https://gitpod.io/#https://github.com/TheAlgorithms/C/pull/704"><img src="https://gitpod.io/api/apps/github/pbs/github.com/harshrey/C.git/dceffa3ce802df9930249a2bfc97bdd95f5c7c62.svg" /></a>
claunia added the pull-request label 2026-01-29 15:18:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1193