input{}
output{}
fun random_sample(): float {
    float u;
    u = rand();
    if (u<0.5) {
        return sqrt(-0.5*3.141593*log(1-(2*u-1)^2));
    } else {
        return -sqrt(-0.5*3.141593*log(1-(1-2*u)^2));
    }
}
model
{
    srand(1234);
    int i;
    i=0;
    float avg;
    avg=0.0;
    while (i<1000) {
        avg = avg + random_sample();
        i = i+1;
    }
    print('close to zero');
    print(avg/1000);
}
