IEEERemainder Function


IEEERemainder Function

Class

System.Math

Syntax

     Dim result As Double = Math.IEEERemainder(x, y) 


x (required; Double)

A numerator in a division expression


y (required; Double)

A nonzero denominator in a division expression

Description

The IEEERemainder function returns the remainder after dividing x by y.

Usage at a Glance

  • VB has a built-in Mod operator that also returns the remainder upon division.

  • The IEEERemainder function complies with the remainder operation as defined in Section 5.1 of ANSI/IEEE Std 7541985; IEEE Standard for Binary Floating-Point Arithmetic; Institute of Electrical and Electronics Engineers, Inc; 1985.

  • This is a shared member of the System.Math class, so it can be used without an instance.

Example

     MsgBox(Math.IEEEremainder(4, 3))      ' Displays 1 

Version Differences

The IEEERemainder function did not exist in VB 6.

See Also

Mod Operator




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net