Exetools

Exetools (https://forum.exetools.com/index.php)
-   Community Tools (https://forum.exetools.com/forumdisplay.php?f=47)
-   -   LinearDiophantineEq (https://forum.exetools.com/showthread.php?t=19434)

CodeCracker 02-05-2020 22:43

LinearDiophantineEq
 
1 Attachment(s)
LinearDiophantineEq: will solve equation a*x+b*y=c
where x and y are integers, nothing special about it.

https://www.techiedelight.com/find-general-solution-linear-diophantine-equation/
https://raw.githubusercontent.com/wandering007/algorithms/master/extended_gcd.cpp

Git 02-14-2020 02:49

Quote:

Originally Posted by CodeCracker (Post 119314)
a*x+b*y=c
where x and y are integers,

Implied, but maybe not obvious that it's more restrictive than that - all four left hand variables muct be integers.

Git

CodeCracker 02-18-2020 02:09

Quote:

Originally Posted by Git (Post 119348)
Implied, but maybe not obvious that it's more restrictive than that - all four left hand variables muct be integers.
Git

a, b, c must be also be integers.

One may ask what if x and y are not integers but real numbers,
then we will have an infinite number of solutions:
for each x value there is a y value
and for each y value there is a x value,
which is another way of saying we don't have enough information about x and y from a single equation.


All times are GMT +8. The time now is 07:34.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX