상위 질문
타임라인
채팅
관점
Bc (프로그래밍 언어)
위키백과, 무료 백과사전
Remove ads
bc는 basic calculator 또는 bench calculator의 준말로, C 프로그래밍 언어와 문법이 비슷한 전체적 정밀도 계산기 언어이다. bc는 일반적으로 수학적 스크립팅 언어 또는 상호작용적 수학 셸로 사용된다.
예시 코드
POSIX bc의 "power" 함수
 /* A function to return the integer part of x */
 define i(x) {
    auto s
    s = scale
    scale = 0
    x /= 1   /* round x down */
    scale = s
    return (x)
 }
 /* Use the fact that x^y == e^(y*log(x)) */
 define p(x,y) {
    if (y == i(y)) {
       return (x ^ y)
    }
    return ( e( y * l(x) ) )
 }
같이 보기
외부 링크
- Dittmer, I. 1993. Error in Unix commands dc and bc for multiple-precision-arithmetic. SIGNUM Newsl. 28, 2 (Apr. 1993), 8–11.
 - Collection of useful GNU bc functions
 - GNU bc (and an alpha version) from the Free Software Foundation
 
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads