-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
-// ----------------------------------------------------------------------------
-// C++
-
-float copysign( float x, float y ) { /* TODO */ };
-long double copysign( long double x, long double y ) { /* TODO */ };
+double copysign( double x, double y ) { /* TODO */ };
-// ----------------------------------------------------------------------------
-// Standard C
+/* Own code
+{
+ if ( y < 0 )
+ {
+ return ( x < 0 ) ? x : -x;
+ }
+ else
+ {
+ return ( x < 0 ) ? -x : x;
+ }
+}
-double copysign( double x, double y ) { /* TODO */ };
float copysignf( float x, float y ) { /* TODO */ };
long double copysignl( long double x, long double y ) { /* TODO */ };