Example #1
0
        public void PolynomFunction()
        {
            lagrangePolynomial = new Lagrange(nodes.ToArray(), values.ToArray());
            string result = MakeNormalForm(lagrangePolynomial.LagrangePolynomial());

            label1.Text = "Polynom: " + result;
        }
Example #2
0
 private void buttonCheck_Click(object sender, EventArgs e)
 {
     try
     {
         if (lagrangePolynomial != null)
         {
             double checkResult =
                 lagrangePolynomial.LagrangePolynomial().Calculate(double.Parse(textBoxCheck.Text));
             labelCheck.Text = "Check result: " + Math.Round(checkResult, 3);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }