5
def divmod_regular(a,b):
7
>>> divmod_regular(10,5)
9
>>> divmod_regular(9191,4096)
11
>>> divmod_regular(10000,10010)
13
>>> divmod_regular(-999999,-111111)
15
>>> divmod_regular(-888888,-11111)
17
>>> divmod_regular(-10000,-10086)
19
>>> divmod_regular(5,-1)
21
>>> divmod_regular(-40,3)
23
>>> divmod_regular(11,-3)
25
>>> divmod_regular(0,9)
27
>>> divmod_regular(0,-987654321)
30
>>> divmod_regular(33,0) #doctest: +ELLIPSIS
31
Traceback (most recent call last):
32
ZeroDivisionError: ...
37
@cython.test_assert_path_exists("//ReturnStatNode//NameNode[@entry.name = 'divmod']",
38
"//ReturnStatNode//NameNode[@entry.cname = '__Pyx_divmod_int']")
39
def divmod_int_regular(a: cython.int, b: cython.int):
41
>>> divmod_int_regular(10,5)
43
>>> divmod_int_regular(9191,4096)
45
>>> divmod_int_regular(10000,10010)
47
>>> divmod_int_regular(-999999,-111111)
49
>>> divmod_int_regular(-888888,-11111)
51
>>> divmod_int_regular(-10000,-10086)
53
>>> divmod_int_regular(-50,1)
55
>>> divmod_int_regular(-40,3)
57
>>> divmod_int_regular(11,-3)
59
>>> divmod_int_regular(0,9)
61
>>> divmod_int_regular(0,-987654321)
64
>>> divmod_int_regular(33,0) #doctest: +ELLIPSIS
65
Traceback (most recent call last):
66
ZeroDivisionError: ...