• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

What is ur idea of STRICTFP?

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all, just wondering what is strictfp.... thanks
Cyrus
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java technically uses the IEEE 754 floating-point math specification. This is a very detailed spec which dictates the precise results of every possible mathematical computation, down to the individual bits. To get the correct, exact, results, you have to compute with 32 bit floats and 64 bit doubles.
Intel processors have extended-precision, 80-bit floating point registers. If the JVM uses these registers for computation, the results will be fast but won't exactly match the IEEE 754 specification. Most JVMs use them as 80-bit registers -- indeed, virtually all software uses them this way. As a result, the numeric results from a Java program might not be exactly portable (note that we're generally talking about differences in the 7th decimal place for floats, or 13th for doubles.)
"strictfp" says that the JVM should follow the specification precisely, even if it's slower and/or "less accurate."
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic