Results 1 to 23 of 23

Thread: [RESOLVED] Solve a cubic polynomial

Hybrid View

  1. #1
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: [RESOLVED] Solve a cubic polynomial

    Oh okie. Glad it seems to have worked out .
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2008
    Posts
    70

    Re: [RESOLVED] Solve a cubic polynomial

    Quote Originally Posted by jemidiah View Post
    Oh okie. Glad it seems to have worked out .
    Actually it hasn't anymore :P There's something wrong with my Cardano, but I'll sort that out - might have to use Newton's method for that afterall.

    I found out that the equation I'm solving is guaranteed to have only real roots. When they become imaginary it's only because of floating point errors. So rather than checking for small imaginary components, I just force the discriminant to be zero if it happens to come out negative.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width