difference between floor() and rounddown() function

Certified Lead Developer

what is the difference between floor() and rounddown() function or ceiling() and roundup() function ?

  Discussion posts and replies are publicly visible

Parents
  • Hi parag,

    floor() :- Rounds the number down to the nearest multiple of the specified significance.

    floor(2.8888, .0124568) returns 2.877521
    floor(-7,5) returns -10

    rounddown() :- Rounds the number down to the specified digit.

    rounddown(7.36819) returns 7.36

    rounddown(7.36819, 3) returns 7.368

    rounddown(7.36819, 4) returns 7.3681


    ceiling() :- Rounds the number up to the nearest multiple of the specified significance.

    ceiling(7.32,.5) returns 7.5

    ceiling(1.6) returns 2

     

     roundup() :- Rounds the number up to the specified digit.

    roundup(7.36819) returns 7.37

    roundup(7.36819, 3) returns 7.369

    roundup(7.36819, 4) returns 7.3682

Reply
  • Hi parag,

    floor() :- Rounds the number down to the nearest multiple of the specified significance.

    floor(2.8888, .0124568) returns 2.877521
    floor(-7,5) returns -10

    rounddown() :- Rounds the number down to the specified digit.

    rounddown(7.36819) returns 7.36

    rounddown(7.36819, 3) returns 7.368

    rounddown(7.36819, 4) returns 7.3681


    ceiling() :- Rounds the number up to the nearest multiple of the specified significance.

    ceiling(7.32,.5) returns 7.5

    ceiling(1.6) returns 2

     

     roundup() :- Rounds the number up to the specified digit.

    roundup(7.36819) returns 7.37

    roundup(7.36819, 3) returns 7.369

    roundup(7.36819, 4) returns 7.3682

Children
No Data