On Mon, Oct 4, 2010 at 10:11 AM, Corbin Simpson
<mostawesomed...@gmail.com> wrote:
> Trying to remember floating-point rules. Isn't repeated multiplication less
> precise than pow()? I thought that was why even integer exponents were only
> unrollable if things like -ffast-math were set. I might be remembering wrong
> though.

Makes sense, and certainly agrees with my simple experiments with gcc
(-ffast-math does unroll them for me). Another option is
-funsafe-math-optimizations (which does the pow unrolling, but does
not disable as much of the error checking.

> Sending from a mobile, pardon the brevity. ~ C.
>
> On Oct 4, 2010 1:30 AM, "Stéfan van der Walt" <ste...@sun.ac.za> wrote:
>> Hi Stefan
>>
>> On Mon, Oct 4, 2010 at 8:24 AM, Stefan Behnel <stefan...@behnel.de> wrote:
>>> Stéfan van der Walt, 03.10.2010 20:29:
>>>>
>>>> x**4
>>>>
>>> the correct way to do it (although a similar optimisation for constant
>>> exponents may be worth it). If it's an integer type, please double check
>>
>> Yes, it's a floating point number; such an optimisation would be very
>> useful!
>>
>> Regards
>> Stéfan
>> _______________________________________________
>> Cython-dev mailing list
>> Cython-dev@codespeak.net
>> http://codespeak.net/mailman/listinfo/cython-dev
>
> _______________________________________________
> Cython-dev mailing list
> Cython-dev@codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
>
>
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to