---- Keith McGee <kpmc...@frontiernet.net> wrote: > > >http://cflib.org/udf/scientificFormat > > > > > >On Fri, Jul 12, 2013 at 8:41 AM, Keith McGee <kpmc...@frontiernet.net>wrote: > > > >> > > This didn't help, Thanks for the link though.
The last time I had to deal with significant figures was in Pascal or Fortran. My approach was to write a procedure that would take the real value and the number of significant figures. I would multiply by 10*sigfigs, truncate, then create the string representing the decimal value. I would test the number of values from the decimal point and pad with 0s if needed. All I needed was the resulting text sort of like a Hollerith in Fortran. It has been 25+ years ago, but I think that's what I did. Note that real numbers are stored in logarithmic format so you need to pass strings after you convert. It gets complicated if you need to have the real value back so you can do math. I remember having code that would do basic math functions (+-*/) on two string values of numbers and calculate the proper number of sig figs when the two numbers had varying significant figures (i.e., "1.89325 * 10.1". That was freaky. There could be a Java package somewhere you could use, but I don't know of one. -- LinkedIn: http://www.linkedin.com/pub/roger-austin/8/a4/60 Twitter: http://twitter.com/RogerTheGeek Blog: http://RogerTheGeek.wordpress.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356190 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm