LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
LMCAS::anonymous_namespace{symbolic_construction.cpp} 命名空间参考

函数

Rational decimal_rational (lmmc_real_t value)

函数说明

◆ decimal_rational()

Rational LMCAS::anonymous_namespace{symbolic_construction.cpp}::decimal_rational ( lmmc_real_t value)

在文件 symbolic_construction.cpp 第 14 行定义.

14 {
15 if (!std::isfinite(value)) {
16 throw std::invalid_argument("approximate number must be finite");
17 }
18 char token[64];
19 const auto formatted = std::to_chars(
20 token, token + sizeof(token), value, std::chars_format::general);
21 if (formatted.ec != std::errc{}) {
22 throw std::logic_error("finite double formatting failed");
23 }
24 return Rational(std::string(token, formatted.ptr));
25}
const std::string const ExprPtr & value

引用了 decimal_rational() , 以及 LMCAS::value.

被这些函数引用 decimal_rational().

函数调用图:
这是这个函数的调用关系图: