Aero Fractions 2.0.4
Users Guide
A Plug-in for FileMaker Pro
from Mouken, L.C.

Contents:

Function Reference:

Fractions:

Factoring: Other Calculations: Informational:

Introduction

Aero Fractions 2.0.4 is an external function plug-in 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("Fact-Factorial", "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("Fact-Factorial", 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("Fact-Multiply", "3/4,2/3")

Or to multiply numbers (which may be fractions or decimal numbers) from two fields, use this formula:

External("Fact-Multiply", 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("Fact-Multiply", first_number & "," & second_number) will pass "2.5,3 1/4" to the "Fact-Multiply" 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 upper-right hand corner of the calculation dialog. If Aero Fractions does not appear, go to the Plug-Ins 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 binary--it 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("Fact-Factor", "126") 2 * 3^2 * 7 "2 times 3 squared times 7".
External("Fact-Factor", "-15") -1 * 3 * 5 For negative numbers, the first factor will always be "-1".
External("Fact-Factor", "8.4") 2^3 Values are always rounded to the nearest whole number before factoring.
External("Fact-Factor", "8.5") 3^2 .5 and greater round up. Anything lower rounds down.
External("Fact-Factor", "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 notation--FileMaker 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".

return to top

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("Fact-FactorsToNumber", "2 * 3^2 * 7") 126 "2 times 3 squared times 7".

return to top

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("Fact-IsAFactor", "9,4") 0  
External("Fact-IsAFactor", "8,4") 1  
External("Fact-IsAFactor", "4,8") 0 8 is not a factor of 4--be sure to use the correct order.
External("Fact-IsAFactor", "0,1") 0 Nothing is considered to be a factor of zero, except...
External("Fact-IsAFactor", "0,0") 1 Zero is considered to be a factor of itsself.
External("Fact-IsAFactor", "-8,4") 1 The sign of the numbers does not matter.
External("Fact-IsAFactor", "2.6,1.3") 1 This function does not round the input values before calculating, so it may be used to test whether a non-integer is an even multiple of another.
External("Fact-IsAFactor", "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 notation--FileMaker 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".

return to top

GCF - Greatest Common Factor

This function returns the largest number which is a factor of both of the numbers given.

Formula: Result: Notes:
External("Fact-GCF", "12, 20") 4  
External("Fact-GCF", "-12,-20") 4 The result is always non-negative.
External("Fact-GCF", "5,20") 5  
External("Fact-GCF", "17,5") 1  
External("Fact-GCF", "0,2") 0  
External("Fact-GCF", "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 notation--FileMaker 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".

return to top

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("Fact-CommonFactors", "6,9") 3  
External("Fact-CommonFactors", "200,150") 2 * 5^2  
External("Fact-CommonFactors", "9,25") 1  
External("Fact-CommonFactors", "0,10") 0  
External("Fact-CommonFactors", "-2,10") 2  
External("Fact-CommonFactors", "-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("Fact-Factor", External("Fact-GCF", "-2,-10"))
This formula would return "2".
External("Fact-CommonFactors", "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 notation--FileMaker 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".

return to top

LCM - Least Common Multiple

This function returns the lowest number which is a multiple of both of the numbers given.

Formula: Result: Notes:
External("Fact-LCM", "2,3") 6  
External("Fact-LCM", "2.1,3") 6 All values are rounded to the nearest whole number before processing.
External("Fact-LCM", "4,6") 12  
External("Fact-LCM", "-2,3") -6 If either or both of the numbers are negative, the result will be negative.
External("Fact-LCM", "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 notation--FileMaker 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".

return to top

Numerator

This function returns the numerator of a fraction.

Formula: Result: Notes:
External("Fact-Numerator", "3/2") 3  
External("Fact-Numerator", "2 1/2") 5 "2 1/2" is converted to "5/2".
External("Fact-Numerator", "5") 5 "5" is converted to "5/1".
External("Fact-Numerator", "5.6") 6 Decimal numbers are rounded to the nearest whole number.
External("Fact-Numerator", "3/6") 3 Fractions are NOT reduced.
External("Fact-Numerator", "2.1e+2/5") 210 You can use exponential notation for input.

return to top

Denominator

This function returns the denominator of a fraction.

Formula: Result: Notes:
External("Fact-Denominator", "3/2") 2  
External("Fact-Denominator", "2 1/2") 2  
External("Fact-Denominator", "3") 1 "3" is converted to "3/1".
External("Fact-Denominator", "3/6") 6 Fractions are NOT reduced.
External("Fact-Denominator", "2.1e+2/5") 5 You can use exponential notation for input.

return to top

Add

This function adds two fractions or whole numbers together.

Formula: Result: Notes:
External("Fact-Add", "1/2,2/3") 1 1/6 Outputs as a mixed number by default.
External("Fact-Add", "1/2,2/3,unmixed") 7/6 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-Add", "1 1/4,5/6") 2 1/12 Inputs can be mixed or simple fractions...
External("Fact-Add", "1/2,2") 2 1/2 ...or whole numbers.
External("Fact-Add", "1/2,2.7") 3 1/2 "2.7" is rounded up to "3".
External("Fact-Add", "2.1e+2/5, 1/2") 42 1/2 You can use exponential notation for input.

return to top

Subtract

This function returns the lowest number which could be used as the denomonator in both fractions given.

Formula: Result: Notes:
External("Fact-Subtract", "5/2,2/3") 1 5/6 Outputs as a mixed number by default.
External("Fact-Subtract", "5/2,2/3,unmixed") 11/6 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-Subtract", "1 1/4,5/6") 5/12 Inputs can be mixed or simple fractions...
External("Fact-Subtract", "1/2,2") -1 1/2 ...or whole numbers.
External("Fact-Subtract", "1/2,2.7") -2 1/2 "2.7" is rounded up to "3".
External("Fact-Subtract", "2.1e+2/5, 1/2") 41 1/2 You can use exponential notation for input.

return to top

Multiply

This function multiplies two fractions or whole numbers.

Formula: Result: Notes:
External("Fact-Multiply", "4/5,7/3") 1 13/15 Outputs as a mixed number by default.
External("Fact-Multiply", "4/5,7/3,unmixed") 28/15 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-Multiply", "1 1/4,5/6") 1 1/24 Inputs can be mixed or simple fractions...
External("Fact-Multiply", "1/2,3") 1 1/2 ...or whole numbers.
External("Fact-Multiply", "1/2,3.7") 2 "3.7" is rounded up to "4".
External("Fact-Multiply", "2.1e+2/5, 1/2") 21 You can use exponential notation for input.

return to top

Divide

This function divides one fraction or whole number by another.

Formula: Result: Notes:
External("Fact-Divide", "4/5,2/3") 1 1/5 Outputs as a mixed number by default.
External("Fact-Divide", "4/5,2/3,unmixed") 6/5 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-Divide", "1 1/4,5/6") 1 1/2 Inputs can be mixed or simple fractions...
External("Fact-Divide", "1/2,3") 1/6 ...or whole numbers.
External("Fact-Divide", "1/2,3.7") 1/8 "3.7" is rounded up to "4".
External("Fact-Divide", "2.1e+2/5, 1/2") 84 You can use exponential notation for input.

return to top

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("Fact-LCD", "1/2,2/3") 6  
External("Fact-LCD", "3/4,5/6") 12  
External("Fact-LCD", "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("Fact-LCD", "1 1/4,5/6") 12 Inputs can be mixed or simple fractions, or even whole numbers.
External("Fact-LCD", "2.1e+2/5, 1/2") 2 You can use exponential notation for input.

return to top

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("Fact-LCDForm", "1/2,2/3") 3/6  
External("Fact-LCDForm", "5/4,5/6") 1 3/12 Outputs as a mixed number by default.
External("Fact-LCDForm", "5/4,5/6,unmixed") 15/12 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-LCDForm", "1 1/4,5/6") 1 3/12 Inputs can be mixed or simple fractions, or even whole numbers.
External("Fact-LCDForm", "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.

return to top

Reduce

This function reduces the given fraction to lowest terms.

Formula: Result: Notes:
External("Fact-Reduce", "2/3") 2/3 It's already in lowest terms.
External("Fact-Reduce", "4/6") 2/3  
External("Fact-Reduce", "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("Fact-Reduce", "22/6") 3 2/3 Outputs as a mixed number by default.
External("Fact-Reduce", "22/6,unmixed") 11/3 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-Reduce", "3 2/3,unmixed") 11/3 This function can be used to convert mixed numbers to simple fractions, or vice versa.
External("Fact-Reduce", "0/10") 0 If the numerator is zero, the result will be zero.
External("Fact-Reduce", "3/-5") -3/5 A minus sign is always moved to the top.
External("Fact-Reduce", "1.2/3") 1/3 All values are rounded to the nearest whole number before processing.
External("Fact-Reduce", "1/0")   If the denominator is zero (the value of the fraction is infinity), nothing is returned.
External("Fact-Reduce", "2.1e+2/5") 42 You can use exponential notation for input.

return to top

ToDecimal

This function converts a fraction to its decimal equivalent with up to 15 digits precision.

Formula: Result: Notes:
External("Fact-ToDecimal", "19/16") 1.1875  
External("Fact-ToDecimal", "1 3/16") 1.1875  
External("Fact-ToDecimal", "2/3") 0.666666666666667 If the result has repeating digits or more than 15 digits, the result gets rounded.
External("Fact-ToDecimal", "2.1e+2/5") 42 You can use exponential notation for input.

return to top

ToFraction

This function converts a decimal number to a fraction.

Formula: Result: Notes:
External("Fact-ToFraction", "1.1875") 1 3/16 Outputs as a mixed number by default.
External("Fact-ToFraction", "1.1875,unmixed") 19/16 Add the optional third parameter, "unmixed", to get a simple fraction.
External("Fact-ToFraction", "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("Fact-ToFraction", "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("Fact-ToFraction", "3.14159,0.001") 3 9/64 A smaller precision value will yield a more precise, but less "friendly" fraction.
External("Fact-ToFraction", "1.234e+1") 12 17/50 You can use exponential notation for input.

return to top

Factorial

This function returns the factorial of the number supplied, where n factorial = 1 * 2 * 3 * ... * n.

Formula: Result: Notes:
External("Fact-Factorial", "5") 120 1 * 2 * 3 * 4 * 5 = 120
External("Fact-Factorial", "5.8") 720 1 * 2 * 3 * 4 * 5 * 6 = 720--The given number is rounded to the nearest whole number before processing.
External("Fact-Factorial", "0") 0  
External("Fact-Factorial", "-3") 0  
External("Fact-Factorial", "2000") Inf Infinity--Factorials get huge very quickly. This number is too large for the computer to handle.
External("Fact-Factorial", "1.1e+2") 1.588245541522742e+178 You can use exponential notation for input.

return to top

Version

This function displays the version string for the Aero Fractions plug-in.

Formula: Result: Notes:
External("Fact-Version", "") Aero Fractions 2.0.4 The second parameter is ignored.

return to top

Help

This function returns a brief description and example for the Aero Fractions function named.

Formula: Result: Notes:
External("Fact-Help", "Reduce") Reduce: Reduces the fraction supplied to lowest terms.
External("Fact-Reduce", "10/-25") = "-2/5"
 
External("Fact-Help", "Goose") Help: Shows a description of, syntax for, and example of the specified function.
External("Fact-Help", "LCDForm") shows help for the function "Fact-LCDForm".
If the second parameter is not the name of an AeroFractions function, the result is the help for the "Help" function itsself.

return to top

About

This function displays the "About Box" dialog box for the Aero Fractions plug-in.

Formula: Result: Notes:
External("Fact-About", "")   No value is returned, but a dialog box is displayed. The second parameter is ignored.

return to top


FileMaker Pro Plug-ins and Solutions | Mouken, L.C. Home Page

© 2001 Mouken, L.C.