Chat on IRC |
Integral in C++
Posted by Cortez [send private reply] at February 05, 2003, 06:43:14 AM
Topic says it all, is there any sample integral calclulation code of C++?
Posted by Psion [send private reply] at February 05, 2003, 08:39:58 AM
Do you mean integral _approximation_ from an arbitrary function?
Posted by taubz [send private reply] at February 05, 2003, 09:22:11 AM
I thought he just meant int a + int b... :)
Posted by CDR700 [send private reply] at February 05, 2003, 10:09:06 AM
What method trapizium ( x^2 error ) or rectangular ( x error ) or Gauss. Search for algorithms , which should be presented in Al ( Algorthmic Language ) and easily transoported into C++. There are no built in ANSI/ISO functions as far as i remember. Generally your error depends on how much time is spent calculating and how much your error is.
Posted by CDR700 [send private reply] at February 05, 2003, 10:27:13 AM
http://mathworld.wolfram.com/ TRY THERE some algorthms there.
Posted by pramod [send private reply] at February 06, 2003, 12:21:42 PM
Or maybe search for numerical intergration or simpsons method. I'd done this kind of thing a few years back, but then I was dealing with single variable equations but the book I had also talked about these things and there was something about simpson's method.
I tried to do a recap a few months back and I got really theorotical stuff. I think if you got a book on numerical integration, it'll probabably have sample code in some language [basic or fortran maybe]. I don't think its too much trouble translating that to C++.
Posted by CDR700 [send private reply] at February 07, 2003, 11:19:36 AM
http://oregonstate.edu/instruct/ch490/lessons/lesson11.htm no C++ code thought , good old FORTRAN and BASIC.
Posted by regretfuldaydreamer [send private reply] at February 07, 2003, 05:11:06 PM
Vlad just set the hated 'B' word? - Learn something else Vlad - BASIC is just for those who are lazy/insane.
Posted by gian [send private reply] at February 08, 2003, 06:24:26 AM
Vlad seems to actively engage in zealot-like activities.
Posted by RedX [send private reply] at February 08, 2003, 11:49:34 AM
We should not laugh at Basic-users, we need to lead them to the light. (or at least to a selfhelp group)
Posted by mop [send private reply] at February 08, 2003, 06:15:00 PM
or at very least a big meat grinder.
Get back some useful protein.
Posted by RedX [send private reply] at February 09, 2003, 09:21:20 AM
Yummy, Basic-hotdogs!
Posted by Cortez [send private reply] at February 09, 2003, 09:55:46 AM
http://oregonstate.edu/instruct/ch490/lessons/lesson11.htm I have no idea about Fortran, but i guess the rest's very useful. Though I already know how to use integral, i quite dont have much idea how to translate it for computer..I'll also take a look at sourceforge.net for a C++ code.
"We should not laugh at Basic-users, we need to lead them to the light" Absolutely agreed!
Posted by regretfuldaydreamer [send private reply] at February 11, 2003, 04:05:01 AM
The light it is then, hang on, is there such a thing as light in Russia?
Posted by Cortez [send private reply] at February 11, 2003, 06:04:47 AM
"light in Russia"?
Posted by regretfuldaydreamer [send private reply] at February 11, 2003, 03:14:49 PM
No wait, now I remember, they have six months in light and six months in darkness. In the dark months, they use some form of radioatcive glowing stick to see around? (I was making a very unintelligent, unthoughtout joke for those of you who didn't realise - too much alchohol I believe.)
Register as a new user | ||||||||||||||||||