I have a feeling though that tools like this will lower the skill threshold for programming by a lot.
I gave it this code I just made and asked it what it does and it figured it out:
public class mean_sink {
double sum;
long n;
public mean_sink(){
}
public void add(double d){
sum += d;
n++;
}
public double getMean(){
if(n == 0)
return Double.NaN;
return sum/n;
}
}
I asked it to improve the numerical accuracy and it did it with BigDecimal instead. I asked it to only use doubles and it did some strange reciprocal summation when I was "hoping" for Kahan summation algorithm. Its "reciprocal summation" did not work. But it made a correct Kahan when I asked for it.
I dunno. This is insane anyway. It is really hard to grasp the consequences.
I have a feeling though that tools like this will lower the skill threshold for programming by a lot.
I gave it this code I just made and asked it what it does and it figured it out:
I asked it to improve the numerical accuracy and it did it with BigDecimal instead. I asked it to only use doubles and it did some strange reciprocal summation when I was "hoping" for Kahan summation algorithm. Its "reciprocal summation" did not work. But it made a correct Kahan when I asked for it.I dunno. This is insane anyway. It is really hard to grasp the consequences.