Sponsored Content
Full Discussion: Math Square Root
Top Forums Shell Programming and Scripting Math Square Root Post 97379 by Perderabo on Sunday 29th of January 2006 09:03:49 PM
Old 01-29-2006
Please read our rules. Note:
(6) Do not post classroom or homework problems.

"he told me to search google for bash math functions, but that came up empty."
"Results 1 - 10 of about 442,000 for bash math functions. (0.21 seconds)"
And I found many results that were quite on target. But be that as it may, I will close this thread since it violates the rules.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

2. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

3. UNIX for Dummies Questions & Answers

Area of a square

I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run. #!/bin/bash #script to find area of a square based on user input if then echo " Usage -$0 x " echo " where x is the dimension of the square " exit 1 n1=$1 ... (2 Replies)
Discussion started by: SnydeMz
2 Replies

4. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

5. Shell Programming and Scripting

AWK script for standard deviation / root mean square deviation

I have a file with say 50 columns, each containing a whole lot of data. Each column contains data from a separate simulation, but each simulation is related to the data in the last (REFERENCE) column $50 I need to calculate the RMS deviation for each data line, i.e. column 1 relative to... (12 Replies)
Discussion started by: chrisjorg
12 Replies

6. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

7. Shell Programming and Scripting

Mean square root error from different files

For example, I have files called A.txt and B.txt. A.txt #x yj 1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100B.txt #x ^yj 1 1 2 8 3 27 4 64 5 125 6 216 (2 Replies)
Discussion started by: Tzeronone
2 Replies

8. Shell Programming and Scripting

Square matrix to columns

Hello all, I am quite new in this but I need some help to keep going with my analysis. I am struggling with a short script to read a square matrix and convert it in two collumns. A B C D A 0.00 0.06 0.51 0.03 B 0.06 0.00 0.72 0.48 C 0.51 0.72 0.00 ... (7 Replies)
Discussion started by: EvaAM
7 Replies

9. Shell Programming and Scripting

Calculate root mean square?

Dear friend, I know for a single case, this could be finished quickly with Excel. But if we have hundreds of files, we definitely want to do it with a script or a FORTRAN code. Since I have no knowledge of FORTRAN, I tried to work out a script to do it. The math is very simple. we chose one atom... (4 Replies)
Discussion started by: liuzhencc
4 Replies

10. What is on Your Mind?

The square root code I coded on this site...

Hi all, (mainly Neo)... I keep noticing that the SQRT code I wrote recently for a POSIX shell keeps appearing, (the green colour sticks out like a sore thumb). So I decided to take a look on Google. Guess what? UNIX.COM comes first in Google's listing just from two words, see image... (2 Replies)
Discussion started by: wisecracker
2 Replies
PTHREAD_JOIN(3) 					     Linux Programmer's Manual						   PTHREAD_JOIN(3)

NAME
pthread_join - join with a terminated thread SYNOPSIS
#include <pthread.h> int pthread_join(pthread_t thread, void **retval); Compile and link with -pthread. DESCRIPTION
The pthread_join() function waits for the thread specified by thread to terminate. If that thread has already terminated, then pthread_join() returns immediately. The thread specified by thread must be joinable. If retval is not NULL, then pthread_join() copies the exit status of the target thread (i.e., the value that the target thread supplied to pthread_exit(3)) into the location pointed to by *retval. If the target thread was canceled, then PTHREAD_CANCELED is placed in *retval. If multiple threads simultaneously try to join with the same thread, the results are undefined. If the thread calling pthread_join() is canceled, then the target thread will remain joinable (i.e., it will not be detached). RETURN VALUE
On success, pthread_join() returns 0; on error, it returns an error number. ERRORS
EDEADLK A deadlock was detected (e.g., two threads tried to join with each other); or thread specifies the calling thread. EINVAL thread is not a joinable thread. EINVAL Another thread is already waiting to join with this thread. ESRCH No thread with the ID thread could be found. CONFORMING TO
POSIX.1-2001. NOTES
After a successful call to pthread_join(), the caller is guaranteed that the target thread has terminated. Joining with a thread that has previously been joined results in undefined behavior. Failure to join with a thread that is joinable (i.e., one that is not detached), produces a "zombie thread". Avoid doing this, since each zombie thread consumes some system resources, and when enough zombie threads have accumulated, it will no longer be possible to create new threads (or processes). There is no pthreads analog of waitpid(-1, &status, 0), that is, "join with any terminated thread". If you believe you need this function- ality, you probably need to rethink your application design. All of the threads in a process are peers: any thread can join with any other thread in the process. EXAMPLE
See pthread_create(3). SEE ALSO
pthread_cancel(3), pthread_create(3), pthread_detach(3), pthread_exit(3), pthread_tryjoin_np(3), pthreads(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-11-27 PTHREAD_JOIN(3)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy