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

    <info>
        <link type="guide" xref="index#equation"/>
    
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Jonathan Ernst</mal:name>
      <mal:email>jonathan@ernstfamily.ch</mal:email>
      <mal:years>2006</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Claude Paroz</mal:name>
      <mal:email>claude@2xlibre.net</mal:email>
      <mal:years>2006-2009</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Laurent Coudeur</mal:name>
      <mal:email>laurentc@iol.ie</mal:email>
      <mal:years>2009-2010</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Alain Lojewski</mal:name>
      <mal:email>allomervan@gmail.com</mal:email>
      <mal:years>2014</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Guillaume Bernard</mal:name>
      <mal:email>associations@guillaume-bernard.fr</mal:email>
      <mal:years>2015-2021</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Irénée Thirion</mal:name>
      <mal:email>irenee.thirion@e.email</mal:email>
      <mal:years>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>
