From 0e05d9826e6d32a27392ed9d6fe613ef6cf957a0 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 25 Sep 2008 17:43:58 +0000 Subject: - remove files that are not either LGPL or Public Domain. - pull replacement funcs for fpmacros.c from glibc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This removes the powerpc/classic implementation which did not state any license but read: Copyright © 1991 Apple Computer, Inc. All rights reserved. and thus was dubious (and not needed). --- libm/powerpc/classic/s_nearbyint.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 libm/powerpc/classic/s_nearbyint.c (limited to 'libm/powerpc/classic/s_nearbyint.c') diff --git a/libm/powerpc/classic/s_nearbyint.c b/libm/powerpc/classic/s_nearbyint.c deleted file mode 100644 index d08430dc6..000000000 --- a/libm/powerpc/classic/s_nearbyint.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -/******************************************************************************* -* * -* The function nearbyint rounds its double argument to integral value * -* according to the current rounding direction and returns the result in * -* double format. This function does not signal inexact. * -* * -******************************************************************************** -* * -* This function calls fabs and copysign. * -* * -*******************************************************************************/ - -static const double twoTo52 = 4503599627370496.0; - -libm_hidden_proto(nearbyint) -double nearbyint ( double x ) - { - double y; - double OldEnvironment; - - y = twoTo52; - - __asm__ ("mffs %0" : "=f" (OldEnvironment)); /* get the environement */ - - if ( fabs ( x ) >= y ) /* huge case is exact */ - return x; - if ( x < 0 ) y = -y; /* negative case */ - y = ( x + y ) - y; /* force rounding */ - if ( y == 0.0 ) /* zero results mirror sign of x */ - y = copysign ( y, x ); -// restore old flags - __asm__ ("mtfsf 255,%0" : /*NULLOUT*/ : /*IN*/ "f" ( OldEnvironment )); - return ( y ); - } -libm_hidden_def(nearbyint) -- cgit v1.2.3