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

diameter -- diameter of an interval

Description

Returns the diameter (the difference between the endpoints) of the input interval.

i1 : interval (2, 7)

o1 = [2,7]

o1 : RRi (of precision 53)
i2 : diameter oo

o2 = 5

o2 : RR (of precision 53)

For a complex interval, the length of the diagonal in the complex plane is returned.

i3 : interval (0, 3 + 4*ii)

o3 = [0,3]+[0,4]*ii

o3 : CCi (of precision 53)
i4 : diameter oo

o4 = 5

o4 : RR (of precision 53)

See also

Ways to use diameter:

  • diameter(CCi)
  • diameter(RRi)

For the programmer

The object diameter is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Macaulay2Doc/doc_intervals.m2:136:0.