Skip to content

Conversation

@dvorster
Copy link
Collaborator

Added tests and code for the bisection method.

Added tests and code for bisection_find_roots, which uses bisection method to search for all roots in a given function.

  • Implemented basic body via iterations over [xmin, xmax]
  • Separated functionality from bisection method for ease of use and readability.
  • Added functionality to deal with repeated roots due to numerical approximations floating points errors
  • Added functionality to capture roots if they exist at endpoints xmin, xmax.

@dvorster dvorster added this to the Milestone 2 milestone Jan 15, 2026
@dvorster dvorster self-assigned this Jan 15, 2026
@dvorster dvorster added the enhancement New feature or request label Jan 15, 2026
@dvorster dvorster moved this from Backlog to In review in Root Finding Python Package Jan 15, 2026
Copy link
Collaborator

@Harrisonlee0530 Harrisonlee0530 left a comment

Choose a reason for hiding this comment

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

Great job


# Bisection Method
fmin = f(xmin)
xmid = xmid = xmin + (xmax - xmin) / 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

xmid = xmid = ...

@Harrisonlee0530
Copy link
Collaborator

There's a duplicated xmid in bisection.py on line 93, but I'll merge it anyways

@Harrisonlee0530 Harrisonlee0530 merged commit d29d8a5 into milestone-2-development Jan 15, 2026
7 of 9 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Root Finding Python Package Jan 15, 2026
@Harrisonlee0530 Harrisonlee0530 deleted the test-and-code-for-bisection branch January 20, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants