Skip to content

Conversation

shimmer12
Copy link
Contributor

The Newton-Raphson method is a powerful and relatively straightforward method for finding the roots of an equation. It has many advantages but suffers from several drawbacks such as a readily calculated derivative, inconsistencies when f′(x)=0 and so on.

@shimmer12 shimmer12 requested review from Copilot and removed request for Copilot October 11, 2025 20:48
@Copilot Copilot AI review requested due to automatic review settings October 11, 2025 20:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the Newton-Raphson method for finding roots of equations in R. The implementation provides a numerical method that iteratively approximates roots using the function and its derivative.

Key changes:

  • Adds a new Newton-Raphson algorithm implementation
  • Includes standard numerical method parameters (tolerance, maximum iterations)
  • Provides a clean, functional interface for root finding
Comments suppressed due to low confidence (1)

mathematics/newton_raphson_method.r:1

  • The function lacks documentation explaining the algorithm, parameters, and return value. Add comments describing what the Newton-Raphson method does, the expected input parameters, and the output.
newtonRaphson <- function(f, fprime, x0, tol = 1e-6, max_iter = 100) {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Copilot Copilot AI review requested due to automatic review settings October 11, 2025 20:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

siriak
siriak previously approved these changes Oct 11, 2025
@siriak siriak merged commit b5d1199 into TheAlgorithms:master Oct 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants