PLUS+1 User Forum

PLUS+1 Tools => PLUS+1 GUIDE => Topic started by: BBarry on December 07, 2022, 10:41:34 PM

Title: Hoe does DIV handle the remainder?
Post by: BBarry on December 07, 2022, 10:41:34 PM
Hi guys this may be a very basic question. I searched and could not find it spelled out anywhere.

How does the DIV function handle remainders (truncate it?) aka always round down to the nearest whole number?
I want to always round a number down and if DIV can do it for me great.

Warmest regards,
Title: Re: Hoe does DIV handle the remainder?
Post by: Tor on December 08, 2022, 09:02:46 AM
Hello BBarry,

If you get a decimal number with the regular DIV component, it is truncated to zero decimal digits.  9/2=4  (Not stated/explained in the User Manual).
Then you have the Rounded divide that rounds up or down depending on what the reminder is. 9/2=5 (This is stated/explained in the User Manual).


I hope it helps.
Title: Re: Hoe does DIV handle the remainder?
Post by: niteRider on December 08, 2022, 03:50:20 PM
You can use the Modulo component to extract the remainder, too.
Title: Re: Hoe does DIV handle the remainder?
Post by: BBarry on December 08, 2022, 09:46:14 PM
Thanks! That is exactly what I was looking for.