This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Simplify pow with constant
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Fri, 4 Aug 2017 15:26:39 +0300 (MSK)
- Subject: Re: [PATCH] Simplify pow with constant
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB2053B473F89233B992CEE1B383B60@DB6PR0801MB2053.eurprd08.prod.outlook.com>
On Fri, 4 Aug 2017, Wilco Dijkstra wrote:
> This patch simplifies pow (C, x) into exp (x * C1), where C1 = log (C).
I don't think you can do that for non-positive C.
> Do this only for fast-math as accuracy is reduced. This is much faster
> since pow is more complex than exp - with a current GLIBC the speedup
> is more than 7 times for this transformation.
Is it bound to be so on future glibc revisions and non-glibc platforms?
Alexander