This repository has been archived on 2022-05-15. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Kollokvium0307/Верхолин Игорь/README.md

18 lines
441 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Умножение: общий случай
## Ссылка на видеоразбор
https://youtu.be/NKhwfK0PurY
## Код из книги
let real_mul x y n =
let n2 = n + 2 in
let r = n2 / 2 in
let s = n2 r in
let xr = x(r)
and ys = y (s) in
let p = log2 xr
and q = log 2 ys in
if p = 0 & q = 0 then Int 0 else
let k = q + r + 1
and l = p + s + 1
and m = p + q + 4 in
(x(k) / y(l)) ndiv ( Int 2 / Int m) ;;