Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What does ceil mean ?

  1. Apr 7, 2006 #1
    Its diifcult to express my question....so, i am posting this

    ceil(4.5) =?
    ceil(4.1)=?
    ceil(4.6)=?
     
  2. jcsd
  3. Apr 7, 2006 #2

    AKG

    User Avatar
    Science Advisor
    Homework Helper

    ceil(x) is the smallest integer which is greater than or equal to x. In particular, if x is an integer, then ceil(x) = x, and if x is not an integer, then ceil(x) > x.
     
  4. Apr 7, 2006 #3
    ceil(4.5)=4 // is it ok ?
    ceil(4.1)=4 //is it ok ?
    ceil(4.6)=5 //is it ok ?
     
  5. Apr 7, 2006 #4

    Integral

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Nope, read the defintion given above, then try again.
     
  6. Apr 7, 2006 #5
    ah...i see, all of them should be 5 .....i had confusion on fractional part .5.
    but i see ..it does not care for .5 which we use for round-off.
     
  7. Apr 7, 2006 #6

    Curious3141

    User Avatar
    Homework Helper

    Yes, all 5.
     
  8. Apr 7, 2006 #7
    thank you for the clarifcation
     
  9. Apr 7, 2006 #8
    Recall that

    [tex]\begin{gathered}
    \forall x \in \left( {a,a + 1} \right)\;{\text{where }}a \in \mathbb{Z}, \hfill \\
    {\text{floor}}\left( x \right) = \left\lfloor x \right\rfloor = a \hfill \\
    {\text{ceil}}\left( x \right) = \left\lceil x \right\rceil = a + 1 \hfill \\
    \end{gathered} [/tex]

    [tex]\forall x \in \mathbb{Z},\;\left\lfloor x \right\rfloor = \left\lceil x \right\rceil = x [/tex]
     
    Last edited: Apr 7, 2006
  10. Apr 7, 2006 #9

    jim mcnamara

    User Avatar
    Science Advisor
    Gold Member

    ceil -> "goes up" if it needs to, in order reach an integer
    floor -> "goes down" as it needs to, in order to reach an integer
    What happens with negative numbers:

    [tex] floor( -1.1 ) = -2 \; ceil( -1.1 ) = -1 [/tex]
    [tex] floor( -0.1 ) = -1 \; ceil( -0.1 ) = 0 [/tex]
    [tex] floor( 0.9 ) = 0 \; ceil( 0.9 ) = 1[/tex]
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: What does ceil mean ?
  1. What does Ept mean? (Replies: 1)

  2. What does "det" mean? (Replies: 6)

Loading...