Re: Decimal Place Limiting
Re: Decimal Place Limiting
- Subject: Re: Decimal Place Limiting
- From: Michelle Steiner <email@hidden>
- Date: Tue, 1 Apr 2008 15:41:15 -0700
On Apr 1, 2008, at 2:20 PM, John Amerkhanian wrote: I wrote a small script to solve quadratic equations and it works fine until I start putting in larger numbers. I first noticed this when I put in 2, 4, 3 for a, b, c and I realized this was because my variable top1 has too many decimal places. How can I limit its decimal places to say... four?
I don't think that was the problem.
4 * 4 = 16 4 * 2 * 3 = 24 16 - 24 = -8
The next line attempts to take the square root of -8, and that's where the script errors because it can't handle imaginary numbers.
The error message, "The result of a numeric operation was too large." is incorrect.
-- Michelle
-- We learn from history that we do not learn anything from history. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden