Commit | Line | Data |
---|---|---|
496e3b86 | 1 | /* |
6cc58bb1 RE |
2 | * Copyright (c) 1980 Regents of the University of California. |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
6 | * @(#)d_abs.c 5.1 %G% | |
496e3b86 DW |
7 | */ |
8 | ||
9 | double d_abs(x) | |
10 | double *x; | |
11 | { | |
12 | if(*x >= 0) | |
13 | return(*x); | |
14 | return(- *x); | |
15 | } |