1. 15 12月, 2012 1 次提交
    • S
      math: fix i386/expl.s with more precise x*log2e · a8f73bb1
      Szabolcs Nagy 提交于
      with naive exp2l(x*log2e) the last 12bits of the result was incorrect
      for x with large absolute value
      
      with hi + lo = x*log2e is caluclated to 128 bits precision and then
        expl(x) = exp2l(hi) + exp2l(hi) * f2xm1(lo)
      this gives <1.5ulp measured error everywhere in nearest rounding mode
      a8f73bb1
  2. 09 8月, 2012 1 次提交
  3. 20 3月, 2012 1 次提交
    • R
      fix exp asm · acb74492
      Rich Felker 提交于
      exponents (base 2) near 16383 were broken due to (1) wrong cutoff, and
      (2) inability to fit the necessary range of scalings into a long
      double value.
      
      as a solution, we fall back to using frndint/fscale for insanely large
      exponents, and also have to special-case infinities here to avoid
      inf-inf generating nan.
      
      thankfully the costly code never runs in normal usage cases.
      acb74492
  4. 19 3月, 2012 3 次提交
    • R
      optimize exponential asm for i386 · 02db27d9
      Rich Felker 提交于
      up to 30% faster exp2 by avoiding slow frndint and fscale functions.
      expm1 also takes a much more direct path for small arguments (the
      expected usage case).
      02db27d9
    • R
      fix broken exponential asm · aa1b4dff
      Rich Felker 提交于
      infinities were getting converted into nans. the new code simply tests
      for infinity and replaces it with a large magnitude value of the same
      sign.
      
      also, the fcomi instruction is apparently not part of the i387
      instruction set, so avoid using it.
      aa1b4dff
    • R
      asm exponential functions for i386 · 6f26cf3d
      Rich Felker 提交于
      6f26cf3d