Commit Graph

3 Commits

Author SHA1 Message Date
Mamy Ratsimbazafy 6eeba3d41a
Division: Fix recursive divide-and-conquer (#20)
* Simplify div2n1n

* Revert borrow detection, needed a cleverer scheme.

* Getting inspired by uint128 didn't work for recursive. Use recursive algo from the get go

* Fix shl bug ... (need fuzzy testing)

* divmod fixed for single nesting (?)

* Almost there

* Fix one part of div3n2n

* Division is wooorrrrkkinnnggg 🔥

* Fix compilation for the nested version

* forgot to not multiply by 8 the size

* Add another failing shift test

* Fix countLeadingZero for nested uint

* Cleanup: remove debugecho

* Move debug utils in a specific folder

* Fix forward declaration

* Move division it's own file
2018-04-20 11:13:47 +02:00
Mamy Ratsimbazafy c8190df152
Faster division algorithm (#8)
* cosmetic changes

* fix zero conversion

* Div using divided and conquer algorithm. (Compiles but doesn't work)

* Passes test with production flag
2018-03-28 17:15:36 +02:00
mratsim f1935fd673 Improve speed by 90% by inline shr/shl 2018-03-26 14:46:38 +02:00