On 2019-06-24 21:26, Richmond via use-livecode wrote:
But it is not much cop when it comes to finding
the quotient of some long and complicated bit of Mathematics.

Perhaps not, but it is what you asked for...

  28 div 3 = 9
  28 mod 1 = 1

  28 / 3 = 9 + 1/3

  301 div 10 = 30
  301 mod 10 = 1

  301/10 = 30 + 1/10

  44 div 6 = 7
  44 mod 6 = 2

  44/6 = 7 + 2/6 = 7 + 1/3

More generally given X and Y you can rewrite X/Y as a 'quotient and a remainder' by defining:

  Q := X div Y
  R := X mod Y

Then you have that:

  X/Y = Q + R/Y

Just as when a human does such a computation R/Y can be often be reduced (if R and Y have any common factors) - i.e. by eliminating their greatest common divisor.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to