File: r_sign.c

package info (click to toggle)
superlu 3.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,380 kB
  • ctags: 1,765
  • sloc: ansic: 48,604; makefile: 411; csh: 141; fortran: 54; sh: 14
file content (12 lines) | stat: -rw-r--r-- 181 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
#include "f2c.h"

#ifdef KR_headers
double r_sign(a,b) real *a, *b;
#else
double r_sign(real *a, real *b)
#endif
{
double x;
x = (*a >= 0 ? *a : - *a);
return( *b >= 0 ? x : -x);
}