|Re: [eigen] sse asin implementation|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] sse asin implementation
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 31 Mar 2009 18:49:12 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=dcSsLoUdlL70HIMkOBrVo08eOw/1RBcUjANv6RGhIH0=; b=JD2iD+tuUBIMNE6sPE+QbgtsV7xqNo2y2I5nm4RbPBIYnU7AreEIlhMz7kb9n/xG8Y Ck9UjvG/sTF/seR6DSRNanfC5tRgbevan6OP2REbLE0WakobPF0g1au6QpglgzrlSe5y kv/VwOMr3GcTstnmpEWaHOuerHswfDYt//m0Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qU4OC8rOiV0ngDzRZ8jUqRsMezQQVN92CRKa/Km3y0aOA46CYqz2RYgbAQqOzhVkAN qfSvCc3soCW0WgNXdkv9TOCQex/GJ3La4PQFe4nB5v11nEksk0waTXcIq2Q0rAhfjEQB a0FpoaoRT5uv+b8AETpYq9hL3ByY0MmYvZv10=
2009/3/31 Rohit Garg <rpg.314@xxxxxxxxx>:
> For general exponentiation, I think a cheap and easy route would be
> just exp(b*log(a))
> I looked at the cephes library implementation of pow and they do a lot
> of hacks just to get 3 bits of precision. In the use case that you
> have cited, I think it's better to just have the above implementation.
> It is certainly good enough for the -ffast-math case.
OK, seems sensible. But I thought the main justification for a simd
pow() would be performance, that it could be faster than the above
formula. If that's not the case then sure, I agree with you.
> BTW, what do you think of enabling the fast math paths in eigen when
> just -ffast-math is supplied to gcc. It can be detected by the
> __FAST_MATH__ macro.
That seems like a good idea! Let's see what Gael thinks.