Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ __mod__
Method
__mod__
recipes/Python/580610_Auto_differentiation/recipe-580610.py:97–99 ·
view source on GitHub ↗
(u, v)
Source
from the content-addressed store, hash-verified
95
return
Num(float(u) // float(v), 0.0)
96
97
def
__mod__(u, v):
98
u, v, du, dv = float(u), float(v), d(u), d(v)
99
return
Num(u % v, du - u // v * dv)
100
101
def
__pos__(u):
102
return
u
Callers
nothing calls this directly
Calls
2
Num
Class · 0.70
d
Function · 0.50
Tested by
no test coverage detected