Recent content by sarah_frtrn

  1. S

    Fortran Getting my method of bisection to output the correct value

    Okay I will explain. Yes, simp_p() routine calculates the integral of the equation found in the equation routine. Basically, I first wrote the simp_p() routine because, given a cutoff value (obtained from a table on the percentile values for the chi-squared distribution), I am able to calculate...
  2. S

    Fortran Getting my method of bisection to output the correct value

    Oh, and for the amount my answer is off... SUPPOSED TO BE: 11.4, getting 11.8 supposed to be: 12.6, getting 12.5 supposed to be 10.2, getting 11.0 So I figured out what is happening. I have been giving it a cutoff point (the value I'm starting with for B...) and every time I'm getting roughly...
  3. S

    Fortran Getting my method of bisection to output the correct value

    1. I will try this. 2. Yes it does return a value of 0, but then I subtract p from it which gives a negative p value. When doing method of bisection, you check the value of the function at each endpoint. My function subtracts p outside of the integral, so p doesn't get subtracted in the simp_p...
  4. S

    Fortran Getting my method of bisection to output the correct value

    [/code] The only time it is executed if there is a value of NaN which was causing errors before.
  5. S

    Fortran Getting my method of bisection to output the correct value

    This is to check for a value of NaN. A value of NaN does not equal itself. Thank you!
  6. S

    Fortran Getting my method of bisection to output the correct value

    I am trying to write a program that calculates the root of chi-square. I am not getting the correct answer and I honestly am at my wits end trying to figure it out. I know my simp_p() method is returning the correct value, but for some reason my root_chisq() method is not giving me the correct...
Back
Top