imate
C++/CUDA Reference
Loading...
Searching...
No Matches
inverse.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3 * SPDX-License-Identifier: BSD-3-Clause
4 * SPDX-FileType: SOURCE
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the license found in the LICENSE.txt file in the root
8 * directory of this source tree.
9 */
10
11
12// =======
13// Headers
14// =======
15
16#include "./inverse.h"
17
18
19// ================
20// Inverse function (float)
21// ================
22
26
27float Inverse::function(const float lambda_) const
28{
29 return 1.0f / lambda_;
30}
31
32
33// ================
34// Inverse function (double)
35// ================
36
40
41double Inverse::function(const double lambda_) const
42{
43 return 1.0 / lambda_;
44}
45
46
47// ================
48// Inverse function (long double)
49// ================
50
54
55long double Inverse::function(const long double lambda_) const
56{
57 return 1.0l / lambda_;
58}
virtual float function(const float lambda_) const
Definition inverse.cpp:27