octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48307] sinc loses precision for large argumen


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments
Date: Tue, 5 Jul 2016 07:47:39 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #29, bug #48307 (project octave):

@ Lachlan, comment #20 <https://savannah.gnu.org/bugs/?48307#comment20>

if you take x=2^24+1/2+1/4 it has an exact binary representation. But


> x = 2^24+1/2+1/4;
> sinc(x)
ans =    1.34157580003058e-08


while the exact result (sage) is


1.3415757952777031231285713571e-8


If we denote by Sin(x) the exact value of sin(x), the implementation of sin
function is correct, in the sense that (sin(x)-Sin(x))/Sin(x) is below machine
precision for any x, but here we pretend


(sin(pi*x)-Sin(the_exact_pi*x))/Sin(the_exact_pi*x)


to be around machine precision. So, for me the original report is not a bug
and sin works in the right way. Of course, it is possible in principle to
enhance the accuracy of sinc, but I do not see an easy way. Are you aware of
any other software working in pure double precision doing better for the
original report?


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48307>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]