| 1 |
# digits(x): Significant Binary Digits |
| 2 |
|
| 3 |
Significant binary digits. |
| 4 |
|
| 5 |
## Declaration |
| 6 |
|
| 7 |
### Syntax |
| 8 |
|
| 9 |
```fortran |
| 10 |
retval = digits(x) |
| 11 |
``` |
| 12 |
|
| 13 |
### Arguments |
| 14 |
|
| 15 |
`x` the input value must be of type real or integer. |
| 16 |
|
| 17 |
### Return values |
| 18 |
|
| 19 |
The return value is of type integer. |
| 20 |
|
| 21 |
## Description |
| 22 |
|
| 23 |
**digits(x)** returns the number of significant binary digits of the internal |
| 24 |
mopdel representation of `x`. |
| 25 |
|
| 26 |
## Types |
| 27 |
|
| 28 |
Supported argument types are real and integer. |
| 29 |
|
| 30 |
## Examples |
| 31 |
|
| 32 |
```fortran |
| 33 |
program intrinsics_digits |
| 34 |
print *, digits(3.1) |
| 35 |
end program |
| 36 |
``` |
| 37 |
|
| 38 |
**Result:** |
| 39 |
|
| 40 |
``` |
| 41 |
24 |
| 42 |
``` |
| 43 |
|
| 44 |
## See Also |