NextAfterreturn the next representable number after x
Calling SequenceParametersDescriptionThread SafetyExamples
<Text-field style="Heading 2" layout="Heading 2" bookmark="usage">Calling Sequence</Text-field>
NextAfter(x, y)
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Parameters</Text-field>x-expressiony-expression
<Text-field style="Heading 2" layout="Heading 2" bookmark="info">Description</Text-field>
The NextAfter(x, y) function returns the next machine representable number after x in the direction toward y, where "machine" means either the software floating-point computation environment determined by Digits, or the hardware floating-point computation environment of the underlying physical hardware.
Which floating-point environment is used depends on the type of x. If x is a hardware floating-point value (see HFloat), the hardware floating-point environment is used. Otherwise the software floating-point environment is used.
If NiMvSSJ4RzYiSSJ5R0Yl and x and y are real extended_numeric, then NextAfter(x, y) = x and no exception is signaled (this specifically includes the case when NiMvSSJ4RzYiIiIh, even when x and y are differently signed).
If either of x or y is undefined, the result is one of the input undefineds.
If x is the largest machine representable number and NiMySSJ4RzYiSSJ5R0Yl, then NextAfter(x, y) = infinity and the overflow event is signaled.
If x is the smallest positive machine representable number and NiMySSJ5RzYiSSJ4R0Yl, then NextAfter(x, y) = +0, and the underflow event is signaled. Similarly, NextAfter(-x, -y) = -0.
If y is unordered with x (i.e., Unordered(x, y) returns true), but neither is undefined, an invalid_operation is signaled.
<Text-field style="Heading 2" layout="Heading 2" bookmark="threadsafety">Thread Safety</Text-field>
The NextAfter command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.See AlsoDigitsexceptionsfloatnumeric_types