2014-02-13 0:38 UTC+01:00, William Stein <[email protected]>:
> On Wed, Feb 12, 2014 at 2:50 PM, Jason Grout
> <[email protected]> wrote:
>> David Smith just pointed this out: arcsec(float(.1)) throws an error that
>> doesn't make much sense.  Yes, it's outside of the domain, but it should
>> probably deal with this by returning NaN or something rather than a type
>> error.  This came up when David was trying to plot arcsec.
>>
>> On a related note, maybe we should have some sort of error that can be
>> thrown for values outside of domains?  Plot could catch an out-of-domain
>> error and break the drawing there, so you wouldn't end up with something
>> like http://sagecell.sagemath.org/?q=llweji
>>
>
> What about ValueError?
>
>    http://docs.python.org/2/library/exceptions.html#exceptions.ValueError
>

+1


On the other hand, it would be very nice and meaningful to have

sage: arcsec.domain()
(-infty; -1] u [1; +infty)

That kind of information can then be used by call to plot.

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" 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-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to