Clang as default compiler November 4th
Roman Divacky
rdivacky at freebsd.org
Sat Sep 15 14:09:37 UTC 2012
Is this correct?
lev ~$ ./cos 1.23456789e20
6.031937e-01
-9.629173e-02
2.814722e-01
If so I believe the issue is fixed.
On Sat, Sep 15, 2012 at 03:48:38PM +0200, Tijl Coosemans wrote:
> 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.
>
More information about the freebsd-toolchain
mailing list