Peter Luschny
unread,Jan 18, 2018, 8:12:05 AM1/18/18You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
restart;
ln(0);
tan(Pi/2);
#> Error, (in ln) numeric exception: division by zero
#> Error, (in tan) numeric exception: division by zero
# Now we replace the NumericEventHandler for division by zero.
NumericEventHandler(division_by_zero = proc(operator,operands,defVal) -infinity end):
ln(0);
tan(Pi/2);
#> -infinity
#> -infinity
# So far so good. Now define
restart;
gammaquot := (n, k) -> limit(GAMMA(n+1+x)/(GAMMA(k+1)*GAMMA(n-k+1+x)), x=0);
gammaquot(-1,-1);
#> Error, (in GAMMA) numeric exception: division by zero
restart;
NumericEventHandler(division_by_zero = proc(operator,operands,defVal) -infinity end):
gammaquot := (n, k) -> limit(GAMMA(n+1+x)/(GAMMA(k+1)*GAMMA(n-k+1+x)), x=0);
gammaquot(-1,-1);
#>0
# Q1: Why is the NumericEventHandler not used here?
# Q2: What is the correct value of gammaquot(-1,-1)?