On Jan 20, 11:28 am, Kirill Smelkov <[EMAIL PROTECTED]> wrote:
> Hi Adh,
Forgive my email address, that's part of my last name. My name is
Saroj. I didn't realize my nickname was my email address.

On adding to asin and acos, we should at least check whether the value
passed lies between -1 and 1. One way I could think is

    def _eval_is_real(self):
        return self.args[0].is_real and abs(self.args[0])<=1

This works for numerical arguments but not for a variable say, x =
Symbol('x', real=True). Not checking the numerical limit would produce
asin(4).is_real as True.

We could continue using this, until we have some method of checking
the limiting values of a function. I realized that there is is_bounded
method. I think it would be nice to actually have a method to get
those bounds. Then, we could also get True for acos(sin(x)).is_real as
sin(x) gives a value between -1 and 1 for real x, and false for
acos(tan(x)).is_real.

On the tests, would you like me to write test on the trig tests as
assert sin(r).is_real == True for all the trig functions?

Saroj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to