avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2554] patch #9864: Use proper float function names an


From: j
Subject: [avr-libc-commit] [2554] patch #9864: Use proper float function names and prototypes
Date: Thu, 20 May 2021 18:22:24 -0400 (EDT)

Revision: 2554
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2554
Author:   joerg_wunsch
Date:     2021-05-20 18:22:24 -0400 (Thu, 20 May 2021)
Log Message:
-----------
patch #9864: Use proper float function names and prototypes
* include/math.h
(cos, sin, tan, fmod, modf, sqrt, cbrt, hypot, square, floor, ceil)
(frexp, ldexp, exp, cosh, sinh, tanh, asin, acos, atan, atan2)
(log, log10, pow, isnan, isinf, signbit, fdim, fma, fmax, fmin)
(trunc, round, lround, lrint) [double=64-bit]: Provide double
prototypes.
[double=32-bit]: Provide protos with assembler names which are
the corresponding float function name.
(cosf, sinf, tanf, fmodf, modff, sqrtf, cbrtf, hypotf, squaref)
(floorf, ceilf, frexpf, ldexpf, expf, coshf, sinhf, tanhf, asinf)
(acosf, atanf, atan2f, logf, log10f, powf, isnanf, isinff)
(signbitf, fdimf, fmaf, fmaxf, fmin, truncf, roundf, lroundf)
(lrintf):
Turn from macro to proper prototype.
(fabs, fabsf, isfinite, isfinitef, copysign, copysignf): Implement.
* libm/fplib/acos.S: Use correct names for functions that deal
with float, e.g. acosf instead of acos.  Adjust comments.
* libm/fplib/asin.S: Same.
* libm/fplib/atan.S: Same.
* libm/fplib/atan2.S: Same.
* libm/fplib/cbrt.S: Same.
* libm/fplib/ceil.S: Same.
* libm/fplib/copysign.S: Same.
* libm/fplib/cos.S: Same.
* libm/fplib/cosh.S: Same.
* libm/fplib/exp.S: Same.
* libm/fplib/fdim.S: Same.
* libm/fplib/floor.S: Same.
* libm/fplib/fma.S: Same.
* libm/fplib/fmax.S: Same.
* libm/fplib/fmin.S: Same.
* libm/fplib/fmod.S: Same.
* libm/fplib/fp_arccos.S: Same.
* libm/fplib/frexp.S: Same.
* libm/fplib/hypot.S: Same.
* libm/fplib/isfinite.S: Same.
* libm/fplib/isinf.S: Same.
* libm/fplib/isnan.S: Same.
* libm/fplib/ldexp.S: Same.
* libm/fplib/log.S: Same.
* libm/fplib/log10.S: Same.
* libm/fplib/lrint.S: Same.
* libm/fplib/lround.S: Same.
* libm/fplib/modf.S: Same.
* libm/fplib/pow.S: Same.
* libm/fplib/round.S: Same.
* libm/fplib/signbit.S: Same.
* libm/fplib/sin.S: Same.
* libm/fplib/sinh.S: Same.
* libm/fplib/sqrt.S: Same.
* libm/fplib/square.S: Same.
* libm/fplib/tan.S: Same.
* libm/fplib/tanh.S: Same.
* libm/fplib/trunc.S: Same.

Ticket Links:
------------
    http://savannah.gnu.org/patch/?9864

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/include/math.h
    trunk/avr-libc/libc/stdio/vfscanf.c
    trunk/avr-libc/libm/fplib/acos.S
    trunk/avr-libc/libm/fplib/asin.S
    trunk/avr-libc/libm/fplib/atan.S
    trunk/avr-libc/libm/fplib/atan2.S
    trunk/avr-libc/libm/fplib/cbrt.S
    trunk/avr-libc/libm/fplib/ceil.S
    trunk/avr-libc/libm/fplib/copysign.S
    trunk/avr-libc/libm/fplib/cos.S
    trunk/avr-libc/libm/fplib/cosh.S
    trunk/avr-libc/libm/fplib/exp.S
    trunk/avr-libc/libm/fplib/fdim.S
    trunk/avr-libc/libm/fplib/floor.S
    trunk/avr-libc/libm/fplib/fma.S
    trunk/avr-libc/libm/fplib/fmax.S
    trunk/avr-libc/libm/fplib/fmin.S
    trunk/avr-libc/libm/fplib/fmod.S
    trunk/avr-libc/libm/fplib/fp_arccos.S
    trunk/avr-libc/libm/fplib/frexp.S
    trunk/avr-libc/libm/fplib/hypot.S
    trunk/avr-libc/libm/fplib/isfinite.S
    trunk/avr-libc/libm/fplib/isinf.S
    trunk/avr-libc/libm/fplib/isnan.S
    trunk/avr-libc/libm/fplib/ldexp.S
    trunk/avr-libc/libm/fplib/log.S
    trunk/avr-libc/libm/fplib/log10.S
    trunk/avr-libc/libm/fplib/lrint.S
    trunk/avr-libc/libm/fplib/lround.S
    trunk/avr-libc/libm/fplib/modf.S
    trunk/avr-libc/libm/fplib/pow.S
    trunk/avr-libc/libm/fplib/round.S
    trunk/avr-libc/libm/fplib/signbit.S
    trunk/avr-libc/libm/fplib/sin.S
    trunk/avr-libc/libm/fplib/sinh.S
    trunk/avr-libc/libm/fplib/sqrt.S
    trunk/avr-libc/libm/fplib/square.S
    trunk/avr-libc/libm/fplib/tan.S
    trunk/avr-libc/libm/fplib/tanh.S
    trunk/avr-libc/libm/fplib/trunc.S

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/ChangeLog    2021-05-20 22:22:24 UTC (rev 2554)
@@ -7,3 +7,61 @@
        (vfprintf): Fix build-warnings.
        * libc/stdlib/dtostre.c (dtostre): Fix build warning.
        * libc/stdlib/getenv.c (getenv): Fix build warning.
+
+2021-05-20 Georg-Johann Lay
+
+       patch #9864: Use proper float function names and prototypes
+       * include/math.h
+       (cos, sin, tan, fmod, modf, sqrt, cbrt, hypot, square, floor, ceil)
+       (frexp, ldexp, exp, cosh, sinh, tanh, asin, acos, atan, atan2)
+       (log, log10, pow, isnan, isinf, signbit, fdim, fma, fmax, fmin)
+       (trunc, round, lround, lrint) [double=64-bit]: Provide double
+       prototypes.
+       [double=32-bit]: Provide protos with assembler names which are
+       the corresponding float function name.
+       (cosf, sinf, tanf, fmodf, modff, sqrtf, cbrtf, hypotf, squaref)
+       (floorf, ceilf, frexpf, ldexpf, expf, coshf, sinhf, tanhf, asinf)
+       (acosf, atanf, atan2f, logf, log10f, powf, isnanf, isinff)
+       (signbitf, fdimf, fmaf, fmaxf, fmin, truncf, roundf, lroundf)
+       (lrintf):
+       Turn from macro to proper prototype.
+       (fabs, fabsf, isfinite, isfinitef, copysign, copysignf): Implement.
+       * libm/fplib/acos.S: Use correct names for functions that deal
+       with float, e.g. acosf instead of acos.  Adjust comments.
+       * libm/fplib/asin.S: Same.
+       * libm/fplib/atan.S: Same.
+       * libm/fplib/atan2.S: Same.
+       * libm/fplib/cbrt.S: Same.
+       * libm/fplib/ceil.S: Same.
+       * libm/fplib/copysign.S: Same.
+       * libm/fplib/cos.S: Same.
+       * libm/fplib/cosh.S: Same.
+       * libm/fplib/exp.S: Same.
+       * libm/fplib/fdim.S: Same.
+       * libm/fplib/floor.S: Same.
+       * libm/fplib/fma.S: Same.
+       * libm/fplib/fmax.S: Same.
+       * libm/fplib/fmin.S: Same.
+       * libm/fplib/fmod.S: Same.
+       * libm/fplib/fp_arccos.S: Same.
+       * libm/fplib/frexp.S: Same.
+       * libm/fplib/hypot.S: Same.
+       * libm/fplib/isfinite.S: Same.
+       * libm/fplib/isinf.S: Same.
+       * libm/fplib/isnan.S: Same.
+       * libm/fplib/ldexp.S: Same.
+       * libm/fplib/log.S: Same.
+       * libm/fplib/log10.S: Same.
+       * libm/fplib/lrint.S: Same.
+       * libm/fplib/lround.S: Same.
+       * libm/fplib/modf.S: Same.
+       * libm/fplib/pow.S: Same.
+       * libm/fplib/round.S: Same.
+       * libm/fplib/signbit.S: Same.
+       * libm/fplib/sin.S: Same.
+       * libm/fplib/sinh.S: Same.
+       * libm/fplib/sqrt.S: Same.
+       * libm/fplib/square.S: Same.
+       * libm/fplib/tan.S: Same.
+       * libm/fplib/tanh.S: Same.
+       * libm/fplib/trunc.S: Same.

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/NEWS 2021-05-20 22:22:24 UTC (rev 2554)
@@ -37,6 +37,7 @@
   [#9400] Add avrxmega3 multilibs
   [#9659] Update eeprom_is_ready for avrxmega3 devices
   [#9553] Fix some issues in libc/
+  [#9864] Use proper float function names and prototypes
 
 * Other changes:
 

Modified: trunk/avr-libc/include/math.h
===================================================================
--- trunk/avr-libc/include/math.h       2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/include/math.h       2021-05-20 22:22:24 UTC (rev 2554)
@@ -117,75 +117,99 @@
 # define __ATTR_CONST__ __attribute__((__const__))
 #endif
 
+#if __SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__
+/* In order to provide aliases for double functions in the case where
+   double = float, use declarations with according assembler name.
+   That way:
+   1) We do *NOT* use macros like
+         #define sin sinf
+      because that would interfere with C++.  For example, if some class
+      would implement a method 'sin', or if there was polymorthism for
+      a function 'sin', then we would silently rename these to 'sinf'.
+   2) We have proper prototypes, both for 'sin' and for 'sinf'.
+   3) It is zero-overhead.  */
+#define __ASM_ALIAS(x) __asm(#x)
+#else
+/* double != float: Provide double prototypes. */
+#define __ASM_ALIAS(x) /* empty */
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /**
-    The cos() function returns the cosine of \a __x, measured in radians.
+    The cosf() function returns the cosine of \a __x, measured in radians.
  */
-extern double cos(double __x) __ATTR_CONST__;
-#define cosf   cos             /**< The alias for cos().       */
+__ATTR_CONST__ extern float cosf (float __x);
+__ATTR_CONST__ extern double cos (double __x) __ASM_ALIAS(cosf);               
/**< The alias for cosf().      */
 
 /**
-    The sin() function returns the sine of \a __x, measured in radians.
+    The sinf() function returns the sine of \a __x, measured in radians.
  */
-extern double sin(double __x) __ATTR_CONST__;
-#define sinf   sin             /**< The alias for sin().       */
+__ATTR_CONST__ extern float sinf (float __x);
+__ATTR_CONST__ extern double sin (double __x) __ASM_ALIAS(sinf);               
/**< The alias for sinf().      */
 
 /**
-    The tan() function returns the tangent of \a __x, measured in radians.
+    The tanf() function returns the tangent of \a __x, measured in radians.
  */
-extern double tan(double __x) __ATTR_CONST__;
-#define tanf   tan             /**< The alias for tan().       */
+__ATTR_CONST__ extern float tanf (float __x);
+__ATTR_CONST__ extern double tan (double __x) __ASM_ALIAS(tanf);               
/**< The alias for tanf().      */
 
 /**
-    The fabs() function computes the absolute value of a floating-point
+    The fabsf() function computes the absolute value of a floating-point
     number \a __x.
  */
-extern double fabs(double __x) __ATTR_CONST__;
-#define fabsf  fabs            /**< The alias for fabs().      */
+static inline float fabsf (float __x)
+{
+    return __builtin_fabsf (__x);
+}
 
+static inline double fabs (double __x)
+{
+    return __builtin_fabs (__x);
+}
+
 /**
-    The function fmod() returns the floating-point remainder of <em>__x /
+    The function fmodf() returns the floating-point remainder of <em>__x /
     __y</em>.
  */
-extern double fmod(double __x, double __y) __ATTR_CONST__;
-#define fmodf  fmod            /**< The alias for fmod().      */
+__ATTR_CONST__ extern float fmodf (float __x, float __y);
+__ATTR_CONST__ extern double fmod (double __x, double __y) __ASM_ALIAS(fmodf); 
        /**< The alias for fmodf().     */
 
 /**
-    The modf() function breaks the argument \a __x into integral and
+    The modff() function breaks the argument \a __x into integral and
     fractional parts, each of which has the same sign as the argument. 
     It stores the integral part as a double in the object pointed to by
     \a __iptr.
 
-    The modf() function returns the signed fractional part of \a __x.
+    The modff() function returns the signed fractional part of \a __x.
 
     \note This implementation skips writing by zero pointer.  However,
     the GCC 4.3 can replace this function with inline code that does not
     permit to use NULL address for the avoiding of storing.
  */
-extern double modf(double __x, double *__iptr);
-
-/** An alias for modf(). */
 extern float modff (float __x, float *__iptr);
 
+/** An alias for modff(). */
+extern double modf (double __x, double *__iptr) __ASM_ALIAS(modff);
+
 /**
-    The sqrt() function returns the non-negative square root of \a __x.
+    The sqrtf() function returns the non-negative square root of \a __x.
  */
-extern double sqrt(double __x) __ATTR_CONST__;
+__ATTR_CONST__ extern float sqrtf (float __x);
 
-/** An alias for sqrt(). */
-extern float sqrtf (float) __ATTR_CONST__;
+/** An alias for sqrtf(). */
+__ATTR_CONST__ extern double sqrt (double __x) __ASM_ALIAS(sqrtf);
 
 /**
     The cbrt() function returns the cube root of \a __x.
  */
-extern double cbrt(double __x) __ATTR_CONST__;
-#define cbrtf  cbrt            /**< The alias for cbrt().      */
+__ATTR_CONST__ extern float cbrtf (float __x);
+__ATTR_CONST__ extern double cbrt (double __x) __ASM_ALIAS(cbrtf);             
/**< The alias for cbrtf().     */
 
 /**
-    The hypot() function returns <em>sqrt(__x*__x + __y*__y)</em>. This
+    The hypotf() function returns <em>sqrtf(__x*__x + __y*__y)</em>. This
     is the length of the hypotenuse of a right triangle with sides of
     length \a __x and \a __y, or the  distance of the point (\a __x, \a
     __y) from the origin. Using this function  instead of the direct
@@ -192,153 +216,153 @@
     formula is wise, since the error is much smaller. No underflow with
     small \a __x and \a __y. No overflow if result is in range.
  */
-extern double hypot (double __x, double __y) __ATTR_CONST__;
-#define hypotf hypot           /**< The alias for hypot().     */
+__ATTR_CONST__ extern float hypotf (float __x, float __y);
+__ATTR_CONST__ extern double hypot (double __x, double __y) 
__ASM_ALIAS(hypotf);               /**< The alias for hypotf().    */
 
 /**
-    The function square() returns <em>__x * __x</em>.
+    The function squaref() returns <em>__x * __x</em>.
 
     \note This function does not belong to the C standard definition.
  */
-extern double square(double __x) __ATTR_CONST__;
-#define squaref        square          /**< The alias for square().    */
+__ATTR_CONST__ extern float squaref (float __x);
+__ATTR_CONST__ extern double square (double __x) __ASM_ALIAS(squaref);         
/**< The alias for squaref().   */
 
 /**
-    The floor() function returns the largest integral value less than or
+    The floorf() function returns the largest integral value less than or
     equal to \a __x, expressed as a floating-point number.
  */
-extern double floor(double __x) __ATTR_CONST__;
-#define floorf floor           /**< The alias for floor().     */
+__ATTR_CONST__ extern float floorf (float __x);
+__ATTR_CONST__ extern double floor (double __x) __ASM_ALIAS(floorf);           
/**< The alias for floorf().    */
 
 /**
-    The ceil() function returns the smallest integral value greater than
+    The ceilf() function returns the smallest integral value greater than
     or equal to \a __x, expressed as a floating-point number.
  */
-extern double ceil(double __x) __ATTR_CONST__;
-#define ceilf  ceil            /**< The alias for ceil().      */
+__ATTR_CONST__ extern float ceilf (float __x);
+__ATTR_CONST__ extern double ceil (double __x) __ASM_ALIAS(ceilf);             
/**< The alias for ceilf().     */
 
 /**
-    The frexp() function breaks a floating-point number into a normalized
+    The frexpf() function breaks a floating-point number into a normalized
     fraction and an integral power of 2.  It stores the integer in the \c
     int object pointed to by \a __pexp.
 
-    If \a __x is a normal float point number, the frexp() function
+    If \a __x is a normal float point number, the frexpf() function
     returns the value \c v, such that \c v has a magnitude in the
     interval [1/2, 1) or zero, and \a __x equals \c v times 2 raised to
     the power \a __pexp. If \a __x is zero, both parts of the result are
-    zero. If \a __x is not a finite number, the frexp() returns \a __x as
+    zero. If \a __x is not a finite number, the frexpf() returns \a __x as
     is and stores 0 by \a __pexp.
 
     \note  This implementation permits a zero pointer as a directive to
     skip a storing the exponent.
  */
-extern double frexp(double __x, int *__pexp);
-#define frexpf frexp           /**< The alias for frexp().     */
+__ATTR_CONST__ extern float frexpf (float __x, int *__pexp);
+__ATTR_CONST__ extern double frexp (double __x, int *__pexp) 
__ASM_ALIAS(frexpf);              /**< The alias for frexpf().    */
 
 /**
-    The ldexp() function multiplies a floating-point number by an integral
+    The ldexpf() function multiplies a floating-point number by an integral
     power of 2. It returns the value of \a __x times 2 raised to the power
     \a __exp.
  */
-extern double ldexp(double __x, int __exp) __ATTR_CONST__;
-#define ldexpf ldexp           /**< The alias for ldexp().     */
+__ATTR_CONST__ extern float ldexpf (float __x, int __exp);
+__ATTR_CONST__ extern double ldexp (double __x, int __exp) 
__ASM_ALIAS(ldexpf);                /**< The alias for ldexpf().    */
 
 /**
-    The exp() function returns the exponential value of \a __x.
+    The expf() function returns the exponential value of \a __x.
  */
-extern double exp(double __x) __ATTR_CONST__;
-#define expf   exp             /**< The alias for exp().       */
+__ATTR_CONST__ extern float expf (float __x);
+__ATTR_CONST__ extern double exp (double __x) __ASM_ALIAS(expf);               
/**< The alias for expf().      */
 
 /**
-    The cosh() function returns the hyperbolic cosine of \a __x.
+    The coshf() function returns the hyperbolic cosine of \a __x.
  */
-extern double cosh(double __x) __ATTR_CONST__;
-#define coshf  cosh            /**< The alias for cosh().      */
+__ATTR_CONST__ extern float coshf (float __x);
+__ATTR_CONST__ extern double cosh (double __x) __ASM_ALIAS(coshf);             
/**< The alias for coshf().     */
 
 /**
-    The sinh() function returns the hyperbolic sine of \a __x.
+    The sinhf() function returns the hyperbolic sine of \a __x.
  */
-extern double sinh(double __x) __ATTR_CONST__;
-#define sinhf  sinh            /**< The alias for sinh().      */
+__ATTR_CONST__ extern float sinhf (float __x);
+__ATTR_CONST__ extern double sinh (double __x) __ASM_ALIAS(sinhf);             
/**< The alias for sinhf().     */
 
 /**
-    The tanh() function returns the hyperbolic tangent of \a __x.
+    The tanhf() function returns the hyperbolic tangent of \a __x.
  */
-extern double tanh(double __x) __ATTR_CONST__;
-#define tanhf  tanh            /**< The alias for tanh().      */
+__ATTR_CONST__ extern float tanhf (float __x);
+__ATTR_CONST__ extern double tanh (double __x) __ASM_ALIAS(tanhf);             
/**< The alias for tanhf().     */
 
 /**
-    The acos() function computes the principal value of the arc cosine of
+    The acosf() function computes the principal value of the arc cosine of
     \a __x.  The returned value is in the range [0, pi] radians. A domain
     error occurs for arguments not in the range [-1, +1].
  */
-extern double acos(double __x) __ATTR_CONST__;
-#define acosf  acos            /**< The alias for acos().      */
+__ATTR_CONST__ extern float acosf (float __x);
+__ATTR_CONST__ extern double acos (double __x) __ASM_ALIAS(acosf);             
/**< The alias for acosf().     */
 
 /**
-    The asin() function computes the principal value of the arc sine of
+    The asinf() function computes the principal value of the arc sine of
     \a __x.  The returned value is in the range [-pi/2, pi/2] radians. A
     domain error occurs for arguments not in the range [-1, +1].
  */
-extern double asin(double __x) __ATTR_CONST__;
-#define asinf  asin            /**< The alias for asin().      */
+__ATTR_CONST__ extern float asinf (float __x);
+__ATTR_CONST__ extern double asin (double __x) __ASM_ALIAS(asinf);             
/**< The alias for asinf().     */
 
 /**
-    The atan() function computes the principal value of the arc tangent
+    The atanf() function computes the principal value of the arc tangent
     of \a __x.  The returned value is in the range [-pi/2, pi/2] radians.
  */
-extern double atan(double __x) __ATTR_CONST__;
-#define atanf  atan            /**< The alias for atan().      */
+__ATTR_CONST__ extern float atanf (float __x);
+__ATTR_CONST__ extern double atan (double __x) __ASM_ALIAS(atanf);             
/**< The alias for atanf().     */
 
 /**
-    The atan2() function computes the principal value of the arc tangent
+    The atan2f() function computes the principal value of the arc tangent
     of <em>__y / __x</em>, using the signs of both arguments to determine
     the quadrant of the return value.  The returned value is in the range
     [-pi, +pi] radians.
  */
-extern double atan2(double __y, double __x) __ATTR_CONST__;
-#define atan2f atan2           /**< The alias for atan2().     */
+__ATTR_CONST__ extern float atan2f (float __y, float __x);
+__ATTR_CONST__ extern double atan2 (double __y, double __x) 
__ASM_ALIAS(atan2f);               /**< The alias for atan2f().    */
 
 /**
-    The log() function returns the natural logarithm of argument \a __x.
+    The logf() function returns the natural logarithm of argument \a __x.
  */
-extern double log(double __x) __ATTR_CONST__;
-#define logf   log             /**< The alias for log().       */
+__ATTR_CONST__ extern float logf (float __x);
+__ATTR_CONST__ extern double log (double __x) __ASM_ALIAS(logf);               
/**< The alias for logf().      */
 
 /**
-    The log10() function returns the logarithm of argument \a __x to base 10.
+    The log10f() function returns the logarithm of argument \a __x to base 10.
  */
-extern double log10(double __x) __ATTR_CONST__;
-#define log10f log10           /**< The alias for log10().     */
+__ATTR_CONST__ extern float log10f (float __x);
+__ATTR_CONST__ extern double log10 (double __x) __ASM_ALIAS(log10f);           
/**< The alias for log10f().    */
 
 /**
-    The function pow() returns the value of \a __x to the exponent \a __y.
+    The function powf() returns the value of \a __x to the exponent \a __y.
  */
-extern double pow(double __x, double __y) __ATTR_CONST__;
-#define powf   pow             /**< The alias for pow().       */
+__ATTR_CONST__ extern float powf (float __x, float __y);
+__ATTR_CONST__ extern double pow (double __x, double __y) __ASM_ALIAS(powf);   
        /**< The alias for powf().      */
 
 /**
-    The function isnan() returns 1 if the argument \a __x represents a
+    The function isnanf() returns 1 if the argument \a __x represents a
     "not-a-number" (NaN) object, otherwise 0.
  */
-extern int isnan(double __x) __ATTR_CONST__;
-#define        isnanf  isnan           /**< The alias for isnan().     */
+__ATTR_CONST__ extern int isnanf (float __x);
+__ATTR_CONST__ extern int isnan (double __x) __ASM_ALIAS(isnanf);              
/**< The alias for isnanf().    */
 
 /**
-    The function isinf() returns 1 if the argument \a __x is positive
+    The function isinff() returns 1 if the argument \a __x is positive
     infinity, -1 if \a __x is negative infinity, and 0 otherwise.
 
     \note The GCC 4.3 can replace this function with inline code that
     returns the 1 value for both infinities (gcc bug #35509).
  */
-extern int isinf(double __x) __ATTR_CONST__;
-#define isinff isinf           /**< The alias for isinf().     */
+__ATTR_CONST__ extern int isinff (float __x);
+__ATTR_CONST__ extern int isinf (double __x) __ASM_ALIAS(isinff);              
/**< The alias for isinff().    */
 
 /**
-    The isfinite() function returns a nonzero value if \a __x is finite:
+    The isfinitef() function returns a nonzero value if \a __x is finite:
     not plus or minus infinity, and not NaN.
  */
-__ATTR_CONST__ static inline int isfinite (double __x)
+__ATTR_CONST__ static inline int isfinitef (float __x)
 {
     unsigned char __exp;
     __asm__ (
@@ -350,13 +374,19 @@
        : "r" (__x)     );
     return __exp != 0xff;
 }
-#define isfinitef isfinite     /**< The alias for isfinite().  */
 
+#if __SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__
+static inline int isfinite (double __x) /**< The alias for isfinitef().        
*/
+{
+    return isfinitef (__x);
+}
+#endif /* double = float */
+
 /**
-    The copysign() function returns \a __x but with the sign of \a __y.
+    The copysignf() function returns \a __x but with the sign of \a __y.
     They work even if \a __x or \a __y are NaN or zero.
 */
-__ATTR_CONST__ static inline double copysign (double __x, double __y)
+__ATTR_CONST__ static inline float copysignf (float __x, float __y)
 {
     __asm__ (
        "bst    %D2, 7  \n\t"
@@ -365,59 +395,68 @@
        : "0" (__x), "r" (__y) );
     return __x;
 }
-#define copysignf copysign     /**< The alias for copysign().  */
 
+__ATTR_CONST__ static inline double copysign (double __x, double __y)
+{
+    __asm__ (
+       "bst    %r1+%2-1, 7" "\n\t"
+       "bld    %r0+%2-1, 7"
+       : "+r" (__x)
+       : "r" (__y), "n" (__SIZEOF_DOUBLE__));
+    return __x;
+}
+
 /**
-    The signbit() function returns a nonzero value if the value of \a __x
+    The signbitf() function returns a nonzero value if the value of \a __x
     has its sign bit set.  This is not the same as `\a __x < 0.0',
     because IEEE 754 floating point allows zero to be signed. The
     comparison `-0.0 < 0.0' is false, but `signbit (-0.0)' will return a
     nonzero value.
  */
-extern int signbit (double __x) __ATTR_CONST__;
-#define signbitf signbit       /**< The alias for signbit().   */
+__ATTR_CONST__ extern int signbitf (float __x);
+__ATTR_CONST__ extern int signbit (double __x) __ASM_ALIAS(signbitf);  /**< 
The alias for signbitf().  */
 
 /**
-    The fdim() function returns <em>max(__x - __y, 0)</em>. If \a __x or
+    The fdimf() function returns <em>maxf(__x - __y, 0)</em>. If \a __x or
     \a __y or both are NaN, NaN is returned.
  */
-extern double fdim (double __x, double __y) __ATTR_CONST__;
-#define fdimf  fdim            /**< The alias for fdim().      */
+__ATTR_CONST__ extern float fdimf (float __x, float __y);
+__ATTR_CONST__ extern double fdim (double __x, double __y) __ASM_ALIAS(fdimf); 
        /**< The alias for fdimf().     */
 
 /**
-    The fma() function performs floating-point multiply-add. This is the
+    The fmaf() function performs floating-point multiply-add. This is the
     operation <em>(__x * __y) + __z</em>, but the intermediate result is
     not rounded to the destination type.  This can sometimes improve the
     precision of a calculation.
  */
-extern double fma (double __x, double __y, double __z) __ATTR_CONST__;
-#define fmaf   fma             /**< The alias for fma().       */
+__ATTR_CONST__ extern float fmaf (float __x, float __y, float __z);
+__ATTR_CONST__ extern double fma (double __x, double __y, double __z) 
__ASM_ALIAS(fmaf);               /**< The alias for fmaf().      */
 
 /**
-    The fmax() function returns the greater of the two values \a __x and
+    The fmaxf() function returns the greater of the two values \a __x and
     \a __y. If an argument is NaN, the other argument is returned. If
     both arguments are NaN, NaN is returned.
  */
-extern double fmax (double __x, double __y) __ATTR_CONST__;
-#define fmaxf  fmax            /**< The alias for fmax().      */
+__ATTR_CONST__ extern float fmaxf (float __x, float __y);
+__ATTR_CONST__ extern double fmax (double __x, double __y) __ASM_ALIAS(fmaxf); 
        /**< The alias for fmaxf().     */
 
 /**
-    The fmin() function returns the lesser of the two values \a __x and
+    The fminf() function returns the lesser of the two values \a __x and
     \a __y. If an argument is NaN, the other argument is returned. If
     both arguments are NaN, NaN is returned.
  */
-extern double fmin (double __x, double __y) __ATTR_CONST__;
-#define fminf  fmin            /**< The alias for fmin().      */
+__ATTR_CONST__ extern float fminf (float __x, float __y);
+__ATTR_CONST__ extern double fmin (double __x, double __y) __ASM_ALIAS(fminf); 
        /**< The alias for fminf().     */
 
 /**
-    The trunc() function rounds \a __x to the nearest integer not larger
+    The truncf() function rounds \a __x to the nearest integer not larger
     in absolute value.
  */
-extern double trunc (double __x) __ATTR_CONST__;
-#define truncf trunc           /**< The alias for trunc().     */
+__ATTR_CONST__ extern float truncf (float __x);
+__ATTR_CONST__ extern double trunc (double __x) __ASM_ALIAS(truncf);           
/**< The alias for truncf().    */
 
 /**
-    The round() function rounds \a __x to the nearest integer, but rounds
+    The roundf() function rounds \a __x to the nearest integer, but rounds
     halfway cases away from zero (instead of to the nearest even integer).
     Overflow is impossible.
 
@@ -424,13 +463,13 @@
     \return The rounded value. If \a __x is an integral or infinite, \a
     __x itself is returned. If \a __x is \c NaN, then \c NaN is returned.
  */
-extern double round (double __x) __ATTR_CONST__;
-#define roundf round           /**< The alias for round().     */
+__ATTR_CONST__ extern float roundf (float __x);
+__ATTR_CONST__ extern double round (double __x) __ASM_ALIAS(roundf);           
/**< The alias for roundf().    */
 
 /**
-    The lround() function rounds \a __x to the nearest integer, but rounds
+    The lroundf() function rounds \a __x to the nearest integer, but rounds
     halfway cases away from zero (instead of to the nearest even integer).
-    This function is similar to round() function, but it differs in type of
+    This function is similar to roundf() function, but it differs in type of
     return value and in that an overflow is possible.
 
     \return The rounded long integer value. If \a __x is not a finite number
@@ -437,13 +476,13 @@
     or an overflow was, this realization returns the \c LONG_MIN value
     (0x80000000).
  */
-extern long lround (double __x) __ATTR_CONST__;
-#define lroundf        lround          /**< The alias for lround().    */
+__ATTR_CONST__ extern long lroundf (float __x);
+__ATTR_CONST__ extern long lround (double __x) __ASM_ALIAS(lroundf);           
/**< The alias for lroundf().   */
 
 /**
-    The lrint() function rounds \a __x to the nearest integer, rounding the
+    The lrintf() function rounds \a __x to the nearest integer, rounding the
     halfway cases to the even integer direction. (That is both 1.5 and 2.5
-    values are rounded to 2). This function is similar to rint() function,
+    values are rounded to 2). This function is similar to rintf() function,
     but it differs in type of return value and in that an overflow is
     possible.
 
@@ -451,8 +490,8 @@
     number or an overflow was, this realization returns the \c LONG_MIN
     value (0x80000000).
  */
-extern long lrint (double __x) __ATTR_CONST__;
-#define lrintf lrint           /**< The alias for lrint().     */
+__ATTR_CONST__ extern long lrintf (float __x);
+__ATTR_CONST__ extern long lrint (double __x) __ASM_ALIAS(lrintf);             
/**< The alias for lrintf().    */
 
 #ifdef __cplusplus
 }

Modified: trunk/avr-libc/libc/stdio/vfscanf.c
===================================================================
--- trunk/avr-libc/libc/stdio/vfscanf.c 2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libc/stdio/vfscanf.c 2021-05-20 22:22:24 UTC (rev 2554)
@@ -395,7 +395,7 @@
    long to float.  Instead it uses a signed long to float conversion
    function along with a large inline code to correct the result.
    Seems, GCC 4.3 does not use it also.        */
-extern double __floatunsisf (unsigned long);
+extern float __floatunsisf (unsigned long);
 
 PROGMEM static const float pwr_p10 [6] = {
     1e+1, 1e+2, 1e+4, 1e+8, 1e+16, 1e+32
@@ -597,7 +597,7 @@
      to <tt>char</tt> (rather than <tt>int</tt>).
    - the character \c l indicating that the argument is a pointer
      to <tt>long int</tt> (rather than <tt>int</tt>, for integer
-     type conversions), or a pointer to \c double (for floating
+     type conversions), or a pointer to \c float (for floating
      point conversions),
 
    In addition, a maximal field width may be specified as a nonzero

Modified: trunk/avr-libc/libm/fplib/acos.S
===================================================================
--- trunk/avr-libc/libm/fplib/acos.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/acos.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -29,8 +29,8 @@
 
 /* $Id$ */
 
-/* float acos (float x);
-     The acos() function calculates the arc cosine of x; that is the value
+/* float acosf (float x);
+     The acosf() function calculates the arc cosine of x; that is the value
      whose cosine is x.
  */
  
@@ -43,7 +43,7 @@
 #define        HI40_PI 0x40490FDA      /* Pi   */
 #define        LO40_PI 0xA2
 
-ENTRY acos
+ENTRY acosf
   ; save A sign
        push    rA3
   ; A = arccos(fabs(A))

Modified: trunk/avr-libc/libm/fplib/asin.S
===================================================================
--- trunk/avr-libc/libm/fplib/asin.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/asin.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -29,8 +29,8 @@
 
 /* $Id$ */
 
-/* float asin (float A);
-     The asin() function returns the arc sine in radians and the value is
+/* float asinf (float A);
+     The asinf() function returns the arc sine in radians and the value is
      mathematically defined to be between -PI/2 and PI/2 (inclusive).
  */
 
@@ -44,7 +44,7 @@
 #define HI40_PI_2   0x3fc90fda         /* high 4 bytes of Pi/2 */
 #define        LO40_PI_2   0xa2                /* lowest byte of Pi/2  */
 
-ENTRY asin
+ENTRY asinf
   ; save A sign
        push    rA3
   ; A = fabs(A)

Modified: trunk/avr-libc/libm/fplib/atan.S
===================================================================
--- trunk/avr-libc/libm/fplib/atan.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/atan.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -29,15 +29,15 @@
 
 /* $Id$ */
 
-/* float atan (float A);
-     The atan() function calculates the arc tangent of A; that is
+/* float atanf (float A);
+     The atanf() function calculates the arc tangent of A; that is
      the value whose tangent is A.
 
    Algorithm:
        if (x > 1)
-           return Pi/2 - atan(1/x)
+           return Pi/2 - atanf(1/x)
        elif (x < -1)
-           return -Pi/2 - atan(1/x)
+           return -Pi/2 - atanf(1/x)
        else
            return x * (1 - C1 * x**2 + ... + C8 * x**16)
  */
@@ -54,7 +54,7 @@
 
 #define        corr    YH
 
-ENTRY atan
+ENTRY atanf
        push    corr
        clr     corr
   ; inverse A, if needed
@@ -74,7 +74,7 @@
        push    rA2
        push    rA1
        push    rA0
-       XCALL   _U(square)
+       XCALL   _U(squaref)
        ldi     ZL, lo8(.L_table)
        ldi     ZH, hi8(.L_table)
        XCALL   _U(__fp_powser)

Modified: trunk/avr-libc/libm/fplib/atan2.S
===================================================================
--- trunk/avr-libc/libm/fplib/atan2.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/atan2.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -29,11 +29,11 @@
 
 /* $Id$ */
 
-/* float atan2 (float A, float B);     // A is y coord, B is x coord.
-     The atan2() function calculates the arc tangent of the two variables
+/* float atan2f (float A, float B);    // A is y coord, B is x coord.
+     The atan2f() function calculates the arc tangent of the two variables
      A and B. It is similar to calculating the arc tangent of A/B, except
      that the signs of both arguments are used to determine the quadrant
-     of the result. The atan2() function returns the result in radians,
+     of the result. The atan2f() function returns the result in radians,
      which is between -PI and PI (inclusive).
      
    Note:
@@ -66,7 +66,7 @@
 
 #define        disp    ZL              /* displacement high byte       */
 
-FUNCTION atan2
+FUNCTION atan2f
 
 .L_nf: XCALL   _U(__fp_pscA)
        brcs    .L_nan
@@ -85,7 +85,7 @@
 .L_nan:        XJMP    _U(__fp_nan)
 .L_zr: XJMP    _U(__fp_zero)
 
-ENTRY   atan2
+ENTRY   atan2f
   ; save 'y' sign
        mov     disp, rA3
        andi    disp, 0x80
@@ -126,7 +126,7 @@
 2:     push    disp
        XCALL   _U(__divsf3_pse)
        XCALL   _U(__fp_round)
-       XCALL   _U(atan)
+       XCALL   _U(atanf)
   ; restore disp and analize
        pop     rB3             ; hhi8()
        tst     rB3

Modified: trunk/avr-libc/libm/fplib/cbrt.S
===================================================================
--- trunk/avr-libc/libm/fplib/cbrt.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/cbrt.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -33,7 +33,7 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double cbrt (double)
+/* float cbrtf (float)
    Cube root function.
  */
 
@@ -72,7 +72,7 @@
 
 #define        REM     RD0
 
-FUNCTION cbrt
+FUNCTION cbrtf
 
 /* Division by 3.
    Input:
@@ -112,7 +112,7 @@
 
 0:     XJMP    _U(__fp_mpack)
 
-ENTRY cbrt
+ENTRY cbrtf
   ; split and check arg.
        XCALL   _U(__fp_splitA)
        brcs    0b              ; !isfinite(A)

Modified: trunk/avr-libc/libm/fplib/ceil.S
===================================================================
--- trunk/avr-libc/libm/fplib/ceil.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/ceil.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -29,12 +29,12 @@
 
 /* $Id$ */
 
-/* double ceil (double x);
-     The ceil() function rounds x up to the nearest integer.
+/* float ceilf (float x);
+     The ceilf() function rounds x up to the nearest integer.
 
    Examples:
-     ceil(1.9) --> 2.0
-     ceil(-1.9) --> -1.0
+     ceilf(1.9) --> 2.0
+     ceilf(-1.9) --> -1.0
  */
 
 
@@ -45,7 +45,7 @@
 
 #define FL_P1  0x3f800000      /* +1.0 */
 
-ENTRY   ceil
+ENTRY   ceilf
        XCALL   _U(__fp_trunc)
        brcs    .L_nf
   ; A is finite

Modified: trunk/avr-libc/libm/fplib/copysign.S
===================================================================
--- trunk/avr-libc/libm/fplib/copysign.S        2021-05-20 21:50:20 UTC (rev 
2553)
+++ trunk/avr-libc/libm/fplib/copysign.S        2021-05-20 22:22:24 UTC (rev 
2554)
@@ -32,12 +32,12 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float copysign (float x, float y);
-     The copysign() function returns x but with the sign of y.
+/* float copysignf (float x, float y);
+     The copysignf() function returns x but with the sign of y.
      They work even if x or y are NaN or zero.
  */
 
-ENTRY   copysign
+ENTRY   copysignf
        bst     rB3, 7
        bld     rA3, 7
        ret

Modified: trunk/avr-libc/libm/fplib/cos.S
===================================================================
--- trunk/avr-libc/libm/fplib/cos.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/cos.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,11 +32,11 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float cos (float A);
-     The cos() function returns the cosine of A, where A is given in
+/* float cosf (float A);
+     The cosf() function returns the cosine of A, where A is given in
      radians.
  */
-ENTRY cos
+ENTRY cosf
        XCALL   _U(__fp_rempio2)
        inc     ZL
        XJMP    _U(__fp_sinus)

Modified: trunk/avr-libc/libm/fplib/cosh.S
===================================================================
--- trunk/avr-libc/libm/fplib/cosh.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/cosh.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,25 +32,25 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float cosh (float x);
-     The cosh() function returns the hyperbolic cosine of x, which is
+/* float coshf (float x);
+     The coshf() function returns the hyperbolic cosine of x, which is
      defined mathematically as (exp(x) + exp(-x)) / 2.
 
    Notes:
-     ldexp() is called twice to avoid overflow with too big x argument.
+     ldexpf() is called twice to avoid overflow with too big x argument.
  */
 
 #define        exp_lo  r20
 #define        exp_hi  r21
 
-ENTRY cosh
-  ; A = exp(-fabs(x))/2        negative to exclude an extra inversion
+ENTRY coshf
+  ; A = expf(-fabsf(x))/2      negative to exclude an extra inversion
        ori     rA3, 0x80
-       XCALL   _U(exp)
+       XCALL   _U(expf)
        ldi     exp_lo, lo8(-1)
        ldi     exp_hi, hi8(-1)
-       XCALL   _U(ldexp)
-  ; save A and calculate exp(fabs(x))/2
+       XCALL   _U(ldexpf)
+  ; save A and calculate expf(fabsf(x))/2
        push    rA3
        push    rA2
        push    rA1
@@ -57,9 +57,9 @@
        push    rA0
        ldi     exp_lo, lo8(2)
        ldi     exp_hi, hi8(2)
-       XCALL   _U(ldexp)
+       XCALL   _U(ldexpf)
        XCALL   _U(inverse)
-  ; exp(x)/2 + exp(-x)/2
+  ; expf(x)/2 + expf(-x)/2
        pop     rB0
        pop     rB1
        pop     rB2

Modified: trunk/avr-libc/libm/fplib/exp.S
===================================================================
--- trunk/avr-libc/libm/fplib/exp.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/exp.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float exp (float x);
-     The exp() function returns the value of e (the base of natural
+/* float expf (float x);
+     The expf() function returns the value of e (the base of natural
      logarithms) raised to the power of x.
  */
 
@@ -42,11 +42,11 @@
 #define        X2BIG    0x43000000     /* exp(-X2BIG) < 0x00000001     */
 #define        FL_1_LN2 0x3fb8aa3b     /* 1 / ln(2)                    */
 
-/* second arg for modf(), ldexp() functions.   */
+/* second arg for modff(), ldexpf() functions. */
 #define        exp_lo  r20
 #define        exp_hi  r21
 
-FUNCTION exp
+FUNCTION expf
 
 .L_nf: brne    .L_nan
 .L_tb: brts    .L_zr
@@ -54,7 +54,7 @@
 .L_zr: XJMP    _U(__fp_zero)
 .L_nan:        XJMP    _U(__fp_nan)
 
-ENTRY exp
+ENTRY expf
   ; split and analize A
        XCALL   _U(__fp_splitA)
        brcs    .L_nf           ; A is not a finite number
@@ -77,7 +77,7 @@
        in      exp_lo, SPL_IO_ADDR
        in      exp_hi, SPH_IO_ADDR
        push    r0
-       XCALL   _U(modf)
+       XCALL   _U(modff)
   ; calculate 2**(-x) for 0 <= x < 1
        ldi     ZL, lo8(.L_table)
        ldi     ZH, hi8(.L_table)
@@ -102,7 +102,7 @@
   ; negate and scale
        neg     exp_lo
        sbc     exp_hi, exp_hi
-2:     XCALL   _U(ldexp)
+2:     XCALL   _U(ldexpf)
   ; inverse for positive arg.
        pop     r0
        sbrs    r0, 7

Modified: trunk/avr-libc/libm/fplib/fdim.S
===================================================================
--- trunk/avr-libc/libm/fplib/fdim.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/fdim.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float fdim (float x, float y);
-     The fdim() function  return max(x-y,0). If x or y or both are NaN,
+/* float fdimf (float x, float y);
+     The fdimf() function  return maxf(x-y,0). If x or y or both are NaN,
      NaN is returned.
 
    Notes:
@@ -44,7 +44,7 @@
      is fast if both arguments are equal.
  */
 
-ENTRY fdim
+ENTRY fdimf
   ; sign(A) | sign(B)
        mov     r0, rA3
        or      r0, rB3

Modified: trunk/avr-libc/libm/fplib/floor.S
===================================================================
--- trunk/avr-libc/libm/fplib/floor.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/floor.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,17 +34,17 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double floor (double x);
-     The floor() function rounds x down to the nearest integer.
+/* float floorf (float x);
+     The floorf() function rounds x down to the nearest integer.
 
    Examples:
-     floor(1.9) --> 1.0
-     floor(-1.9) --> -2.0
+     floorf(1.9) --> 1.0
+     floorf(-1.9) --> -2.0
  */
 
 #define FL_M1  0xbf800000      /* -1.0 */
 
-ENTRY floor
+ENTRY floorf
        XCALL   _U(__fp_trunc)
        brcs    .L_nf
   ; A is finite

Modified: trunk/avr-libc/libm/fplib/fma.S
===================================================================
--- trunk/avr-libc/libm/fplib/fma.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/fma.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double fma (double A, double B, double C)
-     The `fma' function performs floating-point multiply-add. This is the   
+/* float fmaf (float A, float B, float C)
+     The `fmaf' function performs floating-point multiply-add. This is the   
      operation (A * B) + C, but the intermediate result is not rounded to   
      the destination type.  This can sometimes improve the precision of a
      calculation.
@@ -44,7 +44,7 @@
 #define        rC0     r14     /* lower byte of arg. C */
 #define        rC2     r16
 
-ENTRY fma
+ENTRY fmaf
        XCALL   _U(__mulsf3x)
        X_movw  rB0, rC0
        X_movw  rB2, rC2

Modified: trunk/avr-libc/libm/fplib/fmax.S
===================================================================
--- trunk/avr-libc/libm/fplib/fmax.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/fmax.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,13 +34,13 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float fmax (float x, float y);
-     The fmax() function returns the greater of the two values x and y.
+/* float fmaxf (float x, float y);
+     The fmaxf() function returns the greater of the two values x and y.
      If an argument is NaN, the other argument is returned. If both
      arguments are NaN, NaN is returned.
  */
 
-ENTRY fmax
+ENTRY fmaxf
        lsl     rA3
        sbc     rAE, rAE        ; rAE = (A < 0) ? -1 : 0
        lsl     rB3

Modified: trunk/avr-libc/libm/fplib/fmin.S
===================================================================
--- trunk/avr-libc/libm/fplib/fmin.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/fmin.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,13 +34,13 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float fmin (float x, float y);
-     The fmin() function returns the lesser of the two values x and y.
+/* float fminf (float x, float y);
+     The fminf() function returns the lesser of the two values x and y.
      If an argument is NaN, the other argument is returned. If both
      arguments are NaN, NaN is returned.
  */
 
-ENTRY fmin
+ENTRY fminf
        lsl     rA3
        sbc     rAE, rAE        ; rAE = (A < 0) ? -1 : 0
        lsl     rB3

Modified: trunk/avr-libc/libm/fplib/fmod.S
===================================================================
--- trunk/avr-libc/libm/fplib/fmod.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/fmod.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,13 +34,13 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double fmod (double x, double y);
-     The fmod() function computes the remainder of dividing x by y. The
+/* float fmodf (float x, float y);
+     The fmodf() function computes the remainder of dividing x by y. The
      return value is x - n*y, where n is the quotient of x/y, rounded
      towards zero to an integer.
  */
 
-FUNCTION fmod
+FUNCTION fmodf
 
 0:     XCALL   _U(__fp_pscA)
        brcs    .L_nan          ; isnan(A)
@@ -51,7 +51,7 @@
 .L_nan:        XJMP    _U(__fp_nan)
 .L_sz: XJMP    _U(__fp_szero)
 
-ENTRY fmod
+ENTRY fmodf
   ; split and check exceptions
        mov     ZL, rA3         ; save
        XCALL   _U(__fp_split3)

Modified: trunk/avr-libc/libm/fplib/fp_arccos.S
===================================================================
--- trunk/avr-libc/libm/fplib/fp_arccos.S       2021-05-20 21:50:20 UTC (rev 
2553)
+++ trunk/avr-libc/libm/fplib/fp_arccos.S       2021-05-20 22:22:24 UTC (rev 
2554)
@@ -74,7 +74,7 @@
        ldi     rA2, hlo8(FL_1)
        ldi     rA3, hhi8(FL_1)
        XCALL   _U(__subsf3)
-       XCALL   _U(sqrt)
+       XCALL   _U(sqrtf)
 
        movw    rB0, rC0
        movw    rB2, rC2
@@ -114,7 +114,7 @@
        ldi     rA2, hlo8(FL_1)
        ldi     rA3, hhi8(FL_1)
        XCALL   _U(__subsf3)
-       XCALL   _U(sqrt)
+       XCALL   _U(sqrtf)
   ; multiply
        pop     rB0
        pop     rB1

Modified: trunk/avr-libc/libm/fplib/frexp.S
===================================================================
--- trunk/avr-libc/libm/fplib/frexp.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/frexp.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,15 +34,15 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float frexp (float A, int *pexp);
-     The frexp() function is used to split the number A into a normalized
+/* float frexpf (float A, int *pexp);
+     The frexpf() function is used to split the number A into a normalized
      fraction and an exponent which is stored by pexp.
 
    Return:
-     If A is a normal float point number, the frexp() function returns the
+     If A is a normal float point number, the frexpf() function returns the
      value v, such that v has a magnitude in the interval [1/2, 1) or zero,
      and A equals v times 2 raised to the power *pexp. If A is zero, both
-     parts of the result are zero. If A is not a finite number, the frexp()
+     parts of the result are zero. If A is not a finite number, the frexpf()
      returns A as is and stores 0 by pexp.
 
    Note:
@@ -52,7 +52,7 @@
 
 #define        pexp_lo r20
 
-ENTRY frexp
+ENTRY frexpf
 
        X_movw  ZL, pexp_lo
 

Modified: trunk/avr-libc/libm/fplib/hypot.S
===================================================================
--- trunk/avr-libc/libm/fplib/hypot.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/hypot.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -33,8 +33,8 @@
 #include "asmdef.h"
 #include "ntz.h"
 
-/* double hypot (double x, double y);
-     The hypot() function returns `sqrt (x*x + y*y)'. This is the length
+/* float hypotf (float x, float y);
+     The hypotf() function returns `sqrtf (x*x + y*y)'. This is the length
      of the hypotenuse of a right triangle with sides of length x and y,
      or the distance of the point (x, y) from the origin. Using this
      function instead of the direct formula is wise, since the error is
@@ -61,7 +61,7 @@
 # error
 #endif
 
-#define        exp_lo  r20             /* ldexp (float x, int exp);            
*/
+#define        exp_lo  r20             /* ldexpf (float x, int exp);           
*/
 #define        exp_hi  r21
 
 #define        rC0     r14
@@ -69,12 +69,12 @@
 #define        rC2     r16
 #define        rC3     r17
 
-FUNCTION hypot
+FUNCTION hypotf
 
 .L_nf: XCALL   _U(__fp_pscA)
-       breq    1f              ; hypot(Inf, *) --> Inf
+       breq    1f              ; hypotf(Inf, *) --> Inf
        XCALL   _U(__fp_pscB)
-       breq    1f              ; hypot(*, Inf) --> Inf
+       breq    1f              ; hypotf(*, Inf) --> Inf
        XJMP    _U(__fp_nan)    ; NaN and finite, or both NaN
 1:     XJMP    _U(__fp_inf)    ; T is 0 after __fp_split3()
 
@@ -84,7 +84,7 @@
 .L_retA:
        XJMP    _U(__fp_mpack)
 
-ENTRY hypot
+ENTRY hypotf
   ; clear signs
        andi    rA3, 0x7f
        andi    rB3, 0x7f
@@ -236,7 +236,7 @@
        
        XCALL   _U(__addsf3x)
        XCALL   _U(__fp_round)
-       XCALL   _U(sqrt)
+       XCALL   _U(sqrtf)
 
   ; restore a scale
 #if (-SCALE_SMALL & SCALE_BIG) == 0
@@ -248,5 +248,5 @@
        clr     exp_hi
        sbrc    exp_lo, 7
        com     exp_hi
-       XJMP    _U(ldexp)
+       XJMP    _U(ldexpf)
 ENDFUNC

Modified: trunk/avr-libc/libm/fplib/isfinite.S
===================================================================
--- trunk/avr-libc/libm/fplib/isfinite.S        2021-05-20 21:50:20 UTC (rev 
2553)
+++ trunk/avr-libc/libm/fplib/isfinite.S        2021-05-20 22:22:24 UTC (rev 
2554)
@@ -32,12 +32,12 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* int isfinite (float x);
-     The isfinite() function returns a nonzero value if x is finite: not
+/* int isfinitef (float x);
+     The isfinitef() function returns a nonzero value if x is finite: not
      plus or minus infinity, and not NaN.
 */
 
-ENTRY isfinite
+ENTRY isfinitef
 /* It is not needed to return 1 if number is finite. Any nonzero value
    is suitable.  This realization returns 0xff in low byte and nonzero
    value (1..255) in high byte.        */

Modified: trunk/avr-libc/libm/fplib/isinf.S
===================================================================
--- trunk/avr-libc/libm/fplib/isinf.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/isinf.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* int isinf (double)
-     The isinf() function returns -1 if value represents negative
+/* int isinff (float)
+     The isinff() function returns -1 if value represents negative
      infinity, 1 if value represents positive infinity, and 0 otherwise.
    Notes:
      * It is implemented to save space, as there is a time effective
@@ -42,7 +42,7 @@
      isfinite() inline function.
  */
 
-ENTRY isinf
+ENTRY isinff
        XCALL   _U(__fp_splitA)
        ldi     r24, 0
        ldi     r25, 0

Modified: trunk/avr-libc/libm/fplib/isnan.S
===================================================================
--- trunk/avr-libc/libm/fplib/isnan.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/isnan.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,8 +32,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* int isnan (double)
-     The isnan() function returns a non-zero value if value is
+/* int isnanf (float)
+     The isnanf() function returns a non-zero value if value is
      "not-a-number" (NaN), and 0 otherwise.
    Notes:
      * It is implemented to save space, as there is a time effective
@@ -40,7 +40,7 @@
      isfinite() inline function.
  */
 
-ENTRY isnan
+ENTRY isnanf
        XCALL   _U(__fp_splitA)
        ldi     r24, 0
        ldi     r25, 0

Modified: trunk/avr-libc/libm/fplib/ldexp.S
===================================================================
--- trunk/avr-libc/libm/fplib/ldexp.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/ldexp.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,19 +34,19 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double ldexp (double x, int exp)
-   The ldexp() function returns the result of multiplying the
+/* float ldexpf (float x, int exp)
+   The ldexpf() function returns the result of multiplying the
    floating-point number x by 2 raised to the power exp.
  */
 #define        exp_lo  r20
 #define        exp_hi  r21
 
-FUNCTION ldexp
+FUNCTION ldexpf
 
 .L_inf:        XJMP    _U(__fp_inf)
 .L_pk: XJMP    _U(__fp_mpack)
 
-ENTRY ldexp
+ENTRY ldexpf
        XCALL   _U(__fp_splitA)
        brcs    .L_pk                   ; as is
        tst     rA3

Modified: trunk/avr-libc/libm/fplib/log.S
===================================================================
--- trunk/avr-libc/libm/fplib/log.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/log.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double log (double A)
-   The log() function returns the natural logarithm of A.
+/* float logf (float A)
+   The logf() function returns the natural logarithm of A.
  */
 
 #define        FL_M1   0xbf800000      /* -1.0 */
@@ -47,7 +47,7 @@
 #define        rC0     r16
 #define        rCE     r15
 
-FUNCTION log
+FUNCTION logf
 
 .L_nf: brts    .L_nan          ; branch, if -Inf
        XJMP    _U(__fp_mpack)  ; pass as is: NaN --> NaN, +Inf --> +Inf
@@ -55,7 +55,7 @@
 .L_min:        set
        XJMP    _U(__fp_inf)
 
-ENTRY log
+ENTRY logf
        XCALL   _U(__fp_splitA)
        brcs    .L_nf           ; !isfinite(A)
        tst     rA3

Modified: trunk/avr-libc/libm/fplib/log10.S
===================================================================
--- trunk/avr-libc/libm/fplib/log10.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/log10.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,14 +32,14 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double log (double A);
-   The log10() function returns the base 10 logarithm of A.
+/* float logf (float A);
+   The log10f() function returns the base 10 logarithm of A.
  */
 
 #define        INV_LN_10       0x3ede5bd9      /* 1.0/log(10.0)        */
 
-ENTRY log10
-       XCALL   _U(log)
+ENTRY log10f
+       XCALL   _U(logf)
        ldi     rB0,  lo8(INV_LN_10)
        ldi     rB1,  hi8(INV_LN_10)
        ldi     rB2, hlo8(INV_LN_10)

Modified: trunk/avr-libc/libm/fplib/lrint.S
===================================================================
--- trunk/avr-libc/libm/fplib/lrint.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/lrint.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -33,8 +33,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* long lrint (double A);
-     The lrint() function rounds A to the nearest integer, rounding the
+/* long lrintf (float A);
+     The lrintf() function rounds A to the nearest integer, rounding the
      halfway cases to the even integer direction. (That is both 1.5 and
      2.5 values are rounded to 2). This function is similar to rint()
      function, but it differs in type of return value and in that an
@@ -50,7 +50,7 @@
      - restore the sign
  */
 
-ENTRY lrint
+ENTRY lrintf
        XCALL   _U(__fp_splitA)
        brcs    .L_err
   ; A is finite

Modified: trunk/avr-libc/libm/fplib/lround.S
===================================================================
--- trunk/avr-libc/libm/fplib/lround.S  2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/lround.S  2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* long lround (double A);
-     The lround() function rounds A to the nearest integer, but rounds
+/* long lroundf (float A);
+     The lroundf() function rounds A to the nearest integer, but rounds
      halfway cases away from zero (instead of to the nearest even integer).
      This function is similar to round() function, but it differs in
      type of return value and in that an overflow is possible.
@@ -52,7 +52,7 @@
    Objections to saturation are listen in __fixunssfsi.S file.
  */
 
-ENTRY lround
+ENTRY lroundf
        XCALL   _U(__fp_splitA)
        brcs    .L_err
   ; A is finite

Modified: trunk/avr-libc/libm/fplib/modf.S
===================================================================
--- trunk/avr-libc/libm/fplib/modf.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/modf.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,9 +34,9 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/*  double modf (double x, double *iptr);
+/*  float modff (float x, float *iptr);
 
-    The modf() function breaks the argument x into an integral part and a
+    The modff() function breaks the argument x into an integral part and a
     fractional part, each of which has the same sign as x. The integral part
     is stored in iptr.
        This implementation skips writing by zero pointer.
@@ -44,7 +44,6 @@
 
 #define        iptr_lo r20
 
-ENTRY modf
 ENTRY modff
   ; save iptr
        X_movw  ZL, iptr_lo

Modified: trunk/avr-libc/libm/fplib/pow.S
===================================================================
--- trunk/avr-libc/libm/fplib/pow.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/pow.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,8 +34,8 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float pow (float x, float y);
-     The pow() function returns the value of x raised to the power of y.
+/* float powf (float x, float y);
+     The powf() function returns the value of x raised to the power of y.
 
    Args combinations:
        x       y               pow(x,y)
@@ -105,7 +105,7 @@
 
 #define        FL_1    0x3f800000      /* +1.0 */
 
-ENTRY pow
+ENTRY powf
   ; ZH := exponent of y
        X_movw  ZL, rB2
        lsl     ZL
@@ -206,13 +206,13 @@
        push    rB2
        push    rB1
        push    rB0
-       XCALL   _U(log)
+       XCALL   _U(logf)
        pop     rB0
        pop     rB1
        pop     rB2
        pop     rB3
        XCALL   _U(__mulsf3)
-       XJMP    _U(exp)
+       XJMP    _U(expf)
 ENDFUNC
 
 #endif /* !defined(__AVR_TINY__) */

Modified: trunk/avr-libc/libm/fplib/round.S
===================================================================
--- trunk/avr-libc/libm/fplib/round.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/round.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -48,7 +48,7 @@
      - merge to float
    This is a balance between space and speed.
  */
-ENTRY round
+ENTRY roundf
        XCALL   _U(__fp_splitA)
        brcs    .L_nf
   ; A is finite

Modified: trunk/avr-libc/libm/fplib/signbit.S
===================================================================
--- trunk/avr-libc/libm/fplib/signbit.S 2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/signbit.S 2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,18 +32,18 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/*  int signbit (double x);
+/*  int signbitf (float x);
 
-    The signbit() function returns a nonzero value if the value of x has
+    The signbitf() function returns a nonzero value if the value of x has
     its sign bit set. This is not the same as `x < 0.0', because IEEE 754
     floating point allows zero to be signed. The comparison `-0.0 < 0.0'
-    is false, but `signbit (-0.0)' will return a nonzero value.
+    is false, but `signbitf (-0.0)' will return a nonzero value.
 
     This implementation returns 1 if sign bit is set. This corresponds
     to builtin GCC realization.
  */
 
-ENTRY signbit
+ENTRY signbitf
        lsl     rA3
        sbc     rA2, rA2
        neg     rA2

Modified: trunk/avr-libc/libm/fplib/sin.S
===================================================================
--- trunk/avr-libc/libm/fplib/sin.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/sin.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,11 +34,11 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float sin (float A);
-     The sin() function returns the sine of A, where A is given in radians.
+/* float sinf (float A);
+     The sinf() function returns the sine of A, where A is given in radians.
  */
 
-ENTRY sin
+ENTRY sinf
        push    rA3
        XCALL   _U(__fp_rempio2)
        pop     r0

Modified: trunk/avr-libc/libm/fplib/sinh.S
===================================================================
--- trunk/avr-libc/libm/fplib/sinh.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/sinh.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,20 +34,20 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float sinh (float x);
-     The sinh() function returns the hyperbolic sine of x, which is
+/* float sinhf (float x);
+     The sinhf() function returns the hyperbolic sine of x, which is
      defined mathematically as (exp(x) - exp(-x)) / 2.
 
    Notes:
-     ldexp() is used twice to avoid overflow for big x.
+     ldexpf() is used twice to avoid overflow for big x.
  */
 
 #define        X2SMALL 0x3e9fffff      /* < 0.3125     */
 
-#define        exp_lo  r20             /* float ldexp (float, int exp);        
*/
+#define        exp_lo  r20             /* float ldexpf (float, int exp);       
*/
 #define        exp_hi  r21
 
-ENTRY sinh
+ENTRY sinhf
   ; save sign
        push    rA3
   ; is arg too small ?
@@ -61,22 +61,22 @@
        ldi     ZH, hi8(.L_table)
        XCALL   _U(__fp_powsodd)
        rjmp    2f
-  ; exp(-fabs(x))      // negative to exclude an extra inversion
+  ; expf(-fabsf(x))    // negative to exclude an extra inversion
 1:     ori     rA3, 0x80
-       XCALL   _U(exp)
-  ; exp(-fabs(x)) / 2
+       XCALL   _U(expf)
+  ; expf(-fabsf(x)) / 2
        ldi     exp_lo, lo8(-1)
        ldi     exp_hi, hi8(-1)
-       XCALL   _U(ldexp)
+       XCALL   _U(ldexpf)
   ; save
        push    rA3
        push    rA2
        push    rA1
        push    rA0
-  ; exp(fabs(x)) / 2
+  ; expf(fabsf(x)) / 2
        ldi     exp_lo, lo8(2)
        ldi     exp_hi, hi8(2)
-       XCALL   _U(ldexp)
+       XCALL   _U(ldexpf)
        XCALL   _U(inverse)
   ; result (in absolute value)
        pop     rB0

Modified: trunk/avr-libc/libm/fplib/sqrt.S
===================================================================
--- trunk/avr-libc/libm/fplib/sqrt.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/sqrt.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,11 +34,11 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/*  double sqrt (double);
+/*  float sqrtf (float);
     Square root function.
  */
 
-FUNCTION sqrt
+FUNCTION sqrtf
 
 .L_nf: brne    .L_pk           ; NaN, return as is
        brtc    .L_pk           ; sqrt(+Inf) --> +Inf
@@ -45,8 +45,7 @@
 .L_nan:        XJMP    _U(__fp_nan)
 .L_pk: XJMP    _U(__fp_mpack)
 
-ENTRY sqrt
-ALIAS_ENTRY sqrtf
+ENTRY sqrtf
   ; split and check arg.
        XCALL   _U(__fp_splitA)
        brcs    .L_nf           ; !isfinite(A)

Modified: trunk/avr-libc/libm/fplib/square.S
===================================================================
--- trunk/avr-libc/libm/fplib/square.S  2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/square.S  2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,11 +32,11 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float square (float A);
-     The square() function returns square of A.
+/* float squaref (float A);
+     The squaref() function returns square of A.
  */
 
-ENTRY square
+ENTRY squaref
        X_movw  rB0, rA0
        X_movw  rB2, rA2        ; B = A
 

Modified: trunk/avr-libc/libm/fplib/tan.S
===================================================================
--- trunk/avr-libc/libm/fplib/tan.S     2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/tan.S     2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,16 +32,16 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float tan (float A);
-     The tan() function returns the tangent of A, where A is given
+/* float tanf (float A);
+     The tanf() function returns the tangent of A, where A is given
      in radians.
  */
 
 /* Calculation:
-     0 <= x <= Pi/4     --> tan(x)             fmod
-     Pi/4 < x < Pi/2    --> 1/tan(Pi/2-x)      fmod, Pi/2-x, 1/x
-     Pi/2 <= x <= 3*Pi/4 --> -1/tan(x-Pi/2)    fmod, 1/x, -x
-     3*Pi/4 < x < Pi    --> -tan(Pi-x)         fmod, Pi/2-x, -x
+     0 <= x <= Pi/4     --> tanf(x)            fmodf
+     Pi/4 < x < Pi/2    --> 1/tanf(Pi/2-x)     fmodf, Pi/2-x, 1/x
+     Pi/2 <= x <= 3*Pi/4 --> -1/tanf(x-Pi/2)   fmodf, 1/x, -x
+     3*Pi/4 < x < Pi    --> -tanf(Pi-x)                fmodf, Pi/2-x, -x
  */
 #define        HI40_PIO4       0x3F490FDA      /* (flt40_t) Pi/4       */
 #define        LO40_PIO4       0xA2            /* --"--                */
@@ -50,7 +50,7 @@
 
 #define        rsign   YH
 
-ENTRY tan
+ENTRY tanf
   ; save sign
        push    rsign
        mov     rsign, rA3

Modified: trunk/avr-libc/libm/fplib/tanh.S
===================================================================
--- trunk/avr-libc/libm/fplib/tanh.S    2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/tanh.S    2021-05-20 22:22:24 UTC (rev 2554)
@@ -34,24 +34,24 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* float tanh (float x);
-     The tanh() function returns the hyperbolic tangent of x, which is
+/* float tanhf (float x);
+     The tanhf() function returns the hyperbolic tangent of x, which is
      defined mathematically as sinh(x) / cosh(x).
 
    Algorithm:
-       if (fabs(x) <= X2SMALL)
+       if (|x| <= X2SMALL)
            return Polinom(x)
        else
-           return sign(x) * (1 - exp(-2*fabs(x))) / (1 + exp(-2*fabs(x)))
+           return sign(x) * (1 - exp(-2*|x|)) / (1 + exp(-2*|x|))
  */
 
 #define        X2SMALL 0x3e0fffff      /* < 0.140625   */
 #define        FL_P1   0x3f800000      /* +1.0 */
 
-#define        exp_lo  r20             /* float ldexp (float, int exp);        
*/
+#define        exp_lo  r20             /* float ldexpf (float, int exp);       
*/
 #define        exp_hi  r21
 
-ENTRY tanh
+ENTRY tanhf
   ; save sign
        push    rA3
   ; is arg too small ?
@@ -69,9 +69,9 @@
 1:     ori     rA3, 0x80
        ldi     exp_lo, lo8(1)
        ldi     exp_hi, hi8(1)
-       XCALL   _U(ldexp)       ; possible overflow -- no matter
-       XCALL   _U(exp)
-  ; save result and calculate 1 + exp(-2*fabs(x))
+       XCALL   _U(ldexpf)      ; possible overflow -- no matter
+       XCALL   _U(expf)
+  ; save result and calculate 1 + expf(-2*fabsf(x))
        push    rA3
        push    rA2
        push    rA1
@@ -81,7 +81,7 @@
        ldi     rB2, hlo8(FL_P1)
        ldi     rB3, hhi8(FL_P1)
        XCALL   _U(__addsf3)
-  ; save/restore and calculate 1 - exp(-2*fabs(x))
+  ; save/restore and calculate 1 - expf(-2*fabsf(x))
        pop     rB0
        pop     rB1
        pop     rB2

Modified: trunk/avr-libc/libm/fplib/trunc.S
===================================================================
--- trunk/avr-libc/libm/fplib/trunc.S   2021-05-20 21:50:20 UTC (rev 2553)
+++ trunk/avr-libc/libm/fplib/trunc.S   2021-05-20 22:22:24 UTC (rev 2554)
@@ -32,16 +32,16 @@
 #include "fp32def.h"
 #include "asmdef.h"
 
-/* double trunc (double x);
-     The trunc() function rounds x to the nearest integer not larger in
+/* float truncf (float x);
+     The truncf() function rounds x to the nearest integer not larger in
      absolute value.
 
    Examples:
-     trunc(1.9) --> 1.0
-     trunc(-1.9) --> -1.0
+     truncf(1.9) --> 1.0
+     truncf(-1.9) --> -1.0
  */
 
-ENTRY trunc
+ENTRY truncf
        XCALL   _U(__fp_trunc)
        brcs    2f              ; pass nonfinite arg as is
        cpi     rA3, 127




reply via email to

[Prev in Thread] Current Thread [Next in Thread]