Skip to content
TheChatArchiveThe Chat Archive
gpt-4-1106-preview· openaiHugging Face Suzhen/CodeChat

translate from french into english, preserve offsets: //…

  1. User

    translate from french into english, preserve offsets: // ================================================================= // * Algorithme de recherche de tous les zeros r�els d'un polynome // * Cet algorithme recherche tous les zeros r�els d'un polynome // * m�me si son graph est tangent � l'axe X. // * on utilise les propri�t�s suivantes : // * 1) le graphe de P est tangent a l'axe t en t0 si et seulement si // * t0 est un zero de P' deriv�e de P // * 2) entre deux z�ro succesif de de P' il ne peut y avoir au plus // * qu'un seul zero pour P // *( Algorithme tir� de TIGER page 396 )

  2. Assistant
    // =================================================================
    // * Algorithm for finding all real zeros of a polynomial
    // * This algorithm searches for all real zeros of a polynomial
    // * even if its graph is tangent to the X-axis.
    // * we use the following properties:
    // * 1) the graph of P is tangent to the axis t at t0 if and only if
    // *    t0 is a zero of P' derivative of P
    // * 2) between two successive zeros of P', there can be at most
    // *    only one zero for P
    // *( Algorithm taken from TIGER page 396 )
    
  3. User

    again: // voir plus bas

  4. Assistant
    // see below
    
  5. User

    same: wa1 = allocate_real_vector(1, (int)clust[index2]); wa2 = allocate_real_vector(1, (int)clust[index2]); clustin = (int)clust[index2]; boundin=bound[index2]; imcent=imcentre[index2]; recent=recentre[index2]; for (j=1; j<=clustin; j++) { place=index2+j-1; wa1[j]=re[place]; wa2[j]=im[place]; }

  6. Assistant
            wa1 = allocate_real_vector(1, (int)clust[index2]);
            wa2 = allocate_real_vector(1, (int)clust[index2]);
            clustin = (int)clust[index2];
            boundin=bound[index2];
            imcent=imcentre[index2];
            recent=recentre[index2];
            for (j=1; j<=clustin; j++) {
              place=index2+j-1;
              wa1[j]=re[place];
              wa2[j]=im[place];
            }
    
  7. User

    again: // Trouve les zeros reels d'un polynome dans l'intervalle lim // bornes incluses // // ER LE 18 Novembre 1997 // ====================== // Attention : This method is working very well unless the last coeficient // are null or almost NULL. //

  8. Assistant
    // Finds the real zeros of a polynomial in the interval lim
    // inclusive boundaries
    //
    // ER November 18, 1997
    // ======================
    //  Caution: This method works very well unless the last coefficient
    //           is null or almost NULL.