Macaulay2 » Documentation
Packages » Macaulay2Doc » rings » basic rings of numbers » CC » realPart
next | previous | forward | backward | up | index | toc

# realPart -- real part

- Usage:
    `realPart z`
- Inputs:
  - z, an integer, rational, real or complex number
- Outputs:
  - the real part of the complex number z.

## Description

    i1 : realPart(3/4)

         3
    o1 = -
         4

    o1 : QQ

    i2 : realPart(1.5+2*ii)

    o2 = 1.5

    o2 : RR (of precision 53)

## See also

- CC -- the class of all complex numbers
- imaginaryPart -- imaginary part

## Ways to use realPart:

- `realPart(InexactNumber)`
- `realPart(Number)`
- `realPart(QQ)`
- `realPart(ZZ)`

## For the programmer

The object realPart is a method function.

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