cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

1-Newbie

## Round down number

Hello! I am new with Mathcad and need to round down a number.

For example I got a result equal to 1.9, but need to round down to 1. Which function can I type to get the desired result?

7 REPLIES 7
13-Aquamarine
(To:abustillos-disa)
floor(1.9)=1
Viktor Korobov
Viktor
If you round 1.9 to 1, you then don't round. Rounding follows rules , i.e: 1.9 rounds to 2, that's it. All that is exemplified in the [Help ?]

Rounding 1.9 to 1 is like the US Congress who had to vote for legal Pi to be 3 or 4 ! 3*4 = 12 as well as 4*3 = 12. Voting for ignorance is like voting for the wind.
In the worst case, you can round 1.9 to 0 .

jmG
1-Newbie
(To:ptc-1368288)

There are many instances where you will need to round down even if the number is closer to an upper whole number.
Ex. You have a 35ft wide road. Each lane on a road has to be exactly 12 ft, anything less than that won't be allowed by road design codes. How many lanes can you fit in the road?  35ft/12ft =2.917  however since you cannot have a lane that is less than 12 ft you can only fit 2 lanes. Hence you will need to round 2.917 down to 2 in order to get the correct answer.

23-Emerald II
(To:AC_10013872)

As stated above, rounding has rules to follow and rounding 2.917 would yield 3.

There are other math functions that should be used. In this case, the Floor() function is perfect as Floor(2.917) = 2.

24-Ruby V
(To:BenLoosli)

@BenLoosli wrote:

As stated above, rounding has rules to follow and rounding 2.917 would yield 3.

There are other math functions that should be used. In this case, the Floor() function is perfect as Floor(2.917) = 2.

No! Floor(2.917) would throw an error! You have to use floor(2.917)=2 or Floor(2.917,1)=2.

Its like beating a dead horse as Viktor gave the correct answer in the first reply already more than 20 years ago. The discussion after that if using "floor" should be considered as "rounding" seems to be just a linguistic problem about the exact meaning of "rounding".

However, it is quite common to describe what "floor" does as "rounding off" or "rounding down".

See https://en.wikipedia.org/wiki/Rounding#Rounding_down for example.
For positive numbers you may also use "trunc" or "Trunc" to achieve the same effect.

And, even if jmG has not been a participant in this forum for a long time, let me say that it may also make sense in some cases to round down 1.9 to zero if you are only interested in multiples of 10 smaller or equal to the number:

Its not necessarily "worst case" 🙂

1. ROUNDDOWN behaves like ROUND, except that it always rounds a number down.
2. If num_digits is greater than 0 (zero), then number is rounded down to the specified number of decimal places.
3. If num_digits is 0, then number is rounded down to the nearest integer.
Announcements
Top Tags