• Post Reply Bookmark Topic Watch Topic
  • New Topic
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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Usage of strictfp

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all Java gurus!
Can anyone give me a good example of usage strictfp modifier in front of class and method? I mean when it is a really must for using this modifier.
Thanks again!
janne
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've never seen strictfp used in any real-world coding but I understand that it is used to indicate that any floating-point maths must conform to the IEEE 754 standard, so all values must be expressed as float and double and any internal values can't use platform-dependent formats that may give you extra range or precision. This is so that you can predict what any rounding errors will be.
As long as you know it can be applied to a class or method only, this is all you'll need for the exam.
 
reply
    Bookmark Topic Watch Topic
  • New Topic