Quantcast
Channel: PTC Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 11410

Normalize (remove leading zeros) and then truncate?

$
0
0

Hello!

 

I am a student, and I am working on a homework problem that I can't quite solve.  I need to:

 

"Write a subroutine or function which will truncate a variable X to D decimal places after normalization.  For example:

 

D = 3, X=0.0069347 

 

Should be returned as:

 

X = 0.00693

 

"

 

Can someone help me write a program to do this?  I don't typically write programs in MathCAD, and i really don't know where to start.

 

PS: X can be any number, not just 0.0069347. 


Viewing all articles
Browse latest Browse all 11410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>