summaryrefslogtreecommitdiffstats
path: root/test/unit/math.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace tabs following #define with spaces.Jason Evans2017-01-211-3/+3
| | | | This resolves #564.
* Remove extraneous parens around return arguments.Jason Evans2017-01-211-4/+4
| | | | This resolves #540.
* Update brace style.Jason Evans2017-01-211-20/+13
| | | | | | | Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
* Remove leading blank lines from function bodies.Jason Evans2017-01-131-1/+0
| | | | This resolves #535.
* Work around a weird pgi bug in test/unit/math.cElliot Ronaghan2016-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | pgi fails to compile math.c, reporting that `-INFINITY` in `pt_norm_expected[]` is a "Non-constant" expression. A simplified version of this failure is: ```c #include <math.h> static double inf1, inf2 = INFINITY; // no complaints static double inf3 = INFINITY; // suddenly INFINITY is "Non-constant" int main() { } ``` ```sh PGC-S-0074-Non-constant expression in initializer (t.c: 4) ``` pgi errors on the declaration of inf3, and will compile fine if that line is removed. I've reported this bug to pgi, but in the meantime I just switched to using (DBL_MAX + DBL_MAX) to work around this bug.
* Define INFINITY when it's not definedMike Hommey2014-05-281-0/+6
|
* Add probabability distribution utility code.Jason Evans2013-12-101-0/+388
Add probabability distribution utility code that enables generation of random deviates drawn from normal, Chi-square, and Gamma distributions. Fix format strings in several of the assert_* macros (remove a %s). Clean up header issues; it's critical that system headers are not included after internal definitions potentially do things like: #define inline Fix the build system to incorporate header dependencies for the test library C files.