1:
|
val quot : symbol : Expression -> u : Expression -> v : Expression -> Expression
|
Возвращает частное при деления двух полиномов для заданной переменной (symbol)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
|
let print = Infix.format >> printfn "%s"
let u = "3*x^3 + x^2 + x + 5" |> Infix.parseOrUndefined
let v = "5*x^2 - 3*x + 1" |> Infix.parseOrUndefined
let x = symbol "x"
printf "u: "
print u
printf "v: "
print v
printf "r: "
Polynomial.quot x u v
|> print
|
1:
2:
3:
|
u: 5 + x + x^2 + 3*x^3
v: 1 - 3*x + 5*x^2
r: 14/25 + (3/5)*x
|