File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Math.IEEEremainder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Math.IEEEremainder" Watch "Math.IEEEremainder" New topic
Author

Math.IEEEremainder

Chitra Jay
Ranch Hand

Joined: May 02, 2002
Posts: 76
Hello
Will there be questions on Math.IEEEremainder method in the exam??
Math.IEEEremainder(7,2.5) o/p -0.5
Math.IEEEremainder(-7,2.5) o/p 0.5
Can anyone explain why?
Thanks
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
There were no questions about this method on my 1.2 exam two weeks ago.


Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
No, the java.lang.Math.IEEEremainder method will not be on the exam. The exam only covers the following methods from the java.lang.Math class: abs, ceil, floor, max, min, random, round, sin, cos, tan, sqrt. For that reason, I removed the IEEEremainder methods from my mock exam.


Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hey Dan, I hope you are saving all those problems
you have removed for your forthcoming book "Questions you wanted to be asked for SCJP, but wern't"!
-Barry


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Barry,
Yes, I still have them. Maybe I should use them for an interview exam next time I'm in a management position.
Maybe that would be just a little too cruel.
Chitra Jay
Ranch Hand

Joined: May 02, 2002
Posts: 76
Hello Dan,
Can you tell me how IEEEremainder works.
Just a bit curious to know
Thanks
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
Originally posted by Chitra Jay:
Hello Dan,
Can you tell me how IEEEremainder works.
Just a bit curious to know
Thanks

Chitra,
The following is a question, answer, and remark from an earlier version of my mock exam.
class H {
public static void main (String[] args) {
double c = Math.IEEEremainder(5,3);
System.out.print(c);
}
}
Prints: -1.0
The Math.IEEEremainder method calculates the remainer using the IEEE 754 standard. The basic algorithm is f1 - f2 X n where n is an integer such that the absolute value of f1 - f2 X n is as small as possible. In this case, Java selects 2 for the value of n because the absolute value of 5 - 6 is smaller than the absolute value of 5 - 3.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Math.IEEEremainder