1.\"	$OpenBSD: nextafter.3,v 1.8 2013/06/05 03:40:26 tedu Exp $
2.\" Copyright (c) 1985, 1991 Regents of the University of California.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. Neither the name of the University nor the names of its contributors
14.\"    may be used to endorse or promote products derived from this software
15.\"    without specific prior written permission.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\"     from: @(#)ieee.3	6.4 (Berkeley) 5/6/91
30.\"
31.Dd $Mdocdate: June 5 2013 $
32.Dt NEXTAFTER 3
33.Os
34.Sh NAME
35.Nm nextafter ,
36.Nm nextafterf ,
37.Nm nextafterl ,
38.Nm nexttoward ,
39.Nm nexttowardf ,
40.Nm nexttowardl
41.Nd next representable value
42.Sh SYNOPSIS
43.In math.h
44.Ft double
45.Fn nextafter "double x" "double y"
46.Ft float
47.Fn nextafterf "float x" "float y"
48.Ft long double
49.Fn nextafterl "long double x" "long double y"
50.Ft double
51.Fn nexttoward "double x" "long double y"
52.Ft float
53.Fn nexttowardf "float x" "long double y"
54.Ft long double
55.Fn nexttowardl "long double x" "long double y"
56.Sh DESCRIPTION
57These functions
58return the next machine representable number from
59.Fa x
60in direction
61.Fa y .
62If
63.Fa x
64equals
65.Fa y ,
66these functions return
67.Fa y .
68.Sh SEE ALSO
69.Xr nearbyint 3
70.Sh STANDARDS
71.St -ieee754
72.Sh HISTORY
73The
74.Nm nextafter
75and
76.Nm nextafterf
77functions appeared in
78.Bx 4.3
79and
80.Nx 1.1 ,
81respectively.
82