mailing list of musl libc
 help / color / mirror / code / Atom feed
1656247770f778aba56e0620adbc3e8241a3e8ea blob 242 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
#include <math.h>

double fabs(double x)
{
	double t;
	__asm__ ("pcmpeqd %0, %0" : "=x"(t));          // t = ~0
	__asm__ ("psrlq   $1, %0" : "+x"(t));          // t >>= 1
	__asm__ ("andps   %1, %0" : "+x"(x) : "x"(t)); // x &= t
	return x;
}
debug log:

solving 16562477 ...
found 16562477 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).