# Unit Conversion

Unit conversions are a common task in solving word problems.  AutoMathic recognizes three common ways of doing unit conversions:

AutoMathic can be used as a general-purpose unit-converter.  Many programs do nothing but unit conversion, usually with large, fixed tables of predefined units and their conversion factors...  AutoMathic has the standard definition of many common units in its vocabulary and library, but the user can provide a description for any valid conversion.  For example, few table-based unit converters would let you "convert 55 [mph] into units furlongs per fortnight"!  AutoMathic's general-purpose approach to units makes any valid conversion possible, however unorthodox it may be!

Furthermore, it's flexible unit-handling allows complex problems to specify, use, and convert between compatible units automatically.  This allows the user to work with measurements as given and not have to convert everything to a common set of units before getting started.

(The "Quick-Reference Tips" section revisits these rules and includes a more formal grammar for specifying units)

Statements / Questions

One way to do unit conversions is to have a statement defining a measurement, while asking for the measurement in different units:

• The speed is 55 unit mph.  What's the speed in terms of kph?
• The speed is 55[mph].  What's the speed in [kph]?
• What's the mass measured in kg's when the mass in unit tons is 3.2?
• What's the mass in [kg's] when the mass in [tons] is 3.2?
• If the mass is 3.2 unit tons, what's the mass measured in kg's?
• If the mass is 3.2[tons], what's the mass in [kg's]?

Direct Questions

A more direct way of doing conversions is to eliminate the statement, asking for the conversion directly:

• What's 55 unit mph in terms of kph?
• What's 55[mph] in [kph]?
• What's 3.2 unit tons measured in kg's?
• What's 3.2[tons] in [kg's]?

Conversion Statements

Another way to do unit conversions is by using a "conversion statement".  A "conversion statement" is based on (or inspired by) the verb "convert":

• A "conversion statement" can be the word "convert", followed by a "unit phrase", followed by the word "to" or "into", followed by the word "unit" or "units", followed by a "unit".  If the unit is enclosed in square brackets, the word "unit" or "units" can be omitted:
`e.g.   Convert 55 unit mph into unit kph.       \_____/ \_________/ \_______/ \_/e.g.   Convert 55[mph] into [kph].       \_____/ \_____/ \__/ \___/e.g.   55 unit mph to units kph.       \_________/ \______/ \_/e.g.   55[mph] to [kph].       \_____/ \/ \___/`
• A "conversion statement" can be the word "convert", followed by a quantity, followed by the word "from", followed by the word "unit" or "units", followed by a "unit", followed by the word "to" or "into", followed by the word "unit" or "units", followed by a "unit".  If the unit is enclosed in square brackets, the word "unit" or "units" can be omitted:
`e.g.   Convert 55 from unit mph to unit kph.       \_____/ \/ \_______/ \_/ \_____/ \_/e.g.   Convert 55 from [mph] to [kph].       \_____/ \/ \__/ \___/ \/ \___/e.g.   55 from units mph into units kph.       \/ \________/ \_/ \________/ \_/e.g.   55 from [mph] into [kph].       \/ \__/ \___/ \__/ \___/`
• A "conversion statement" can be a quantity, followed by the word "converts" or "converted", followed by the word "from", followed by the word "unit" or "units", followed by a "unit", followed by the word "to" or "into", followed by the word "unit" or "units", followed by a "unit".  If the unit is enclosed in square brackets, the word "unit" or "units" can be omitted:
`e.g.   55 converted from unit mph to unit kph.       \/ \_________________/ \_/ \_____/ \_/e.g.   55 converted from [mph] to [kph].       \/ \____________/ \___/ \/ \___/`
• A "conversion statement" can be a "unit phrase", followed by the word "convert" or "converts" or "converted", followed by the word "to" or "into", followed by a "unit phrase":
`e.g.   What speed measured in kph converts to 55 unit mph?       \________________________/ \_________/ \_________/e.g.   What speed in [kph] converts to 55[mph]?       \_________________/ \_________/ \_____/`
• A "conversion statement" can be a "unit phrase", followed by a "helping verb" (do, does, did, would, will, could, should, might, must, shall, can, may), followed by a "unit phrase", followed by the word "convert" or "converts" or "converted", followed by the word "to" or "into":
`e.g.   How many unit kph would 55 unit mph convert to?       \_______________/ \___/ \_________/ \________/e.g.   How many [kph] would 55[mph] convert to?       \____________/ \___/ \_____/ \________/`