<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="guide" id="floor-ceil" xml:lang="gl">

    <info>
        <link type="guide" xref="index#equation"/>
    
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Fran Dieguez</mal:name>
      <mal:email>frandieguez@gnome.org</mal:email>
      <mal:years>2011-2023.</mal:years>
    </mal:credit>
  </info>

	<title>Rounding</title>

    <p>
    Nearest integer values tying away from zero are calculated using the [ and ] symbols or round <link xref="function">function</link>.
    </p>
    <example>
    <p>
    [0.5]
    </p>
    <p>
    round (0.5)
    </p>
    </example>

    <p>
    Nearest integer values toward -∞ also known as floor values are calculated using the ⌊ and ⌋ symbols or floor <link xref="function">function</link>.
    </p>
    <example>
    <p>
    ⌊0.5⌋
    </p>
    <p>
    floor (0.5)
    </p>
    </example>

    <p>
    Nearest integer values toward +∞ also known as ceiling values are calculated using the ⌈ and ⌉ symbols or ceil <link xref="function">function</link>.
    </p>
    <example>
    <p>
    ⌈0.5⌉
    </p>
    <p>
    ceil (0.5)
    </p>
    </example>

    <p>
    Nearest integer values toward 0 i.e. the integer components are calculated using int <link xref="function">function</link>.
    </p>
    <p>
    The fractional components are calculated using frac <link xref="function">function</link>.
    </p>
    <example>
    <p>
    int (0.5)
    </p>
    <p>
    frac (0.5)
    </p>
    </example>
</page>
