Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. goodluckmich

    Question about Perl "exp" function? Please help!

    Sorry I should've followed the "code" rules. Here is my code - thanks!!! sub func { my $x = shift; return (1/(sqrt($Vz*2*3.1416)+0.000001))*exp(-(($x-$Mz)**2)/((2*($Vz**2))+0.000001)); }
  2. goodluckmich

    Question about Perl "exp" function? Please help!

    In my Perl code I aim to compute the Gaussian integral, and the Gaussian function is expressed as ###code### sub func { my $x = shift; return (1/(sqrt($Vz*2*3.1416)+0.000001))*exp(-(($x-$Mz)**2)/((2*($Vz**2))+0.000001)); } ###code### , where I integral from 0 to 1, and $Vz is the...
  3. goodluckmich

    Help on "Access Violation (Segmentation Fault)" :(

    I wrote a C++ program in Dev-C++. I kept having the problem of access violation (segmentation fault) when I was running the program. :( The following was a segment at which the problem probably occurred. int main(){ ofstream fout("output.txt"); for(int j=0;j<20;j++) {...
  4. goodluckmich

    About using a function pointer/reference in Perl?

    woooow it works now! I tried sub func { # get $x from @_ (passed-in arguments) my $x = shift; return $x*2+5; } and the result is correct now. Thanks sooo much - really lots of help and favor. Thanks!
  5. goodluckmich

    About using a function pointer/reference in Perl?

    I'm trying to use Eric Boesch's library, Math::Integral::Romberg, for the integral of a Gaussian distribution from 0 to 1. However I have some problems about "a reference to the function to be integrated". In my code, I wrote $area=integral(\&func, 0, 1); to do the integration, which is...

Part and Inventory Search

Back
Top