Recent content by sarah_frtrn
-
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...- sarah_frtrn
- Post #11
- Forum: Programming and Computer Science
-
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...- sarah_frtrn
- Post #9
- Forum: Programming and Computer Science
-
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...- sarah_frtrn
- Post #8
- Forum: Programming and Computer Science
-
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.- sarah_frtrn
- Post #6
- Forum: Programming and Computer Science
-
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!- sarah_frtrn
- Post #5
- Forum: Programming and Computer Science
-
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...- sarah_frtrn
- Thread
- Bisection method Method Output Statistics Value
- Replies: 11
- Forum: Programming and Computer Science