0
$\begingroup$

For example, for 10/3, I only want to get 3, not 3.333. Is there a math operation that does this?

$\endgroup$
1
$\begingroup$

There are two methods to do this:
1. Use the floor function $\lfloor \frac{a}{b} \rfloor$
2. Subtract the remainder and then divide: $\frac{a - ({a \text{ mod } b})}{b}$

| cite | improve this answer | |
$\endgroup$
3
$\begingroup$

Use the floor function, which takes a rational number and outputs the quotient (hence subtracts the remainder from the rational number): $\lfloor x \rfloor$, where $x$ is a given fraction.

So $\lfloor 10/3 \rfloor = 3$, e.g.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Go Vikes! ${}{}$ $\endgroup$ – Asaf Karagila Jan 5 '14 at 16:45
  • $\begingroup$ Today, @Asaf, it's the San Francisco 49'ers! First playoff game preceding the superbowl! ;-) $\endgroup$ – amWhy Jan 5 '14 at 16:48
  • 1
    $\begingroup$ I see. I don't actually follow sports in Israel, let alone in other countries. I just recognized the Packers symbols from watching a lot of That '70s Show and How I Met Your Mother. :-P $\endgroup$ – Asaf Karagila Jan 5 '14 at 16:53
  • $\begingroup$ @amWhy: needs another UV +1 $\endgroup$ – Amzoti Jan 6 '14 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.