| 1 |
– |
/* Copyright (c) 1986 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* zeroes.c - compute roots for various equations. |
| 6 |
|
* |
| 7 |
< |
* 8/19/85 |
| 7 |
> |
* External symbols declared in standard.h |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
< |
#define FTINY 1e-7 |
| 10 |
> |
#include "copyright.h" |
| 11 |
|
|
| 12 |
|
|
| 13 |
+ |
#include <math.h> |
| 14 |
+ |
|
| 15 |
+ |
#include "fvect.h" |
| 16 |
+ |
#include "rtmath.h" |
| 17 |
+ |
|
| 18 |
|
int |
| 19 |
|
quadratic(r, a, b, c) /* find real roots of quadratic equation */ |
| 20 |
|
double *r; /* roots in ascending order */ |
| 21 |
|
double a, b, c; |
| 22 |
|
{ |
| 21 |
– |
double fabs(), sqrt(); |
| 23 |
|
double disc; |
| 24 |
|
int first; |
| 25 |
|
|