I cannot find a derivative of remainder function (i.e. derivative of a(x) mod b(x) with respect to x, and x is a real number and a(), b() is also real-valued functions) in tables of derivatives. Without the loss of generality, we may assume (and it desired at all), that continuous approximation is acceptable.

I note, that (a(x) mod const)' ~ a'(x), (c(x) mod c(x))' = 0, but still I can't conclude form of desired right hand side (a(x) mod b(x))' -> ? function from these borderline cases (maybe dimensional method or method of indefinite coefficients in some form is applicable, but I have not an intuitions of how).

What is the generalized (in sense of continuity) form of remainder derivative?

I mean a remainder function as presented on x86/x86-64 architectures (FPREM and FPREM1).

  • $\begingroup$ For even mildly general $a(x)$, $b(x)$ there seems to be no natural definition of remainder function. $\endgroup$ – André Nicolas Feb 11 '14 at 18:06
  • $\begingroup$ @AndréNicolas It's incredible. I intuitively feel that the solution is expressed in terms of elementary functions or even of couple of multiplications, additions, subtractions and divisions of operands and its first derivatives. $\endgroup$ – Orient Feb 11 '14 at 18:08
  • $\begingroup$ @MPW I think there are at least two cases: when lhs < rhs and vice-versa. $\endgroup$ – Orient Feb 11 '14 at 18:30
  • $\begingroup$ There is a standard definition of the remainder when $a(x)$ and $b(x)$ are polynomials. So any conjectured answer should probably give the "right thing" for polynomials. $\endgroup$ – André Nicolas Feb 11 '14 at 18:32
  • $\begingroup$ @AndréNicolas Interesting note. I'll try to find the solution for polinomials. $\endgroup$ – Orient Feb 11 '14 at 18:33

How are you defining "$a(x) \mod b(x)$"? Is it something like $a(x) - b(x)[a(x)/b(x)]$ (perhaps assuming $a,b>0$)? If so, and if $a,b$ are continuous, then I would think it is $a'(x)$ (where it exists) since $[\cdot]$ is mostly piecewise constant, right? Of course, there will be holes in the domain of this derivative where jumps occur in the function ($a \mod b$) being differentiated.

EDIT: Oh, I see I drew the wrong conclusion. Since $[\cdot]$ is mostly constant, this means that the derivative will be $a'(x) - b'(x)[a(x)/b(x)]$ where it exists. Better?

  • $\begingroup$ If $[\cdot]$ is constant regardless of constancy of an argument, than derivative is $a'(x) - [a(x)/b(x)] \cdot b'(x)$ except the points, where $a(x) = n \cdot b(x)$ for some natural $n$. Isn't it? $\endgroup$ – Orient Feb 11 '14 at 18:47
  • $\begingroup$ Yes, I just realized that and have already edited my answer. You are correct. $\endgroup$ – MPW Feb 11 '14 at 18:52
  • $\begingroup$ $a'(x)$ is an answer only when $a(x) < b(x)$ $\endgroup$ – Orient Feb 11 '14 at 18:53
  • $\begingroup$ @Dukales: The derivative could still exist where $a=n\cdot b$, as long as $[a/b]$ doesn't jump there. $\endgroup$ – MPW Feb 11 '14 at 18:54
  • 1
    $\begingroup$ Hmm... $[a / b]$ difenitely have steps when dividend growth and passes the points of multiplicity with respect to divisor. In such points the quotient have integer values. $\endgroup$ – Orient Feb 11 '14 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.