1. 19 3月, 2012 27 次提交
  2. 18 3月, 2012 9 次提交
  3. 17 3月, 2012 4 次提交
    • N
      fix i386 fegetround and make fesetround faster · 88cfaf8a
      nsz 提交于
      Note that the new fesetround has slightly different semantics:
      
      Storing the floating-point environment with fnstenv makes the
      next fldenv (or fldcw) "non-signaling", so unmasked and pending
      exceptions does not invoke the exception handler.
      (These are rare since exceptions are handled immediately and by
      default all exceptions are masked anyway. But if one manually
      unmasks an exception in the control word then either sets the
      corresponding exception flag in the status word or the execution
      of an exception raising floating-point operation gets interrupted
      then it may happen).
      So the old implementation did not trap in some rare cases
      where the new implementation traps.
      
      However POSIX does not specify anything like the x87 exception
      handling traps and the fnstenv/fldenv pair is significantly slower
      than the fnstcw/fldcw pair (new code is about 5x faster here and
      it's dominated by the function call overhead).
      88cfaf8a
    • R
    • R
      one more fenv availability issue: lround · d3fc7247
      Rich Felker 提交于
      d3fc7247
    • R
      make fma and lrint functions build without full fenv support · 2e77dc13
      Rich Felker 提交于
      this is necessary to support archs where fenv is incomplete or
      unavailable (presently arm). fma, fmal, and the lrint family should
      work perfectly fine with this change; fmaf is slightly broken with
      respect to rounding as it depends on non-default rounding modes to do
      its work.
      2e77dc13