What is the best approximation for sine?A 1,400 years old approximation to the sine function by...

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

What is the meaning of option 'by' in TikZ Intersections

Why do we call complex numbers “numbers” but we don’t consider 2 vectors numbers?

Do natural melee weapons (from racial traits) trigger Improved Divine Smite?

Is this nominative case or accusative case?

School performs periodic password audits. Is my password compromised?

Questions of the type "What do you think other people would think?"

PTIJ: Aliyot for the deceased

New invention compresses matter to produce energy? or other items? (Short Story)

Affine transformation of circular arc in 3D

Is there a way to find out the age of climbing ropes?

If nine coins are tossed, what is the probability that the number of heads is even?

In the world of The Matrix, what is "popping"?

Rationale to prefer local variables over instance variables?

How spaceships determine each other's mass in space?

What is a term for a function that when called repeatedly, has the same effect as calling once?

Infinitive vs Gerund

Convert an array of objects to array of the objects' values

How to make sure I'm assertive enough in contact with subordinates?

What's the difference between Compensation, Indemnity, and Reparations?

Why can't we use freedom of speech and expression to incite people to rebel against government in India?

Why aren't there more gauls like Obelix?

Ignoring Someone as Wrongful Speech

Where do you go through passport control when transiting through another Schengen airport on your way out of the Schengen area?



What is the best approximation for sine?


A 1,400 years old approximation to the sine function by Mahabhaskariya of Bhaskara IWhat is the purpose of Stirling's approximation to a factorial?How to justify small angle approximation for cosineFinding good approximation for $x^{1/2.4}$A 1,400 years old approximation to the sine function by Mahabhaskariya of Bhaskara Ileast squres vs. lagrange interpolationHow is the derivative truly, literally the “best linear approximation” near a point?Approximation of $e^x$Looking for a better (geometric) approximation of $pi$…single equation that can approximate sine, triangle, and square waves by changing a single variableInverse of Bhāskara I's sine approximation













0












$begingroup$


Can you tell me which is the best approximation for cosine/sine functions. It should also reduce the computational complexity. I've already tried the Bhaskara I's approximation.



Can you suggest me anything better?



Thanks in advance.










share|cite|improve this question











$endgroup$












  • $begingroup$
    How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:13










  • $begingroup$
    I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
    $endgroup$
    – phanitej
    May 11 '15 at 6:16










  • $begingroup$
    What range of values?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:20










  • $begingroup$
    Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
    $endgroup$
    – phanitej
    May 11 '15 at 6:23










  • $begingroup$
    Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
    $endgroup$
    – marty cohen
    May 11 '15 at 6:27
















0












$begingroup$


Can you tell me which is the best approximation for cosine/sine functions. It should also reduce the computational complexity. I've already tried the Bhaskara I's approximation.



Can you suggest me anything better?



Thanks in advance.










share|cite|improve this question











$endgroup$












  • $begingroup$
    How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:13










  • $begingroup$
    I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
    $endgroup$
    – phanitej
    May 11 '15 at 6:16










  • $begingroup$
    What range of values?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:20










  • $begingroup$
    Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
    $endgroup$
    – phanitej
    May 11 '15 at 6:23










  • $begingroup$
    Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
    $endgroup$
    – marty cohen
    May 11 '15 at 6:27














0












0








0





$begingroup$


Can you tell me which is the best approximation for cosine/sine functions. It should also reduce the computational complexity. I've already tried the Bhaskara I's approximation.



Can you suggest me anything better?



Thanks in advance.










share|cite|improve this question











$endgroup$




Can you tell me which is the best approximation for cosine/sine functions. It should also reduce the computational complexity. I've already tried the Bhaskara I's approximation.



Can you suggest me anything better?



Thanks in advance.







approximation transcendental-equations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited 22 hours ago









Rócherz

2,8562821




2,8562821










asked May 11 '15 at 6:08









phanitejphanitej

567




567












  • $begingroup$
    How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:13










  • $begingroup$
    I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
    $endgroup$
    – phanitej
    May 11 '15 at 6:16










  • $begingroup$
    What range of values?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:20










  • $begingroup$
    Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
    $endgroup$
    – phanitej
    May 11 '15 at 6:23










  • $begingroup$
    Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
    $endgroup$
    – marty cohen
    May 11 '15 at 6:27


















  • $begingroup$
    How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:13










  • $begingroup$
    I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
    $endgroup$
    – phanitej
    May 11 '15 at 6:16










  • $begingroup$
    What range of values?
    $endgroup$
    – marty cohen
    May 11 '15 at 6:20










  • $begingroup$
    Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
    $endgroup$
    – phanitej
    May 11 '15 at 6:23










  • $begingroup$
    Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
    $endgroup$
    – marty cohen
    May 11 '15 at 6:27
















$begingroup$
How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
$endgroup$
– marty cohen
May 11 '15 at 6:13




$begingroup$
How accurate do you want it to be, how simple (or complex), and what operations do you allow? Also, do you want it in fixed or floating point?
$endgroup$
– marty cohen
May 11 '15 at 6:13












$begingroup$
I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
$endgroup$
– phanitej
May 11 '15 at 6:16




$begingroup$
I can afford one multiplication, and an addition/subtraction. And I want it for fixed point implementaion
$endgroup$
– phanitej
May 11 '15 at 6:16












$begingroup$
What range of values?
$endgroup$
– marty cohen
May 11 '15 at 6:20




$begingroup$
What range of values?
$endgroup$
– marty cohen
May 11 '15 at 6:20












$begingroup$
Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
$endgroup$
– phanitej
May 11 '15 at 6:23




$begingroup$
Actually i want it for simultaneous sine and cosine functions, with the input real/ imag values in between -1 and +1. I want to use these functions for discrete fourier transform
$endgroup$
– phanitej
May 11 '15 at 6:23












$begingroup$
Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
$endgroup$
– marty cohen
May 11 '15 at 6:27




$begingroup$
Looks like you are doing this on a quite limited processor. What are the inputs to your computation? From all your restrictions, it's starting to look like the only possibility would be table lookup, perhaps combined with linear interpolation.
$endgroup$
– marty cohen
May 11 '15 at 6:27










2 Answers
2






active

oldest

votes


















1












$begingroup$

For $-pile x le pi $ I found $$left(frac{315}{2}pi^2 - frac{15}{2pi^2} right)x + frac{175}{2pi^6}left( frac{pi^2}{5}-3right)x^3,$$ is it of any help?






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
    $endgroup$
    – phanitej
    May 11 '15 at 6:33










  • $begingroup$
    @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 6:46












  • $begingroup$
    I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
    $endgroup$
    – Claude Leibovici
    May 11 '15 at 9:02










  • $begingroup$
    @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:22












  • $begingroup$
    @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:58



















0












$begingroup$

Hopefully you're interested in the following double inequality, valid for $0le xlepi$: $$xleft(1-frac{x}{pi}right)lesin xle frac{4x}{pi}left(1-frac{x}{pi}right) $$






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1276699%2fwhat-is-the-best-approximation-for-sine%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    For $-pile x le pi $ I found $$left(frac{315}{2}pi^2 - frac{15}{2pi^2} right)x + frac{175}{2pi^6}left( frac{pi^2}{5}-3right)x^3,$$ is it of any help?






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
      $endgroup$
      – phanitej
      May 11 '15 at 6:33










    • $begingroup$
      @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 6:46












    • $begingroup$
      I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
      $endgroup$
      – Claude Leibovici
      May 11 '15 at 9:02










    • $begingroup$
      @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:22












    • $begingroup$
      @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:58
















    1












    $begingroup$

    For $-pile x le pi $ I found $$left(frac{315}{2}pi^2 - frac{15}{2pi^2} right)x + frac{175}{2pi^6}left( frac{pi^2}{5}-3right)x^3,$$ is it of any help?






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
      $endgroup$
      – phanitej
      May 11 '15 at 6:33










    • $begingroup$
      @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 6:46












    • $begingroup$
      I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
      $endgroup$
      – Claude Leibovici
      May 11 '15 at 9:02










    • $begingroup$
      @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:22












    • $begingroup$
      @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:58














    1












    1








    1





    $begingroup$

    For $-pile x le pi $ I found $$left(frac{315}{2}pi^2 - frac{15}{2pi^2} right)x + frac{175}{2pi^6}left( frac{pi^2}{5}-3right)x^3,$$ is it of any help?






    share|cite|improve this answer









    $endgroup$



    For $-pile x le pi $ I found $$left(frac{315}{2}pi^2 - frac{15}{2pi^2} right)x + frac{175}{2pi^6}left( frac{pi^2}{5}-3right)x^3,$$ is it of any help?







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered May 11 '15 at 6:31









    Vincenzo OlivaVincenzo Oliva

    5,32611234




    5,32611234












    • $begingroup$
      Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
      $endgroup$
      – phanitej
      May 11 '15 at 6:33










    • $begingroup$
      @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 6:46












    • $begingroup$
      I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
      $endgroup$
      – Claude Leibovici
      May 11 '15 at 9:02










    • $begingroup$
      @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:22












    • $begingroup$
      @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:58


















    • $begingroup$
      Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
      $endgroup$
      – phanitej
      May 11 '15 at 6:33










    • $begingroup$
      @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 6:46












    • $begingroup$
      I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
      $endgroup$
      – Claude Leibovici
      May 11 '15 at 9:02










    • $begingroup$
      @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:22












    • $begingroup$
      @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
      $endgroup$
      – Vincenzo Oliva
      May 11 '15 at 10:58
















    $begingroup$
    Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
    $endgroup$
    – phanitej
    May 11 '15 at 6:33




    $begingroup$
    Ya it is of help , but i need to do a modulo operation, to wrap the x^3 back into 0<x<pi.
    $endgroup$
    – phanitej
    May 11 '15 at 6:33












    $begingroup$
    @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 6:46






    $begingroup$
    @phanitej But does it really work? I had just found it on the net, but I'm afraid it's incorrect. Though, I can't check now.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 6:46














    $begingroup$
    I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
    $endgroup$
    – Claude Leibovici
    May 11 '15 at 9:02




    $begingroup$
    I suppose typo's in this formula. Try using $x=frac pi 2$ or $x=pi$. Could you tell where you did find it ?
    $endgroup$
    – Claude Leibovici
    May 11 '15 at 9:02












    $begingroup$
    @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:22






    $begingroup$
    @ClaudeLeibovici Yeah, I checked that once but couldn't doublecheck as I'm at school, so I thought I had typed something wrong in the calculator. It was the result of an Italian graduand, confirmed by who looked like his professor. I guess you're right about the typo.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:22














    $begingroup$
    @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:58




    $begingroup$
    @phanitej I'll leave this answer here in case someone finds the typo. In the meanwhile, I'll post another answer with a correct inequality.
    $endgroup$
    – Vincenzo Oliva
    May 11 '15 at 10:58











    0












    $begingroup$

    Hopefully you're interested in the following double inequality, valid for $0le xlepi$: $$xleft(1-frac{x}{pi}right)lesin xle frac{4x}{pi}left(1-frac{x}{pi}right) $$






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Hopefully you're interested in the following double inequality, valid for $0le xlepi$: $$xleft(1-frac{x}{pi}right)lesin xle frac{4x}{pi}left(1-frac{x}{pi}right) $$






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Hopefully you're interested in the following double inequality, valid for $0le xlepi$: $$xleft(1-frac{x}{pi}right)lesin xle frac{4x}{pi}left(1-frac{x}{pi}right) $$






        share|cite|improve this answer









        $endgroup$



        Hopefully you're interested in the following double inequality, valid for $0le xlepi$: $$xleft(1-frac{x}{pi}right)lesin xle frac{4x}{pi}left(1-frac{x}{pi}right) $$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered May 11 '15 at 11:07









        Vincenzo OlivaVincenzo Oliva

        5,32611234




        5,32611234






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1276699%2fwhat-is-the-best-approximation-for-sine%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Nidaros erkebispedøme

            Birsay

            Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?