01-21-2016 06:56 AM
Hi, I'm quite new in labview and I'm doing some personal projects and I would like to know which is the best way to calculate the e number depending on the presition desired, with this formula e = (1+1/n)^n, and show result as it has been defined with precision.
Many thanks
01-21-2016 07:03 AM
Have you looked in the maths palette? From here you can implement any mathematical expression/equation.
I suggest you take a look at some of the free LabVIEW tutorials.
You can change the displayed precision of the number by right clicking on the control/indicator, right clicking on it and selecting 'display format'.
01-21-2016 08:10 AM
Hi nayobi,
in addition to Sam's comment: there also is a "mathematics" function palette with a power function.
And you should also learn the basic about precision of float calculations. Wikipedia has articles on that topic…
01-21-2016 08:16 AM - edited 01-21-2016 08:35 AM
Thanks for both answers, I've tried with Formula Node and I added the code:
int i;
float e[10];
for (i=0;i<10;i++)
e[i]= ((1+1/n[i])**(n[i]));
with proper input/output, and it works!
Thank you,
Nayobi
01-21-2016 08:52 AM