1 | initial version |
This is clearly a bug. Looking ate the source code, it seems to be related to the fact that Sage tries to transform the smbolic expression abs(i*x)
into an object which provides fast floating point evaluation of it:
sage: abs(i*x)._fast_float_()
TypeError: unable to coerce to a real number
A workaround is to provide a python function, not a symbolic expression:
sage: f = lambda x : abs(i*x)
sage: find_local_maximum(f, 1000, 3000)
(2999.999947571147, 2999.999947571147