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: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments
Date: Tue, 5 Jul 2016 05:38:57 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

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

Ah, so "mp" of mpmath library means "multi-precision', thanks.

I should have thought of the known solution for factor of pi/3 angles.  Octave
produces:


>> sprintf("%0.100g", -3*sqrt(3)/(20000002*pi))
ans =
-8.26993260433362135722798187502380340418994819629006087779998779296875e-08


which is quite an improvement, six digits in fact.  So that gets into the area
of eps:


>>
abs((-3*sqrt(3)/(20000002*pi)-(-0.000000082699326043336203093078665439078872301720741882921))
/ -0.000000082699326043336203093078665439078872301720741882921) 
ans =    1.6004e-16
>> eps
ans =    2.2204e-16


which just shows that square-rooting algorithms are a little more numerically
accurate.  With a series computation, all those multiplications accumulate
errors, or if we truncate the series then we are inherently tossing
precision.

Well, getting somewhere, but I still don't know what can be done.  Bessel
functions are an idea, but I'm sure they have their own numerical and speed
issues.

Just curious, from what you know about the arbitrary precision library, is it
slow to compute trig functions out to sixteen digits compared to the floating
point library?


    _______________________________________________________

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]