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>


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  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 #include "libm_synonyms.h"
  31 #include "libm_inlines.h"
  32 
  33 #ifdef __RESTRICT
  34 #define restrict _Restrict
  35 #else
  36 #define restrict
  37 #endif
  38 
  39 #define sqrt __sqrt
  40 
  41 extern double sqrt(double);
  42 
  43 void
  44 __vhypotf(int n, float * restrict x, int stridex, float * restrict y,
  45         int stridey, float * restrict z, int stridez)
  46 {
  47         float           x0, x1, x2, y0, y1, y2, z0, z1, z2, *pz0, *pz1, *pz2;
  48         unsigned        hx0, hx1, hx2, hy0, hy1, hy2;
  49         int                     i, j0, j1, j2;
  50 
  51         do
  52         {
  53 LOOP0:
  54                 hx0 = *(unsigned*)x & ~0x80000000;
  55                 hy0 = *(unsigned*)y & ~0x80000000;
  56                 *(unsigned*)&x0 = hx0;
  57                 *(unsigned*)&y0 = hy0;
  58                 if (hy0 > hx0)
  59                 {
  60                         i = hy0 - hx0;




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  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 #include "libm_inlines.h"
  31 
  32 #ifdef __RESTRICT
  33 #define restrict _Restrict
  34 #else
  35 #define restrict
  36 #endif
  37 


  38 extern double sqrt(double);
  39 
  40 void
  41 __vhypotf(int n, float * restrict x, int stridex, float * restrict y,
  42         int stridey, float * restrict z, int stridez)
  43 {
  44         float           x0, x1, x2, y0, y1, y2, z0, z1, z2, *pz0, *pz1, *pz2;
  45         unsigned        hx0, hx1, hx2, hy0, hy1, hy2;
  46         int                     i, j0, j1, j2;
  47 
  48         do
  49         {
  50 LOOP0:
  51                 hx0 = *(unsigned*)x & ~0x80000000;
  52                 hy0 = *(unsigned*)y & ~0x80000000;
  53                 *(unsigned*)&x0 = hx0;
  54                 *(unsigned*)&y0 = hy0;
  55                 if (hy0 > hx0)
  56                 {
  57                         i = hy0 - hx0;