Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. bc (Unix) — Wikipédia
bc (Unix) — Wikipédia 👆 Click Here! Read More..
Un article de Wikipédia, l'encyclopédie libre.

Bc

Informations
Première version 1975Voir et modifier les données sur Wikidata
Type Langage de programmation
Utilitaire UNIX (d)Voir et modifier les données sur Wikidata

modifier - modifier le code - voir Wikidata (aide)

bc, abréviation de « basic calculator » (« calculatrice basique »), est un interpréteur de commandes Unix qui permet d'effectuer des calculs en arithmétique multiprécision. Sa syntaxe est proche du langage C.

bc peut interpréter un script ou être invoqué en ligne de commande, de façon interactive. Dans ce dernier cas, il suffit de taper en ligne de commande : bc, puis de saisir une expression mathématique, par exemple (1 + 3) * 2, et une fois entré cette ligne, l'interpréteur affichera 8.

Bien que bc effectue des calculs en arithmétique multiprécision (donc sans passer par la représentation en virgule flottante), il est réglé par défaut sur un résultat arrondi à l'unité : ainsi l'expression 2/3 renverra le résultat 0. L'option -l (taper bc -l) déclenche un arrondi par défaut à 20 décimales, tout en intégrant quelques fonctions mathématiques courantes à l'interpréteur (sin, cos, atan, ln, exp essentiellement).

bc, écrit par deux chercheurs des Bell Labs (le cryptographe Robert Morris Sr. (en)[1] et Lorinda Cherry) a été intégré à Unix en 1975 (version 6). Ses auteurs avaient d'abord écrit un interpréteur arithmétique multiprécision utilisant la notation polonaise inverse : dc (desk calculator). bc n'est, fondamentalement, qu'un préprocesseur de dc, et c'est un programme très court (il est obtenu par traitement d'un seul fichier par yacc) qui ne fait que traduire les expressions algébriques en notation polonaise inverse avant d'appeler dc.

Depuis 1991, POSIX a normalisé la syntaxe de bc. Il en existe aujourd'hui deux implémentations : celle d'Unix, qui est un préprocesseur de dc, que l'on retrouve sur le système d'exploitation Plan 9 ; l'autre est GNU bc, publié en 1991 par Philip A. Nelson.

GNU bc

[modifier | modifier le code]
$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
1+1
2
scale = 20
sqrt(2)
1.41421356237309504880

Notes et références

[modifier | modifier le code]

Note

[modifier | modifier le code]
  1. ↑ Cf. (en) Chad Perrin, « Cryptographer and computer scientist Robert Morris dies at 78 », IT Security,‎ 8 juillet 2011 (lire en ligne).

Source

[modifier | modifier le code]
  • Lorinda Cherry et Robert Morris, « BC − An Arbitrary Precision Desk-Calculator Language », Bell Laboratories, 1997

Lien externe

[modifier | modifier le code]

(en) Site officiel

v · m
Commandes Unix
Aide
  • uname
  • apropos
  • help
  • file
  • history
  • info
  • man
  • type
  • whatis
Environnement utilisateur
  • env
  • dmesg
  • finger
  • halt
  • id
  • init
  • logname
  • mesg
  • passwd
  • reboot
  • shutdown
  • su
  • sudo
  • talk
  • uptime
  • w
  • wall
  • who
  • whoami
  • write
Gestion de processus
  • at
  • bg
  • chroot
  • crontab
  • disown
  • exit
  • fg
  • htop
  • iowait
  • jobs
  • kill
  • nice
  • nohup
  • pkill
  • ps
  • pstree
  • sleep
  • time
  • top
Manipulation de texte
  • awk (gawk)
  • banner
  • bash
  • cat
  • clear
  • cut
  • diff
  • ed
  • ex
  • head
  • join
  • nl
  • paste
  • patch
  • read
  • sed
  • sort
  • strings
  • tail
  • tee
  • tr
  • uniq
  • vi
  • vim
  • wc
Programmation shell
  • alias
  • basename
  • dirname
  • echo
  • expr
  • false
  • printf
  • set
  • test
  • true
  • unset
  • wait
Recherche
  • find
  • grep
  • locate
  • whereis
  • which
Réseau
  • cURL
  • ethtool
  • ftp
  • host
  • ifconfig
  • mail
  • mailx
  • mii-tool
  • nc
  • netstat
  • ping
  • rlogin
  • ssh
  • sftp
  • telnet
  • traceroute
  • wget
Système de fichiers
  • cd
  • chgrp
  • chmod
  • chown
  • cp
  • dd
  • df
  • dir
  • du
  • file
  • less
  • ln
  • ls
  • lsof
  • mkdir
  • more
  • mount
  • mv
  • pwd
  • rm
  • rmdir
  • split
  • touch
  • tree
  • umask
  • umount
Divers
  • bc
  • dc
  • cal
  • date
  • fc
  • lp
  • lpr
  • md5sum
  • icône décorative Portail de l’informatique
Ce document provient de « https://fr.teknopedia.teknokrat.ac.id/w/index.php?title=Bc_(Unix)&oldid=223516470 ».
Catégories :
  • Commande Unix
  • Logiciel du projet GNU
Catégories cachées :
  • Page utilisant P571
  • Page utilisant P31
  • Article utilisant une Infobox
  • Article contenant un appel à traduction en anglais
  • Portail:Informatique/Articles liés
  • Portail:Technologies/Articles liés

  • indonesia
  • Polski
  • الرية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصر
  • Nederlands
  • 本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українска
  • Tiếng Việt
  • Winaray
  • 中文
  • Русски
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id