#
Fortran Wiki

exponent

## Description

`exponent(x)`

returns the value of the exponent part of `x`

. If `x`

is zero the value returned is zero.

## Standard

Fortran 95 and later

## Class

Elemental function

## Syntax

`result = exponent(x)`

## Arguments

`x`

- The type shall be `real`

.

## Return value

The return value is of type default `integer`

.

## Example

```
program test_exponent
real :: x = 1.0
integer :: i
i = exponent(x)
print *, i
print *, exponent(0.0)
end program test_exponent
```

Revised on April 30, 2009 22:46:12
by

Jason Blevins
(71.70.142.190)
(584 characters / 0.0 pages)