I neglected to ask: You did not mention what you would like done to a number with less than six decimal places. Do you want them padded with zeroes?
I was in too much of a hurry to be the one helping someone else, rather than asking for help, that I fired this script right off as soon as I could test it. ;o) Shawn shawn_milochik@god ivachoc.com To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] 10/22/2002 02:41 bcc: PM Subject: Re: truncation of decimal places. Perhaps this is really clumsy, but maybe this will help. If not, the others on the list will fix us right up. until (length($a) - index($a, '.') < 8){ $a = substr($a, 0, (length($a)-1)) } Shawn prabhakn77@yahoo .com To: [EMAIL PROTECTED] cc: 10/22/2002 02:15 bcc: PM Subject: truncation of decimal places. Hi, I have a really simple question.I have two numbers say $a = 1.559999 $b=1.5599999999 how do I compare them to exactly 6 decimals without doing a round off.I used sprintf but it does a round off. thank you. --------------------------------- Do you Yahoo!? Y! Web Hosting - Let the expert host your web site ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]