MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / __floordiv__

Method __floordiv__

maths/dual_number_automatic_differentiation.py:74–80  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

72 raise ValueError
73
74 def __floordiv__(self, other):
75 if not isinstance(other, Dual):
76 new_duals = []
77 for i in self.duals:
78 new_duals.append(i // other)
79 return Dual(self.real // other, new_duals)
80 raise ValueError
81
82 def __pow__(self, n):
83 if n < 0 or isinstance(n, float):

Callers

nothing calls this directly

Calls 2

DualClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected