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: Colin Macdonald
Subject: [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments
Date: Tue, 5 Jul 2016 04:24:20 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

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

>  symbolic IS using long double

Symbolic is using arbitrary precision via the mpmath library.  I have compared
the results to Maple, I did so down below and they matched... 


Here's something like what you want, although to me this just shows that two
independent arbitrary precision calculators give the same result.

Symbolic:

>> sin(pi*x) / (pi*x)
ans = (sym)

    -3⋅√3   
  ──────────
  20000002⋅π

>> digits(200)
>> vpa(ans)
ans = (sym)

 
-0.000000082699326043336203093078665439078872301720741882921909627713940272260
 
518294338639792193025104173122963842414014598385696672944197610371640960743486
  670650135932398542467726274361779425593210227572018156


Maple:

> x := 10000001/3;        
                                x := 10000001/3

> A := sin(Pi*x) / (Pi*x);
                                          1/2
                                       3 3
                              A := - -----------
                                     20000002 Pi

> Digits := 200;          
                                 Digits := 200

> evalf(A);               
-0.826993260433362030930786654390788723017207418829219096277139402722605182\
    94338639792193025104173122963842414014598385696672944197610371640960743\

                                                                -7
    486670650135932398542467726274361779425593210227572018154 10



    _______________________________________________________

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]