PASS Rinchi-Fortran-Preprocessor-0.02 i386-freebsd 6.1-release-p23
  Home FAQ Contact Sign in
perl.cpan.testers only
 
Advanced search
POPULAR GROUPS

more...

 Up
PASS Rinchi-Fortran-Preprocessor-0.02 i386-freebsd 6.1-release-p23         

Group: perl.cpan.testers · Group Profile
Author: srezic
Date: Sep 19, 2008 12:13

This distribution has been tested as part of the cpan-testers
effort to test as many new uploads to CPAN as possible. See
http://testers.cpan.org/

--
Dear Brian M. Ames,

This is a computer-generated report for Rinchi-Fortran-Preprocessor-0.02
on perl 5.8.8 patch 34313, created by CPAN-Reporter-1.17.

Thank you for uploading your work to CPAN. Congratulations!
All tests were successful.

Sections of this report:

* Tester comments
* Program output
* Prerequisites
* Environment and other context

------------------------------
TESTER COMMENTS
------------------------------

Additional comments from tester:

none provided

------------------------------
PROGRAM OUTPUT
------------------------------

Output from '/usr/bin/make test':

PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Rinchi-Fortran-Preprocessor....ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.02 cusr 0.01 csys = 0.04 CPU)
Result: PASS
PERL_DL_NONLAZY=1 /usr/perl5.8.8@34313/bin/perl5.8.8 "-Iblib/lib" "-Iblib/arch" test.pl

! --------------------------------------------------------------------
! This program solves equations with the Bisection Method. Given
! a function f(x) = 0. The bisection method starts with two values,
! a and b such that f(a) and f(b) have opposite signs. That is,
! f(a)*f(b) < 0. Then, it is guaranteed that f(x)=0 has a root in
! the range of a and b. This program reads in a and b (Left and Right
! in this program) and find the root in [a,b].
! In the following, function f() is REAL FUNCTION Funct() and
! solve() is the function for solving the equation.
! --------------------------------------------------------------------

PROGRAM Bisection
IMPLICIT NONE

REAL, PARAMETER :: Tolerance = 0.00001
REAL :: Left, fLeft
REAL :: Right, fRight
REAL :: Root

WRITE(*,*) 'This program can solves equation F(x) = 0'
WRITE(*,*) 'Please enter two values Left and Right such that '
WRITE(*,*) 'F(Left) and F(Right) have opposite signs.'
WRITE(*,*)
WRITE(*,*) 'Left and Right please --> '
READ(*,*) Left, Right ! read in Left and Right

fLeft = Funct(Left) ! compute their function values
fRight = Funct(Right)
WRITE(*,*)
WRITE(*,*) 'Chwith = ', Left, ' f(Chwith) = ', fLeft ! Welsh
WRITE(*,*) 'De = ', Right, ' f(De) = ', fRight ! Welsh
WRITE(*,*)
IF (fLeft*fRight > 0.0) THEN
WRITE(*,*) '*** ERROR: f(Left)*f(Right) must be negative ***'
ELSE
Root = Solve(Left, Right, Tolerance)
WRITE(*,*) 'A root is ', Root
END IF

CONTAINS

! --------------------------------------------------------------------
! REAL FUNCTION Funct()
! This is for function f(x). It takes a REAL formal argument and
! returns the value of f() at x. The following is sample function
! with a root in the range of -10.0 and 0.0. You can change the
! expression with your own function.
! --------------------------------------------------------------------

REAL FUNCTION Funct(x)
IMPLICIT NONE
REAL, INTENT(IN) :: x
REAL, PARAMETER :: PI = 3.1415926
REAL, PARAMETER :: a = 0.8475

Funct = SQRT(PI/2.0)*EXP(a*x) + x/(a*a + x*x)

END FUNCTION Funct

! --------------------------------------------------------------------
! REAL FUNCTION Solve()
! This function takes Left - the left end, Right - the right end,
! and Tolerance - a tolerance value such that f(Left)*f(Right) < 0
! and find a root in the range of Left and Right.
! This function works as follows. Because of INTENT(IN), this
! function cannot change the values of Left and Right and therefore
! the values of Left and Right are saved to a and b.
! Then, the middle point c=(a+b)/2 and its function value f(c)
! is computed. If f(a)*f(c) < 0, then a root is in [a,c]; otherwise,
! a root is in [c,b]. In the former case, replacing b and f(b) with
! c and f(c), we still maintain that a root in [a,b]. In the latter,
! replacing a and f(a) with c and f(c) will keep a root in [a,b].
! This process will continue until |f(c)| is less than Tolerance and
! hence c can be considered as a root.
! --------------------------------------------------------------------

REAL FUNCTION Solve(Left, Right, Tolerance)
IMPLICIT NONE
REAL, INTENT(IN) :: Left, Right, Tolerance
REAL :: a, Fa, b, Fb, c, Fc

a = Left ! save Left and Right
b = Right

Fa = Funct(a) ! compute the function values
Fb = Funct(b)
IF (ABS(Fa) < Tolerance) THEN ! if f(a) is already small
Solve = a ! then a is a root
ELSE IF (ABS(Fb) < Tolerance) THEN ! is f(b) is small
Solve = b ! then b is a root
ELSE ! otherwise,
DO ! iterate ....
c = (a + b)/2.0 ! compute the middle point
Fc = Funct(c) ! and its function value
IF (ABS(Fc) < Tolerance) THEN ! is it very small?
Solve = c ! yes, c is a root
EXIT
ELSE IF (Fa*Fc < 0.0) THEN ! do f(a)*f(c) < 0 ?
b = c ! replace b with c
Fb = Fc ! and f(b) with f(c)
ELSE ! then f(c)*f(b) < 0 holds
a = c ! replace a with c
Fa = Fc ! and f(a) with f(c)
END IF
END DO ! go back and do it again
END IF
END FUNCTION Solve

END PROGRAM Bisection

------------------------------
PREREQUISITES
------------------------------

Prerequisite modules loaded:

No requirements found

------------------------------
ENVIRONMENT AND OTHER CONTEXT
------------------------------

Environment variables:

PATH = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin:/usr/perl5.8.0/bin:/usr/bin:/bin:/usr/local/sbin...
PERL5LIB =
PERL5OPT = -I/tmp/CPAN-Reporter-lib-S2m4 -MDevel::Autoflush
PERL5_CPANPLUS_IS_RUNNING = 92427
PERL5_CPAN_IS_RUNNING = 92427
PERL_BATCH = yes
PERL_CPAN_REPORTER_CONFIG = /home/cpansand/.cpanreporter/configfile.ini
PERL_EXTUTILS_AUTOINSTALL = --defaultdeps
PERL_HTML_DISPLAY_CLASS = HTML::Display::Mozilla
SHELL = /usr/local/bin/zsh
TERM = screen

Perl special variables (and OS-specific diagnostics, for MSWin32):

$^X = /usr/perl5.8.8@34313/bin/perl5.8.8
$UID/$EUID = 1023 / 1023
$GID = 1023 1023 1023
$EGID = 1023 1023 1023

Perl module toolchain versions installed:

Module Have
------------------- ------
CPAN 1.9205
Cwd 3.2701
ExtUtils::CBuilder 0.24
ExtUtils::Command 1.14
ExtUtils::Install 1.50
ExtUtils::MakeMaker 6.44
ExtUtils::Manifest 1.54
ExtUtils::ParseXS 2.19
File::Spec 3.2701
Module::Build 0.2808
Module::Signature 0.55
Test::Harness 3.13
Test::More 0.80
YAML 0.66
YAML::Syck 1.05
version 0.76

--

Summary of my perl5 (revision 5 version 8 subversion 8 patch 34313) configuration:
Platform:
osname=freebsd, osvers=6.1-release-p23, archname=i386-freebsd
uname='freebsd biokovo.herceg.de 6.1-release-p23 freebsd 6.1-release-p23 #0: wed feb 13 10:36:51 utc 2008 root@i386-builder.daemonology.net:usrobjusrsrcsysgeneric i386 '
config_args='-ds -e -Dprefix=/usr/perl5.8.8@34313'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-O',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.4.4 [FreeBSD] 20050518', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
no comments
diggit! del.icio.us! reddit!