Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well my mortgage is thankful for that.

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.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: