Macaulay2 » Documentation
Packages » Macaulay2Doc » rings » substitution and maps between rings » working with multiple rings » commonRing
next | previous | forward | backward | up | index | toc

# commonRing -- find smallest containing ring

- Usage:
    `commonRing v`
- Inputs:
  - v, a list of numbers, ring elements, matrices, or things with rings, see
  - ring
- Outputs:
  - a ring, the smallest ring to which all members of the list can be promoted

## Description

    i1 : commonRing {1,2/3}

    o1 = QQ

    o1 : Ring

    i2 : commonRing {1,2.}

    o2 = RR
           53

    o2 : RealField

    i3 : commonRing {1,2p100,matrix{{3p200}}}

    o3 = RR
           100

    o3 : RealField

    i4 : R = RR[x];

    i5 : commonRing {1,2p100,matrix{{3p200}},0_R}

    o5 = R

    o5 : PolynomialRing

## Ways to use commonRing:

- `commonRing(List)`

## For the programmer

The object commonRing is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_analytic_functions.m2:556:0.