Files
darkfi/lisp/bits.lisp
2020-10-28 01:26:55 +01:00

10 lines
392 B
Common Lisp

(def! bit-dec
(fn* [x] (
(def! bits (unpack-bits x 256))
(def! enforce-step-1 (fn* [b] (enforce (add-one-lc0 (sub-lc0 b) (add-lc1 b))))
(map enforce-step-1 bits)
(map (fn* [b] ((add-lc0 b) double-coeff-lc) bits)
(enforce reset-coeff-lc sub-lc0 add-one-lc1)
)))))