Search:

Type: Posts; User: Elysia

Search: Search took 0.10 seconds.

  1. Thread: Newton's Method

    by Elysia
    Replies
    33
    Views
    22,766

    Looks nice. The only complaint is that...

    Looks nice. The only complaint is that lexical_cast throws if it fails. You should probably intercept this and display an error.
    Are you sure the derivative is right, though? Looks like you've...
  2. Thread: Newton's Method

    by Elysia
    Replies
    33
    Views
    22,766

    Yes. Since lambdas behave just like functors, and...

    Yes. Since lambdas behave just like functors, and you are using template parameters, it will be fine.
  3. Thread: Newton's Method

    by Elysia
    Replies
    33
    Views
    22,766

    The only thing I can say is avoid atoi (use...

    The only thing I can say is avoid atoi (use boost::lexical_cast instead) and I would prefer lambdas over boost::bind (error messages are horrible as usual).
    Otherwise it looks like a very nice...
  4. Thread: Newton's Method

    by Elysia
    Replies
    33
    Views
    22,766

    What? You invented your own sqrt or something?

    What? You invented your own sqrt or something?
  5. Thread: Newton's Method

    by Elysia
    Replies
    33
    Views
    22,766

    #define TOLERANCE 10^-6 this is incorrect. "^"...

    #define TOLERANCE 10^-6
    this is incorrect. "^" is not the power operator.
    I believe there is a syntax such as
    const float g_Tolerance = 10E-6;
    Can't remember exactly.
    Also, use const instead of...
Results 1 to 5 of 5