LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to obtain e number (labview)

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

0 Kudos
Message 1 of 5
(5,458 Views)

Have you looked in the maths palette? From here you can implement any mathematical expression/equation.

2016-01-21_13-01-28.png

 

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'.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(5,455 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(5,404 Views)

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

0 Kudos
Message 4 of 5
(5,395 Views)

Hi Nayobi,

 

why don't you use "real" LabVIEW functions?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(5,378 Views)