Hi all,
I need to write a script that will round a figure to the next highest number at a defined number of significant figures
examples of what I am looking for are:
0.0215 gives .022
0.215 gives 0.22
2.15 gives 2.2
21.5 gives 22
215.00 gives 220
2150.0 gives 2200
2149.0 gives 2200
21500.00 gives 22000
I am completely stumped with this.
If you can help I would really appreciate it.
Thank you in advance.
AM
I need to write a script that will round a figure to the next highest number at a defined number of significant figures
examples of what I am looking for are:
0.0215 gives .022
0.215 gives 0.22
2.15 gives 2.2
21.5 gives 22
215.00 gives 220
2150.0 gives 2200
2149.0 gives 2200
21500.00 gives 22000
I am completely stumped with this.
If you can help I would really appreciate it.
Thank you in advance.
AM