09-09-2014 12:46 PM
I'm trying to input the taylor series for a sin(x) in LV, and my answers come out differntly, is there is way to modify the precision on this, i tried doing single precision but solutions do not come out correctly
thank you
09-09-2014 12:57 PM
A taylor series is an approximation that gets better with the number of terms.
Why do you think you can improve accuracy by going from DBL to SGL? That makes no sense!
As a first step, make the code scalable so the number of terms is adjustable. You should also wrap the input into the range of one turn.
Here is one of my old implementations. Maybe it can give you some ideas. (originally posted here)
If you are only interested in very few digits, you can change the display format of the indicators.
09-09-2014 01:05 PM
Most applications use a DBL, which is more accurate than a SGL (Double Precision Floating Point vs a Single Precision Floating Point). You could go to the EXT (Extended Precision Floating Point), but that won't help you that much. A Taylor Series will only get you the right answer when you go to infinite number of points in the series.