November 2003
Beginner to intermediate
480 pages
15h 3m
English
^ — exponentiation
number1 ^ number2
Raises the first number to the power of the second. The result is a real.
Do not blame AppleScript for the phenomena inherent in doing floating-point arithmetic in any language on any computer. It is the nature of computer numerics that most values can only be approximated. Modern processors are extraordinarily clever about compensating, but rounding operations can easily expose the truth:
2.32 * 100.0 div 1 -- 231Similarly, there may be situations where instead of comparing two values for absolute equality you will do better to test whether the difference between them lies within some acceptable small epsilon.
Read now
Unlock full access