• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Decimal Place Limiting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Decimal Place Limiting (From: John Amerkhanian <email@hidden>)

  • Prev by Date: re: launching firefox
  • Next by Date: Re: Decimal Place Limiting
  • Previous by thread: Decimal Place Limiting
  • Next by thread: Re: Decimal Place Limiting
  • Index(es):
    • Date
    • Thread