b_div
This commit is contained in:
parent
a293dd0ca1
commit
105ec294d3
9
main.py
9
main.py
@ -1,4 +1,5 @@
|
||||
# Copyright (c) PARRRATE T&V 2021. All rights reserved.
|
||||
import random
|
||||
|
||||
from bu4.common_interface import with_common_interface
|
||||
from bu4.evaluation.constructs.proxy import antiproxy, eproxy
|
||||
@ -53,8 +54,10 @@ with TimeSample(' full'):
|
||||
print(sys3)
|
||||
with TimeSample(' full'):
|
||||
sys1 = with_common_interface(synced(readfile('src/sys1')))
|
||||
sys1 = sync(sys1.call(eproxy(77)))
|
||||
sys1 = sync(sys1.call(eproxy(194)))
|
||||
print(sys1)
|
||||
a_ = random.randrange(2 ** 64)
|
||||
b_ = random.randrange(2 ** 64)
|
||||
sys1 = sync(sys1.call(eproxy(a_)))
|
||||
sys1 = sync(sys1.call(eproxy(b_)))
|
||||
print(sys1, b_ % a_)
|
||||
with TimeSample(' full'):
|
||||
print(with_common_interface(synced(readfile('src/sys4'))))
|
||||
|
@ -4,3 +4,4 @@
|
||||
@mul
|
||||
@sub
|
||||
@bitwise
|
||||
@div
|
||||
|
36
src/binary/div.bu4
Normal file
36
src/binary/div.bu4
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
(bD)
|
||||
/(b_div)
|
||||
(zqN)(lbN)(hb!N)
|
||||
/
|
||||
/(hQ)(hR)
|
||||
{ /[hR]/[lbN][b!] | bR }
|
||||
/(bRD)(bDR)
|
||||
/(zqDR)(lbDR-unused)(hb!DR-unused)
|
||||
/
|
||||
/
|
||||
[bR]
|
||||
/
|
||||
/[hQ]/[0][b!]
|
||||
[pair]
|
||||
/
|
||||
/
|
||||
[bRD]
|
||||
/
|
||||
/[hQ]/[1][b!]
|
||||
[pair]
|
||||
[zqDR]
|
||||
[bDR]
|
||||
/[bD]/[bR][b_sub]
|
||||
</[b_div][hb!N]>
|
||||
/
|
||||
/
|
||||
[b0]
|
||||
/
|
||||
[b0]
|
||||
[pair]
|
||||
[zqN]
|
||||
[YC]
|
||||
|
|
||||
b_div
|
||||
}
|
@ -7,9 +7,11 @@
|
||||
|
||||
/
|
||||
/
|
||||
/
|
||||
/
|
||||
/[a][n_to_bx]
|
||||
[b_div]
|
||||
/[b][n_to_bx]
|
||||
/
|
||||
/[a][n_to_bx]
|
||||
[xx2b]
|
||||
[second]
|
||||
[b_to_nx]
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
Loading…
Reference in New Issue
Block a user