Skip to content

Commit 9d2f4d6

Browse files
authored
Merge pull request #80 from MaximSmolskiy/fix_linear_diophantine_equation
Fix linear diophantine equation
2 parents f22da2b + df6a5ed commit 9d2f4d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algorithms/maths/linear_diophantine_eqn.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%Used in programming to find the exact solution exists or not.
55

66
function retval = linear_diophantine_eqn (a,b,c)
7-
if c % gcd(a,b)==0
7+
if mod(c,gcd(a,b))==0
88
retval=true; % 1 represent yes it exist
99
else
1010
retval= false; % 0 represent no it doesn't exist

0 commit comments

Comments
 (0)