(a,b)
| 161 | |
| 162 | #ifdef KR_headers |
| 163 | double r_sign(a,b) real *a, *b; |
| 164 | #else |
| 165 | double r_sign(real *a, real *b) |
| 166 | #endif |
| 167 | { |
| 168 | float x; |
| 169 | x = (*a >= 0.0f ? *a : - *a); |
| 170 | return( *b >= 0.0f ? x : -x); |
| 171 | } |
| 172 | |
| 173 | #ifdef KR_headers |
| 174 | double d_sign(a,b) doublereal *a, *b; |
| 175 | #else |
| 176 | double d_sign(doublereal *a, doublereal *b) |
| 177 | #endif |
| 178 | { |
| 179 | double x; |
| 180 | x = (*a >= 0 ? *a : - *a); |
| 181 | return( *b >= 0 ? x : -x); |
| 182 | } |
| 183 | |
| 184 | |
| 185 | #ifdef KR_headers |
| 186 | double floor(); |
| 187 | integer i_dnnt(x) doublereal *x; |
| 188 | #else |
| 189 | #undef abs |
| 190 | |
| 191 | integer i_dnnt(doublereal *x) |
| 192 | #endif |
| 193 | { |
| 194 | return( (*x)>=0 ? |
| 195 | floor(*x + .5) : -floor(.5 - *x) ); |
| 196 | } |
| 197 | |
| 198 | |
| 199 | #ifdef KR_headers |
| 200 | double floor(); |
| 201 | integer i_nint(x) real *x; |
| 202 | #else |
| 203 | #undef abs |
| 204 | integer i_nint(real *x) |
| 205 | #endif |
| 206 | { |
| 207 | return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); |
| 208 | } |
| 209 | |
| 210 | #ifdef KR_headers |
| 211 | double pow(); |
| 212 | double pow_dd(ap, bp) doublereal *ap, *bp; |
| 213 | #else |
| 214 | #undef abs |
| 215 | |
| 216 | double pow_dd(doublereal *ap, doublereal *bp) |
| 217 | #endif |
| 218 | { |
| 219 | return(pow(*ap, *bp) ); |
| 220 | } |
no test coverage detected