Fundamental question: How does MATLAB calculate the sine function?
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ronald LaFleur
am 15 Mär. 2017
Kommentiert: Ronald LaFleur
am 15 Mär. 2017
Since it is a built-in function there is little information provided and many online Q/A's have to do with using the sine function for particular applications not the fundamental code-level evaluation of the function.
I imagine the modulo function is used to convert a wide range of angles to the 0:2*pi or -pi:pi range prior to sine function mathematics.
If a series expansion is used, what is the highest order term used? If a look-up table is used, what is the number of table entries within the above range?
These questions come up in our discussion of error propagation of functions.
Thank you, Ron LaFleur, Clarkson University
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
James Tursa
am 15 Mär. 2017
MATLAB doesn't publish all of their function algorithms, but I would guess it would be range reduction followed by a rational function approximation rather than a series expansion. The range reduction is not trivial. E.g., see this link:
https://www.mathworks.com/matlabcentral/answers/195965-taylor-series-cosx-function
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!