Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/libstdc++-devel-4.0.2/html/26_numerics/ drwxr-xr-x |
Viewing file: Select action/file-type: Chapter 26: NumericsChapter 26 deals with building block abstractions to aid in numerical computing:
All of the Standard C math functions are of course included in C++,
and overloaded versions for ContentsComplex Number ProcessingUsing
Return to top of page or to the FAQ. Array ProcessingOne of the major reasons why FORTRAN can chew through numbers so well
is that it is defined to be free of pointer aliasing, an assumption
that C89 is not allowed to make, and neither is C++98. C99 adds a new
keyword, That library solution is a set of two classes, five template classes,
and "a whole bunch" of functions. The classes are required
to be free of pointer aliasing, so compilers can optimize the
daylights out of them the same way that they have been for FORTRAN.
They are collectively called Some more stuff should go here once somebody has time to write it. Return to top of page or to the FAQ. Numerical FunctionsThere are four generalized functions in the <numeric> header that follow the same conventions as those in <algorithm>. Each of them is overloaded: one signature for common default operations, and a second for fully general operations. Their names are self-explanatory to anyone who works with numerics on a regular basis:
Here is a simple example of the two forms of int ar[50]; int someval = somefunction(); // ...initialize members of ar to something... int sum = std::accumulate(ar,ar+50,0); int sum_stuff = std::accumulate(ar,ar+50,someval); int product = std::accumulate(ar,ar+50,1,std::multiplies<int>()); The first call adds all the members of the array, using zero as an
initial value for The other three functions have similar dual-signature forms. Return to top of page or to the FAQ. C99In addition to the other topics on this page, we'll note here some of the C99 features that appear in libstdc++-v3. The C99 features depend on the As of GCC 3.0, C99 support includes classification functions
such as Return to top of page or to the FAQ. See license.html for copying conditions. Comments and suggestions are welcome, and may be sent to the libstdc++ mailing list. |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0027 ]-- |