Blame thirdparty/superlu/SuperLU_4.1/TESTING/MATGEN/d_sign.c
|
kusano |
7d535a |
#include "f2c.h"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#ifdef KR_headers
|
|
kusano |
7d535a |
double d_sign(a,b) doublereal *a, *b;
|
|
kusano |
7d535a |
#else
|
|
kusano |
7d535a |
double d_sign(doublereal *a, doublereal *b)
|
|
kusano |
7d535a |
#endif
|
|
kusano |
7d535a |
{
|
|
kusano |
7d535a |
double x;
|
|
kusano |
7d535a |
x = (*a >= 0 ? *a : - *a);
|
|
kusano |
7d535a |
return( *b >= 0 ? x : -x);
|
|
kusano |
7d535a |
}
|