Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 522915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:24:12+00:00 2026-05-13T08:24:12+00:00

I am reading the standard (Numerical Recipes and GSL C versions are identical) implementation

  • 0

I am reading the standard (Numerical Recipes and GSL C versions are identical) implementation of Brent root finding algorithm, and cannot understand the meaning of variable “e”. The usage suggests that “e” is supposed to be the previous distance between the brackets. But then, why is it set to “xm” (half the distance) when we use bisection?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:24:12+00:00Added an answer on May 13, 2026 at 8:24 am

    I’m not familiar with the algorithm. However, I can compare the C source and the Wikipedia description of the algorithm. The algorithm seems straight forward-ish (if you’re familiar with methods to find roots), but the C implementation looks like a direct port of the fortran, so it’s rather hard to read.

    My best guess is that e is related to the loop conditional.

    Wikipedia says (line 8 of the algorithm):
    repeat until f(b or s) = 0 or |b − a| is small enough (convergence)

    The C source says:
    e = b - a, then later if (fabs(e) <= tol ....

    I’d hope that the purpose of the variables would be described clearly in the book, but apparently not 🙂


    Ok, here you go. I found the original implementation (in algol 60) here. In addition to a nice description of the algorithm, it says (starting on page 50):

    let e be the value of p/q at the step before the last one. If |e|< δ or|p/q| ≥ 1/2|e| then do a bisection, otherwise we do either a bisection or interpolation just as in Dekker’s algorithm. Thus |e| decreases by at least a factor of two on every second step, and when |e|< δ a bisection must be done. (After a bisection we take e = m for the next step.)

    So the addition of e is Brent’s “main modification” of Dekker’s algorithm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been reading some Obj-C projects, and I'm always finding this standard for naming
I've posted the same question here a few days ago( Java reading standard output
I'm reading from the standard input using the read() system call but there's a
I am reading the IEEE Standard Verilog Hardware Description Language (specifically IEEE Std 1364-2001)
In my simple custom shell I'm reading commands from the standard input and execute
I am reading book called C++ coding standard By Herb Sutter, Andrei Alexandrescu and
I'm reading through: The C++ Standard Library: A Tutorial and Reference by Nicolai M.
I was reading the C Standard the other day, and noticed that unlike signed
From my reading of the standard, random_device::entropy() should return 0.0 if a software engine
i'm using the standard method for reading files stored on the sdcard: public static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.