Ilya Zakharevich on Tue, 27 Apr 2004 15:37:26 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: link error log2 exp2 gcc 3.4.0 and resolution

On Tue, Apr 27, 2004 at 10:35:10AM +0200, Bill Allombert wrote:
> We should probably test a non-constant value:
> double log4(double x) { return log2(x)/2;}

> A compiler could decide to optimize log2(0.666) to -0.586405917590824
> or whatever is the valid ieee754 result.

The valid ieee754 result depends on FP flags, so can't be calculated
at compile-time.

Hope this helps,