[Mesa-dev] [PATCH 01/12] mesa: replace FREXPF, LDEXPF with frexpf, ldexpf

Brian Paul brianp at vmware.com
Tue Feb 24 09:27:34 PST 2015


On 02/24/2015 10:17 AM, Matt Turner wrote:
> On Tue, Feb 24, 2015 at 8:57 AM, Brian Paul <brianp at vmware.com> wrote:
>> Start getting rid of some imports.h macros.  Use the c99 functions instead.
>> ---
>>   include/c99_math.h              | 11 +++++++++++
>>   src/mesa/main/imports.h         |  6 ------
>>   src/mesa/math/m_debug_util.h    |  9 ++++++---
>>   src/mesa/program/prog_execute.c |  5 +++--
>>   4 files changed, 20 insertions(+), 11 deletions(-)
>>
>> diff --git a/include/c99_math.h b/include/c99_math.h
>> index 6680f54..e60e7d3 100644
>> --- a/include/c99_math.h
>> +++ b/include/c99_math.h
>> @@ -82,6 +82,17 @@ static inline float logf( float f )
>>      return (float) log( (double) f );
>>   }
>>
>> +static inline float frexpf(float x, float y)
>> +{
>> +   return (float) frexp(x, y);
>
> frexp takes a pointer as the second argument.

Hmm, I didn't see an error on the MSVC build.  I'll fix it though.


> I'd have to think more
> about frexp and ldexp to make myself sure that passing floats to the
> double function actually give the results you'd get from frexpf... but
> I guess that'd work?
>
> Similar concerns about ldexp, but I guess we've been doing it for years.

Yeah, should be no functional change.

-Brian



More information about the mesa-dev mailing list