Linux Common Commands--BC

Source: Internet
Author: User
Tags natural logarithm

bc 任意精度的计算器语言

Syntax format: BC "option" BC [options]
Note: There must be at least one space between each element in the BC command and subsequent options

Option Description:

parameter Options Explanatory notes
-L Define a standard math library, such as: tangent function
-C Only by compiling. The output of the BC command is sent to the standard output
-I. Forced interaction Mode

Case one:
BC operator

Addition: +
Subtraction:-
Multiplication: *
Division:/
Index: ^
Remainder:%

Case TWO:
Keep Decimals and exit

Case THREE:
Text line calculation pi reserved 100 decimal places

Additional: function-related content

MATH LIBRARY
The math library defines the following functions:

   s (x)  The sine of x, x is in radians.   c (x)  The cosine of x, x is in radians.   a (x)  The arctangent of x, arctangent returns radians.   l (x)  The natural logarithm of x.   e (x)  The exponential function of raising e to the value x.   j (n,x)The Bessel function of integer order n of x.

Case FOUR:
Computes a formula in a file and returns the result

Linux Common Commands--BC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.