I don't know much about Python, but the following snippet result is 0.367879441171
from math import exp
window = 10000
td = 1
print exp(-td/window)
Whereas in Java the snippet below results in 0.9999000049998333
import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
public class HelloWorld{
public static void main(String []args){
double td = 1d;
double window = 10000d;
System.out.println(Math.exp(- td / window));
}
}
I could swear these are equivalent but they're apparently not. What am I doing wrong?