[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: |
Sun, 26 Jun 2016 17:52:00 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
Follow-up Comment #5, bug #48307 (project octave):
Experiment with this a little bit:
>> sprintf("%0.100g", 10000000)
ans = 10000000
>> x = [1 10 100 1000 10000 100000 1000000 10000000];
>> plot([0:7], abs(sin(pi*x)));
There's a definite loss of accuracy, and if I go to higher powers (e.g.,
[0:10]) the sin() function starts to fall apart.
Maybe it is a problem with the C math library Octave uses.
I've not seen the library code, but the sorts of questions would be how the
Taylor series is evaluated. From what I'm recalling about series expansion is
that it is done about some type of centroid and is accurate within a certain
range, and for better accuracy one does an expansion about a different
centroid...that sort of thing. For trig functions it would make sense to
bring that value, no matter how large it is, back within the canonical range
of [0,2*pi) or [-pi,pi).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48307>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Colin Macdonald, 2016/06/24
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Dan Sebald, 2016/06/24
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Colin Macdonald, 2016/06/26
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Dan Sebald, 2016/06/26
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Dan Sebald, 2016/06/26
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments,
Dan Sebald <=
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Lachlan Andrew, 2016/06/26
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Dan Sebald, 2016/06/27
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Marco Caliari, 2016/06/27
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Lachlan Andrew, 2016/06/27
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Dan Sebald, 2016/06/27
- [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments, Lachlan Andrew, 2016/06/27