<div dir="ltr"><div><div><div><div><div><div><div><div>Due to the finite nature of number representation on computers,<br>any answer will be an approximation to some degree.<br>To me, it looks to be a non-issue to some 15 significant digits.<br></div>I would say it depends how accurate you need.<br>You could do long-hand general calculations that track percent error,<br></div></div></div></div></div>and see how it gets compounded in a particular series of calculations.<br><br>If you got right into the nuts and bolts of writing optimized functions,<br>there are many clever ways to calculate common functions<br>that you can find in certain math or algorithms & data structures texts.<br></div><div>You would also need intimate knowledge of the target chipset.<br></div><div>But it seems that would be way too much time in <br>research and development to reinvent the wheel.<br></div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 7:28 PM, Greg Lindahl <span dir="ltr"><<a href="mailto:lindahl@pbm.com" target="_blank">lindahl@pbm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Apr 30, 2016 at 02:23:31AM +0800, C Bergström wrote:<br>
<br>
> Surprisingly, glibc does a pretty respectable job in terms of<br>
> accuracy, but alas it's certainly not the fastest.<br>
<br>
</span>If you go look in the source comments I believe it says which paper's<br>
algorithm it is using... doing range reduction for sin(6e5) is<br>
expensive to do accurately. Which is why the x86 sin() hardware<br>
instruction does it inaccurately but quickly, and most people/codes<br>
don't care.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org">Beowulf@beowulf.org</a> sponsored by Penguin Computing<br>
To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf" rel="noreferrer" target="_blank">http://www.beowulf.org/mailman/listinfo/beowulf</a><br>
</div></div></blockquote></div><br></div>