Scilab Function

nearfloat - get previous or next floating-point number

### Sequence d'appel

  `xnear = nearfloat(dir, x)`

### Parametres

- `dir` : string ("succ" or "pred")
- `x` : real scalar, vector or matrix
- `xnear` : real scalar, vector or matrix

### Description

This function computes, in the element wise meaning, the corresponding neighbours of the elements of `x` (in the underlying floating point set, see number_properties), the successors if `dir = "succ"` and the predecessors if `dir = "pred"`

### Exemples

    format("e",22)
    nearfloat("succ",1) - 1
    1 - nearfloat("pred",1)
    format("v") //reset default format

### Voir aussi

`number_properties` `frexp`

### Auteur

B.P.