#18595: Big Oh terms and equality
--------------------------------------------+------------------------
Reporter: behackl | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.8
Component: commutative algebra | Resolution:
Keywords: powerseries, asymptotics | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------------------+------------------------
Changes (by behackl):
* cc: dkrenn (added)
Comment:
I'll probably have to provide some more context. When I'm thinking of
O-notation, I have http://en.wikipedia.org/wiki/Big_O_notation#Equals_sign
in mind, that is I think of `O(f(x))` as the class of functions `g(x)`
such that `|g(x)| <= C |f(x)|` holds for `x -> oo`. By abuse of notation,
`g(x) = O(f(x))` then actually means `g(x) \in O(f(x))` -- and this leads
to the problem that I do not agree with
{{{
sage: (x + (-x + O(x^2))).is_zero()
True
}}}
because while `0 = O(x^2)` (mathematically) translates to `0 \in O(x^2)`,
which is true -- but the converse, `O(x^2) = 0`, is not.
Unfortunately, I think this "one-way equality" cannot be modeled by `==`
-- or can it? Or would this even be desireable?
However, apart from that, do you think that `is_zero` really shoud
evaluate to `True` for `O(x)` and other "approximate" terms? Maybe this is
not the best comparion, but consider the real interval field:
{{{
sage: RIF(0).is_zero()
True
sage: RIF((-0.1, 0.1)).is_zero()
False
}}}
This is more like the behavior I would expect from `O(x).is_zero()`. What
do you think?
(Also: thanks for pointing me towards `precision_absolute()`, this (more
or less) solves my original problem!)
--
Ticket URL: <http://trac.sagemath.org/ticket/18595#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.