STORMM Source Documentation
Loading...
Searching...
No Matches
src
Math
juffa.h
1
// -*-c++-*-
2
#ifndef STORMM_JUFFA_H
3
#define STORMM_JUFFA_H
4
5
#include "copyright.h"
6
7
// Copyright (c) 2015-2021 Norbert Juffa
8
// All rights reserved.
9
//
10
// Redistribution and use in source and binary forms, with or without modification, are permitted
11
// provided that the following conditions are met:
12
//
13
// 1. Redistributions of source code must retain the above copyright notice, this list of
14
// conditions and the following disclaimer.
15
//
16
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of
17
// conditions and the following disclaimer in the documentation and/or other materials provided
18
// with the distribution.
19
//
20
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
21
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
// POSSIBILITY OF SUCH DAMAGE.
29
30
namespace
stormm {
31
namespace
stmath {
32
36
class
JfErfc
{
37
public
:
38
41
JfErfc
(
float
alpha_in = 1.0);
42
46
float
erfcJf
(
float
x);
47
48
private
:
49
float
alpha;
50
float
c0;
51
float
c1;
52
float
c2;
53
float
c3;
54
float
c4;
55
float
c5;
56
float
c6;
57
float
c7;
58
float
c8;
59
float
c9;
60
};
61
66
float
expJf(
float
x);
67
68
}
// namespace stmath
69
}
// namespace stormm
70
#endif
stormm::stmath::JfErfc::JfErfc
JfErfc(float alpha_in=1.0)
The constructor requires a pre-factor for the argument that the object will eventually take in order ...
Definition
juffa.cpp:10
stormm::stmath::JfErfc::erfcJf
float erfcJf(float x)
Evaluate the approximate erfc(alpha * x) using all 32-bit floating-point arithmetic.
Definition
juffa.cpp:26
Generated by
1.13.2