# Math.Arithmetic.Division

**Math.Arithmetic.Division** Is is the tag for the expression representing the mathematical division.

## Contents

# Definition

**Math.Arithmetic.Division** Is is the tag for the expression representing the mathematical division.

## Behavior

This expression must have exactly two children.

### Children names

The subexpressions should be named "Numerator" and "Denominator" respectively.

Localization packages could be created in order to provide the names in languages other than English.

## Visualization

There can be different form of visualization, the following are examples:

Visualization |
---|

## Edition

There could be several editions. The most obvious is: Given a selected expression, it is replaced by a new division expression with two children, the dividen is the expressions that was selected, and the divison is a new Null expression.

## Reduction

There could be several reductions, see below.

# Known implementations

## The Standard Arithmetic Package

### Visualization

There is one visualization in this package. This visualization shows the numerator over the denominator, separated by an horizontal line. The numerator and denominator vertical baselines are aligned and centered, and this is the complete division vertical baseline. The horizontal baseline of the division is aligned with the separated line, such like the following example:

### Edition

There are two editions in this package. The first one creates a division being the currently selected expression the numerator and creates a Null expression as denominator. The second one is the opposite, it creates a division being the currently selected expression the denominator and creating a Null expression as numerator.

This is shown in the following examples:

Example | Edition performed | Result |
---|---|---|

Inserts a divisor | ||

Inserts a dividend | ||

Inserts a divisor | ||

Inserts a dividend | ||

Inserts a divisor | ||

Inserts a dividend |

### Reduction

#### Division of numeric expressions

This reducer searches on the Math.Arithmetic.Multiplication children, for numeric expressions. If there are more than one, performs a numeric multiplication. According to Arithmetic canon, a numeric expression is either:

- A Math.Number expression.
- A Math.Arithmetic.Negative expression, containing a Math.Number expression as its child. It represents a negative number.
- A
**Math.Arithmetic.Division**expression, containing two Math.Number expressions representing integer numbers, as its children. Ir represents a rational number. - A Math.Arithmetic.Negative expression, containing a
**Math.Arithmetic.Division**expression, containing two Math.Number expressions representing integer numbers, as its children. It represents a negative rational number.

The following are examples. In these examples, expressions , and are supposed not to be numeric expressions.

Expression before reduction | Expression after reduction | Explanation |
---|---|---|

The same | It does not reduce, there are no numeric expressions as addends. | |

The same | It does not reduce, there are not two or more numeric expressions as addends. | |

According to Arithmetic canon, if any operand is a decimal number, the result must be either. | ||

According to Arithmetic canon, if any operand is a decimal number, the result must be either. | ||