dcsimg
Clarification about strictfp.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vinothkumar_C
Posted On:   Tuesday, March 6, 2012 02:05 AM

Hi,what is the use of strictfp keyword,i am not able to understand by the above clarifications,so if anyone knows with programmatic explanation,pls post me.

Re: Clarification about strictfp.

Posted By:   rahul123  
Posted On:   Wednesday, December 18, 2013 03:41 AM

strictfp is a modifier which is applicable only for Classes and methods but not for variable.
If in our method floating point calculation is their then in some operating system is return 4 digit or some 4 ,,,,........etc so it is depends on OS this is make java platefrom independent .
So resolve this problem java introduce a new modifier called stricpfp . strictfp is follow the IEEE 754 standard for floating point calculation.

In our class more than one method that perform calculation in that case its better to use strictfp modifer with  class ... so there is no need to use this modifier in all the method .

Re: Clarification about strictfp.

Posted By:   Anonymous  
Posted On:   Thursday, March 8, 2012 01:07 AM

strictfp is a non access modifies which is used with class and methods. Marking a class or methods as strictfp enforces IEEE 754 floating point standards. Without that modifier, floating points used in the methods might behave in a platform-dependent way. With strictfp, you can predict how your floating points will behave regardless of the underlying platform the JVM is running on. The downside is that if the underlying platform is capable of supporting greater precision, a strictfp method won't be able to take any advantage of it.
About | Sitemap | Contact