Lasso Soft Inc. > Home

[ decimal->nextafter ]

Method

Returns the next representable double-precision floating-point value following x in the direction of y. Thus, if y is less than x, [decimal->nextafter] returns the largest representable floating-point number less than x. x is the decimal object and y is the required decimal parameter.

  • Syntax
Decimal Object->nextafter(Decimal Value)
Examples
  • Beginner

To return the next representable double-precision floating-point number following a decimal in the direction of another decimal:

Use the [decimal->nextafter] method. The following examples illustrate the next numbers which can be represented when followed in two different directions, relative to the original decimal.

Code

1.0000005->nextafter(2.0)
'<br>'
1.0000005->nextafter(1.0)

Result

1.000001
1.000000

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft