tech_log
2014년 3월 18일 화요일
R integer factorization code
# simple but ineffective.
factor =function (x) {
limit = ceiling(sqrt(x))
g = x/(1:limit)
k = x/g[g%%1==0]
c(k, rev(x/k))
}
댓글 없음:
댓글 쓰기
최근 게시물
이전 게시물
홈
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기