next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Divisor :: ceiling(RWeilDivisor)

ceiling(RWeilDivisor) -- produce a WeilDivisor whose coefficients are ceilings or floors of the divisor

Synopsis

Description

Start with a rational or real Weil divisor. We form a new divisor whose coefficients are obtained by applying the ceiling or floor function to them.

i1 : R = QQ[x, y, z] / ideal(x *y - z^2);
i2 : D = divisor({1/2, 4/3}, {ideal(x, z), ideal(y, z)}, CoefficientType => QQ)

o2 = 4/3*Div(y, z) + 1/2*Div(x, z)

o2 : QWeilDivisor on R
i3 : ceiling( D )

o3 = 2*Div(y, z) + Div(x, z)

o3 : WeilDivisor on R
i4 : floor( D )

o4 = Div(y, z)

o4 : WeilDivisor on R
i5 : E = divisor({0.3, -0.7}, {ideal(x, z), ideal(y,z)}, CoefficientType => RR)

o5 = -.7*Div(y, z) + .3*Div(x, z)

o5 : RWeilDivisor on R
i6 : ceiling( E )

o6 = Div(x, z)

o6 : WeilDivisor on R
i7 : floor( E )

o7 = -Div(z, y)

o7 : WeilDivisor on R