Chronology | Current Month | Current Thread | Current Date |
[Year List] [Month List (current year)] | [Date Index] [Thread Index] | [Thread Prev] [Thread Next] | [Date Prev] [Date Next] |
The textbook formula
(exp(-a*t1) - exp(-a*t2))/a [1]
divides by zero when a is zero
would run into significant precision subtraction error when |a*(t2 -
t1)| gets small compared to 1,
If I was trying really hard to be miserly with the clock cycles I
might try something else that didn't require the evaluation of 2
different transcendental functions.
if abs(x) < threshold
Set compsinc = 1st few initial terms of Taylor series for sinh(x)/x
else
Set compsinc = sinh(x)/x
endif
the possibility a greatly negative argument of exp() causing an underflow
possibility of values of the arguments of the intrinsic exp() and
sinh() functions getting too big & cause an overflow
treats both endpoints t1 & t2 on a similar footing without undulyAgreed. That's a useful sanity check.
biasing one end of the interval relative to the other.