Re: Scientific notation
Re: Scientific notation
- Subject: Re: Scientific notation
- From: John Delacour <email@hidden>
- Date: Fri, 2 May 2003 18:29:17 +0100
- Mac-eudora-version: 6.0a16
At 8:24 pm -0400 1/5/03, Steve Roy wrote:
In a script, I'm getting small real numbers such as 3.0E-4. When I
turn them to
string, I would like them to appear in normal notation "0.0003" instead of
"3.0E-4". Is that possible?
It depends how small your number is. Using perl, the limit is
1/10000 before it switches to scientific, and there's almost
certainly a simple trick to go beyond that, which no doubt someone
else knows.
set numb to 1 / 9999.9
set n to "1 / 9999.9"
set np to do shell script "perl -e 'print " & n & "'"
{numb, np}
--> {1.0000100001E-4, "0.00010000100001"}
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.