On 15-09-2012 14:48, Roman Divacky wrote: > Fwiw, this seems to have been fixed as of a few minutes ago. > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150720.html > > Steve, can you please test llvm/clang from (their) svn and report > back? We can import a newer snapshot if all is ok.
Here's a small test program. You're probably better equipped to test
clang svn.
--------
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main( int argc, char **argv ) {
double d = strtod( argv[ 1 ], NULL );
printf( "%e\n", ( double ) cos( d ));
printf( "%e\n", ( double ) cosf( d ));
printf( "%e\n", ( double ) cosl( d ));
return( 0 );
}
--------
This is the current output of clang:
% clang -o cos cos.c -lm
% ./cos 1.23456789e20
6.031937e-01
1.234568e+20
2.814722e-01
The second number (cosf) is wrong. It should be a value between -1 and 1.
signature.asc
Description: OpenPGP digital signature
