I decided to calculate the extrema of the function by the Fibonacci method, I am a beginner, I encountered some errors in the code, if it isn`t difficult to help correctly write the code to determine the minimum and maximum, outputs -2, counted the result with the help of a gold section, turned out to be 1.55.

```
public class Fibonacci {
     double func(double x){
            return Math.pow(x,3)-26*x+6*Math.pow(x, 2)-9;
        } 
     double findMininFibonacci(double range_min_0, double range_min_1, double eps_min){
            double x1, x2;
            double N;   
            int j=10;
            int[] f = new int[j];
            f[0] = 1;
            f[1] = 1;
            f[3] = 2;
            f[4] = 3;
            double h_min;
            double x3;
            double x4;  
            while ((range_min_1-range_min_0)>eps_min){                  
                for (int i = 4; i < j; ++i) {
                    N = (range_min_1-range_min_0)/eps_min;
                  f[i] = f[i - 1] + f[i - 2];   
                  x1 = range_min_0 + (f[i-2]/f[i])*(range_min_1-range_min_0);
                  x2 = range_min_0 + (f[i-1]/f[i])*(range_min_1-range_min_0);               
                if(func(x1)<=func(x2)) {
                    range_min_1 = x2;
                    x2 = x1;
                    x1 = range_min_0 + (f[i-3]/f[i-1])*(range_min_1-range_min_0);
                } else {        
                    range_min_0 = x1;
                    x1 = x2;
                    x2 = range_min_0 + (f[i-2]/f[i-1])*(range_min_1-range_min_0);}              
                }              
            }       

            return (range_min_0 + range_min_1) / 2;
     }

```