Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from CMATHL/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ulises-jeremias committed Feb 22, 2018
2 parents 2a904dc + 0d9043f commit 5762bed
Show file tree
Hide file tree
Showing 45 changed files with 2,194 additions and 256 deletions.
13 changes: 13 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 1.0.{build}
skip_tags: true
image: Visual Studio 2017
platform: x64
configuration: Release
clone_folder: c:\projects\cml
build_script:
- if exist "build" ( rmdir build /s /q )
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=%configuration% -G "Visual Studio 15 2017 Win64" .. || exit /b 1
test_script:
- ctest --output-on-failure --build-config %configuration%
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ compiler:

env:
- FLAGS=""
- FLAGS="-DCML_NO_LONG_DOUBLE_MATH=ON"
- FLAGS="-DCML_LONG_DOUBLE_MATH=ON"
- FLAGS="-DCML_NO_MATH=ON -DCML_NO_STDBOOL=ON -DCML_NO_STDINT=ON"
- FLAGS="-DCML_NO_LONG_DOUBLE_MATH=ON -DCML_NO_MATH=ON -DCML_NO_STDBOOL=ON -DCML_NO_STDINT=ON"
- FLAGS="-DCML_LONG_DOUBLE_MATH=ON -DCML_NO_MATH=ON -DCML_NO_STDBOOL=ON -DCML_NO_STDINT=ON"


script:
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# cml

[![Build Status](https://travis-ci.org/CMATHL/cml.svg?branch=master)](https://travis-ci.org/CMATHL/cml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![Version: v1.9.5](https://img.shields.io/badge/Version-v1.9.5-blue.svg)
[![Build Status](https://travis-ci.org/CMATHL/cml.svg?branch=master)](https://travis-ci.org/CMATHL/cml) [![Documentation Status](https://readthedocs.org/projects/cml/badge/?version=latest)](http://cml.readthedocs.io/en/latest/?badge=latest) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![Version: v1.9.5](https://img.shields.io/badge/Version-v1.9.5-blue.svg)

CML is a pure-C math library with a great variety of mathematical functions. It is almost 100% C89/C90 compliant.

You can read the following [file](./docs/REFERENCE.md) to learn more about CML.
You can read the following [file](./docs~/REFERENCE.md) to learn more about CML.

## Table of Contents

Expand Down Expand Up @@ -62,19 +62,18 @@ $ make && ctest

CML can be configured with the following preprocessors (described in the following sections of this document):

- `CML_LONG_DOUBLE_MATH`
- `CML_NO_ALIASES`
- `DCML_NO_LONG_DOUBLE_MATH`
- `CML_NO_MATH`
- `CML_NO_STDBOOL`
- `CML_NO_STDINT`
- `CML_SINGLE_PRECISION`
- `mfloat_t`
- `mint_t`

You can define these macros during compilation time with flags:

```
cmake .. -DCML_NO_STDBOOL=ON -DCML_NO_MATH=ON -DCML_NO_LONG_DOUBLE_MATH=ON
cmake .. -DCML_NO_STDBOOL=ON -DCML_NO_MATH=ON -DCML_LONG_DOUBLE_MATH=ON
```

### Bool Type
Expand All @@ -87,11 +86,7 @@ By default, `mint_t` is a `int32_t` if the header `stdint.h` is available. If th

### Float Point Type

The float type used by CML is defined by the macro `mfloat_t`, which is by default `long double`.

### Long Double Type

If `CML_SINGLE_PRECISION` (described [bellow](#math-precision)) is not defined, the library will have double precision for the internal definition of its functions. Then, this precision extends by default to the extended double precision and, at the same time, `mfloat_t` will be defined _(if possible)_ as `long double`. This precision can be simply doubled by defining the macro `CML_NO_LONG_DOUBLE_MATH`.
The float type used by CML is defined by the macro `mfloat_t`, which is by default `double`.

### Math Functions Aliases

Expand All @@ -105,7 +100,7 @@ By default, cml will use some math functions from the header `math.h` if it is a

### Math Precision

By default, CML will use double-precision internally. This can be changed by predefining `CML_SINGLE_PRECISION`. If the macro `CML_SINGLE_PRECISION` is defined, the math constants macros will be defined with single precision and the library will use internally the math functions for float types. Otherwise, the math constants macros will be defined with double precision and the library will internally use the math functions for double types.
By default, the library will have double precision for the internal definition of its functions. Then, this precision could be changed to the extended double precision and, at the same time, `mfloat_t` will be defined _(if possible)_ as `long double`. This precision can be simply extended by defining the macro `CML_LONG_DOUBLE_MATH`.

## Build Options

Expand Down Expand Up @@ -151,4 +146,4 @@ A great way to learn how to use the library is to review the [unit tests](./test

## Can I trust this math library?

A goal of the unit tests is to test each function against `CML_FLT_EPSILON` which is defined in cml.h, currently in the interval `[1e6, 1e16]`, depending on the mathematical precision. A number of functions do not yet have unit tests proving epsilon, but more are coming.
A goal of the unit tests is to test each function against `CML_FLT_EPSILON` which is defined in cml.h, currently in the interval `[1e-5, 1e-7]`, depending on the mathematical precision. A number of functions do not yet have unit tests proving epsilon, but more are coming.
10 changes: 5 additions & 5 deletions cmake/CMLFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ ELSE()
MESSAGE(STATUS "Using math functions aliases")
ENDIF()

OPTION(CML_NO_LONG_DOUBLE_MATH "Use non long double-precision floating point values" BOOL:TRUE)
IF(CML_NO_LONG_DOUBLE_MATH)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_LONG_DOUBLE_MATH=\"${CML_NO_LONG_DOUBLE_MATH}\"")
MESSAGE(STATUS "Using double-precision floating point values")
OPTION(CML_LONG_DOUBLE_MATH "Use long double-precision floating point values" BOOL:TRUE)
IF(CML_LONG_DOUBLE_MATH)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_LONG_DOUBLE_MATH=\"${CML_LONG_DOUBLE_MATH}\"")
MESSAGE(STATUS "Using long double-precision floating point values")
ELSE()
MESSAGE(STATUS "Using long-double precision floating point values")
MESSAGE(STATUS "Using double-precision floating point values")
ENDIF()

OPTION(CML_NO_STDBOOL "Use stdbool.h" BOOL:FALSE)
Expand Down
1 change: 1 addition & 0 deletions cml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ SET(CML_SRCS
src/ieee/make_rep.c
src/ieee/print.c
src/ieee/standardize.c
src/deriv/deriv.c
src/diff/diff.c
)
SOURCE_GROUP(cml FILES ${CML_SRCS})
Expand Down
2 changes: 2 additions & 0 deletions cml/include/cml.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "cml/ieee.h"
#include "cml/inline.h"
#include "cml/machine.h"
#include "cml/minmax.h"

#ifndef PREDEF_STANDARD_C11
#undef __CML_NO_GENERIC
Expand All @@ -32,6 +33,7 @@
#include "cml/tgmath.h"
#endif

#include "cml/deriv.h"
#include "cml/diff.h"
#include "cml/easings.h"
#include "cml/structures.h"
Expand Down
16 changes: 16 additions & 0 deletions cml/include/cml/const.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef CML_H
#error "Never use <cml/const.h> directly; include <cml.h> instead."
#endif

#ifndef CML_CONST_H
#define CML_CONST_H

#include "const/num.h"

#include "const/cgs.h"
#include "const/mks.h"

#include "const/cgsm.h"
#include "const/mksa.h"

#endif
96 changes: 96 additions & 0 deletions cml/include/cml/const/cgs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#ifndef __CML_CONST_CGS_H
#define __CML_CONST_CGS_H

#define CML_CONST_CGS_SPEED_OF_LIGHT (2.99792458e10) /* cm / s */
#define CML_CONST_CGS_GRAVITATIONAL_CONSTANT (6.673e-8) /* cm^3 / g s^2 */
#define CML_CONST_CGS_PLANCKS_CONSTANT_H (6.62606896e-27) /* g cm^2 / s */
#define CML_CONST_CGS_PLANCKS_CONSTANT_HBAR (1.05457162825e-27) /* g cm^2 / s */
#define CML_CONST_CGS_ASTRONOMICAL_UNIT (1.49597870691e13) /* cm */
#define CML_CONST_CGS_LIGHT_YEAR (9.46053620707e17) /* cm */
#define CML_CONST_CGS_PARSEC (3.08567758135e18) /* cm */
#define CML_CONST_CGS_GRAV_ACCEL (9.80665e2) /* cm / s^2 */
#define CML_CONST_CGS_ELECTRON_VOLT (1.602176487e-12) /* g cm^2 / s^2 */
#define CML_CONST_CGS_MASS_ELECTRON (9.10938188e-28) /* g */
#define CML_CONST_CGS_MASS_MUON (1.88353109e-25) /* g */
#define CML_CONST_CGS_MASS_PROTON (1.67262158e-24) /* g */
#define CML_CONST_CGS_MASS_NEUTRON (1.67492716e-24) /* g */
#define CML_CONST_CGS_RYDBERG (2.17987196968e-11) /* g cm^2 / s^2 */
#define CML_CONST_CGS_BOLTZMANN (1.3806504e-16) /* g cm^2 / K s^2 */
#define CML_CONST_CGS_MOLAR_GAS (8.314472e7) /* g cm^2 / K mol s^2 */
#define CML_CONST_CGS_STANDARD_GAS_VOLUME (2.2710981e4) /* cm^3 / mol */
#define CML_CONST_CGS_MINUTE (6e1) /* s */
#define CML_CONST_CGS_HOUR (3.6e3) /* s */
#define CML_CONST_CGS_DAY (8.64e4) /* s */
#define CML_CONST_CGS_WEEK (6.048e5) /* s */
#define CML_CONST_CGS_INCH (2.54e0) /* cm */
#define CML_CONST_CGS_FOOT (3.048e1) /* cm */
#define CML_CONST_CGS_YARD (9.144e1) /* cm */
#define CML_CONST_CGS_MILE (1.609344e5) /* cm */
#define CML_CONST_CGS_NAUTICAL_MILE (1.852e5) /* cm */
#define CML_CONST_CGS_FATHOM (1.8288e2) /* cm */
#define CML_CONST_CGS_MIL (2.54e-3) /* cm */
#define CML_CONST_CGS_POINT (3.52777777778e-2) /* cm */
#define CML_CONST_CGS_TEXPOINT (3.51459803515e-2) /* cm */
#define CML_CONST_CGS_MICRON (1e-4) /* cm */
#define CML_CONST_CGS_ANGSTROM (1e-8) /* cm */
#define CML_CONST_CGS_HECTARE (1e8) /* cm^2 */
#define CML_CONST_CGS_ACRE (4.04685642241e7) /* cm^2 */
#define CML_CONST_CGS_BARN (1e-24) /* cm^2 */
#define CML_CONST_CGS_LITER (1e3) /* cm^3 */
#define CML_CONST_CGS_US_GALLON (3.78541178402e3) /* cm^3 */
#define CML_CONST_CGS_QUART (9.46352946004e2) /* cm^3 */
#define CML_CONST_CGS_PINT (4.73176473002e2) /* cm^3 */
#define CML_CONST_CGS_CUP (2.36588236501e2) /* cm^3 */
#define CML_CONST_CGS_FLUID_OUNCE (2.95735295626e1) /* cm^3 */
#define CML_CONST_CGS_TABLESPOON (1.47867647813e1) /* cm^3 */
#define CML_CONST_CGS_TEASPOON (4.92892159375e0) /* cm^3 */
#define CML_CONST_CGS_CANADIAN_GALLON (4.54609e3) /* cm^3 */
#define CML_CONST_CGS_UK_GALLON (4.546092e3) /* cm^3 */
#define CML_CONST_CGS_MILES_PER_HOUR (4.4704e1) /* cm / s */
#define CML_CONST_CGS_KILOMETERS_PER_HOUR (2.77777777778e1) /* cm / s */
#define CML_CONST_CGS_KNOT (5.14444444444e1) /* cm / s */
#define CML_CONST_CGS_POUND_MASS (4.5359237e2) /* g */
#define CML_CONST_CGS_OUNCE_MASS (2.8349523125e1) /* g */
#define CML_CONST_CGS_TON (9.0718474e5) /* g */
#define CML_CONST_CGS_METRIC_TON (1e6) /* g */
#define CML_CONST_CGS_UK_TON (1.0160469088e6) /* g */
#define CML_CONST_CGS_TROY_OUNCE (3.1103475e1) /* g */
#define CML_CONST_CGS_CARAT (2e-1) /* g */
#define CML_CONST_CGS_UNIFIED_ATOMIC_MASS (1.660538782e-24) /* g */
#define CML_CONST_CGS_GRAM_FORCE (9.80665e2) /* cm g / s^2 */
#define CML_CONST_CGS_POUND_FORCE (4.44822161526e5) /* cm g / s^2 */
#define CML_CONST_CGS_KILOPOUND_FORCE (4.44822161526e8) /* cm g / s^2 */
#define CML_CONST_CGS_POUNDAL (1.38255e4) /* cm g / s^2 */
#define CML_CONST_CGS_CALORIE (4.1868e7) /* g cm^2 / s^2 */
#define CML_CONST_CGS_BTU (1.05505585262e10) /* g cm^2 / s^2 */
#define CML_CONST_CGS_THERM (1.05506e15) /* g cm^2 / s^2 */
#define CML_CONST_CGS_HORSEPOWER (7.457e9) /* g cm^2 / s^3 */
#define CML_CONST_CGS_BAR (1e6) /* g / cm s^2 */
#define CML_CONST_CGS_STD_ATMOSPHERE (1.01325e6) /* g / cm s^2 */
#define CML_CONST_CGS_TORR (1.33322368421e3) /* g / cm s^2 */
#define CML_CONST_CGS_METER_OF_MERCURY (1.33322368421e6) /* g / cm s^2 */
#define CML_CONST_CGS_INCH_OF_MERCURY (3.38638815789e4) /* g / cm s^2 */
#define CML_CONST_CGS_INCH_OF_WATER (2.490889e3) /* g / cm s^2 */
#define CML_CONST_CGS_PSI (6.89475729317e4) /* g / cm s^2 */
#define CML_CONST_CGS_POISE (1e0) /* g / cm s */
#define CML_CONST_CGS_STOKES (1e0) /* cm^2 / s */
#define CML_CONST_CGS_STILB (1e0) /* cd / cm^2 */
#define CML_CONST_CGS_LUMEN (1e0) /* cd sr */
#define CML_CONST_CGS_LUX (1e-4) /* cd sr / cm^2 */
#define CML_CONST_CGS_PHOT (1e0) /* cd sr / cm^2 */
#define CML_CONST_CGS_FOOTCANDLE (1.076e-3) /* cd sr / cm^2 */
#define CML_CONST_CGS_LAMBERT (1e0) /* cd sr / cm^2 */
#define CML_CONST_CGS_FOOTLAMBERT (1.07639104e-3) /* cd sr / cm^2 */
#define CML_CONST_CGS_CURIE (3.7e10) /* 1 / s */
#define CML_CONST_CGS_ROENTGEN (2.58e-7) /* A s / g */
#define CML_CONST_CGS_RAD (1e2) /* cm^2 / s^2 */
#define CML_CONST_CGS_SOLAR_MASS (1.98892e33) /* g */
#define CML_CONST_CGS_BOHR_RADIUS (5.291772083e-9) /* cm */
#define CML_CONST_CGS_NEWTON (1e5) /* cm g / s^2 */
#define CML_CONST_CGS_DYNE (1e0) /* cm g / s^2 */
#define CML_CONST_CGS_JOULE (1e7) /* g cm^2 / s^2 */
#define CML_CONST_CGS_ERG (1e0) /* g cm^2 / s^2 */
#define CML_CONST_CGS_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-5) /* g / K^4 s^3 */
#define CML_CONST_CGS_THOMSON_CROSS_SECTION (6.65245893699e-25) /* cm^2 */

#endif
102 changes: 102 additions & 0 deletions cml/include/cml/const/cgsm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#ifndef CML_CONST_CGSM_H
#define CML_CONST_CGSM_H

#define CML_CONST_CGSM_SPEED_OF_LIGHT (2.99792458e10) /* cm / s */
#define CML_CONST_CGSM_GRAVITATIONAL_CONSTANT (6.673e-8) /* cm^3 / g s^2 */
#define CML_CONST_CGSM_PLANCKS_CONSTANT_H (6.62606896e-27) /* g cm^2 / s */
#define CML_CONST_CGSM_PLANCKS_CONSTANT_HBAR (1.05457162825e-27) /* g cm^2 / s */
#define CML_CONST_CGSM_ASTRONOMICAL_UNIT (1.49597870691e13) /* cm */
#define CML_CONST_CGSM_LIGHT_YEAR (9.46053620707e17) /* cm */
#define CML_CONST_CGSM_PARSEC (3.08567758135e18) /* cm */
#define CML_CONST_CGSM_GRAV_ACCEL (9.80665e2) /* cm / s^2 */
#define CML_CONST_CGSM_ELECTRON_VOLT (1.602176487e-12) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_MASS_ELECTRON (9.10938188e-28) /* g */
#define CML_CONST_CGSM_MASS_MUON (1.88353109e-25) /* g */
#define CML_CONST_CGSM_MASS_PROTON (1.67262158e-24) /* g */
#define CML_CONST_CGSM_MASS_NEUTRON (1.67492716e-24) /* g */
#define CML_CONST_CGSM_RYDBERG (2.17987196968e-11) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_BOLTZMANN (1.3806504e-16) /* g cm^2 / K s^2 */
#define CML_CONST_CGSM_MOLAR_GAS (8.314472e7) /* g cm^2 / K mol s^2 */
#define CML_CONST_CGSM_STANDARD_GAS_VOLUME (2.2710981e4) /* cm^3 / mol */
#define CML_CONST_CGSM_MINUTE (6e1) /* s */
#define CML_CONST_CGSM_HOUR (3.6e3) /* s */
#define CML_CONST_CGSM_DAY (8.64e4) /* s */
#define CML_CONST_CGSM_WEEK (6.048e5) /* s */
#define CML_CONST_CGSM_INCH (2.54e0) /* cm */
#define CML_CONST_CGSM_FOOT (3.048e1) /* cm */
#define CML_CONST_CGSM_YARD (9.144e1) /* cm */
#define CML_CONST_CGSM_MILE (1.609344e5) /* cm */
#define CML_CONST_CGSM_NAUTICAL_MILE (1.852e5) /* cm */
#define CML_CONST_CGSM_FATHOM (1.8288e2) /* cm */
#define CML_CONST_CGSM_MIL (2.54e-3) /* cm */
#define CML_CONST_CGSM_POINT (3.52777777778e-2) /* cm */
#define CML_CONST_CGSM_TEXPOINT (3.51459803515e-2) /* cm */
#define CML_CONST_CGSM_MICRON (1e-4) /* cm */
#define CML_CONST_CGSM_ANGSTROM (1e-8) /* cm */
#define CML_CONST_CGSM_HECTARE (1e8) /* cm^2 */
#define CML_CONST_CGSM_ACRE (4.04685642241e7) /* cm^2 */
#define CML_CONST_CGSM_BARN (1e-24) /* cm^2 */
#define CML_CONST_CGSM_LITER (1e3) /* cm^3 */
#define CML_CONST_CGSM_US_GALLON (3.78541178402e3) /* cm^3 */
#define CML_CONST_CGSM_QUART (9.46352946004e2) /* cm^3 */
#define CML_CONST_CGSM_PINT (4.73176473002e2) /* cm^3 */
#define CML_CONST_CGSM_CUP (2.36588236501e2) /* cm^3 */
#define CML_CONST_CGSM_FLUID_OUNCE (2.95735295626e1) /* cm^3 */
#define CML_CONST_CGSM_TABLESPOON (1.47867647813e1) /* cm^3 */
#define CML_CONST_CGSM_TEASPOON (4.92892159375e0) /* cm^3 */
#define CML_CONST_CGSM_CANADIAN_GALLON (4.54609e3) /* cm^3 */
#define CML_CONST_CGSM_UK_GALLON (4.546092e3) /* cm^3 */
#define CML_CONST_CGSM_MILES_PER_HOUR (4.4704e1) /* cm / s */
#define CML_CONST_CGSM_KILOMETERS_PER_HOUR (2.77777777778e1) /* cm / s */
#define CML_CONST_CGSM_KNOT (5.14444444444e1) /* cm / s */
#define CML_CONST_CGSM_POUND_MASS (4.5359237e2) /* g */
#define CML_CONST_CGSM_OUNCE_MASS (2.8349523125e1) /* g */
#define CML_CONST_CGSM_TON (9.0718474e5) /* g */
#define CML_CONST_CGSM_METRIC_TON (1e6) /* g */
#define CML_CONST_CGSM_UK_TON (1.0160469088e6) /* g */
#define CML_CONST_CGSM_TROY_OUNCE (3.1103475e1) /* g */
#define CML_CONST_CGSM_CARAT (2e-1) /* g */
#define CML_CONST_CGSM_UNIFIED_ATOMIC_MASS (1.660538782e-24) /* g */
#define CML_CONST_CGSM_GRAM_FORCE (9.80665e2) /* cm g / s^2 */
#define CML_CONST_CGSM_POUND_FORCE (4.44822161526e5) /* cm g / s^2 */
#define CML_CONST_CGSM_KILOPOUND_FORCE (4.44822161526e8) /* cm g / s^2 */
#define CML_CONST_CGSM_POUNDAL (1.38255e4) /* cm g / s^2 */
#define CML_CONST_CGSM_CALORIE (4.1868e7) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_BTU (1.05505585262e10) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_THERM (1.05506e15) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_HORSEPOWER (7.457e9) /* g cm^2 / s^3 */
#define CML_CONST_CGSM_BAR (1e6) /* g / cm s^2 */
#define CML_CONST_CGSM_STD_ATMOSPHERE (1.01325e6) /* g / cm s^2 */
#define CML_CONST_CGSM_TORR (1.33322368421e3) /* g / cm s^2 */
#define CML_CONST_CGSM_METER_OF_MERCURY (1.33322368421e6) /* g / cm s^2 */
#define CML_CONST_CGSM_INCH_OF_MERCURY (3.38638815789e4) /* g / cm s^2 */
#define CML_CONST_CGSM_INCH_OF_WATER (2.490889e3) /* g / cm s^2 */
#define CML_CONST_CGSM_PSI (6.89475729317e4) /* g / cm s^2 */
#define CML_CONST_CGSM_POISE (1e0) /* g / cm s */
#define CML_CONST_CGSM_STOKES (1e0) /* cm^2 / s */
#define CML_CONST_CGSM_STILB (1e0) /* cd / cm^2 */
#define CML_CONST_CGSM_LUMEN (1e0) /* cd sr */
#define CML_CONST_CGSM_LUX (1e-4) /* cd sr / cm^2 */
#define CML_CONST_CGSM_PHOT (1e0) /* cd sr / cm^2 */
#define CML_CONST_CGSM_FOOTCANDLE (1.076e-3) /* cd sr / cm^2 */
#define CML_CONST_CGSM_LAMBERT (1e0) /* cd sr / cm^2 */
#define CML_CONST_CGSM_FOOTLAMBERT (1.07639104e-3) /* cd sr / cm^2 */
#define CML_CONST_CGSM_CURIE (3.7e10) /* 1 / s */
#define CML_CONST_CGSM_ROENTGEN (2.58e-8) /* abamp s / g */
#define CML_CONST_CGSM_RAD (1e2) /* cm^2 / s^2 */
#define CML_CONST_CGSM_SOLAR_MASS (1.98892e33) /* g */
#define CML_CONST_CGSM_BOHR_RADIUS (5.291772083e-9) /* cm */
#define CML_CONST_CGSM_NEWTON (1e5) /* cm g / s^2 */
#define CML_CONST_CGSM_DYNE (1e0) /* cm g / s^2 */
#define CML_CONST_CGSM_JOULE (1e7) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_ERG (1e0) /* g cm^2 / s^2 */
#define CML_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT (5.67040047374e-5) /* g / K^4 s^3 */
#define CML_CONST_CGSM_THOMSON_CROSS_SECTION (6.65245893699e-25) /* cm^2 */
#define CML_CONST_CGSM_BOHR_MAGNETON (9.27400899e-21) /* abamp cm^2 */
#define CML_CONST_CGSM_NUCLEAR_MAGNETON (5.05078317e-24) /* abamp cm^2 */
#define CML_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT (9.28476362e-21) /* abamp cm^2 */
#define CML_CONST_CGSM_PROTON_MAGNETIC_MOMENT (1.410606633e-23) /* abamp cm^2 */
#define CML_CONST_CGSM_FARADAY (9.64853429775e3) /* abamp s / mol */
#define CML_CONST_CGSM_ELECTRON_CHARGE (1.602176487e-20) /* abamp s */

#endif

0 comments on commit 5762bed

Please sign in to comment.