Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RcppCore/Rcpp
/ takeLogRcpp
Function
takeLogRcpp
inst/tinytest/cpp/exceptions.cpp:34–39 ·
view source on GitHub ↗
[[Rcpp::export]]
Source
from the content-addressed store, hash-verified
32
33
// [[Rcpp::export]]
34
double takeLogRcpp(double val) {
35
if (val <= 0.0) {
36
throw Rcpp::exception(
"Inadmissible value"
);
37
}
38
return log(val);
39
}
40
41
// [[Rcpp::export]]
42
double takeLogStop(double val) {
Callers
nothing calls this directly
Calls
2
exception
Class · 0.85
log
Function · 0.50
Tested by
no test coverage detected