Aero Fractions 2.0.4
Users Guide A Plugin for FileMaker Pro from Mouken, L.C. 
Contents:
Function Reference:Fractions:
Introduction 
Aero Fractions 2.0.4 is an external function plugin for FileMaker Pro. With Aero Fractions installed, a number of new calculation functions become available in FileMaker Pro calculation fields and ScriptMaker scripts.
The functions provided by Aero Fractions are called using FileMaker Pro's "External" function with the first parameter being "Fact" followed by the name of the function. For example, to calculate 5! ("5 factorial"), you could enter the following formula into a calculation field or script:
External("FactFactorial", "5")
You may, of course, also use fields for the second parameter. For example, this forumula would calculate the factorial of the number in a field named "some_number_field":
External("FactFactorial", some_number_field)
In cases where a function requires more than one parameter, parameters are separated by commas. For example, to multiply 3/4 by 2/3, use this formula:
External("FactMultiply", "3/4,2/3")
Or to multiply numbers (which may be fractions or decimal numbers) from two fields, use this formula:
External("FactMultiply", first_number & "," & second_number)
Notice how & "," & appears between the field names. The ampersand (&) is FileMaker's symbol for connecting things together. If the value in "first_number" is 2.5, and the value in second_number is 3 1/4, the formula External("FactMultiply", first_number & "," & second_number) will pass "2.5,3 1/4" to the "FactMultiply" function, and the result will be "8 1/8".
See below for descriptions and usage examples of each of the functions provided by Aero Fractions.
Installation 
Before Aero Fractions may be used, it must be moved to the "FileMaker Extensions" folder (Macintosh) or the "SYSTEM" folder (Windows) located in the FileMaker Pro folder. After placing Aero Fractions in the correct location, restart FileMaker Pro. Aero Fractions should then be enabled, and it's functions should appear in the list shown when "External Functions" is selected from the list at the upperright hand corner of the calculation dialog. If Aero Fractions does not appear, go to the PlugIns panel in Application Preferences, and make sure that AeroFractions is checked.
Software Requirements 
Macintosh: FileMaker Pro 4.0 or higher for Macintosh.
The Macintosh version of Aero Fractions is a fat binaryit will run at native speeds on either a PowerMacintosh or an older "68K" based Macintosh.
Windows: FileMaker Pro 4.0 or higher for Windows and one of: Windows95 or higher, or Windows NT 4.0 or higher.
Factor 
This function finds all of the prime factors for the given number and outputs them in the format:
2^3 * 5 * 11^2
(2 cubed times 5 times 11 squared).
Formula:  Result:  Notes: 
External("FactFactor", "126") 
2 * 3^2 * 7  "2 times 3 squared times 7". 
External("FactFactor", "15") 
1 * 3 * 5  For negative numbers, the first factor will always be "1". 
External("FactFactor", "8.4") 
2^3  Values are always rounded to the nearest whole number before factoring. 
External("FactFactor", "8.5") 
3^2  .5 and greater round up. Anything lower rounds down. 
External("FactFactor", "1.2e+2") 
2^3 * 3 * 5  You can use exponential notation for input. Important: If you are taking input from a number field, do not use exponential notationFileMaker removes the "e+" before passing the number to Aero Fractions, so the number in this example would become "1.22", and the result would be "1". 
FactorsToNumber 
This function is the reverse of the Factor function: it takes a list of factors in the format:
2^3 * 5 * 11^2
and calculates a number.
Formula:  Result:  Notes: 
External("FactFactorsToNumber", "2 * 3^2 * 7") 
126  "2 times 3 squared times 7". 
IsAFactor 
This function determines whether the second number given is a factor of the first number given. It returns 1 for yes, 0 for no. Note that this is the only function provided by Aero Fractions which does not round to the nearest whole number before executing. Therefore, it may be more correct to say that it determines whether the first number divided by the second number has a whole number result.
Formula:  Result:  Notes: 
External("FactIsAFactor", "9,4") 
0  
External("FactIsAFactor", "8,4") 
1  
External("FactIsAFactor", "4,8") 
0  8 is not a factor of 4be sure to use the correct order. 
External("FactIsAFactor", "0,1") 
0  Nothing is considered to be a factor of zero, except... 
External("FactIsAFactor", "0,0") 
1  Zero is considered to be a factor of itsself. 
External("FactIsAFactor", "8,4") 
1  The sign of the numbers does not matter. 
External("FactIsAFactor", "2.6,1.3") 
1  This function does not round the input values before calculating, so it may be used to test whether a noninteger is an even multiple of another. 
External("FactIsAFactor", "2.1e+2,5") 
1  You can use exponential notation for input. Important: If you are taking input from a number field, do not use exponential notationFileMaker removes the "e+" before passing the number to Aero Fractions, so "2.1e+2" in this example would become "2.12", and the result would be "0". 
GCF  Greatest Common Factor 
This function returns the largest number which is a factor of both of the numbers given.
Formula:  Result:  Notes: 
External("FactGCF", "12, 20") 
4  
External("FactGCF", "12,20") 
4  The result is always nonnegative. 
External("FactGCF", "5,20") 
5  
External("FactGCF", "17,5") 
1  
External("FactGCF", "0,2") 
0  
External("FactGCF", "2.1e+2,5") 
5  You can use exponential notation for input. Important: If you are taking input from a number field, do not use exponential notationFileMaker removes the "e+" before passing the number to Aero Fractions, so "2.1e+2" in this example would become "2.12", and the result would be "1". 
CommonFactors 
This function returns a list of the common factors of the two number given in the format:
2^3 * 5 * 11^2
(2 cubed times 5 times 11 squared).
Formula:  Result:  Notes: 
External("FactCommonFactors", "6,9") 
3  
External("FactCommonFactors", "200,150") 
2 * 5^2  
External("FactCommonFactors", "9,25") 
1  
External("FactCommonFactors", "0,10") 
0  
External("FactCommonFactors", "2,10") 
2  
External("FactCommonFactors", "2,10") 
1 * 2  If both of the numbers are negative, the first common factor will be "1".
If you prefer not to include the 1, you may take advantage of the fact that the GCF function always returns a positive value and use a formula like the following:
External("FactFactor", External("FactGCF", "2,10"))
This formula would return "2". 
External("FactCommonFactors", "2.1e+2,5") 
5  You can use exponential notation for input. Important: If you are taking input from a number field, do not use exponential notationFileMaker removes the "e+" before passing the number to Aero Fractions, so "2.1e+2" in this example would become "2.12", and the result would be "1". 
LCM  Least Common Multiple 
This function returns the lowest number which is a multiple of both of the numbers given.
Formula:  Result:  Notes: 
External("FactLCM", "2,3") 
6  
External("FactLCM", "2.1,3") 
6  All values are rounded to the nearest whole number before processing. 
External("FactLCM", "4,6") 
12  
External("FactLCM", "2,3") 
6  If either or both of the numbers are negative, the result will be negative. 
External("FactLCM", "2.1e+2,5") 
210  You can use exponential notation for input. Important: If you are taking input from a number field, do not use exponential notationFileMaker removes the "e+" before passing the number to Aero Fractions, so "2.1e+2" in this example would become "2.12", and the result would be "10". 
Numerator 
This function returns the numerator of a fraction.
Formula:  Result:  Notes: 
External("FactNumerator", "3/2") 
3  
External("FactNumerator", "2 1/2") 
5  "2 1/2" is converted to "5/2". 
External("FactNumerator", "5") 
5  "5" is converted to "5/1". 
External("FactNumerator", "5.6") 
6  Decimal numbers are rounded to the nearest whole number. 
External("FactNumerator", "3/6") 
3  Fractions are NOT reduced. 
External("FactNumerator", "2.1e+2/5") 
210  You can use exponential notation for input. 
Denominator 
This function returns the denominator of a fraction.
Formula:  Result:  Notes: 
External("FactDenominator", "3/2") 
2  
External("FactDenominator", "2 1/2") 
2  
External("FactDenominator", "3") 
1  "3" is converted to "3/1". 
External("FactDenominator", "3/6") 
6  Fractions are NOT reduced. 
External("FactDenominator", "2.1e+2/5") 
5  You can use exponential notation for input. 
Add 
This function adds two fractions or whole numbers together.
Formula:  Result:  Notes: 
External("FactAdd", "1/2,2/3") 
1 1/6  Outputs as a mixed number by default. 
External("FactAdd", "1/2,2/3,unmixed") 
7/6  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactAdd", "1 1/4,5/6") 
2 1/12  Inputs can be mixed or simple fractions... 
External("FactAdd", "1/2,2") 
2 1/2  ...or whole numbers. 
External("FactAdd", "1/2,2.7") 
3 1/2  "2.7" is rounded up to "3". 
External("FactAdd", "2.1e+2/5, 1/2") 
42 1/2  You can use exponential notation for input. 
Subtract 
This function returns the lowest number which could be used as the denomonator in both fractions given.
Formula:  Result:  Notes: 
External("FactSubtract", "5/2,2/3") 
1 5/6  Outputs as a mixed number by default. 
External("FactSubtract", "5/2,2/3,unmixed") 
11/6  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactSubtract", "1 1/4,5/6") 
5/12  Inputs can be mixed or simple fractions... 
External("FactSubtract", "1/2,2") 
1 1/2  ...or whole numbers. 
External("FactSubtract", "1/2,2.7") 
2 1/2  "2.7" is rounded up to "3". 
External("FactSubtract", "2.1e+2/5, 1/2") 
41 1/2  You can use exponential notation for input. 
Multiply 
This function multiplies two fractions or whole numbers.
Formula:  Result:  Notes: 
External("FactMultiply", "4/5,7/3") 
1 13/15  Outputs as a mixed number by default. 
External("FactMultiply", "4/5,7/3,unmixed") 
28/15  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactMultiply", "1 1/4,5/6") 
1 1/24  Inputs can be mixed or simple fractions... 
External("FactMultiply", "1/2,3") 
1 1/2  ...or whole numbers. 
External("FactMultiply", "1/2,3.7") 
2  "3.7" is rounded up to "4". 
External("FactMultiply", "2.1e+2/5, 1/2") 
21  You can use exponential notation for input. 
Divide 
This function divides one fraction or whole number by another.
Formula:  Result:  Notes: 
External("FactDivide", "4/5,2/3") 
1 1/5  Outputs as a mixed number by default. 
External("FactDivide", "4/5,2/3,unmixed") 
6/5  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactDivide", "1 1/4,5/6") 
1 1/2  Inputs can be mixed or simple fractions... 
External("FactDivide", "1/2,3") 
1/6  ...or whole numbers. 
External("FactDivide", "1/2,3.7") 
1/8  "3.7" is rounded up to "4". 
External("FactDivide", "2.1e+2/5, 1/2") 
84  You can use exponential notation for input. 
LCD  Least Common Denominator 
This function returns the lowest number which could be used as the denomonator in both fractions given.
Formula:  Result:  Notes: 
External("FactLCD", "1/2,2/3") 
6  
External("FactLCD", "3/4,5/6") 
12  
External("FactLCD", "2/4,5/6") 
6  Note the difference between this and the previous example. Both fractions are reduced to lowest terms before calculating the LCD. 
External("FactLCD", "1 1/4,5/6") 
12  Inputs can be mixed or simple fractions, or even whole numbers. 
External("FactLCD", "2.1e+2/5, 1/2") 
2  You can use exponential notation for input. 
LCDForm  Least Common Denominator Form 
This function returns the first of two given fractions in the form using the least common denominator for the two fractions.
Formula:  Result:  Notes: 
External("FactLCDForm", "1/2,2/3") 
3/6  
External("FactLCDForm", "5/4,5/6") 
1 3/12  Outputs as a mixed number by default. 
External("FactLCDForm", "5/4,5/6,unmixed") 
15/12  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactLCDForm", "1 1/4,5/6") 
1 3/12  Inputs can be mixed or simple fractions, or even whole numbers. 
External("FactLCDForm", "2.1e+2/5, 1/2") 
42 0/2  You can use exponential notation for input. Also note how, even if the result is a whole number, a mixed fraction is returned if "unmixed" is not specified. 
Reduce 
This function reduces the given fraction to lowest terms.
Formula:  Result:  Notes: 
External("FactReduce", "2/3") 
2/3  It's already in lowest terms. 
External("FactReduce", "4/6") 
2/3  
External("FactReduce", "10/5") 
2  If the denominator of the result is 1, the result will be returned as a whole number rather than a fraction. 
External("FactReduce", "22/6") 
3 2/3  Outputs as a mixed number by default. 
External("FactReduce", "22/6,unmixed") 
11/3  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactReduce", "3 2/3,unmixed") 
11/3  This function can be used to convert mixed numbers to simple fractions, or vice versa. 
External("FactReduce", "0/10") 
0  If the numerator is zero, the result will be zero. 
External("FactReduce", "3/5") 
3/5  A minus sign is always moved to the top. 
External("FactReduce", "1.2/3") 
1/3  All values are rounded to the nearest whole number before processing. 
External("FactReduce", "1/0") 
If the denominator is zero (the value of the fraction is infinity), nothing is returned.  
External("FactReduce", "2.1e+2/5") 
42  You can use exponential notation for input. 
ToDecimal 
This function converts a fraction to its decimal equivalent with up to 15 digits precision.
Formula:  Result:  Notes: 
External("FactToDecimal", "19/16") 
1.1875  
External("FactToDecimal", "1 3/16") 
1.1875  
External("FactToDecimal", "2/3") 
0.666666666666667  If the result has repeating digits or more than 15 digits, the result gets rounded. 
External("FactToDecimal", "2.1e+2/5") 
42  You can use exponential notation for input. 
ToFraction 
This function converts a decimal number to a fraction.
Formula:  Result:  Notes: 
External("FactToFraction", "1.1875") 
1 3/16  Outputs as a mixed number by default. 
External("FactToFraction", "1.1875,unmixed") 
19/16  Add the optional third parameter, "unmixed", to get a simple fraction. 
External("FactToFraction", "0.66666666666667") 
66666666666667/100000000000000  By default, the result is precise: no attempt is made to find a "nicer looking fraction" with close to the same value. (In this case, 2/3). 
External("FactToFraction", "3.14159,0.002,unmixed") 
22/7  By specifying a precision value as the second parameter, you may obtain an approximate fraction, accurate to whatever degree you wish. 
External("FactToFraction", "3.14159,0.001") 
3 9/64  A smaller precision value will yield a more precise, but less "friendly" fraction. 
External("FactToFraction", "1.234e+1") 
12 17/50  You can use exponential notation for input. 
Factorial 
This function returns the factorial of the number supplied, where n factorial = 1 * 2 * 3 * ... * n.
Formula:  Result:  Notes: 
External("FactFactorial", "5") 
120  1 * 2 * 3 * 4 * 5 = 120 
External("FactFactorial", "5.8") 
720  1 * 2 * 3 * 4 * 5 * 6 = 720The given number is rounded to the nearest whole number before processing. 
External("FactFactorial", "0") 
0  
External("FactFactorial", "3") 
0  
External("FactFactorial", "2000") 
Inf  InfinityFactorials get huge very quickly. This number is too large for the computer to handle. 
External("FactFactorial", "1.1e+2") 
1.588245541522742e+178  You can use exponential notation for input. 
Version 
This function displays the version string for the Aero Fractions plugin.
Formula:  Result:  Notes: 
External("FactVersion", "") 
Aero Fractions 2.0.4  The second parameter is ignored. 
Help 
This function returns a brief description and example for the Aero Fractions function named.
Formula:  Result:  Notes: 
External("FactHelp", "Reduce") 
Reduce: Reduces the fraction supplied to lowest terms.
External("FactReduce", "10/25") = "2/5" 

External("FactHelp", "Goose") 
Help: Shows a description of, syntax for, and example of the specified function.
External("FactHelp", "LCDForm") shows help for the function "FactLCDForm". 
If the second parameter is not the name of an AeroFractions function, the result is the help for the "Help" function itsself. 
About 
This function displays the "About Box" dialog box for the Aero Fractions plugin.
Formula:  Result:  Notes: 
External("FactAbout", "") 
No value is returned, but a dialog box is displayed. The second parameter is ignored. 
© 2001 Mouken, L.C.