Index: include/math.h
===================================================================
--- include/math.h	(revision 2548)
+++ include/math.h	(working copy)
@@ -122,223 +122,226 @@ 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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
+extern double modf (double __x, double *__iptr);
 
 /**
-    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__;
-
-/** An alias for sqrt(). */
-extern float sqrtf (float) __ATTR_CONST__;
+__ATTR_CONST__ extern float sqrtf (float __x);
+__ATTR_CONST__ extern double sqrt (double __x);
 
 /**
-    The cbrt() function returns the cube root of \a __x.
+    The cbrtf() 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);
 
 /**
-    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
     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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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 +353,19 @@ __ATTR_CONST__ static inline int isfinit
 	: "r" (__x)	);
     return __exp != 0xff;
 }
-#define isfinitef isfinite	/**< The alias for isfinite().	*/
+
+#if __SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__
+static inline int isfinite (double __x)
+{
+    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,85 +374,94 @@ __ATTR_CONST__ static inline double copy
 	: "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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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);
 
 /**
-    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.
 
     \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);
 
 /**
-    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
     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);
 
 /**
-    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 +469,8 @@ extern long lround (double __x) __ATTR_C
     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);
 
 #ifdef __cplusplus
 }
Index: libc/stdio/vfscanf.c
===================================================================
--- libc/stdio/vfscanf.c	(revision 2548)
+++ libc/stdio/vfscanf.c	(working copy)
@@ -396,7 +396,7 @@ conv_brk (FILE *stream, width_t width, c
    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
@@ -598,7 +598,7 @@ static int skip_spaces (FILE *stream)
      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
Index: libm/fplib/acos.S
===================================================================
--- libm/fplib/acos.S	(revision 2548)
+++ libm/fplib/acos.S	(working copy)
@@ -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,8 @@
 #define	HI40_PI	0x40490FDA	/* Pi	*/
 #define	LO40_PI	0xA2
 
-ENTRY acos
+ENTRY acosf
+ENTRY_DOUBLE32 acos
   ; save A sign
 	push	rA3
   ; A = arccos(fabs(A))
Index: libm/fplib/asin.S
===================================================================
--- libm/fplib/asin.S	(revision 2548)
+++ libm/fplib/asin.S	(working copy)
@@ -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,8 @@
 #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
+ENTRY_DOUBLE32 asin
   ; save A sign
 	push	rA3
   ; A = fabs(A)
Index: libm/fplib/asmdef.h
===================================================================
--- libm/fplib/asmdef.h	(revision 2548)
+++ libm/fplib/asmdef.h	(working copy)
@@ -100,9 +100,11 @@ _U(\name):
    it is preferable to provide actual symbols in the library, so
    that code that expects to be able to use them directly -
    like gcc/gcc/testsuite/gcc.dg/pr41963.c using sqrtf - will work.  */
-.macro	ALIAS_ENTRY	name
+.macro	ENTRY_DOUBLE32	name
+#if (__SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__)
 	.global	_U(\name)
 _U(\name):
+#endif /* double = float */
 .endm
 
 .macro	ENDFUNC
Index: libm/fplib/atan.S
===================================================================
--- libm/fplib/atan.S	(revision 2548)
+++ libm/fplib/atan.S	(working copy)
@@ -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,8 @@
 
 #define	corr	YH
 
-ENTRY atan
+ENTRY atanf
+ENTRY_DOUBLE32 atan
 	push	corr
 	clr	corr
   ; inverse A, if needed
@@ -74,7 +75,7 @@ ENTRY atan
 	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)
Index: libm/fplib/atan2.S
===================================================================
--- libm/fplib/atan2.S	(revision 2548)
+++ libm/fplib/atan2.S	(working copy)
@@ -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,8 @@ FUNCTION atan2
 .L_nan:	XJMP	_U(__fp_nan)
 .L_zr:	XJMP	_U(__fp_zero)
 
-ENTRY   atan2
+ENTRY   atan2f
+ENTRY_DOUBLE32 atan2
   ; save 'y' sign
 	mov	disp, rA3
 	andi	disp, 0x80
@@ -126,7 +127,7 @@ ENTRY   atan2
 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
Index: libm/fplib/cbrt.S
===================================================================
--- libm/fplib/cbrt.S	(revision 2548)
+++ libm/fplib/cbrt.S	(working copy)
@@ -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,8 @@ FUNCTION cbrt
 
 0:	XJMP	_U(__fp_mpack)
 
-ENTRY cbrt
+ENTRY cbrtf
+ENTRY_DOUBLE32 cbrt
   ; split and check arg.
 	XCALL	_U(__fp_splitA)
 	brcs	0b		; !isfinite(A)
Index: libm/fplib/ceil.S
===================================================================
--- libm/fplib/ceil.S	(revision 2548)
+++ libm/fplib/ceil.S	(working copy)
@@ -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,8 @@
 
 #define FL_P1	0x3f800000	/* +1.0	*/
 
-ENTRY   ceil
+ENTRY   ceilf
+ENTRY_DOUBLE32 ceil
 	XCALL	_U(__fp_trunc)
 	brcs	.L_nf
   ; A is finite
Index: libm/fplib/copysign.S
===================================================================
--- libm/fplib/copysign.S	(revision 2548)
+++ libm/fplib/copysign.S	(working copy)
@@ -32,12 +32,13 @@
 #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
+ENTRY_DOUBLE32 copysign
 	bst	rB3, 7
 	bld	rA3, 7
 	ret
Index: libm/fplib/cos.S
===================================================================
--- libm/fplib/cos.S	(revision 2548)
+++ libm/fplib/cos.S	(working copy)
@@ -32,11 +32,12 @@
 #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
+ENTRY_DOUBLE32 cos
 	XCALL	_U(__fp_rempio2)
 	inc	ZL
 	XJMP	_U(__fp_sinus)
Index: libm/fplib/cosh.S
===================================================================
--- libm/fplib/cosh.S	(revision 2548)
+++ libm/fplib/cosh.S	(working copy)
@@ -32,34 +32,35 @@
 #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
+ENTRY_DOUBLE32 cosh
+  ; 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
 	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
Index: libm/fplib/exp.S
===================================================================
--- libm/fplib/exp.S	(revision 2548)
+++ libm/fplib/exp.S	(working copy)
@@ -34,19 +34,19 @@
 #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.
  */
 
 #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,8 @@ FUNCTION exp
 .L_zr:	XJMP	_U(__fp_zero)
 .L_nan:	XJMP	_U(__fp_nan)
 
-ENTRY exp
+ENTRY expf
+ENTRY_DOUBLE32 exp
   ; split and analize A
 	XCALL	_U(__fp_splitA)
 	brcs	.L_nf		; A is not a finite number
@@ -77,7 +78,7 @@ ENTRY exp
 	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 +103,7 @@ ENTRY exp
   ; 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
Index: libm/fplib/fdim.S
===================================================================
--- libm/fplib/fdim.S	(revision 2548)
+++ libm/fplib/fdim.S	(working copy)
@@ -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,8 @@
      is fast if both arguments are equal.
  */
 
-ENTRY fdim
+ENTRY fdimf
+ENTRY_DOUBLE32 fdim
   ; sign(A) | sign(B)
 	mov	r0, rA3
 	or	r0, rB3
Index: libm/fplib/floor.S
===================================================================
--- libm/fplib/floor.S	(revision 2548)
+++ libm/fplib/floor.S	(working copy)
@@ -34,17 +34,18 @@
 #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
+ENTRY_DOUBLE32 floor
 	XCALL	_U(__fp_trunc)
 	brcs	.L_nf
   ; A is finite
Index: libm/fplib/fma.S
===================================================================
--- libm/fplib/fma.S	(revision 2548)
+++ libm/fplib/fma.S	(working copy)
@@ -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,8 @@
 #define	rC0	r14	/* lower byte of arg. C	*/
 #define	rC2	r16
 
-ENTRY fma
+ENTRY fmaf
+ENTRY_DOUBLE32 fma
 	XCALL	_U(__mulsf3x)
 	X_movw	rB0, rC0
 	X_movw	rB2, rC2
Index: libm/fplib/fmax.S
===================================================================
--- libm/fplib/fmax.S	(revision 2548)
+++ libm/fplib/fmax.S	(working copy)
@@ -34,13 +34,14 @@
 #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
+ENTRY_DOUBLE32 fmax
 	lsl	rA3
 	sbc	rAE, rAE	; rAE = (A < 0) ? -1 : 0
 	lsl	rB3
Index: libm/fplib/fmin.S
===================================================================
--- libm/fplib/fmin.S	(revision 2548)
+++ libm/fplib/fmin.S	(working copy)
@@ -34,13 +34,14 @@
 #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
+ENTRY_DOUBLE32 fmin
 	lsl	rA3
 	sbc	rAE, rAE	; rAE = (A < 0) ? -1 : 0
 	lsl	rB3
Index: libm/fplib/fmod.S
===================================================================
--- libm/fplib/fmod.S	(revision 2548)
+++ libm/fplib/fmod.S	(working copy)
@@ -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,8 @@ FUNCTION fmod
 .L_nan:	XJMP	_U(__fp_nan)
 .L_sz:	XJMP	_U(__fp_szero)
 
-ENTRY fmod
+ENTRY fmodf
+ENTRY_DOUBLE32 fmod
   ; split and check exceptions
 	mov	ZL, rA3		; save
 	XCALL	_U(__fp_split3)
Index: libm/fplib/fp_arccos.S
===================================================================
--- libm/fplib/fp_arccos.S	(revision 2548)
+++ libm/fplib/fp_arccos.S	(working copy)
@@ -74,7 +74,7 @@ ENTRY __fp_arccos
 	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 @@ ENTRY __fp_arccos
 	ldi	rA2, hlo8(FL_1)
 	ldi	rA3, hhi8(FL_1)
 	XCALL	_U(__subsf3)
-	XCALL	_U(sqrt)
+	XCALL	_U(sqrtf)
   ; multiply
 	pop	rB0
 	pop	rB1
Index: libm/fplib/frexp.S
===================================================================
--- libm/fplib/frexp.S	(revision 2548)
+++ libm/fplib/frexp.S	(working copy)
@@ -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,8 @@
 
 #define	pexp_lo	r20
 
-ENTRY frexp
+ENTRY frexpf
+ENTRY_DOUBLE32 frexp
 
 	X_movw	ZL, pexp_lo
 
Index: libm/fplib/hypot.S
===================================================================
--- libm/fplib/hypot.S	(revision 2548)
+++ libm/fplib/hypot.S	(working copy)
@@ -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,8 @@ FUNCTION hypot
 .L_retA:
 	XJMP	_U(__fp_mpack)
 
-ENTRY hypot
+ENTRY hypotf
+ENTRY_DOUBLE32 hypot
   ; clear signs
 	andi	rA3, 0x7f
 	andi	rB3, 0x7f
@@ -236,7 +237,7 @@ ENTRY hypot
 	
 	XCALL	_U(__addsf3x)
 	XCALL	_U(__fp_round)
-	XCALL	_U(sqrt)
+	XCALL	_U(sqrtf)
 
   ; restore a scale
 #if (-SCALE_SMALL & SCALE_BIG) == 0
@@ -248,5 +249,5 @@ ENTRY hypot
 	clr	exp_hi
 	sbrc	exp_lo, 7
 	com	exp_hi
-	XJMP	_U(ldexp)
+	XJMP	_U(ldexpf)
 ENDFUNC
Index: libm/fplib/isfinite.S
===================================================================
--- libm/fplib/isfinite.S	(revision 2548)
+++ libm/fplib/isfinite.S	(working copy)
@@ -32,12 +32,13 @@
 #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
+ENTRY_DOUBLE32 isfinite
 /* 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.	*/
Index: libm/fplib/isinf.S
===================================================================
--- libm/fplib/isinf.S	(revision 2548)
+++ libm/fplib/isinf.S	(working copy)
@@ -34,15 +34,16 @@
 #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
      isfinite() inline function.
  */
 
-ENTRY isinf
+ENTRY isinff
+ENTRY_DOUBLE32 isinf
 	XCALL	_U(__fp_splitA)
 	ldi	r24, 0
 	ldi	r25, 0
Index: libm/fplib/isnan.S
===================================================================
--- libm/fplib/isnan.S	(revision 2548)
+++ libm/fplib/isnan.S	(working copy)
@@ -32,15 +32,16 @@
 #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
      isfinite() inline function.
  */
 
-ENTRY isnan
+ENTRY isnanf
+ENTRY_DOUBLE32 isnan
 	XCALL	_U(__fp_splitA)
 	ldi	r24, 0
 	ldi	r25, 0
Index: libm/fplib/ldexp.S
===================================================================
--- libm/fplib/ldexp.S	(revision 2548)
+++ libm/fplib/ldexp.S	(working copy)
@@ -34,19 +34,20 @@
 #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
+ENTRY_DOUBLE32 ldexp
 	XCALL	_U(__fp_splitA)
 	brcs	.L_pk			; as is
 	tst	rA3
Index: libm/fplib/log.S
===================================================================
--- libm/fplib/log.S	(revision 2548)
+++ libm/fplib/log.S	(working copy)
@@ -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,8 @@ FUNCTION log
 .L_min:	set
 	XJMP	_U(__fp_inf)
 
-ENTRY log
+ENTRY logf
+ENTRY_DOUBLE32 log
 	XCALL	_U(__fp_splitA)
 	brcs	.L_nf		; !isfinite(A)
 	tst	rA3
Index: libm/fplib/log10.S
===================================================================
--- libm/fplib/log10.S	(revision 2548)
+++ libm/fplib/log10.S	(working copy)
@@ -32,14 +32,15 @@
 #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
+ENTRY_DOUBLE32 log10
+	XCALL	_U(logf)
 	ldi	rB0,  lo8(INV_LN_10)
 	ldi	rB1,  hi8(INV_LN_10)
 	ldi	rB2, hlo8(INV_LN_10)
Index: libm/fplib/lrint.S
===================================================================
--- libm/fplib/lrint.S	(revision 2548)
+++ libm/fplib/lrint.S	(working copy)
@@ -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,8 @@
      - restore the sign
  */
 
-ENTRY lrint
+ENTRY lrintf
+ENTRY_DOUBLE32 lrint
 	XCALL	_U(__fp_splitA)
 	brcs	.L_err
   ; A is finite
Index: libm/fplib/lround.S
===================================================================
--- libm/fplib/lround.S	(revision 2548)
+++ libm/fplib/lround.S	(working copy)
@@ -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,8 @@
    Objections to saturation are listen in __fixunssfsi.S file.
  */
 
-ENTRY lround
+ENTRY lroundf
+ENTRY_DOUBLE32 lround
 	XCALL	_U(__fp_splitA)
 	brcs	.L_err
   ; A is finite
Index: libm/fplib/modf.S
===================================================================
--- libm/fplib/modf.S	(revision 2548)
+++ libm/fplib/modf.S	(working copy)
@@ -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,8 +44,8 @@
 
 #define	iptr_lo	r20
 
-ENTRY modf
 ENTRY modff
+ENTRY_DOUBLE32 modf
   ; save iptr
 	X_movw	ZL, iptr_lo
   ; XH = exponent field
Index: libm/fplib/pow.S
===================================================================
--- libm/fplib/pow.S	(revision 2548)
+++ libm/fplib/pow.S	(working copy)
@@ -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,8 @@
 
 #define	FL_1	0x3f800000	/* +1.0	*/
 
-ENTRY pow
+ENTRY powf
+ENTRY_DOUBLE32 pow
   ; ZH := exponent of y
 	X_movw	ZL, rB2
 	lsl	ZL
@@ -206,13 +207,13 @@ ENTRY pow
 	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__) */
Index: libm/fplib/round.S
===================================================================
--- libm/fplib/round.S	(revision 2548)
+++ libm/fplib/round.S	(working copy)
@@ -48,7 +48,8 @@
      - merge to float
    This is a balance between space and speed.
  */
-ENTRY round
+ENTRY roundf
+ENTRY_DOUBLE32 round
 	XCALL	_U(__fp_splitA)
 	brcs	.L_nf
   ; A is finite
Index: libm/fplib/signbit.S
===================================================================
--- libm/fplib/signbit.S	(revision 2548)
+++ libm/fplib/signbit.S	(working copy)
@@ -32,18 +32,19 @@
 #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
+ENTRY_DOUBLE32 signbit
 	lsl	rA3
 	sbc	rA2, rA2
 	neg	rA2
Index: libm/fplib/sin.S
===================================================================
--- libm/fplib/sin.S	(revision 2548)
+++ libm/fplib/sin.S	(working copy)
@@ -34,11 +34,12 @@
 #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
+ENTRY_DOUBLE32 sin
 	push	rA3
 	XCALL	_U(__fp_rempio2)
 	pop	r0
Index: libm/fplib/sinh.S
===================================================================
--- libm/fplib/sinh.S	(revision 2548)
+++ libm/fplib/sinh.S	(working copy)
@@ -34,20 +34,21 @@
 #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
+ENTRY_DOUBLE32 sinh
   ; save sign
 	push	rA3
   ; is arg too small ?
@@ -61,22 +62,22 @@ ENTRY sinh
 	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
Index: libm/fplib/sqrt.S
===================================================================
--- libm/fplib/sqrt.S	(revision 2548)
+++ libm/fplib/sqrt.S	(working copy)
@@ -34,19 +34,19 @@
 #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
 .L_nan:	XJMP	_U(__fp_nan)
 .L_pk:	XJMP	_U(__fp_mpack)
 
-ENTRY sqrt
-ALIAS_ENTRY sqrtf
+ENTRY sqrtf
+ENTRY_DOUBLE32 sqrt
   ; split and check arg.
 	XCALL	_U(__fp_splitA)
 	brcs	.L_nf		; !isfinite(A)
Index: libm/fplib/square.S
===================================================================
--- libm/fplib/square.S	(revision 2548)
+++ libm/fplib/square.S	(working copy)
@@ -32,11 +32,12 @@
 #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
+ENTRY_DOUBLE32 square
 	X_movw	rB0, rA0
 	X_movw	rB2, rA2	; B = A
 
Index: libm/fplib/tan.S
===================================================================
--- libm/fplib/tan.S	(revision 2548)
+++ libm/fplib/tan.S	(working copy)
@@ -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,8 @@
 
 #define	rsign	YH
 
-ENTRY tan
+ENTRY tanf
+ENTRY_DOUBLE32 tan
   ; save sign
 	push	rsign
 	mov	rsign, rA3
Index: libm/fplib/tanh.S
===================================================================
--- libm/fplib/tanh.S	(revision 2548)
+++ libm/fplib/tanh.S	(working copy)
@@ -34,24 +34,26 @@
 #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
+ENTRY_DOUBLE32 tanh
   ; save sign
 	push	rA3
   ; is arg too small ?
@@ -69,9 +71,9 @@ ENTRY tanh
 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 +83,7 @@ ENTRY tanh
 	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
Index: libm/fplib/trunc.S
===================================================================
--- libm/fplib/trunc.S	(revision 2548)
+++ libm/fplib/trunc.S	(working copy)
@@ -32,16 +32,17 @@
 #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
+ENTRY_DOUBLE32 trunc
 	XCALL	_U(__fp_trunc)
 	brcs	2f		; pass nonfinite arg as is
 	cpi	rA3, 127
