Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.

Similar presentations


Presentation on theme: "ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material."— Presentation transcript:

1 ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material developed by Professor Phillip Wong @ PSU ECE

2 Syllabus Beyond GNU Scientific Library

3 2 Beyond The C90 Standard Library contains only elementary math functions: sinatan2log10ldexp cossinhpowfrexp tancoshsqrtmodf asintanhceilfmod acosexpfloor atanlogfabs

4 3 C99 expands the number of built-in math functions: More macros and constants are defined. Complex numbers, operators, functions are supported. acoshscalblnllroundfdim asinhcbrtrintfmax atanhhypotlrintfmin exp2erfllrintfma expm1erfcnearbyint ilogbtgammaremainder log1plgammaremquo log2trunccopysign logbroundNAN scalbnlroundnextafter

5 4 Even more comprehensive math abilities can be added to C by using commercial or free libraries. From Wikipedia article: List of numerical libraries GNU Scientific Library - popular, free numerical analysis library implemented in C. GNU Multi-Precision Library - for doing arbitrary precision arithmetic. IMSL Numerical Libraries - cross-platform libraries containing a comprehensive set of mathematical and statistical functions. LabWindows/CVI - libraries for analysis of measurement data, signal generation, windowing, filter functions, signal processing, linear algebra, array and complex operations, curve fitting and statistics. NAG - collection of numerical analysis routines which can be called from user applications running on a wide variety of hardware platforms. Alternative:Numerical Recipes (book with source code, also online version, not free) http://www.nr.com

6 5 GNU Scientific Library Free to use: License = GPL Homepage: http://www.gnu.org/software/gslhttp://www.gnu.org/software/gsl Complex NumbersChebyshev ApproximationRandom Distributions Special FunctionsDiscrete Hankel TransformsHistograms PermutationsMinimizationMonte Carlo Integration BLAS SupportPhysical ConstantsDifferential Equations EigensystemsWaveletsNumerical Differentiation QuadratureRoots of PolynomialsSeries Acceleration Quasi-Random SequencesVectors and MatricesRoot-Finding StatisticsSortingLeast-Squares Fitting N-TuplesLinear AlgebraIEEE Floating-Point Simulated AnnealingFast Fourier TransformsBasis splines InterpolationRandom Numbers


Download ppt "ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material."

Similar presentations


Ads by Google