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>


  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 /*
  31  * Floating point Bessel's function of the first and second kinds
  32  * of order zero: j0(x),y0(x);
  33  *
  34  * Special cases:
  35  *      y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
  36  *      y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
  37  */
  38 
  39 #pragma weak j0 = __j0
  40 #pragma weak y0 = __y0
  41 
  42 #include "libm.h"
  43 #include "libm_synonyms.h"
  44 #include "libm_protos.h"
  45 #include <math.h>
  46 #include <values.h>
  47 
  48 #define GENERIC double
  49 static const GENERIC
  50 zero    = 0.0,
  51 small   = 1.0e-5,
  52 tiny    = 1.0e-18,
  53 one     = 1.0,
  54 eight   = 8.0,
  55 invsqrtpi = 5.641895835477562869480794515607725858441e-0001,
  56 tpi     = 0.636619772367581343075535053490057448;
  57 
  58 static GENERIC pzero(GENERIC), qzero(GENERIC);
  59 static const GENERIC r0[4] = {  /* [1.e-5, 1.28] */
  60         -2.500000000000003622131880894830476755537e-0001,
  61         1.095597547334830263234433855932375353303e-0002,
  62         -1.819734750463320921799187258987098087697e-0004,
  63         9.977001946806131657544212501069893930846e-0007,




  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 /*
  31  * Floating point Bessel's function of the first and second kinds
  32  * of order zero: j0(x),y0(x);
  33  *
  34  * Special cases:
  35  *      y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
  36  *      y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
  37  */
  38 
  39 #pragma weak __j0 = j0
  40 #pragma weak __y0 = y0
  41 
  42 #include "libm.h"

  43 #include "libm_protos.h"
  44 #include <math.h>
  45 #include <values.h>
  46 
  47 #define GENERIC double
  48 static const GENERIC
  49 zero    = 0.0,
  50 small   = 1.0e-5,
  51 tiny    = 1.0e-18,
  52 one     = 1.0,
  53 eight   = 8.0,
  54 invsqrtpi = 5.641895835477562869480794515607725858441e-0001,
  55 tpi     = 0.636619772367581343075535053490057448;
  56 
  57 static GENERIC pzero(GENERIC), qzero(GENERIC);
  58 static const GENERIC r0[4] = {  /* [1.e-5, 1.28] */
  59         -2.500000000000003622131880894830476755537e-0001,
  60         1.095597547334830263234433855932375353303e-0002,
  61         -1.819734750463320921799187258987098087697e-0004,
  62         9.977001946806131657544212501069893930846e-0007,