title: Does Java's strictfp modifier apply through function calls?
body: <p>More precisely, if there exists a function in the call stack with the strictfp modifier, will the function at the top of the call stack also adhere to the strictfp specifier?</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Main {
  
      // case 1: strictfp not present at top of call stack
      private static double bar1(double x) {
          return Math.sin(x);
      }
  
      strictfp private static double foo1(double x) {
          return bar1(x);
      }
  
      // case 2: strictfp present at top of call stack
      strictfp private static double bar2(double x) {
          return Math.sin(x);
      }
  
      strictfp private static double foo2(double x) {
          return bar2(x);
      }
  
      public static void main(String[] args) {
          double x = 10.0;
          System.out.println(foo1(x)); // -0.5440211108893698
          System.out.println(foo2(x)); // -0.5440211108893698
      }
  }
  </code></pre>
  
  <p>In this example, <code>foo1</code> and <code>foo2</code> appear to return the same value. In other words, it doesn't look like it matters whether the function at the top of the call stack has the strictfp modifier when a function further down also has the modifier.</p>
  
  <p>Does this always hold true? What if I choose differing values for <code>x</code>? What if I choose floating point operations other than sine?</p>