Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Polynomials > diophant

diophant

diophantine (Bezout) equation

Calling Sequence

[x,err]=diophant(p1p2,b)

Arguments

p1p2

polynomial vector p1p2 = [p1 p2]

b

polynomial

x

polynomial vector [x1; x2]

Description

diophant solves the bezout equation:

p1*x1+p2*x2=b with p1p2 a polynomial vector. If the equation is not solvable, err = ||p1*x1 + p2*x2 - b|| / ||b||

else err = 0.

Examples

s = poly(0, 's');
p1 = (s+3)^2;
p2 = (1+s);
x1 = s;
x2 = (2+s);
[x,err] = diophant([p1 p2], p1*x1 + p2*x2);
p1*x1 + p2*x2 - p1*x(1) - p2*x(2)
Report an issue
<< detr Polynomials factors >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:13:54 CEST 2015