@@ -1717,25 +1717,22 @@ NPY_NO_EXPORT void
17171717 }
17181718}
17191719
1720- #ifdef HAVE_FREXP @C @
17211720NPY_NO_EXPORT void
17221721@TYPE @_frexp (char * * args , npy_intp * dimensions , npy_intp * steps , void * NPY_UNUSED (func ))
17231722{
17241723 UNARY_LOOP_TWO_OUT {
17251724 const @type @ in1 = * (@type @ * )ip1 ;
1726- * ((@type @ * )op1 ) = frexp @c @(in1 , (int * )op2 );
1725+ * ((@type @ * )op1 ) = npy_frexp @c @(in1 , (int * )op2 );
17271726 }
17281727}
1729- #endif
17301728
1731- #ifdef HAVE_LDEXP @C @
17321729NPY_NO_EXPORT void
17331730@TYPE @_ldexp (char * * args , npy_intp * dimensions , npy_intp * steps , void * NPY_UNUSED (func ))
17341731{
17351732 BINARY_LOOP {
17361733 const @type @ in1 = * (@type @ * )ip1 ;
17371734 const int in2 = * (int * )ip2 ;
1738- * ((@type @ * )op1 ) = ldexp @c @(in1 , in2 );
1735+ * ((@type @ * )op1 ) = npy_ldexp @c @(in1 , in2 );
17391736 }
17401737}
17411738
@@ -1752,23 +1749,22 @@ NPY_NO_EXPORT void
17521749 const long in2 = * (long * )ip2 ;
17531750 if (((int )in2 ) == in2 ) {
17541751 /* Range OK */
1755- * ((@type @ * )op1 ) = ldexp @c @(in1 , ((int )in2 ));
1752+ * ((@type @ * )op1 ) = npy_ldexp @c @(in1 , ((int )in2 ));
17561753 }
17571754 else {
17581755 /*
17591756 * Outside npy_int range -- also ldexp will overflow in this case,
17601757 * given that exponent has less bits than npy_int.
17611758 */
17621759 if (in2 > 0 ) {
1763- * ((@type @ * )op1 ) = ldexp @c @(in1 , NPY_MAX_INT );
1760+ * ((@type @ * )op1 ) = npy_ldexp @c @(in1 , NPY_MAX_INT );
17641761 }
17651762 else {
1766- * ((@type @ * )op1 ) = ldexp @c @(in1 , NPY_MIN_INT );
1763+ * ((@type @ * )op1 ) = npy_ldexp @c @(in1 , NPY_MIN_INT );
17671764 }
17681765 }
17691766 }
17701767}
1771- #endif
17721768
17731769#define @TYPE @_true_divide @TYPE@_divide
17741770
@@ -2033,25 +2029,22 @@ HALF_modf(char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED(f
20332029 }
20342030}
20352031
2036- #ifdef HAVE_FREXPF
20372032NPY_NO_EXPORT void
20382033HALF_frexp (char * * args , npy_intp * dimensions , npy_intp * steps , void * NPY_UNUSED (func ))
20392034{
20402035 UNARY_LOOP_TWO_OUT {
20412036 const float in1 = npy_half_to_float (* (npy_half * )ip1 );
2042- * ((npy_half * )op1 ) = npy_float_to_half (frexpf (in1 , (int * )op2 ));
2037+ * ((npy_half * )op1 ) = npy_float_to_half (npy_frexpf (in1 , (int * )op2 ));
20432038 }
20442039}
2045- #endif
20462040
2047- #ifdef HAVE_LDEXPF
20482041NPY_NO_EXPORT void
20492042HALF_ldexp (char * * args , npy_intp * dimensions , npy_intp * steps , void * NPY_UNUSED (func ))
20502043{
20512044 BINARY_LOOP {
20522045 const float in1 = npy_half_to_float (* (npy_half * )ip1 );
20532046 const int in2 = * (int * )ip2 ;
2054- * ((npy_half * )op1 ) = npy_float_to_half (ldexpf (in1 , in2 ));
2047+ * ((npy_half * )op1 ) = npy_float_to_half (npy_ldexpf (in1 , in2 ));
20552048 }
20562049}
20572050
@@ -2068,23 +2061,22 @@ HALF_ldexp_long(char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UN
20682061 const long in2 = * (long * )ip2 ;
20692062 if (((int )in2 ) == in2 ) {
20702063 /* Range OK */
2071- * ((npy_half * )op1 ) = npy_float_to_half (ldexpf (in1 , ((int )in2 )));
2064+ * ((npy_half * )op1 ) = npy_float_to_half (npy_ldexpf (in1 , ((int )in2 )));
20722065 }
20732066 else {
20742067 /*
20752068 * Outside npy_int range -- also ldexp will overflow in this case,
20762069 * given that exponent has less bits than npy_int.
20772070 */
20782071 if (in2 > 0 ) {
2079- * ((npy_half * )op1 ) = npy_float_to_half (ldexpf (in1 , NPY_MAX_INT ));
2072+ * ((npy_half * )op1 ) = npy_float_to_half (npy_ldexpf (in1 , NPY_MAX_INT ));
20802073 }
20812074 else {
2082- * ((npy_half * )op1 ) = npy_float_to_half (ldexpf (in1 , NPY_MIN_INT ));
2075+ * ((npy_half * )op1 ) = npy_float_to_half (npy_ldexpf (in1 , NPY_MIN_INT ));
20832076 }
20842077 }
20852078 }
20862079}
2087- #endif
20882080
20892081#define HALF_true_divide HALF_divide
20902082
0 commit comments