source:
branches/GNU/src/gcc/libf2c/libF77/d_sign.c@
3
| Last change on this file since 3 was 2, checked in by , 23 years ago | |
|---|---|
|
|
| File size: 199 bytes | |
| Line | |
|---|---|
| 1 | #include "f2c.h" |
| 2 | |
| 3 | #ifdef KR_headers |
| 4 | double d_sign(a,b) doublereal *a, *b; |
| 5 | #else |
| 6 | double d_sign(doublereal *a, doublereal *b) |
| 7 | #endif |
| 8 | { |
| 9 | double x; |
| 10 | x = (*a >= 0 ? *a : - *a); |
| 11 | return( *b >= 0 ? x : -x); |
| 12 | } |
Note:
See TracBrowser
for help on using the repository browser.
