1*86f9d4cdStedu.\" $OpenBSD: nextafter.3,v 1.8 2013/06/05 03:40:26 tedu Exp $ 2f66cd146Smartynas.\" Copyright (c) 1985, 1991 Regents of the University of California. 3f66cd146Smartynas.\" All rights reserved. 4f66cd146Smartynas.\" 5f66cd146Smartynas.\" Redistribution and use in source and binary forms, with or without 6f66cd146Smartynas.\" modification, are permitted provided that the following conditions 7f66cd146Smartynas.\" are met: 8f66cd146Smartynas.\" 1. Redistributions of source code must retain the above copyright 9f66cd146Smartynas.\" notice, this list of conditions and the following disclaimer. 10f66cd146Smartynas.\" 2. Redistributions in binary form must reproduce the above copyright 11f66cd146Smartynas.\" notice, this list of conditions and the following disclaimer in the 12f66cd146Smartynas.\" documentation and/or other materials provided with the distribution. 13f66cd146Smartynas.\" 3. Neither the name of the University nor the names of its contributors 14f66cd146Smartynas.\" may be used to endorse or promote products derived from this software 15f66cd146Smartynas.\" without specific prior written permission. 16f66cd146Smartynas.\" 17f66cd146Smartynas.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18f66cd146Smartynas.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19f66cd146Smartynas.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20f66cd146Smartynas.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21f66cd146Smartynas.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22f66cd146Smartynas.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23f66cd146Smartynas.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24f66cd146Smartynas.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25f66cd146Smartynas.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26f66cd146Smartynas.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27f66cd146Smartynas.\" SUCH DAMAGE. 28f66cd146Smartynas.\" 29f66cd146Smartynas.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 30f66cd146Smartynas.\" 31*86f9d4cdStedu.Dd $Mdocdate: June 5 2013 $ 32f66cd146Smartynas.Dt NEXTAFTER 3 33f66cd146Smartynas.Os 34f66cd146Smartynas.Sh NAME 35f66cd146Smartynas.Nm nextafter , 367ac6a943Smartynas.Nm nextafterf , 378188d52eSmartynas.Nm nextafterl , 388188d52eSmartynas.Nm nexttoward , 398188d52eSmartynas.Nm nexttowardf , 40a99869e7Sjmc.Nm nexttowardl 41f66cd146Smartynas.Nd next representable value 42f66cd146Smartynas.Sh SYNOPSIS 43*86f9d4cdStedu.In math.h 44f66cd146Smartynas.Ft double 45f66cd146Smartynas.Fn nextafter "double x" "double y" 46f66cd146Smartynas.Ft float 47f66cd146Smartynas.Fn nextafterf "float x" "float y" 487ac6a943Smartynas.Ft long double 497ac6a943Smartynas.Fn nextafterl "long double x" "long double y" 508188d52eSmartynas.Ft double 518188d52eSmartynas.Fn nexttoward "double x" "long double y" 528188d52eSmartynas.Ft float 538188d52eSmartynas.Fn nexttowardf "float x" "long double y" 548188d52eSmartynas.Ft long double 558188d52eSmartynas.Fn nexttowardl "long double x" "long double y" 56f66cd146Smartynas.Sh DESCRIPTION 578188d52eSmartynasThese functions 588188d52eSmartynasreturn the next machine representable number from 59f66cd146Smartynas.Fa x 60f66cd146Smartynasin direction 61f66cd146Smartynas.Fa y . 627c0a0586SmartynasIf 637c0a0586Smartynas.Fa x 647c0a0586Smartynasequals 657c0a0586Smartynas.Fa y , 668188d52eSmartynasthese functions return 677c0a0586Smartynas.Fa y . 68f66cd146Smartynas.Sh SEE ALSO 690714f1f8Smartynas.Xr nearbyint 3 70f66cd146Smartynas.Sh STANDARDS 71f66cd146Smartynas.St -ieee754 72f66cd146Smartynas.Sh HISTORY 73f66cd146SmartynasThe 748f740a56Smartynas.Nm nextafter 75f66cd146Smartynasand 76f66cd146Smartynas.Nm nextafterf 77f66cd146Smartynasfunctions appeared in 788f740a56Smartynas.Bx 4.3 798f740a56Smartynasand 808f740a56Smartynas.Nx 1.1 , 818f740a56Smartynasrespectively. 82