cvs commit: src/lib/msun/src e_acosf.c e_asinf.c e_atan2f.c s_atanf.c

David Schultz das at FreeBSD.org
Fri Aug 1 01:24:39 UTC 2008


das         2008-08-01 01:24:25 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         e_acosf.c e_asinf.c e_atan2f.c s_atanf.c 
  Log:
  SVN rev 181100 on 2008-08-01 01:24:25Z by das
  
  Fix some problems with asinf(), acosf(), atanf(), and atan2f():
  
  - Adjust several constants for float precision. Some thresholds
    that were appropriate for double precision were never changed
    when these routines were converted to float precision. This
    has an impact on performance but not accuracy. (Submitted by bde.)
  
  - Reduce the degrees of the polynomials used. A smaller degree
    suffices for float precision.
  
  - In asinf(), use double arithmetic in part of the calculation to
    avoid a corner case and some complicated arithmetic involving a
    division and some buggy constants. This improves performance and
    accuracy.
  
  Max error (ulps):
           asinf  acosf  atanf
  before   0.925  0.782  0.852
  after    0.743  0.804  0.852
  
  As bde points out, it's cheaper for asin*() and acos*() to use
  polynomials instead of rational functions, but that's a task for
  another day.
  
  Revision  Changes    Path
  1.10      +11 -17    src/lib/msun/src/e_acosf.c
  1.11      +18 -35    src/lib/msun/src/e_asinf.c
  1.10      +2 -2      src/lib/msun/src/e_atan2f.c
  1.10      +11 -17    src/lib/msun/src/s_atanf.c


More information about the cvs-src mailing list