[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Simplifiying gsl_poly_solve_quadratic()
From: |
Brian Gough |
Subject: |
Re: [Bug-gsl] Simplifiying gsl_poly_solve_quadratic() |
Date: |
Wed, 13 Apr 2011 17:53:09 +0100 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO) |
At Tue, 5 Apr 2011 19:51:48 -0400,
James Ward wrote:
> with the simpler:
>
> if (b == 0)
> {
> double r = sqrt (-c / a);
> *x0 = -r;
> *x1 = r;
> }
>
> you could also move the assignment of disc after the linear case,
>
> disc = b * b - 4 * a * c;
>
> since disc is not used in the linear case.
Thanks. I'll make both those changes.