Calculating Hyperbolic Sin faster than using a standard power seriesIs there a way to get trig functions...
Skis versus snow shoes - when to choose which for travelling the backcountry?
A bug in Excel? Conditional formatting for marking duplicates also highlights unique value
Where is the line between being obedient and getting bullied by a boss?
I can't die. Who am I?
What are all the squawk codes?
Roots of 6th chords on the guitar for different inversions/voicings
Is there a frame of reference in which I was born before I was conceived?
What happened to QGIS 2.x LTR?
Levi-Civita symbol: 3D matrix
Where is the fallacy here?
Is there any relevance to Thor getting his hair cut other than comedic value?
Reason why dimensional travelling would be restricted
Toast materialize
What is a term for a function that when called repeatedly, has the same effect as calling once?
If a set is open, does that imply that it has no boundary points?
Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?
How to evaluate the limit where something is raised to a power of x?
How can I be pwned if I'm not registered on the compromised site?
Rationale to prefer local variables over instance variables?
What is better: yes / no radio, or simple checkbox?
Why can't we make a perpetual motion machine by using a magnet to pull up a piece of metal, then letting it fall back down?
Giving a talk in my old university, how prominently should I tell students my salary?
Citing contemporaneous (interlaced?) preprints
How to substitute values from a list into a function?
Calculating Hyperbolic Sin faster than using a standard power series
Is there a way to get trig functions without a calculator?Broken Calculator: only certain unary functions work.How do we define $sin(theta)$ or $cos(theta)$Help with Trigonometric FunctionsHow would Taylor Series work?Understanding power series and their representation of functionsSeries Convergence of $sumlimits_{n=1}^{infty} frac{cos(npi/3)}{n!}$ by Ratio TestOrthogonal Function Dirac Delta SeriesHow do calculators calculate the value of trigonometric functions?How to calculate a “rational” sine/cosine to specific digits of precision?Calculating trig functions faster than with standard power series
$begingroup$
Using $$ sinh x = x + tfrac{x^3}{3!}+ tfrac{x^5}{5!} + tfrac{x^7}{7!}+ cdots$$ as the Standard Power Series. This series takes a very long time to run. Can it be written without using the exponentials divided by a huge factorial. The example functions in Is there a way to get trig functions without a calculator? using the "Tailored Taylor" series representation for sin and cosine are very fast and give the same answers. I want to use it within my calculator program.
Thank you very much.
sequences-and-series trigonometry
New contributor
$endgroup$
add a comment |
$begingroup$
Using $$ sinh x = x + tfrac{x^3}{3!}+ tfrac{x^5}{5!} + tfrac{x^7}{7!}+ cdots$$ as the Standard Power Series. This series takes a very long time to run. Can it be written without using the exponentials divided by a huge factorial. The example functions in Is there a way to get trig functions without a calculator? using the "Tailored Taylor" series representation for sin and cosine are very fast and give the same answers. I want to use it within my calculator program.
Thank you very much.
sequences-and-series trigonometry
New contributor
$endgroup$
add a comment |
$begingroup$
Using $$ sinh x = x + tfrac{x^3}{3!}+ tfrac{x^5}{5!} + tfrac{x^7}{7!}+ cdots$$ as the Standard Power Series. This series takes a very long time to run. Can it be written without using the exponentials divided by a huge factorial. The example functions in Is there a way to get trig functions without a calculator? using the "Tailored Taylor" series representation for sin and cosine are very fast and give the same answers. I want to use it within my calculator program.
Thank you very much.
sequences-and-series trigonometry
New contributor
$endgroup$
Using $$ sinh x = x + tfrac{x^3}{3!}+ tfrac{x^5}{5!} + tfrac{x^7}{7!}+ cdots$$ as the Standard Power Series. This series takes a very long time to run. Can it be written without using the exponentials divided by a huge factorial. The example functions in Is there a way to get trig functions without a calculator? using the "Tailored Taylor" series representation for sin and cosine are very fast and give the same answers. I want to use it within my calculator program.
Thank you very much.
sequences-and-series trigonometry
sequences-and-series trigonometry
New contributor
New contributor
edited 2 hours ago
MPW
30.5k12157
30.5k12157
New contributor
asked 3 hours ago
Bill BollingerBill Bollinger
312
312
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Note that $$sinh x=frac{e^x-e^{-x}}2$$
So all you need is a fast way to calculate the exponential $e^x$. You can use the regular Taylor series, but that's slow. So you can use the definition $$e^x=lim_{ntoinfty}left(1+frac xnright)^n$$
For calculation purposes, use $n$ as a power of $2$, $n=2^k$. You calculate first $y=1+frac x{2^k}$, then you repeat the $y=ycdot y$ operation $k$ times. I've got the idea about calculating the fast exponential from this article.
$endgroup$
add a comment |
$begingroup$
Let me consider the problem from a computing point of view assumin that you do not know how to compute $e^x$.
The infinite series is
$$sinh(x)=sum_{n=0}^infty frac{x^{2n+1}}{(2n+1)!}$$ If you compute each term independently of the other, for sure, it is expensive since you have to compute each power of $x$ as well as each factorial.
But suppose that you write instead
$$sinh(x)=sum_{n=0}^infty T_n qquad text{where} qquad T_n=frac{x^{2n+1}}{(2n+1)!}qquad text{and} qquad T_0=x$$ then
$$T_{n+1}= frac {t,, T_n}{(2n+2)(2n+3)}qquad text{where} qquad t=x^2$$ This would be much less expensive in terms of basic operations.
You could use the same trick for most functions expressed as infinite series.
$endgroup$
add a comment |
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
});
}
});
Bill Bollinger is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3137004%2fcalculating-hyperbolic-sin-faster-than-using-a-standard-power-series%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
$begingroup$
Note that $$sinh x=frac{e^x-e^{-x}}2$$
So all you need is a fast way to calculate the exponential $e^x$. You can use the regular Taylor series, but that's slow. So you can use the definition $$e^x=lim_{ntoinfty}left(1+frac xnright)^n$$
For calculation purposes, use $n$ as a power of $2$, $n=2^k$. You calculate first $y=1+frac x{2^k}$, then you repeat the $y=ycdot y$ operation $k$ times. I've got the idea about calculating the fast exponential from this article.
$endgroup$
add a comment |
$begingroup$
Note that $$sinh x=frac{e^x-e^{-x}}2$$
So all you need is a fast way to calculate the exponential $e^x$. You can use the regular Taylor series, but that's slow. So you can use the definition $$e^x=lim_{ntoinfty}left(1+frac xnright)^n$$
For calculation purposes, use $n$ as a power of $2$, $n=2^k$. You calculate first $y=1+frac x{2^k}$, then you repeat the $y=ycdot y$ operation $k$ times. I've got the idea about calculating the fast exponential from this article.
$endgroup$
add a comment |
$begingroup$
Note that $$sinh x=frac{e^x-e^{-x}}2$$
So all you need is a fast way to calculate the exponential $e^x$. You can use the regular Taylor series, but that's slow. So you can use the definition $$e^x=lim_{ntoinfty}left(1+frac xnright)^n$$
For calculation purposes, use $n$ as a power of $2$, $n=2^k$. You calculate first $y=1+frac x{2^k}$, then you repeat the $y=ycdot y$ operation $k$ times. I've got the idea about calculating the fast exponential from this article.
$endgroup$
Note that $$sinh x=frac{e^x-e^{-x}}2$$
So all you need is a fast way to calculate the exponential $e^x$. You can use the regular Taylor series, but that's slow. So you can use the definition $$e^x=lim_{ntoinfty}left(1+frac xnright)^n$$
For calculation purposes, use $n$ as a power of $2$, $n=2^k$. You calculate first $y=1+frac x{2^k}$, then you repeat the $y=ycdot y$ operation $k$ times. I've got the idea about calculating the fast exponential from this article.
answered 2 hours ago
AndreiAndrei
12.7k21128
12.7k21128
add a comment |
add a comment |
$begingroup$
Let me consider the problem from a computing point of view assumin that you do not know how to compute $e^x$.
The infinite series is
$$sinh(x)=sum_{n=0}^infty frac{x^{2n+1}}{(2n+1)!}$$ If you compute each term independently of the other, for sure, it is expensive since you have to compute each power of $x$ as well as each factorial.
But suppose that you write instead
$$sinh(x)=sum_{n=0}^infty T_n qquad text{where} qquad T_n=frac{x^{2n+1}}{(2n+1)!}qquad text{and} qquad T_0=x$$ then
$$T_{n+1}= frac {t,, T_n}{(2n+2)(2n+3)}qquad text{where} qquad t=x^2$$ This would be much less expensive in terms of basic operations.
You could use the same trick for most functions expressed as infinite series.
$endgroup$
add a comment |
$begingroup$
Let me consider the problem from a computing point of view assumin that you do not know how to compute $e^x$.
The infinite series is
$$sinh(x)=sum_{n=0}^infty frac{x^{2n+1}}{(2n+1)!}$$ If you compute each term independently of the other, for sure, it is expensive since you have to compute each power of $x$ as well as each factorial.
But suppose that you write instead
$$sinh(x)=sum_{n=0}^infty T_n qquad text{where} qquad T_n=frac{x^{2n+1}}{(2n+1)!}qquad text{and} qquad T_0=x$$ then
$$T_{n+1}= frac {t,, T_n}{(2n+2)(2n+3)}qquad text{where} qquad t=x^2$$ This would be much less expensive in terms of basic operations.
You could use the same trick for most functions expressed as infinite series.
$endgroup$
add a comment |
$begingroup$
Let me consider the problem from a computing point of view assumin that you do not know how to compute $e^x$.
The infinite series is
$$sinh(x)=sum_{n=0}^infty frac{x^{2n+1}}{(2n+1)!}$$ If you compute each term independently of the other, for sure, it is expensive since you have to compute each power of $x$ as well as each factorial.
But suppose that you write instead
$$sinh(x)=sum_{n=0}^infty T_n qquad text{where} qquad T_n=frac{x^{2n+1}}{(2n+1)!}qquad text{and} qquad T_0=x$$ then
$$T_{n+1}= frac {t,, T_n}{(2n+2)(2n+3)}qquad text{where} qquad t=x^2$$ This would be much less expensive in terms of basic operations.
You could use the same trick for most functions expressed as infinite series.
$endgroup$
Let me consider the problem from a computing point of view assumin that you do not know how to compute $e^x$.
The infinite series is
$$sinh(x)=sum_{n=0}^infty frac{x^{2n+1}}{(2n+1)!}$$ If you compute each term independently of the other, for sure, it is expensive since you have to compute each power of $x$ as well as each factorial.
But suppose that you write instead
$$sinh(x)=sum_{n=0}^infty T_n qquad text{where} qquad T_n=frac{x^{2n+1}}{(2n+1)!}qquad text{and} qquad T_0=x$$ then
$$T_{n+1}= frac {t,, T_n}{(2n+2)(2n+3)}qquad text{where} qquad t=x^2$$ This would be much less expensive in terms of basic operations.
You could use the same trick for most functions expressed as infinite series.
answered 7 mins ago
Claude LeiboviciClaude Leibovici
123k1157135
123k1157135
add a comment |
add a comment |
Bill Bollinger is a new contributor. Be nice, and check out our Code of Conduct.
Bill Bollinger is a new contributor. Be nice, and check out our Code of Conduct.
Bill Bollinger is a new contributor. Be nice, and check out our Code of Conduct.
Bill Bollinger is a new contributor. Be nice, and check out our Code of Conduct.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3137004%2fcalculating-hyperbolic-sin-faster-than-using-a-standard-power-series%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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