 programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Tim Cooke
• Ron McLeod
• Jeanne Boyarsky
• Paul Clapham
Sheriffs:
• Liutauras Vilda
• Henry Wong
• Devaka Cooray
Saloon Keepers:
• Tim Moores
• Stephan van Hulst
• Tim Holloway
• Al Hobbs
• Carey Brown
Bartenders:
• Piet Souris
• Mikalai Zaikin
• Himai Minh

# IEEEremainder and rint menthods

Ranch Hand
Posts: 243
• • Number of slices to send:
Optional 'thank-you' note:
• • Does Anyone Have Knowledge About these methods and what function do they perform.

double IEEEremainder(double, double)
double rint(double a)

Thanks,
anand

author Posts: 9046
21
• • Number of slices to send:
Optional 'thank-you' note:
• • all I know for sure is that they have never been on the exam Maybe this question should go to the intermediate forum?

Ranch Hand
Posts: 55
• • Number of slices to send:
Optional 'thank-you' note:
• • static double rint(double d) rounds a double value to the nearest integer value , but still posed as a double

ie ; double d = 49.59888;

double e = Math.rint(d);
//results in 50.0

quote from API
public static native double IEEEremainder(double f1,
double f2)

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. The remainder value is mathematically equal to f1 - f2 � n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument.

Parameters:
f1 - the dividend.
f2 - the divisor.
Returns:
the remainder when f1 is divided by f2.
[ September 15, 2005: Message edited by: Daniel .J.Hyslop ] 