|
|
As for Math.exp(x) that will depend on how you're using it. Usually as x increases the result will increase exponentially (faster) as you've described. If that's not the behavior then there may be some specifics in the way you're using it that are causing the result to behave differently.
Possible variations might include:
Math.exp(x) – returns 1 when x is 0 and exponentially larger values when x is above 0
Math.exp(-x) or 1 / Math.exp(x) – returns 1 when x is 0 and exponentially smaller values when x is above 0
Math.exp(1/x) – undefined at 0 (divide by 0, a vertical asymptote) but returns values ranging from infinity to e as x goes from 0 to 1. Approaches horizontal asymptote of 1 as x increases from 1 to infinity.
-D
|
|