What a neat limit. Probably best to leave the powerfn/logfn() as a dumb symbolic symbol until the end (until after later parameter substitution)?
What a neat limit. Probably best to leave the powerfn/logfn() as a dumb symbolic symbol until the end (until after later parameter substitution)?
integral{from t=0, to t=x} t^{-1+0} dx
but you calculate instead
f(x) = lim_{ε->0} [ integral{from t=0, to t=x} t^{-1+ε} dx ]
that is just
= lim_{ε->0} [ (t^ε - 1) / ε ]
replacing t^ε
= lim_{ε->0} [ (e^(ln(t)*ε) - 1) / ε ]
by https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule
= lim_{ε->0} [ ln(t)*e^(ln(t)*ε) / 1 ]
that is easy to calculate
= ln(t)*e^(ln(t)*0) / 1
= ln(t)*1 / 1
= ln(t)
So f(t)=ln(t)
We throw ZeroDivisionError instead of axiomatically defining a ranking for
scalar*parameter*inf
if x > 0:
2*x*inf > x*inf
# because
2 > 1
But basically every CAS just prematurely throws away all terms next to infinity (by replacing the information in that expression with just infinity)? And nothing yet implements e.g. Conway's Surreal numbers infinities?Is negative infinity to the infinity greater or lesser than infinity?
assert (-1*math.inf)**math.inf == math.inf
assert (-1*sympy.oo)**sympy.oo == sympy.oo
Here's a dumb Real/Function instead of prematurely discarding information that could be useful: from sympy import symbol
from sympy.abc import x
Infinity = symbol('Infinity', real=True) # *
#
from sympy.symbols import Wild
All the axioms just change there. limit(-x**-1)
An uphill battle for certain."[Python-ideas] Re: 'Infinity' constant in Python" https://mail.python.org/archives/list/python-ideas@python.or...
Plenty of functions are discontinuous. Almost all of them, in fact. (This isn't true constructively, but GP is clearly doing classical analysis.)
> If a [math] function returns a more complex type signature instead of throwing a ZeroDivisionError (as Python core does) what is that then called? Is it differentiable or no, etc?
Depends on the smooth structures you've imposed on the domain and codomain, which requires much more powerful types to represent than are available in any mainstream language I'm aware of. (You might be able to contort Haskell into something sort of close, but it wouldn't be simple.)