Print this page
5261 libm should stop using synonyms.h
5298 fabs is 0-sized, confuses dis(1) and others
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Gordon Ross <gwr@nexenta.com>


  41 / +-(|x| > 1) **  +inf is +inf
  42 / +-(|x| > 1) **  -inf is +0
  43 / +-(|x| < 1) **  +inf is +0
  44 / +-(|x| < 1) **  -inf is +inf
  45 / (-1) ** +-inf is +1                   (C99)
  46 / +0 ** +y (except 0, NaN)              is +0
  47 / -0 ** +y (except 0, NaN, odd int)     is +0
  48 / +0 ** -y (except 0, NaN)              is +inf (z flag)
  49 / -0 ** -y (except 0, NaN, odd int)     is +inf (z flag)
  50 / -0 ** y (odd int)                     is - (+0 ** x)
  51 / +inf ** +y (except 0, NaN)            is +inf
  52 / +inf ** -y (except 0, NaN)            is +0
  53 / -inf ** +-y (except 0, NaN)           is -0 ** -+y (NO z flag)
  54 / x ** -1 is 1/x
  55 / x ** 2 is x*x
  56 / -x ** y (an integer) is (-1)**(y) * (+x)**(y)
  57 / x ** y (x negative & y not integer) is NaN (i flag)
  58 
  59 #include "libm.h"
  60 LIBM_ANSI_PRAGMA_WEAK(powf,function)
  61 #include "libm_synonyms.h"
  62 #include "libm_protos.h"
  63 #include "xpg6.h"
  64 
  65 #undef fabs
  66 
  67         .data
  68         .align  4
  69 negzero:
  70         .float  -0.0
  71 half:
  72         .float  0.5
  73 one:
  74         .float  1.0
  75 negone:
  76         .float  -1.0
  77 two:
  78         .float  2.0
  79 Snan:
  80         .long   0x7f800001
  81 pinfinity:
  82         .long   0x7f800000
  83 ninfinity:
  84         .long   0xff800000
  85 
  86 




  41 / +-(|x| > 1) **  +inf is +inf
  42 / +-(|x| > 1) **  -inf is +0
  43 / +-(|x| < 1) **  +inf is +0
  44 / +-(|x| < 1) **  -inf is +inf
  45 / (-1) ** +-inf is +1                   (C99)
  46 / +0 ** +y (except 0, NaN)              is +0
  47 / -0 ** +y (except 0, NaN, odd int)     is +0
  48 / +0 ** -y (except 0, NaN)              is +inf (z flag)
  49 / -0 ** -y (except 0, NaN, odd int)     is +inf (z flag)
  50 / -0 ** y (odd int)                     is - (+0 ** x)
  51 / +inf ** +y (except 0, NaN)            is +inf
  52 / +inf ** -y (except 0, NaN)            is +0
  53 / -inf ** +-y (except 0, NaN)           is -0 ** -+y (NO z flag)
  54 / x ** -1 is 1/x
  55 / x ** 2 is x*x
  56 / -x ** y (an integer) is (-1)**(y) * (+x)**(y)
  57 / x ** y (x negative & y not integer) is NaN (i flag)
  58 
  59 #include "libm.h"
  60 LIBM_ANSI_PRAGMA_WEAK(powf,function)

  61 #include "libm_protos.h"
  62 #include "xpg6.h"
  63 


  64         .data
  65         .align  4
  66 negzero:
  67         .float  -0.0
  68 half:
  69         .float  0.5
  70 one:
  71         .float  1.0
  72 negone:
  73         .float  -1.0
  74 two:
  75         .float  2.0
  76 Snan:
  77         .long   0x7f800001
  78 pinfinity:
  79         .long   0x7f800000
  80 ninfinity:
  81         .long   0xff800000
  82 
  83