imate
C++/CUDA Reference
Loading...
Searching...
No Matches
logarithm.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 <cmath> // log
17#include "./logarithm.h"
18
19
20// ==================
21// Logarithm function (float)
22// ==================
23
27
28float Logarithm::function(const float lambda_) const
29{
30 return std::log(lambda_);
31}
32
33
34// ==================
35// Logarithm function (double)
36// ==================
37
41
42double Logarithm::function(const double lambda_) const
43{
44 return std::log(lambda_);
45}
46
47
48// ==================
49// Logarithm function (long double)
50// ==================
51
55
56long double Logarithm::function(const long double lambda_) const
57{
58 return std::log(lambda_);
59}
virtual float function(const float lambda_) const
Definition logarithm.cpp:28