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 PSU ECE
Syllabus Beyond GNU Scientific Library
2 Beyond The C90 Standard Library contains only elementary math functions: sinatan2log10ldexp cossinhpowfrexp tancoshsqrtmodf asintanhceilfmod acosexpfloor atanlogfabs
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
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)
5 GNU Scientific Library Free to use: License = GPL Homepage: 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