Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

math(3) [opendarwin man page]

MATH(3) 						   BSD Library Functions Manual 						   MATH(3)

NAME
math -- introduction to mathematical library functions DESCRIPTION
This page is currently being updated. BSD
November 14, 2002 BSD
Man Page

13 More Discussions You Might Find Interesting

1. Programming

basic math program 4 child

Iam writing a script for my sisters friends little brother i want the program to say hello lets say his name is Joe and ask him how he is and he can write a reply back saying fine and then it replys "Iam happy you are (his response) today and then it goes into a basic math where he can put in a... (9 Replies)
Discussion started by: perleo
9 Replies

2. Shell Programming and Scripting

a math related question

hello: First I know the rules on Homework related questions, I wrote my script, but I cannot seem to figure out how to do one math problem. How do I take a zip code and seperate the idvidual digits? I used the modulus expression and divided the number by 10 ^ n but that only worked... (9 Replies)
Discussion started by: jahjah
9 Replies

3. UNIX for Dummies Questions & Answers

math in unix

I have 2 variables a=2 b=1 i want to add a and b how do i do this in unix using just the echo command and by assigning it to a different variable like c? (13 Replies)
Discussion started by: khestoi
13 Replies

4. Shell Programming and Scripting

script to add numbers is slow

Hi, I am running a BASH shell with the following script. The script works and gives me correct output but is very slow with large files. The more rows and columns (width and height) the slower as you can probably see. How can I do what I want more efficiently? Any ideas welcome. It has been... (10 Replies)
Discussion started by: macsurveyr
10 Replies

5. Shell Programming and Scripting

Script math calculation

Hi Gurus, I'm currently using HP-UX B.11.23. I've a simple calculation script which performs the task below. -> echo "240021344 / 1024 /1024" | bc Output: 228 240021344 is KB value. When I tried to perform the same calculate in Ms Excel, it produces a different result: 228.9021912.... (12 Replies)
Discussion started by: superHonda123
12 Replies

6. Shell Programming and Scripting

Can BASH handle mathematical operations and do a Search & Replace?

Hello, I have a bunch of xml file that needs to have edits made and I was wondering if a BASH script could handle it. I would like the script to look within my xml files and replace all integers greater than 5px with a value that is 25% smaller. For example, 100px = 75px. Since the integers... (12 Replies)
Discussion started by: jl487
12 Replies

7. Shell Programming and Scripting

Doing simple math for children.

Hello! I saw that there were a few differente ways to do math within bash scripts. expr and bc are possibilities. But which one to use when? I want to make an simple bash script for children to do math. The script must ask only questions like 1*1= till 10*10= ... No + or - or /... (10 Replies)
Discussion started by: ugurgazi
10 Replies

8. Shell Programming and Scripting

awk math and csv output

Hi I have this list 592;1;Z:\WB\DOCS;/FS3_100G/FILER112/BU/MPS/DOCS;;;;\\FILER112\BUMPS-DOCS\;580,116,544,878 Bytes;656,561 ;77,560 592;2;Z:\WB\FOCUS;/FS3_100G/FILER112/BU/MPS/FOCUS;;;;\\FILER112\BUMPS-FOCUS\;172,430 Bytes;6 ;0 ... (12 Replies)
Discussion started by: nakaedu
12 Replies

9. Shell Programming and Scripting

Bit of a math question

I have a number, say 174. I need to write bash code that will find the first larger number that ends in 99. That would be 199 in this case. If the number were 1263, I would be looking for 1299, for 175438, I would want 175499, etc. If the numbers were always three digit, I could just grab the... (11 Replies)
Discussion started by: LMHmedchem
11 Replies

10. Shell Programming and Scripting

Mathematical calculations using shell

Dear All, I read some variables in a file and assigned as name for each of them. If I do echo I am able to see the values as 1.0E-05,3.4,5.0E-03 etc, Now I want to do some mathematical operations with them. Lets say 1 1.0E-05*5.0E-03 expected ans is 5.0E-08 2 1.0E-05/5.0E-03 expected... (9 Replies)
Discussion started by: linuxUser_
9 Replies

11. Shell Programming and Scripting

[awk] Math & Bold-Font?

Heya There is a script which has presets stored in a tab-seperated file. That script also has $help_text, which will be shown when called with invalid arguments or -h. So i do need to have that file ready, so the help text can get the values out of the file, and print it with the $help_text.... (17 Replies)
Discussion started by: sea
17 Replies

12. UNIX for Dummies Questions & Answers

Math

i have file (my_file.txt) that looks like this: 000000000000010000 000000000000010000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 000000000000005000 all said and one, it should look... (11 Replies)
Discussion started by: lawsongeek
11 Replies

13. What is on Your Mind?

Forum Trivial Pursuit - New Computer Science and Mathematics Trivia for UNIX.com

I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box. In the future, I plan to Expand this feature to add more trivia categories from math, science and technology. Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies