Numworks Epsilon
1.4.1
Graphing Calculator Operating System
erf_inv.cpp
Go to the documentation of this file.
1
#include <
quiz.h
>
2
#include <string.h>
3
#include <
assert.h
>
4
#include <float.h>
5
#include <cmath>
6
#include "../law/erf_inv.h"
7
8
QUIZ_CASE
(erf_inv) {
9
assert
(
erfInv
(0.0) == 0.0);
10
assert
(
std::isinf
(
erfInv
(1.0)) &&
erfInv
(1.0) > 0.0);
11
assert
(
std::isinf
(
erfInv
(-1.0)) &&
erfInv
(-1.0) < 0.0);
12
assert
(
std::fabs
(
erfInv
(0.5) - 0.476936276204469873381418353643130559808969749059470644703) <
DBL_EPSILON
);
13
assert
(
std::fabs
(
erfInv
(0.25) - 0.225312055012178104725014013952277554782118447807246757600) <
DBL_EPSILON
);
14
assert
(
std::fabs
(
erfInv
(0.999999) - 3.458910737279500022150927635957569519915669808042886747076) < 10E-6);
15
assert
(
std::fabs
(
erfInv
(0.123456) - 0.109850294001424923867673480939041914394684494884310054922) <
DBL_EPSILON
);
16
17
}
18
assert
#define assert(e)
Definition:
assert.h:9
isinf
#define isinf(x)
Definition:
math.h:44
fabs
#define fabs(x)
Definition:
math.h:178
erfInv
double erfInv(double x)
Definition:
erf_inv.cpp:31
DBL_EPSILON
#define DBL_EPSILON
Definition:
float.h:11
assert.h
QUIZ_CASE
QUIZ_CASE(erf_inv)
Definition:
erf_inv.cpp:8
quiz.h
epsilon
apps
probability
test
erf_inv.cpp
Generated by
1.8.14