📄 fnmath.hpp
字号:
// Float number math implementation -*- C++ -*-
// Copyright (C) 2005 Ben T. Bear
//
// This file is published under GNU GPL 2.0. See more in "copy.hpp".
// #include "copy.hpp"
#ifndef __bt2il_fn_math_hpp
#define __bt2il_fn_math_hpp
#include "fn.hpp"
#include "fnexp.hpp"
namespace btil
{
namespace fn
{
template <int n>
struct factorial;
template <typename a, typename q, int n>
struct geometric;
template <int n>
struct factorial
{
struct value
{
static const double f_val = __factorial<n>::f_val;
};
};
template <typename a, typename q, int n>
struct geometric
{
struct value
{
static const double f_val = (a::f_val * (1 - pow_n<q, n>::value::f_val)
/ (1 - q::f_val));
};
};
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -